:root {
  color-scheme: light;
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --border-color: #e2e8f0;
  --border-glow: rgba(16, 185, 129, 0.35);
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;

  --accent-emerald: #059669;
  --accent-emerald-glow: rgba(16, 185, 129, 0.16);
  --accent-cyan: #0284c7;
  --accent-indigo: #4f46e5;
  --accent-rose: #e11d48;
  --accent-amber: #d97706;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  min-height: 100vh;
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Ambient glow accents */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
}
.glow-1 {
  width: 500px;
  height: 500px;
  top: -120px;
  left: 10%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.08) 0%, transparent 70%);
}
.glow-2 {
  width: 450px;
  height: 450px;
  top: 300px;
  right: 5%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.06) 0%, transparent 70%);
}

.app-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
  position: relative;
  z-index: 1;
}

/* Header */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.14), rgba(6, 182, 212, 0.12));
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-emerald);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.12);
}

.brand-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #0f172a 30%, #475569 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.connection-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.9rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
  border: 1px solid var(--border-color);
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  transition: var(--transition);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.status-connected {
  border-color: rgba(16, 185, 129, 0.35);
  background: #ecfdf5;
  color: #047857;
}
.status-connected .status-dot {
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
  animation: pulse-dot 2s infinite;
}

.status-pairing {
  border-color: rgba(245, 158, 11, 0.35);
  background: #fffbeb;
  color: #b45309;
}
.status-pairing .status-dot {
  background: #f59e0b;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
}

.status-disconnected {
  border-color: rgba(244, 63, 94, 0.35);
  background: #fff1f2;
  color: #be123c;
}
.status-disconnected .status-dot {
  background: #f43f5e;
}

@keyframes pulse-dot {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: #cbd5e1;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
}

