:root {
  --ink: #172026;
  --muted: #66717a;
  --line: #dde4ea;
  --page: #f6f8fb;
  --panel: #ffffff;
  --teal: #0f766e;
  --teal-dark: #115e59;
  --amber: #b7791f;
  --green: #15803d;
  --red: #b91c1c;
  --indigo: #3730a3;
  --shadow: 0 12px 30px rgba(23, 32, 38, 0.08);
}

* { box-sizing: border-box; }
html, body { width: 100%; overflow-x: hidden; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}
a { color: inherit; }
.text-muted { color: var(--muted) !important; }
.small { font-size: .875rem; }
.w-100 { width: 100% !important; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: .5rem 1rem;
  border: 1px solid transparent;
  border-radius: 8px;
  font: inherit;
  font-weight: 700;
  min-height: 42px;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}
.btn-primary { background: var(--teal); border-color: var(--teal); }
.btn-primary:hover, .btn-primary:focus { background: var(--teal-dark); border-color: var(--teal-dark); }
.btn-outline-primary { color: var(--teal); border-color: var(--teal); }
.btn-outline-primary:hover { background: var(--teal); border-color: var(--teal); }
.btn-lg { min-height: 54px; padding: .7rem 1rem; font-size: 1rem; }
.badge { border-radius: 999px; padding: .45rem .65rem; }
.card, .modal-content { border-radius: 8px; border: 1px solid var(--line); box-shadow: none; }
.soft-card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.status-completed { color: var(--green); background: #eaf7ee; }
.status-pending { color: var(--amber); background: #fff7e6; }
.status-inactive { color: var(--red); background: #fff0f0; }
.form-label {
  display: block;
  margin-bottom: 7px;
  font-weight: 800;
}
.form-control, .form-select {
  display: block;
  width: 100%;
  padding: .55rem .75rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid #cbd5dd;
  border-radius: 8px;
  min-height: 42px;
  font: inherit;
  line-height: 1.35;
}
.form-control:focus, .form-select:focus { border-color: var(--teal); box-shadow: 0 0 0 .2rem rgba(15, 118, 110, .12); }
.alert {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 14px;
}
.alert-danger { color: var(--red); background: #fff0f0; border-color: #fecaca; }
.alert-secondary { color: #475569; background: #f8fafc; }
.alert-success { color: var(--green); background: #eaf7ee; border-color: #bde8ca; }
.alert-warning { color: var(--amber); background: #fff7e6; border-color: #f1d08a; }

.form-stack {
  display: grid;
  gap: 0;
  margin-bottom: 14px;
}
.admin-login-main {
  width: 100%;
  min-height: 100vh;
  display: grid;
  align-items: start;
  justify-items: center;
  padding: 42px 16px;
}
.admin-login-card {
  width: min(420px, 100%);
}
.admin-login-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.admin-login-title {
  font-weight: 850;
  line-height: 1.2;
}
.admin-login-form {
  display: grid;
  gap: 2px;
}
.admin-login-button {
  margin-top: 8px;
}

.customer-shell {
  max-width: 430px;
  min-height: 100svh;
  margin: 0 auto;
  background: #fbfcfd;
  position: relative;
  padding: 18px 16px 88px;
}
.app-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0 16px;
}
.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  display: inline-grid;
  place-items: center;
  font-weight: 900;
}
.mobile-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  box-shadow: var(--shadow);
}
.hero-title { font-size: 1.75rem; line-height: 1.15; margin: 10px 0 8px; font-weight: 850; }
.mini-label { font-size: .76rem; color: var(--muted); text-transform: uppercase; font-weight: 800; }
.profile-row { display: grid; grid-template-columns: 112px 1fr; gap: 8px; padding: 9px 0; border-bottom: 1px solid #edf1f4; }
.profile-row:last-child { border-bottom: 0; }
.progress-thin { height: 8px; border-radius: 999px; overflow: hidden; background: #e8eef1; }
.progress-thin > span { display: block; height: 100%; background: var(--teal); }
.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  width: min(398px, calc(100% - 24px));
  height: 58px;
  background: rgba(255,255,255,.96);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(0,0,0,.12);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  z-index: 10;
}
.bottom-nav a {
  display: grid;
  place-items: center;
  text-decoration: none;
  font-size: .78rem;
  font-weight: 800;
  color: var(--muted);
}
.bottom-nav a.active { color: var(--teal); background: #eef9f7; }
.capture-frame {
  width: 100%;
  aspect-ratio: 4 / 5;
  background: #101820;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  display: grid;
  place-items: center;
}
.capture-frame.card-ratio { aspect-ratio: 1011 / 638; }
.capture-frame video, .capture-frame canvas, .capture-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}
.capture-frame.card-ratio video {
  object-fit: cover !important;
  background: #101820;
}
.capture-frame.card-ratio img {
  object-fit: contain !important;
  background: #101820;
}
.capture-guide {
  position: absolute;
  inset: 10%;
  border: 2px solid rgba(255,255,255,.85);
  border-radius: 8px;
  pointer-events: none;
}
.capture-frame.card-ratio .capture-guide {
  inset: 8% 6%;
  border-color: #ffd166;
  box-shadow: 0 0 0 999px rgba(0,0,0,.18);
}
.capture-frame.is-preview .capture-guide {
  display: none;
}
.step-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-weight: 900;
  color: #fff;
  background: var(--teal);
  font-size: .82rem;
}
.signature-pad {
  width: 100%;
  height: 190px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  touch-action: none;
}
.thumb {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  object-fit: contain;
}
.demo-login-box {
  border-top: 1px dashed var(--line);
  padding-top: 14px;
}
.easy-kyc .mobile-card { scroll-margin-top: 14px; }
.easy-progress { position: sticky; top: 0; z-index: 8; }
.easy-tip {
  background: #eef9f7;
  color: var(--teal-dark);
  border: 1px solid #c8ece6;
  border-radius: 8px;
  padding: 10px 12px;
  font-weight: 800;
  line-height: 1.35;
}
.kyc-step {
  transition: opacity .2s ease, transform .2s ease, border-color .2s ease;
}
.kyc-step.is-active {
  border-color: var(--teal);
  box-shadow: 0 14px 34px rgba(15, 118, 110, .14);
}
.kyc-step.is-locked {
  opacity: .58;
}
.kyc-step.is-done {
  border-color: #a7e3b8;
  background: #fbfffc;
}
.easy-step-head {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  margin-bottom: 10px;
}
.easy-step-title {
  font-size: 1.1rem;
  font-weight: 900;
  line-height: 1.2;
}
.easy-step-help {
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.35;
  margin-top: 2px;
}
.easy-step-state {
  border-radius: 999px;
  background: #eef2f5;
  color: var(--muted);
  padding: 5px 9px;
  font-size: .75rem;
  font-weight: 900;
  white-space: nowrap;
}
.kyc-step.is-active .easy-step-state {
  background: #fff7e6;
  color: var(--amber);
}
.kyc-step.is-done .easy-step-state {
  background: #eaf7ee;
  color: var(--green);
}
.easy-instruction {
  background: #fff7e6;
  color: #7a4d0b;
  border: 1px solid #f1d08a;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
  font-weight: 800;
  line-height: 1.35;
}
.camera-empty {
  color: #dbe5ea;
  font-weight: 900;
  text-align: center;
  padding: 16px;
}
.easy-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.easy-actions.two {
  grid-template-columns: 1fr 1fr;
}
.easy-actions .btn {
  min-height: 54px;
  font-size: 1rem;
}
.easy-signature-pad {
  height: 230px;
  border-width: 2px;
}
.kyc-finish-card {
  border-color: #a7e3b8;
  background: #fbfffc;
}
.step-support {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}
.step-support a {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  text-decoration: none;
  font-weight: 800;
  background: #fff;
}
.receipt-check {
  width: 64px;
  height: 64px;
  margin: 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--green);
  font-size: 2rem;
  font-weight: 900;
}
.receipt-ref {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px;
  font-weight: 900;
}

.admin-layout { min-height: 100vh; display: grid; grid-template-columns: 248px 1fr; }
.admin-mobilebar { display: none; }
.admin-sidebar { background: #172026; color: #dce6ec; padding: 22px 16px; }
.admin-sidebar .brand-mark { background: #f8fafc; color: #172026; }
.admin-sidebar a {
  display: block;
  color: #dce6ec;
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 8px;
  margin: 4px 0;
  font-weight: 700;
}
.admin-sidebar a.active, .admin-sidebar a:hover { background: #22313a; color: #fff; }
.sidebar-cache-form { margin: 4px 0; }
.sidebar-cache-form button {
  width: 100%;
  text-align: left;
  color: #dce6ec;
  background: transparent;
  border: 0;
  padding: 10px 12px;
  border-radius: 8px;
  font-weight: 700;
}
.sidebar-cache-form button:hover {
  background: #22313a;
  color: #fff;
}
.admin-menu-toggle {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}
.admin-menu-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  display: block;
}
.admin-main { padding: 22px; min-width: 0; }
.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.admin-overview {
  background: #172026;
  color: #fff;
  border-radius: 8px;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  box-shadow: var(--shadow);
}
.admin-overview .text-muted,
.admin-overview .mini-label { color: #c6d2da !important; }
.admin-overview-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat-card { padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: 8px; position: relative; overflow: hidden; }
.stat-card { color: inherit; text-decoration: none; }
.stat-card.active { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(15, 118, 110, .12); }
.stat-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--teal); }
.stat-card.accent-green::before { background: var(--green); }
.stat-card.accent-amber::before { background: var(--amber); }
.stat-card.accent-indigo::before { background: var(--indigo); }
.stat-card.accent-red::before { background: var(--red); }
.stat-card strong { font-size: 1.72rem; display: block; line-height: 1.1; margin: 8px 0 4px; }
.stat-card small { color: var(--muted); font-weight: 700; }
.stat-label { color: var(--muted); font-size: .78rem; text-transform: uppercase; font-weight: 900; }
.admin-content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.admin-side-stack { display: grid; gap: 16px; }
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.activity-row {
  display: block;
  text-decoration: none;
  border-top: 1px solid #edf1f4;
  padding: 10px 0;
}
.activity-row:first-of-type { border-top: 0; padding-top: 0; }
.activity-row strong,
.admin-table td strong { display: block; font-weight: 850; color: var(--ink); }
.activity-row span,
.admin-table td > span:not(.badge) { display: block; color: var(--muted); font-size: .86rem; }
.table-wrap {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}
.table { margin-bottom: 0; white-space: nowrap; }
.table th { color: var(--muted); font-size: .8rem; text-transform: uppercase; }
.admin-table th,
.admin-table td { padding: 13px 14px; }
.admin-table tbody tr:hover { background: #fbfdff; }
.customer-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
.customer-summary-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  text-decoration: none;
  box-shadow: var(--shadow);
}
.customer-summary-item.active,
.customer-summary-item:hover { border-color: var(--teal); }
.customer-summary-item span { color: var(--muted); display: block; font-weight: 800; font-size: .78rem; text-transform: uppercase; }
.customer-summary-item strong { display: block; font-size: 1.4rem; margin-top: 4px; }
.latest-kyc-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.latest-kyc-item {
  display: block;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--ink);
  padding: 11px 12px;
  text-decoration: none;
}
.latest-kyc-item:hover {
  border-color: var(--teal);
  background: #eef9f7;
}
.latest-kyc-item strong,
.latest-kyc-item span,
.latest-kyc-item small {
  display: block;
  overflow-wrap: anywhere;
}
.latest-kyc-item span,
.latest-kyc-item small {
  color: var(--muted);
  margin-top: 3px;
}
.customer-filter-bar {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 180px auto auto;
  align-items: end;
  gap: 10px;
}
.address-clamp {
  max-width: 280px;
  white-space: normal;
  overflow: hidden;
  display: -webkit-box !important;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.3;
}
.row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 270px;
}
.row-actions form { margin: 0; }
.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.wa-compose-grid {
  display: grid;
  grid-template-columns: minmax(360px, .95fr) minmax(420px, 1.05fr);
  gap: 16px;
  align-items: start;
}
.wa-admin-flow {
  display: grid;
  gap: 16px;
}
.wa-filter-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.wa-filter-tab {
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  display: grid;
  gap: 4px;
  padding: 14px;
  text-decoration: none;
}
.wa-filter-tab:hover,
.wa-filter-tab.is-active {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, .12);
}
.wa-filter-tab span {
  color: var(--muted);
  font-weight: 850;
}
.wa-filter-tab strong {
  font-size: 2rem;
  line-height: 1;
}
.wa-filter-tab small {
  color: var(--muted);
}
.wa-setup-line {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.wa-setup-line span {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 9px 10px;
  color: var(--muted);
  font-weight: 800;
}
.wa-setup-line strong {
  color: var(--ink);
}
.wa-send-grid {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(360px, .9fr);
  gap: 18px;
  align-items: start;
}
.wa-template-media {
  border: 1px solid #bfe4dc;
  border-radius: 8px;
  background: #eef9f7;
  padding: 12px;
  margin-top: 12px;
}
.wa-template-select {
  min-height: 52px;
  border: 2px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
  margin-top: 10px;
}
.wa-template-search {
  border: 2px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
}
.wa-template-search:focus,
.wa-template-select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, .14);
}
.wa-legacy-compose-hidden {
  display: none !important;
}
.wa-simple-flow {
  grid-template-columns: minmax(340px, .9fr) minmax(440px, 1.1fr);
}
.wa-step-card {
  border-top: 4px solid var(--teal);
}
.wa-template-sync-card .wa-template-list {
  display: none;
}
.wa-template-sync-card h2:not(.wa-clean-template-count) {
  display: none;
}
.wa-selected {
  border-radius: 999px;
  background: #eef9f7;
  color: var(--teal-dark);
  padding: 7px 12px;
  font-weight: 850;
}
.wa-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}
.wa-choice {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  cursor: pointer;
}
.wa-choice strong,
.wa-choice small {
  display: block;
}
.wa-choice small {
  color: var(--muted);
  margin-top: 2px;
}
.wa-choice:has(input:checked) {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, .12);
}
.wa-recipient-tools,
.wa-type-grid {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 12px;
}
.wa-recipient-tools label,
.wa-type-grid label {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px 10px;
  font-weight: 800;
}
.wa-customer-list {
  max-height: 620px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.wa-customer-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  margin-top: 12px;
  overflow: hidden;
}
.wa-customer-panel summary {
  cursor: pointer;
  font-weight: 850;
  padding: 12px;
}
.wa-customer-panel .wa-recipient-tools {
  padding: 0 12px 12px;
}
.wa-customer-panel .wa-customer-list {
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  border-radius: 0;
  max-height: 420px;
}
.wa-customer-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid #edf1f4;
}
.wa-customer-row:last-child { border-bottom: 0; }
.wa-customer-row strong,
.wa-customer-row small { display: block; }
.wa-customer-row small { color: var(--muted); }
.wa-customer-row em {
  font-style: normal;
  color: var(--teal-dark);
  font-weight: 850;
  font-size: .8rem;
}
.wa-message-box {
  min-height: 150px;
  resize: vertical;
}
.wa-template-choice-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.wa-template-choice {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 12px;
  text-align: left;
  cursor: pointer;
  min-height: 84px;
}
.wa-template-choice strong,
.wa-template-choice span {
  display: block;
}
.wa-template-choice span {
  color: var(--muted);
  font-size: .86rem;
  margin-top: 4px;
}
.wa-template-choice:hover,
.wa-template-choice.is-active {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, .12);
}
.wa-selected-template {
  border: 1px solid #bfe4dc;
  border-radius: 8px;
  background: #eef9f7;
  color: var(--teal-dark);
  padding: 10px 12px;
  font-weight: 850;
  margin-top: 12px;
}
.wa-advanced {
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  margin-top: 12px;
  padding: 10px 12px;
  background: #fff;
}
.wa-advanced summary {
  cursor: pointer;
  font-weight: 850;
  color: var(--muted);
}
.wa-vars {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 8px;
  color: var(--muted);
  font-weight: 750;
}
.wa-vars button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--teal);
  padding: 4px 9px;
  font-weight: 850;
}
.wa-inline-check {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
  font-weight: 800;
}
.wa-preview {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
}
.wa-preview img {
  max-width: 220px;
  max-height: 160px;
  object-fit: contain;
  display: block;
  border-radius: 8px;
  border: 1px solid var(--line);
  margin: 8px 0;
  background: #fff;
}
.wa-preview pre,
.wa-message-cell {
  white-space: pre-wrap;
  word-break: break-word;
}
.wa-preview pre {
  margin: 8px 0 0;
  font: inherit;
}
.wa-progress-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.wa-progress-grid span {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  color: var(--muted);
  font-weight: 800;
}
.wa-progress-grid strong {
  color: var(--ink);
  display: block;
  font-size: 1.35rem;
}
.wa-template-status {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.wa-template-status span {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px;
  color: var(--muted);
  font-weight: 800;
}
.wa-template-status strong {
  color: var(--ink);
  display: block;
  margin-top: 2px;
}
.wa-template-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.wa-template-pill {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
  text-align: left;
  color: var(--ink);
}
.wa-template-pill:hover {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, .1);
}
.wa-template-pill strong,
.wa-template-pill span {
  display: block;
}
.wa-template-pill span {
  color: var(--muted);
  font-size: .86rem;
  margin-top: 3px;
}
.log-viewer {
  max-height: 70vh;
  overflow: auto;
  background: #101820;
  color: #dbe5ea;
  border-radius: 8px;
  padding: 14px;
  font-size: .82rem;
  white-space: pre-wrap;
  word-break: break-word;
}
.a4-sheet {
  width: 210mm;
  min-height: 297mm;
  margin: 0 auto;
  padding: 12mm;
  background: #fff;
  border: 1px solid var(--line);
  color: #111827;
}
.kyc-document { font-size: 13px; }
.kyc-doc-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 9px;
  margin-bottom: 12px;
}
.kyc-info-block { margin-bottom: 14px; }
.kyc-info-table {
  width: 100%;
  table-layout: fixed;
  white-space: normal;
}
.kyc-info-table th {
  width: 32%;
  color: #506170;
  background: #f8fafc;
}
.kyc-info-table th,
.kyc-info-table td {
  vertical-align: top;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.28;
}
.kyc-address {
  display: block;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
}
.kyc-image-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.kyc-image-cell { min-width: 0; }
.kyc-section-title {
  font-weight: 800;
  margin-bottom: 6px;
}
.kyc-consent-line {
  border-top: 1px solid #111827;
  border-bottom: 1px solid #111827;
  padding: 7px 0;
  margin: 8px 0 14px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}
