/* WhatsApp Settings */

.wa-page .wa-body,
.wat-page .wa-body {
  padding: 16px 16px 32px;
}

.wa-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.wa-back {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #25b7a7;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  flex-shrink: 0;
}

.wa-back svg { width: 16px; height: 16px; }
.wa-back:hover { background: #1a9e8f; }

.wa-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
}

.wa-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .05);
  padding: 8px 18px 22px;
  min-height: 420px;
}

.wa-tabs {
  display: flex;
  gap: 22px;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 18px;
  overflow-x: auto;
}

.wa-tab {
  border: 0;
  background: transparent;
  padding: 12px 2px 10px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
}

.wa-tab:hover { color: #1a9e8f; }
.wa-tab.is-active {
  color: #25b7a7;
  border-bottom-color: #25b7a7;
}

.wa-pane[hidden] { display: none !important; }

.wa-pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.wa-pane-head--end { justify-content: flex-end; }

.wa-section-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #25b7a7;
}

.wa-link-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #25b7a7;
  text-decoration: none;
}

.wa-link-action svg { width: 18px; height: 18px; color: #22c55e; }
.wa-link-action:hover { text-decoration: underline; }

.wa-lead {
  margin: 0;
  font-size: 13px;
  color: #64748b;
  max-width: 640px;
}

.wa-create-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 16px;
  border-radius: 8px;
  background: #25b7a7;
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(37, 183, 167, .25);
}

.wa-create-btn span {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  color: #25b7a7;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
}

.wa-create-btn:hover { background: #1a9e8f; }

.wa-account-card {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px 18px;
  max-width: 560px;
}

.wa-account-card h3 {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
}

.wa-account-list {
  margin: 0;
  display: grid;
  gap: 10px;
}

.wa-account-list div {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 10px;
  font-size: 13px;
}

.wa-account-list dt {
  margin: 0;
  color: #64748b;
  font-weight: 600;
}

.wa-account-list dd { margin: 0; color: #1e293b; }

.wa-phone {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid #bae6fd;
  border-radius: 4px;
  background: #f0f9ff;
  color: #0369a1;
  font-weight: 600;
}

.wa-badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.wa-badge--ok {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

.wa-note {
  margin: 14px 0 0;
  font-size: 12px;
  color: #64748b;
}

.wa-note a { color: #25b7a7; }

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

.wa-btn {
  height: 34px;
  padding: 0 14px;
  border-radius: 6px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
}

.wa-btn--muted {
  background: #64748b;
  color: #fff;
}

.wa-btn--ghost {
  background: #fff;
  color: #94a3b8;
  border-color: #e5e7eb;
}

.wa-table-wrap {
  overflow: auto;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
}

.wa-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
  font-size: 13px;
}

.wa-table th {
  background: #f8fafc;
  color: #334155;
  font-weight: 700;
  text-align: left;
  padding: 11px 12px;
  border-bottom: 1px solid #e5e7eb;
  white-space: nowrap;
}

.wa-table td {
  padding: 11px 12px;
  border-bottom: 1px solid #eef2f7;
  color: #1e293b;
  vertical-align: middle;
}

.wa-table tbody tr:nth-child(even) { background: #fafbfc; }

.wa-link {
  border: 0;
  background: none;
  color: #25b7a7;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

.wa-link:hover { color: #1a9e8f; }

.wa-action-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  background: none;
  color: #25b7a7;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  padding: 0;
  margin-right: 10px;
}

.wa-action-link svg { width: 14px; height: 14px; }

.wa-status {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
}

.wa-status--draft {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.wa-status--approved {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

.wa-yesno {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}

.wa-yesno--yes {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

.wa-yesno--no {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.wa-type-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  background: #e0f2fe;
  color: #0369a1;
}

.wa-toggle {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
}

.wa-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.wa-toggle span {
  display: block;
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: #cfd6dc;
  position: relative;
  cursor: pointer;
  transition: background .2s;
}

.wa-toggle span::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .18);
  transition: transform .2s;
}

.wa-toggle input:checked + span { background: #25b7a7; }
.wa-toggle input:checked + span::after { transform: translateX(18px); }

.wa-toast-stack {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wa-toast {
  min-width: 220px;
  max-width: 320px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #0f172a;
  color: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .25);
  font-size: 13px;
}

.wa-toast strong {
  display: block;
  margin-bottom: 2px;
}

.wa-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

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

.wa-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .45);
}

.wa-modal__dialog {
  position: relative;
  width: min(480px, 100%);
  max-height: min(85vh, 560px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 24px 48px rgba(15, 23, 42, .22);
  overflow: hidden;
}

.wa-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
}

.wa-modal__head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
}

.wa-modal__close {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #64748b;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.wa-modal__close:hover {
  background: #f1f5f9;
  color: #1e293b;
}

.wa-modal__body {
  padding: 20px;
  overflow: auto;
  font-size: 14px;
  line-height: 1.7;
  color: #334155;
  white-space: pre-wrap;
}

@media (max-width: 700px) {
  .wa-pane-head { flex-direction: column; align-items: flex-start; }
  .wa-create-btn { width: 100%; justify-content: center; }
}