.stat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.stat-footer {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

/* Navigation Tabs */
.nav-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.nav-tab {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
  white-space: nowrap;
}

.nav-tab:hover {
  color: var(--text-primary);
  background: #f1f5f9;
}

.nav-tab.active {
  color: var(--accent-emerald);
  background: #ecfdf5;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Content Area */
.tab-content {
  display: none;
}
.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Layout Cards & Grids */
.grid-2-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(460px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  position: relative;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.card-header h3 {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.card-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.badge-accent {
  background: #ecfdf5;
  border-color: rgba(16, 185, 129, 0.3);
  color: #047857;
}

.badge-high {
  background: #fff1f2;
  border-color: rgba(244, 63, 94, 0.3);
  color: #be123c;
}

.badge-normal {
  background: #f0f9ff;
  border-color: rgba(14, 165, 233, 0.3);
  color: #0369a1;
}

.badge-low {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #475569;
}

/* Detail Rows */
.account-details {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #f1f5f9;
}

.detail-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.detail-value {
  font-size: 0.875rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-secondary {
  background: #ffffff;
  border-color: #cbd5e1;
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: #f1f5f9;
}

.btn-danger {
  background: #fff1f2;
  border-color: rgba(244, 63, 94, 0.35);
  color: #be123c;
}

.btn-danger:hover {
  background: #ffe4e6;
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.8125rem;
}

/* Forms & Inputs */
.form-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-group label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.input-field {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  padding: 0.65rem 1rem;
  outline: none;
  transition: var(--transition);
  width: 100%;
}

.input-field:focus {
  border-color: var(--accent-emerald);
  box-shadow: 0 0 0 3px var(--accent-emerald-glow);
}

.select-field {
  cursor: pointer;
}

.textarea-field {
  resize: vertical;
}

.input-group {
  display: flex;
  gap: 0.75rem;
}

.input-with-button {
  display: flex;
  gap: 0.5rem;
}
.input-with-button input {
  flex: 1;
}

.tip-banner {
  display: flex;
  gap: 0.75rem;
  background: #ecfdf5;
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.8125rem;
}
.tip-icon {
  font-size: 1.25rem;
  line-height: 1;
}
.tip-text {
  color: var(--text-primary);
}
.tip-steps {
  margin-top: 0.35rem;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  color: var(--text-secondary);
}
.form-help {
  font-size: 0.75rem;
  margin-top: 0.25rem;
  display: block;
}

/* Pairing Mode Switch */
.pairing-mode-switch {
  display: flex;
  background: #f1f5f9;
  border-radius: var(--radius-sm);
  padding: 3px;
  border: 1px solid var(--border-color);
}

.mode-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: calc(var(--radius-sm) - 2px);
  cursor: pointer;
  transition: var(--transition);
}

.mode-btn.active {
  background: #ffffff;
  color: #059669;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

/* Pairing Code Display */
.pairing-box {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.box-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.pairing-code-display {
  background: #ecfdf5;
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: center;
  margin-top: 0.5rem;
}

.code-label {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 0.75rem;
}

.code-blocks {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #047857;
}

.code-expiry {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

/* QR Code Display */
.qr-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 250px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.qr-img {
  max-width: 220px;
  height: auto;
  border-radius: var(--radius-sm);
  background: #ffffff;
  padding: 8px;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.qr-placeholder {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Tables */
.table-container {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}

.data-table th {
  padding: 0.75rem 1rem;
  color: var(--text-muted);
  font-weight: 600;
  background: #f8fafc;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.data-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.data-table tr:hover td {
  background: #f8fafc;
}

/* Code Snippets */
.code-block {
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: #1e293b;
  overflow-x: auto;
  line-height: 1.5;
}

.code-block-sm {
  font-size: 0.75rem;
  padding: 0.75rem;
  max-height: 200px;
}

.test-result-box {
  margin-top: 1rem;
}
.test-result-box h4 {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

/* Alias List Cards */
.alias-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 480px;
  overflow-y: auto;
}

.alias-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  transition: var(--transition);
}

.alias-card:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.alias-meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.alias-key {
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--accent-cyan);
}

.alias-jid {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 520px;
  padding: 1.75rem;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
  animation: modalScale 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScale {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.key-reveal-box {
  display: flex;
  gap: 0.75rem;
  margin: 1.25rem 0;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
}

/* Helpers */
.mono { font-family: var(--font-mono); }
.fw-600 { font-weight: 600; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-emerald { color: #059669; }
.text-rose { color: #e11d48; }
.text-amber { color: #d97706; }
.text-cyan { color: #0284c7; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }

/* Template Library Styles */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.filter-pill {
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.35rem 0.9rem;
  border-radius: 9999px;
  font-size: 0.825rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.filter-pill:hover, .filter-pill.active {
  background: #ecfdf5;
  border-color: rgba(16, 185, 129, 0.4);
  color: #047857;
}

.template-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.template-card-modern {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.75rem;
  padding: 1.5rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  align-items: stretch;
}

.template-card-modern:hover {
  background: var(--bg-card-hover);
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 12px 28px -8px rgba(15, 23, 42, 0.1), 0 0 0 1px rgba(16, 185, 129, 0.12);
  transform: translateY(-2px);
}

.template-info-col {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.1rem;
}

.template-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.template-header-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.template-code-badge {
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  color: #4338ca;
  font-family: var(--font-mono);
  font-size: 0.775rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.cat-badge-ALERT {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: #be123c;
}

.cat-badge-NOTIFICATION {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  color: #0369a1;
}

.cat-badge-OPERATIONAL {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #b45309;
}

.cat-badge-GENERAL {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #475569;
}

.template-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.template-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.template-section-label {
  font-size: 0.725rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.45rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.var-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.var-chip {
  background: #ecfdf5;
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #047857;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-weight: 500;
}

.template-raw-toggle {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.template-raw-summary {
  padding: 0.45rem 0.75rem;
  font-size: 0.775rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.template-raw-summary:hover {
  color: var(--text-primary);
  background: #f1f5f9;
}

.template-raw-pre {
  margin: 0;
  padding: 0.75rem;
  background: #f1f5f9;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #334155;
  border-top: 1px solid var(--border-color);
  white-space: pre-wrap;
  word-break: break-word;
}

.template-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-color);
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* WhatsApp Side Preview Column ("di samping setiap template") */
.template-preview-col {
  background: #efeae2;
  border: 1px solid #d5cfc7;
  border-radius: var(--radius-md);
  padding: 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-image: radial-gradient(circle at center, rgba(15, 23, 42, 0.045) 1px, transparent 1px);
  background-size: 20px 20px;
  position: relative;
  box-shadow: inset 0 1px 4px rgba(15, 23, 42, 0.06);
  min-height: 240px;
}

.preview-col-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.65rem;
  margin-bottom: 0.85rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.preview-col-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: #4338ca;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.preview-channel-pill {
  font-size: 0.7rem;
  color: #0369a1;
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.28);
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  font-weight: 600;
}

.template-wa-bubble {
  background: #d9fdd3;
  color: #111b21;
  padding: 0.95rem 1.1rem;
  border-radius: 8px 8px 2px 8px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.14);
  font-size: 0.875rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  position: relative;
  margin-top: auto;
  margin-bottom: auto;
  width: 100%;
}

.template-wa-bubble::after {
  content: "";
  position: absolute;
  top: 0;
  right: -8px;
  width: 0;
  height: 0;
  border-top: 8px solid #d9fdd3;
  border-right: 8px solid transparent;
}

/* WhatsApp Chat Preview Bubble */
.wa-chat-container {
  background: #efeae2;
  border: 1px solid #d5cfc7;
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  background-image: radial-gradient(circle at center, rgba(15, 23, 42, 0.045) 1px, transparent 1px);
  background-size: 20px 20px;
  position: relative;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.wa-bubble {
  background: #d9fdd3;
  color: #111b21;
  padding: 0.85rem 1rem;
  border-radius: 8px 8px 2px 8px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.14);
  font-size: 0.88rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  position: relative;
  max-width: 90%;
  margin-left: auto;
}

.wa-bubble::after {
  content: "";
  position: absolute;
  top: 0;
  right: -8px;
  width: 0;
  height: 0;
  border-top: 8px solid #d9fdd3;
  border-right: 8px solid transparent;
}

.wa-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  font-size: 0.7rem;
  color: #667781;
  margin-top: 4px;
}

.wa-ticks {
  color: #53bdeb;
  font-size: 0.8rem;
}

.mode-toggle-group {
  display: inline-flex;
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 4px;
  gap: 4px;
  margin-bottom: 1.25rem;
}

.mode-toggle-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.mode-toggle-btn.active {
  background: #ffffff;
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.35);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

@media (max-width: 980px) {
  .template-card-modern { grid-template-columns: 1fr; gap: 1.25rem; }
}

@media (max-width: 768px) {
  .grid-2-col { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .app-container { padding: 1rem; }
}


/* ======================================================
   AUTH — LOGIN OVERLAY
   ====================================================== */
.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background-image:
    radial-gradient(ellipse 80% 60% at 20% 20%, rgba(16,185,129,0.1) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(99,102,241,0.08) 0%, transparent 60%);
}
.login-card {
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(16,185,129,0.06);
  animation: loginCardIn 0.45s cubic-bezier(0.16,1,0.3,1) both;
}
@keyframes loginCardIn {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.login-brand {
  display: flex; align-items: center; gap: 1rem;
  padding: 2rem 2rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  background: linear-gradient(135deg, rgba(16,185,129,0.06) 0%, transparent 60%);
}
.login-brand-icon {
  width: 52px; height: 52px; border-radius: 14px; flex-shrink: 0;
  background: linear-gradient(135deg, #10b981, #06b6d4);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 20px rgba(16,185,129,0.25);
}
.login-brand-icon svg { color: white; }
.login-brand-name { font-size: 1.15rem; font-weight: 700; color: var(--text-primary); letter-spacing: -0.02em; }
.login-brand-sub { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }
.login-form-section { padding: 2rem; }
.login-title { font-size: 1.4rem; font-weight: 700; color: var(--text-primary); margin-bottom: 0.3rem; letter-spacing: -0.02em; }
.login-subtitle { font-size: 0.875rem; color: var(--text-secondary); margin-bottom: 1.75rem; }
.login-error {
  background: #fff1f2; border: 1px solid #fecdd3;
  color: #be123c; border-radius: var(--radius-sm); padding: 0.75rem 1rem;
  font-size: 0.85rem; margin-bottom: 1.25rem; animation: shakeX 0.4s ease;
}
@keyframes shakeX {
  0%,100% { transform: translateX(0); } 20%,60% { transform: translateX(-6px); } 40%,80% { transform: translateX(6px); }
}
.login-field { margin-bottom: 1.25rem; }
.login-label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 0.5rem; text-transform: uppercase; letter-spacing: 0.06em; }
.login-input-wrap { position: relative; display: flex; align-items: center; }
.login-input-icon { position: absolute; left: 0.9rem; color: var(--text-muted); pointer-events: none; }
.login-input {
  width: 100%; background: #f8fafc; border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm); color: var(--text-primary); font-family: var(--font-sans);
  font-size: 0.95rem; padding: 0.75rem 2.75rem; transition: var(--transition); outline: none;
}
.login-input:focus { border-color: var(--accent-emerald); background: #ffffff; box-shadow: 0 0 0 3px rgba(16,185,129,0.14); }
.login-input::placeholder { color: var(--text-muted); }
.login-eye-btn { position: absolute; right: 0.9rem; background: none; border: none; cursor: pointer; color: var(--text-muted); padding: 0; display: flex; transition: color 0.15s; }
.login-eye-btn:hover { color: var(--text-secondary); }
.login-submit-btn {
  width: 100%; padding: 0.875rem; margin-top: 0.5rem;
  background: linear-gradient(135deg, #10b981, #06b6d4); border: none;
  border-radius: var(--radius-sm); color: white; font-family: var(--font-sans);
  font-size: 0.95rem; font-weight: 700; cursor: pointer; transition: var(--transition);
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  box-shadow: 0 4px 16px rgba(16,185,129,0.25);
}
.login-submit-btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(16,185,129,0.35); }
.login-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.login-spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,0.3); border-top-color: white; border-radius: 50%; animation: spin 0.7s linear infinite; }
.login-footer { display: flex; align-items: center; justify-content: center; gap: 0.4rem; margin-top: 1.5rem; font-size: 0.78rem; color: var(--text-muted); }

/* ======================================================
   HEADER — USER WIDGET & LOGOUT
   ====================================================== */
.user-widget { display: flex; align-items: center; gap: 0.65rem; background: #ffffff; border: 1px solid var(--border-color); border-radius: 40px; padding: 0.35rem 0.75rem 0.35rem 0.4rem; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04); }
.user-avatar { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, #10b981, #06b6d4); display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 700; color: white; flex-shrink: 0; }
.user-info { line-height: 1.2; }
.user-name { font-size: 0.8rem; font-weight: 600; color: var(--text-primary); }
.user-role { font-size: 0.68rem; color: var(--accent-emerald); text-transform: uppercase; letter-spacing: 0.05em; }
.btn-logout { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 0.3rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: var(--transition); margin-left: 0.15rem; }
.btn-logout:hover { color: var(--accent-rose); background: rgba(244,63,94,0.1); }

/* ======================================================
   QUEUE DATA TABLE — SERVER-SIDE INTEGRATION & TOOLBAR
   ====================================================== */
.queue-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.icon-refresh-svg {
  transition: transform 0.4s ease;
}
.btn-refreshing .icon-refresh-svg {
  animation: spin 0.75s linear infinite;
}

/* Toolbar: Search & Filters */
.queue-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
}

.queue-search-box {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 280px;
}

.queue-search-box .search-icon {
  position: absolute;
  left: 0.85rem;
  color: var(--text-muted);
  pointer-events: none;
}

.queue-search-input {
  width: 100%;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  padding: 0.55rem 2.25rem 0.55rem 2.4rem;
  outline: none;
  transition: var(--transition);
}

.queue-search-input:focus {
  border-color: var(--accent-emerald);
  box-shadow: 0 0 0 3px var(--accent-emerald-glow);
  background: #ffffff;
}

.queue-search-input::placeholder {
  color: var(--text-muted);
  font-size: 0.825rem;
}

.search-clear-btn {
  position: absolute;
  right: 0.65rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: color 0.15s;
}

.search-clear-btn:hover {
  color: var(--text-primary);
}

.search-spinner {
  position: absolute;
  right: 0.75rem;
  width: 14px;
  height: 14px;
  border: 2px solid #e2e8f0;
  border-top-color: var(--accent-emerald);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.queue-filter-group {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.filter-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

.queue-select-filter {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  padding: 0.45rem 0.85rem;
  outline: none;
  cursor: pointer;
  transition: var(--transition);
}

.queue-select-filter:focus {
  border-color: var(--accent-emerald);
}

/* Data Table Rows & Hover */
.queue-data-table {
  width: 100%;
}

.queue-data-table tbody tr {
  transition: background-color 0.15s ease;
  cursor: pointer;
}

.queue-data-table tbody tr:hover {
  background: #f8fafc !important;
}

.btn-action-view {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  background: #ecfdf5;
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #047857;
  cursor: pointer;
  transition: var(--transition);
}

.btn-action-view:hover {
  background: #d1fae5;
  border-color: rgba(16, 185, 129, 0.45);
  transform: translateY(-1px);
}

/* Pagination Footer */
.table-pagination-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0.5rem 0.25rem;
  margin-top: 0.75rem;
  border-top: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 1rem;
}

.pagination-info {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.pagination-limit-wrap {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.pagination-limit-label {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.queue-limit-select {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  padding: 0.3rem 0.5rem;
  outline: none;
  cursor: pointer;
}

.pagination-buttons {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-page {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-page:hover:not(:disabled) {
  background: #f1f5f9;
  color: var(--text-primary);
}

.btn-page:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pagination-page-numbers {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.page-num-btn {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: #ffffff;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.page-num-btn:hover {
  background: #f1f5f9;
  color: var(--text-primary);
}

.page-num-btn.active {
  background: #ecfdf5;
  border-color: rgba(16, 185, 129, 0.4);
  color: #047857;
}

.page-num-ellipsis {
  padding: 0 0.25rem;
  color: var(--text-muted);
  font-size: 0.75rem;
}

/* ======================================================
   MESSAGE DETAIL MODAL (LIGHT CLEAN DIALOG)
   ====================================================== */
.modal-lg {
  max-width: 760px;
  width: 94%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  background: #ffffff;
  border: 1px solid var(--border-color);
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.22);
}

.modal-lg .modal-header {
  padding: 1.5rem 1.75rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 0;
}

.modal-lg .modal-body {
  padding: 1.5rem 1.75rem;
  overflow-y: auto;
  max-height: calc(90vh - 150px);
}

.modal-lg .modal-footer {
  padding: 1.25rem 1.75rem;
  border-top: 1px solid var(--border-color);
  margin-top: 0;
  background: #f8fafc;
}

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.modal-icon-badge {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.14), rgba(6, 182, 212, 0.14));
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #059669;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.modal-title-group h3 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.modal-subhead {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-top: 0.15rem;
}

.modal-loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 3rem 1rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.modal-detail-content {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Detail Hero Bar */
.detail-hero-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-status-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.hero-time-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Audit Pipeline Steps */
.audit-pipeline-card {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.25rem;
}

.section-title {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.audit-steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  position: relative;
}

.audit-step-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.85rem;
}

.step-marker {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-marker.done {
  background: #ecfdf5;
  border-color: rgba(16, 185, 129, 0.5);
  color: #059669;
}

.step-marker.active {
  background: #fffbeb;
  border-color: rgba(245, 158, 11, 0.5);
  color: #d97706;
}

.step-marker.failed {
  background: #fff1f2;
  border-color: rgba(244, 63, 94, 0.5);
  color: #e11d48;
}

.step-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.step-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.step-value {
  color: var(--text-primary);
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Detail Meta Grid */
.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
}

.meta-item-box {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
}

.meta-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  display: block;
  margin-bottom: 0.25rem;
}

.meta-value {
  font-size: 0.875rem;
  color: var(--text-primary);
  word-break: break-all;
}

/* Error Banner */
.detail-error-banner {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  color: #be123c;
}

.error-banner-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  margin-bottom: 0.35rem;
}

.error-banner-text {
  font-size: 0.8125rem;
  font-family: var(--font-mono);
  line-height: 1.5;
  background: #ffffff;
  border: 1px solid #fecdd3;
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  margin-top: 0.5rem;
  white-space: pre-wrap;
}

/* Content Preview Section */
.detail-content-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.content-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.content-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.wa-message-bubble-preview {
  background: #d9fdd3;
  border: 1px solid rgba(37, 211, 102, 0.3);
  border-left: 3px solid #16a34a;
  border-radius: var(--radius-md);
  padding: 1.15rem 1.25rem;
  font-size: 0.9rem;
  line-height: 1.6;
  color: #111b21;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 280px;
  overflow-y: auto;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.wa-message-bubble-preview strong, 
.wa-message-bubble-preview b {
  color: #0f172a;
}

.wa-message-bubble-preview code {
  background: rgba(15, 23, 42, 0.08);
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.825rem;
  color: #047857;
}

/* Raw Accordion */
.detail-raw-accordion {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: #f8fafc;
  overflow: hidden;
}

.raw-accordion-summary {
  padding: 0.65rem 1rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.raw-accordion-summary:hover {
  color: var(--text-primary);
  background: #f1f5f9;
}

.btn-text-action {
  background: none;
  border: none;
  color: var(--accent-cyan);
  font-size: 0.72rem;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
}

.btn-text-action:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .audit-steps-grid {
    grid-template-columns: 1fr;
  }
  .detail-meta-grid {
    grid-template-columns: 1fr;
  }
  .queue-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .queue-search-box {
    min-width: 100%;
  }
}

/* ======================================================
   VERSION BADGES, APP FOOTER & ABOUT SYSTEM MODAL
   ====================================================== */
.app-version-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  color: #0369a1;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}

.app-version-badge:hover {
  background: #e0f2fe;
  border-color: #7dd3fc;
  color: #075985;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.15);
}

/* App Footer */
.app-footer {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.footer-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
  flex-shrink: 0;
}

.footer-brand {
  font-weight: 600;
  color: var(--text-secondary);
}

.footer-sep {
  color: #cbd5e1;
}

.version-tag-btn {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  padding: 0.2rem 0.55rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: var(--transition);
}

.version-tag-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.version-tag-pill {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: #0284c7;
}

.version-badge-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #0284c7;
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.95); opacity: 0.6; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.6; }
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-note {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.btn-about {
  background: none;
  border: none;
  color: var(--accent-cyan);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  transition: var(--transition);
}

.btn-about:hover {
  color: #0369a1;
  text-decoration: underline;
}

/* About Modal Styling */
.modal-about-card {
  max-width: 580px;
}

.about-version-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #f0f9ff, #ecfdf5);
  border: 1px solid #bae6fd;
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}

.about-version-val {
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: 800;
  color: #0284c7;
  letter-spacing: -0.02em;
}

.about-version-status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
}

.about-spec-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.about-spec-card {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.9rem;
}

.about-changelog-summary {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
}

.about-feature-list {
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.about-feature-list strong {
  color: var(--text-primary);
}

/* WhatsApp Mention Tag Pill */
.wa-mention-pill {
  color: #027eb5 !important;
  background: rgba(2, 126, 181, 0.12) !important;
  padding: 1px 7px !important;
  border-radius: 4px !important;
  font-weight: 600 !important;
  display: inline-block !important;
  font-family: inherit !important;
  letter-spacing: 0.01em;
  border: 1px solid rgba(2, 126, 181, 0.25) !important;
  transition: all 0.15s ease;
}

.wa-mention-pill:hover {
  background: rgba(2, 126, 181, 0.2) !important;
  color: #0369a1 !important;
  border-color: rgba(2, 126, 181, 0.4) !important;
}

/* Enterprise Line Tabs Polish */
.nav-tabs {
  gap: 0.25rem;
  padding-bottom: 0;
}

.nav-tab {
  border-radius: 0;
  border-bottom: 2px solid transparent;
  padding: 0.7rem 1rem;
  font-size: 0.875rem;
}

.nav-tab.active {
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--accent-emerald);
  color: var(--accent-emerald);
}

/* Shield Health Pill & Budget Strip */
.shield-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid var(--border-color);
  background: #f8fafc;
  color: var(--text-secondary);
}

.shield-pill.shield-healthy {
  background: #ecfdf5;
  border-color: rgba(16, 185, 129, 0.35);
  color: #047857;
}

.shield-pill.shield-throttled {
  background: #fffbeb;
  border-color: rgba(217, 119, 6, 0.35);
  color: #b45309;
}

.shield-pill.shield-cooldown,
.shield-pill.shield-paused,
.shield-pill.shield-disconnected {
  background: #fff1f2;
  border-color: rgba(225, 29, 72, 0.35);
  color: #be123c;
}

.shield-budget-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.9rem;
  margin-bottom: 1.5rem;
}

.budget-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
}

.budget-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.45rem;
}

.budget-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.budget-val {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
}

.budget-track {
  height: 6px;
  border-radius: 9999px;
  background: #f1f5f9;
  overflow: hidden;
}

.budget-fill {
  height: 100%;
  border-radius: 9999px;
  background: var(--accent-emerald);
  transition: width 0.3s ease, background-color 0.2s ease;
}

.budget-fill.warn {
  background: var(--accent-amber);
}

.budget-fill.full {
  background: var(--accent-rose);
}

.budget-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quiet-hours-box {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
}