.kyc-sign-photo-row {
  display: grid;
  grid-template-columns: 1fr 1.2in;
  align-items: end;
  gap: 20px;
  margin-top: 10px;
}
.kyc-sign-block,
.kyc-photo-block { min-width: 0; }
.kyc-photo { width: 1.2in; height: 1.5in; object-fit: cover; border: 1px solid #111827; display: block; }
.kyc-aadhaar { width: 3.37in; height: 2.125in; object-fit: contain; border: 1px solid #111827; display: block; }
.kyc-signature { width: 3.4in; height: .86in; object-fit: contain; border: 1px solid #111827; display: block; background: #fff; }
.kyc-placeholder {
  display: grid;
  place-items: center;
  color: #7b8791;
  background: #f8fafc;
  font-weight: 800;
}
.kyc-declaration {
  margin-top: 18px;
  line-height: 1.45;
}

@media screen and (max-width: 900px) {
  body.admin-menu-open { overflow: hidden; }
  .admin-layout {
    display: block;
    min-height: 100svh;
    padding-top: 70px;
  }
  .admin-mobilebar {
    position: fixed;
    inset: 0 0 auto 0;
    height: 70px;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid var(--line);
    padding: 12px 14px;
    backdrop-filter: blur(10px);
  }
  .admin-sidebar {
    position: fixed;
    inset: 70px 0 auto 0;
    z-index: 25;
    max-height: calc(100svh - 70px);
    overflow: auto;
    padding: 14px;
    border-bottom: 1px solid #31414b;
    box-shadow: 0 18px 40px rgba(0,0,0,.22);
    transform: translateY(-110%);
    transition: transform .22s ease;
  }
  body.admin-menu-open .admin-sidebar {
    transform: translateY(0);
  }
  .admin-sidebar > .d-flex {
    display: none !important;
  }
  .admin-sidebar a,
  .sidebar-cache-form button {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  .admin-main {
    padding: 14px;
  }
  .admin-topbar {
    align-items: flex-start;
    margin-bottom: 14px;
  }
  .admin-topbar .text-end {
    text-align: left !important;
  }
  .admin-overview {
    display: grid;
    align-items: start;
    padding: 16px;
  }
  .admin-overview-actions {
    justify-content: flex-start;
  }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-content-grid { grid-template-columns: 1fr; }
  .customer-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .latest-kyc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .customer-filter-bar { grid-template-columns: 1fr; }
  .tool-grid { grid-template-columns: 1fr; }
  .wa-compose-grid { grid-template-columns: 1fr; }
  .wa-filter-tabs,
  .wa-setup-line,
  .wa-send-grid { grid-template-columns: 1fr; }
  .wa-choice-grid,
  .wa-template-choice-list { grid-template-columns: 1fr; }
  .wa-progress-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wa-template-status,
  .wa-template-list { grid-template-columns: 1fr; }
  .section-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .row-actions {
    min-width: 0;
  }
  .row-actions .btn {
    flex: 1 1 auto;
  }
  .wa-customer-row {
    grid-template-columns: 24px minmax(0, 1fr);
  }
  .wa-customer-row em {
    grid-column: 2;
  }
  .a4-sheet {
    width: 100%;
    min-height: auto;
    padding: 14px;
  }
  .kyc-image-row,
  .kyc-sign-photo-row {
    grid-template-columns: 1fr;
  }
  .kyc-photo,
  .kyc-aadhaar,
  .kyc-signature {
    max-width: 100%;
  }
}

@media screen and (max-width: 560px) {
  .admin-main { padding: 12px; }
  .admin-topbar {
    display: grid;
    gap: 8px;
  }
  .admin-topbar h1 {
    font-size: 1.35rem;
    line-height: 1.2;
  }
  .soft-card,
  .mobile-card,
  .customer-filter-bar {
    padding: 12px !important;
  }
  .btn {
    width: 100%;
  }
  .section-head .btn,
  .admin-overview-actions .btn {
    width: auto;
  }
  .stat-grid,
  .customer-summary-grid,
  .latest-kyc-grid,
  .wa-progress-grid {
    grid-template-columns: 1fr;
  }
  .customer-summary-item,
  .stat-card {
    padding: 12px;
  }
  .table-wrap {
    margin-left: -2px;
    margin-right: -2px;
  }
  .customer-table {
    white-space: normal;
  }
  .customer-table thead {
    display: none;
  }
  .customer-table,
  .customer-table tbody,
  .customer-table tr,
  .customer-table td {
    display: block;
    width: 100%;
  }
  .customer-table tbody {
    display: grid;
    gap: 12px;
  }
  .customer-table tr {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
  }
  .customer-table td {
    border: 0;
    border-bottom: 1px solid #edf1f4;
    padding: 10px 12px;
    white-space: normal;
  }
  .customer-table td:last-child {
    border-bottom: 0;
  }
  .customer-table td::before {
    content: attr(data-label);
    display: block;
    color: var(--muted);
    font-size: .72rem;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 4px;
  }
  .customer-table td[data-label="Customer"] {
    background: #f8fafc;
  }
  .customer-table td[data-label="Actions"]::before {
    margin-bottom: 8px;
  }
  .customer-table .address-clamp {
    max-width: none;
    -webkit-line-clamp: 3;
  }
  .customer-table .row-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
  }
  .customer-table .row-actions .btn,
  .customer-table .row-actions form {
    width: 100%;
  }
  .admin-table th,
  .admin-table td {
    padding: 11px 12px;
  }
  .wa-filter-tab strong {
    font-size: 1.5rem;
  }
  .wa-setup-line span,
  .wa-progress-grid span,
  .wa-template-status span {
    padding: 9px;
  }
  .a4-sheet {
    border-left: 0;
    border-right: 0;
    padding: 12px;
  }
}

@page { size: A4 portrait; margin: 0; }
@media print {
  body { background: #fff; }
  .admin-sidebar, .admin-topbar, .no-print, .bottom-nav { display: none !important; }
  .admin-layout { display: block; }
  .admin-main { padding: 0; }
  .a4-sheet {
    width: 210mm;
    height: 297mm;
    min-height: 297mm;
    border: 0;
    margin: 0;
    box-shadow: none;
    page-break-after: avoid;
    overflow: hidden;
  }
}
