/* ═══════════════════════════════════════════════════════════════
   WhatsApp API — Styles (Admin + Client Panel)
   ═══════════════════════════════════════════════════════════════ */

/* ── Variables ──────────────────────────────────────────────── */
:root {
  --bg:        #f5f7fa;   /* app background, light gray */
  --surface:   #ffffff;   /* sidebar / topbar — white */
  --card:      #ffffff;   /* cards / tables — white */
  --elevated:  #f1f5f9;   /* inputs / table headers — subtle gray */
  --border:    #e2e8f0;   /* borders — light gray */
  --border-md: #cbd5e1;   /* input borders — stronger gray */
  --t1: #0f172a;          /* primary text — slate-900 */
  --t2: #475569;          /* secondary text — slate-600 */
  --t3: #94a3b8;          /* muted text — slate-400 */
  --green:     #25D366;   /* WhatsApp green */
  --green-dark:#1da851;   /* green hover/pressed */
  --glow:      rgba(37,211,102,0.15);
  --red:    #ef4444;
  --blue:   #3b82f6;
  --amber:  #f59e0b;
  --purple: #a855f7;
  --sb:     268px;
  --top:    60px;
  --r:      12px;
  --shadow:    0 1px 3px rgba(15,23,42,0.08), 0 1px 2px rgba(15,23,42,0.04);
  --shadow-md: 0 4px 12px rgba(15,23,42,0.08);
  --shadow-lg: 0 10px 30px rgba(15,23,42,0.10);
}

/* ── Reset ──────────────────────────────────────────────────── */
*,*::before,*::after { box-sizing:border-box; margin:0; padding:0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--t1);
  min-height: 100vh;
  line-height: 1.6;
  font-size: 14px;
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; border: none; }
input, textarea, select { font-family: inherit; font-size: 14px; }

/* ═══════════════════════════════════════════════════════════════
   LOGIN PAGE
   ═══════════════════════════════════════════════════════════════ */

.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 10% 20%, rgba(37, 211, 102, 0.08) 0%, transparent 40%),
              radial-gradient(circle at 90% 80%, rgba(59, 130, 246, 0.08) 0%, transparent 40%),
              var(--bg);
  padding: 40px 20px;
  position: relative;
  overflow: hidden;
}

.login-wrapper {
  display: flex;
  max-width: 960px;
  width: 100%;
  border-radius: 24px;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.1), 0 0 2px rgba(0,0,0,0.05);
  overflow: hidden;
  position: relative;
  z-index: 10;
}

/* Hero Showcase Left Column */
.login-hero-card {
  flex: 1.1;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  padding: 48px;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.login-hero-card::before {
  content: '';
  position: absolute;
  top: -50px; left: -50px;
  width: 250px; height: 250px;
  background: rgba(37, 211, 102, 0.2);
  filter: blur(80px);
  border-radius: 50%;
  pointer-events: none;
}

.login-hero-card::after {
  content: '';
  position: absolute;
  bottom: -50px; right: -50px;
  width: 250px; height: 250px;
  background: rgba(59, 130, 246, 0.2);
  filter: blur(80px);
  border-radius: 50%;
  pointer-events: none;
}

/* Futuristic CLI Terminal Command Badge */
.login-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px 8px 12px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-left: 3px solid #25D366;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 0 0 15px rgba(37, 211, 102, 0.15);
  backdrop-filter: blur(16px);
  margin-bottom: 24px;
  width: fit-content;
  position: relative;
  overflow: hidden;
}

.login-hero-badge::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, #25D366 0%, rgba(59, 130, 246, 0.5) 50%, transparent 100%);
}

.badge-cli-symbol {
  font-family: monospace;
  font-size: 13px;
  font-weight: 800;
  color: #25D366;
  background: rgba(37, 211, 102, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
}

.login-hero-badge .badge-text {
  font-size: 12px;
  font-weight: 700;
  color: #f1f5f9 !important;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.badge-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(37, 211, 102, 0.12);
  color: #4ade80;
  border: 1px solid rgba(37, 211, 102, 0.3);
  letter-spacing: 0.8px;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #25D366;
  box-shadow: 0 0 8px #25D366;
  animation: pulse-dot-anim 1.5s infinite alternate;
}

@keyframes pulse-dot-anim {
  0% { transform: scale(0.8); opacity: 0.6; }
  100% { transform: scale(1.3); opacity: 1; }
}

.login-hero-heading {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.25;
  color: #ffffff;
  margin-bottom: 14px;
  letter-spacing: -0.5px;
}

.login-hero-sub {
  font-size: 14px;
  color: #94a3b8;
  line-height: 1.6;
  margin-bottom: 32px;
}

.login-hero-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 32px;
}

.hero-stat-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
}

.stat-icon-wrap {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.stat-icon-wrap.green { background: rgba(37, 211, 102, 0.25); color: #25D366; }
.stat-icon-wrap.blue { background: rgba(59, 130, 246, 0.25); color: #60a5fa; }

.stat-text-wrap {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.stat-val {
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.3px;
  line-height: 1.2;
}

.stat-lbl {
  font-size: 12px;
  font-weight: 700;
  margin-top: 3px;
  line-height: 1.2;
  white-space: normal;
  word-break: break-word;
}

.stat-lbl-green {
  color: #4ade80 !important;
}

.stat-lbl-blue {
  color: #60a5fa !important;
}

.hero-feature-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #cbd5e1;
}

.feat-check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(37, 211, 102, 0.2);
  color: #25D366;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

/* Right Login Card Column */
.login-card {
  flex: 1;
  padding: 48px 40px;
  background: var(--card);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--t2);
  transition: color 0.2s, transform 0.2s;
  margin-bottom: 24px;
}
.back-link:hover {
  color: var(--t1);
  transform: translateX(-3px);
}

.login-brand {
  text-align: center;
  margin-bottom: 28px;
}

.login-logo {
  width: 68px;
  height: 68px;
  background: transparent;
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
  filter: drop-shadow(0 10px 24px rgba(37, 211, 102, 0.45));
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.login-logo:hover {
  transform: scale(1.08) rotate(4deg);
}

.login-title {
  font-size: 32px;
  font-weight: 900;
  color: var(--t1);
  letter-spacing: -1px;
}

.portal-header-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 6px 14px;
  border-radius: 12px;
  background: var(--elevated);
  border: 1px solid var(--border-md);
  box-shadow: var(--shadow-sm);
}

.chip-shield-icon {
  color: var(--green);
}

.login-subtitle {
  font-size: 13px;
  font-weight: 700;
  color: var(--t1);
  letter-spacing: -0.1px;
  margin: 0;
}

.chip-auth-indicator {
  font-size: 9px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(37, 211, 102, 0.15);
  color: var(--green-dark);
  border: 1px solid rgba(37, 211, 102, 0.3);
  letter-spacing: 0.6px;
}

.login-form .form-group {
  margin-bottom: 16px;
}
.login-form .form-group:last-of-type {
  margin-bottom: 6px;
}

.login-form .form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--t2);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-lead-icon {
  position: absolute;
  left: 14px;
  color: var(--t3);
  pointer-events: none;
  transition: color 0.2s;
}

.input-with-icon input {
  width: 100%;
  padding: 12px 14px 12px 42px !important;
  background: var(--elevated);
  border: 1px solid var(--border-md);
  border-radius: 10px;
  color: var(--t1);
  font-size: 14px;
  transition: all 0.2s ease;
}

.input-with-icon input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.15);
  background: var(--card);
}

.input-with-icon input:focus + .input-lead-icon,
.input-with-icon input:focus ~ .input-lead-icon {
  color: var(--green);
}

.pwd-toggle-btn {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--t3);
  padding: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
  border-radius: 4px;
}
.pwd-toggle-btn:hover {
  color: var(--t1);
}

.login-error {
  color: var(--red);
  font-size: 13px;
  margin-top: 10px;
  min-height: 0;
}
.login-error:empty {
  display: none;
}

.btn-login-submit {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  border: none;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.3);
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.3s ease;
  cursor: pointer;
}

.btn-login-submit::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -75%;
  width: 50%;
  height: 200%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.55) 50%,
    transparent 100%
  );
  transform: rotate(25deg);
  pointer-events: none;
  opacity: 0;
}

.btn-login-submit.shimmer-sweep-in::after {
  animation: btn-shimmer-in 0.65s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.btn-login-submit.shimmer-sweep-out::after {
  animation: btn-shimmer-out 0.65s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes btn-shimmer-in {
  0% { left: -75%; opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { left: 145%; opacity: 0; }
}

@keyframes btn-shimmer-out {
  0% { left: 145%; opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { left: -75%; opacity: 0; }
}

.btn-login-submit:hover {
  box-shadow: 0 6px 22px rgba(37, 211, 102, 0.45);
}

.btn-login-submit:active {
  box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3);
}

/* Admin Login Theme Variations */
.admin-logo {
  background: rgba(59, 130, 246, 0.1) !important;
  border-color: rgba(59, 130, 246, 0.25) !important;
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.15) !important;
}

.btn-admin-submit {
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important;
  border: none;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.3s ease;
  cursor: pointer;
}

.btn-admin-submit::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -75%;
  width: 50%;
  height: 200%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.55) 50%,
    transparent 100%
  );
  transform: rotate(25deg);
  pointer-events: none;
  opacity: 0;
}

.btn-admin-submit.shimmer-sweep-in::after {
  animation: btn-shimmer-in 0.65s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.btn-admin-submit.shimmer-sweep-out::after {
  animation: btn-shimmer-out 0.65s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.btn-admin-submit:hover {
  box-shadow: 0 6px 22px rgba(59, 130, 246, 0.5);
}

.btn-admin-submit:active {
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.admin-hero-badge {
  border-left-color: #3b82f6 !important;
}

.badge-cli-symbol.admin-cli {
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.15);
}

.badge-status-pill.admin-pill {
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.3);
}

.pulse-dot.admin-pulse {
  background: #3b82f6;
  box-shadow: 0 0 8px #3b82f6;
}

.feat-check.admin-feat-check {
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.15);
}

.login-footer-card {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--t2);
}

.btn-register-link {
  font-weight: 600;
  color: var(--green-dark);
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(37, 211, 102, 0.1);
  transition: all 0.2s ease;
}
.btn-register-link:hover {
  background: rgba(37, 211, 102, 0.2);
  color: var(--green-dark);
}

@media (max-width: 840px) {
  .login-hero-card { display: none; }
  .login-wrapper { max-width: 440px; }
  .login-card { padding: 36px 24px; }
}

.login-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 12px;
  color: var(--t3);
}

.login-footer strong {
  color: var(--t2);
}

/* ═══════════════════════════════════════════════════════════════
   APP LAYOUT
   ═══════════════════════════════════════════════════════════════ */

.app { display: flex; min-height: 100vh; }
.hidden { display: none !important; }

.overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(15,23,42,.45);
  z-index: 40;
  backdrop-filter: blur(2px);
}
.overlay.show { display: block; }

/* ── Sidebar ────────────────────────────────────────────────── */
.sidebar {
  width: var(--sb);
  min-height: 100vh;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 50;
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  overflow-y: auto;
}

.sb-logo {
  height: var(--top);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sb-logo-icon {
  width: 32px; height: 32px;
  background: transparent;
  display: grid; place-items: center;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 8px rgba(37, 211, 102, 0.25));
}
.sb-logo-title {
  font-size: 13px; font-weight: 700;
  color: var(--t1); display: block;
  letter-spacing: -.2px;
}
.sb-logo-sub {
  font-size: 11px; color: var(--t3);
  display: block; margin-top: 1px;
}
.sb-close {
  margin-left: auto;
  background: none;
  color: var(--t3);
  font-size: 16px;
  display: none;
  padding: 4px 6px;
  border-radius: 6px;
  transition: color .2s;
}
.sb-close:hover { color: var(--t1); }

/* Status Pill (used in the "My WhatsApp" section) */
.status-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 10px; font-weight: 600;
}
.status-pill.status-disconnected { background: rgba(239,68,68,.1); color: #dc2626; border: 1px solid rgba(239,68,68,.25); }
.status-pill.status-connecting   { background: rgba(245,158,11,.12); color: #b45309; border: 1px solid rgba(245,158,11,.3); }
.status-pill.status-authenticating { background: rgba(59,130,246,.1); color: #2563eb; border: 1px solid rgba(59,130,246,.25); }
.status-pill.status-connected    { background: rgba(37,211,102,.12);  color: #1da851; border: 1px solid rgba(37,211,102,.3); }
.status-dot {
  width: 6px; height: 6px;
  border-radius: 50%; background: currentColor;
  animation: blink 2s ease-in-out infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.3} }

/* Header connection indicator (topbar center, clients only) */
.topbar-center {
  display: flex; align-items: center;
  margin-left: auto; margin-right: 12px;
}
.conn-indicator {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px; font-weight: 600;
  border: 1px solid transparent;
  transition: background .2s, color .2s, border-color .2s;
}
.conn-indicator .conn-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 0 currentColor;
  animation: connPulse 2s ease-in-out infinite;
}
.conn-indicator.conn-connected {
  background: rgba(37,211,102,.12);
  color: #1da851;
  border-color: rgba(37,211,102,.3);
}
.conn-indicator.conn-connected .conn-dot { animation: connPulseGreen 2s ease-in-out infinite; }
.conn-indicator.conn-connecting {
  background: rgba(245,158,11,.12);
  color: #b45309;
  border-color: rgba(245,158,11,.3);
}
.conn-indicator.conn-authenticating {
  background: rgba(59,130,246,.1);
  color: #2563eb;
  border-color: rgba(59,130,246,.25);
}
.conn-indicator.conn-offline {
  background: rgba(100,116,139,.1);
  color: #64748b;
  border-color: rgba(100,116,139,.2);
}
.conn-indicator.conn-offline .conn-dot { animation: none; opacity: .7; }
@keyframes connPulse { 0%,100%{opacity:1} 50%{opacity:.4} }
@keyframes connPulseGreen {
  0%   { box-shadow: 0 0 0 0 rgba(37,211,102,.5); }
  70%  { box-shadow: 0 0 0 6px rgba(37,211,102,0); }
  100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); }
}

/* Sidebar Nav */
.sb-nav { padding: 10px; flex: 1; }
.sb-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--t2);
  font-size: 13px; font-weight: 500;
  transition: background .15s, color .15s;
  margin-bottom: 2px;
}
.sb-nav-item:hover { background: var(--elevated); color: var(--t1); }
.sb-nav-item.active {
  background: rgba(37,211,102,.12);
  color: var(--green-dark);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--green);
}
.sb-nav-item svg { flex-shrink: 0; opacity: .65; }
.sb-nav-item.active svg { opacity: 1; color: var(--green); }

/* ── Main Wrapper ───────────────────────────────────────────── */
.main-wrapper {
  margin-left: var(--sb);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Top Bar ────────────────────────────────────────────────── */
.topbar {
  height: var(--top);
  box-sizing: border-box;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  gap: 14px;
  position: sticky; top: 0; z-index: 30;
}
.topbar-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.topbar-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.menu-btn {
  display: none; flex-direction: column; gap: 4px;
  background: none; padding: 6px;
  border-radius: 6px;
}
.menu-btn span {
  display: block; width: 18px; height: 2px;
  background: var(--t2); border-radius: 2px;
  transition: .2s;
}
.topbar-crumb {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; line-height: 1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.crumb-root { color: var(--t3); font-weight: 500; }
.crumb-sep { color: var(--t3); opacity: .6; }
.crumb-current { color: var(--t2); font-weight: 600; }

/* Profile menu (top-right) */
.profile-menu { position: relative; }
.profile-trigger {
  display: flex; align-items: center; gap: 6px;
  background: none; padding: 4px 6px 4px 4px;
  border-radius: 999px;
  transition: background .15s, box-shadow .15s;
}
.profile-trigger:hover { background: var(--elevated); }
.profile-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  color: #fff;
  display: grid; place-items: center;
  font-weight: 700; font-size: 14px;
  flex-shrink: 0;
}
.profile-caret {
  color: var(--t3);
  transition: transform .2s;
  margin-right: 4px;
}
.profile-menu.open .profile-caret { transform: rotate(180deg); }

.profile-dropdown {
  position: absolute;
  top: calc(100% + 8px); right: 0;
  width: 248px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 8px;
  z-index: 60;
  opacity: 0; visibility: hidden;
  transform: translateY(-8px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
}
.profile-menu.open .profile-dropdown {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.profile-dropdown-header {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 8px 12px;
}
.pd-name { font-size: 14px; font-weight: 700; color: var(--t1); line-height: 1.2; }
.pd-role { font-size: 12px; color: var(--t3); margin-top: 2px; }
.profile-dropdown-balance {
  display: flex; align-items: center; justify-content: space-between;
  margin: 0 4px 8px; padding: 10px 12px;
  background: var(--elevated);
  border-radius: 8px;
  font-size: 13px; color: var(--t2);
}
.profile-dropdown-balance b { color: var(--green-dark); font-weight: 700; }
.pd-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 9px 12px;
  background: none;
  border-radius: 8px;
  font-size: 13px; font-weight: 500;
  color: var(--t1);
  transition: background .12s;
}
.pd-item:hover { background: var(--elevated); }
.pd-item svg { color: var(--t3); flex-shrink: 0; }
.pd-item:hover svg { color: var(--t2); }
.pd-item.pd-danger { color: #dc2626; }
.pd-item.pd-danger:hover { background: rgba(239,68,68,.08); }
.pd-item.pd-danger svg { color: #dc2626; }
.pd-divider { height: 1px; background: var(--border); margin: 6px 4px; }

/* ── Content ────────────────────────────────────────────────── */
.content { padding: 28px 32px; flex: 1; }

.page-section { max-width: 1200px; margin-bottom: 32px; }
.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}
.section-title {
  position: relative;
  font-size: 22px; font-weight: 800;
  letter-spacing: -0.4px;
  color: var(--t1);
  padding-left: 14px;
  line-height: 1.2;
}
.section-title::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 4px; height: 22px;
  background: var(--green);
  border-radius: 2px;
}
.section-sub { font-size: 13px; color: var(--t2); margin-top: 4px; padding-left: 14px; }

/* Section Badge Tags (Pill Styling) */
.sec-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
  align-self: flex-start;
  margin-top: 2px;
}

.sec-badge.sec-green {
  background: rgba(37, 211, 102, 0.12);
  color: #4ade80;
  border: 1px solid rgba(37, 211, 102, 0.35);
}

.sec-badge.sec-blue {
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.35);
}

.sec-badge.sec-purple {
  background: rgba(168, 85, 247, 0.12);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.35);
}

.sec-badge.sec-amber {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

/* ═══════════════════════════════════════════════════════════════
   STATS CARDS
   ═══════════════════════════════════════════════════════════════ */

.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: border-color .2s, box-shadow .2s, transform .2s;
  box-shadow: var(--shadow);
}
.stat-card:hover { border-color: var(--border-md); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-icon-wrap {
  width: 42px; height: 42px;
  border-radius: 10px;
  background: var(--elevated);
  display: grid; place-items: center;
  font-size: 18px;
  flex-shrink: 0;
}
.stat-info { flex: 1; min-width: 0; }
.stat-num {
  font-size: 24px; font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.2;
}
.stat-lbl { font-size: 12px; color: var(--t2); margin-top: 2px; white-space: normal; word-break: break-word; }
.stat-green { border-color: rgba(37,211,102,.2); }
.stat-green .stat-icon-wrap { background: rgba(37,211,102,.12); color: var(--green); }
.stat-red { border-color: rgba(239,68,68,.2); }
.stat-red .stat-icon-wrap { background: rgba(239,68,68,.12); color: var(--red); }
.stat-blue { border-color: rgba(59,130,246,.2); }
.stat-blue .stat-icon-wrap { background: rgba(59,130,246,.12); color: var(--blue); }
.stat-amber { border-color: rgba(245,158,11,.2); }
.stat-amber .stat-icon-wrap { background: rgba(245,158,11,.12); color: var(--amber); }
.stat-purple { border-color: rgba(168,85,247,.2); }
.stat-purple .stat-icon-wrap { background: rgba(168,85,247,.12); color: var(--purple); }

@keyframes pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}
.stat-pop { animation: pop .3s ease; }

/* ═══════════════════════════════════════════════════════════════
   CARDS & TABLES
   ═══════════════════════════════════════════════════════════════ */

.compose-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 24px;
  box-shadow: var(--shadow);
}

/* Table Filter & Search Bar */
.table-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  background: var(--card);
  padding: 12px 16px;
  border-radius: var(--r);
  border: 1px solid var(--border);
}
.filter-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  max-width: 450px;
}
.filter-lbl {
  font-size: 12px;
  font-weight: 600;
  color: var(--t2);
  white-space: nowrap;
}
.filter-input-wrap input {
  padding: 8px 14px;
  font-size: 12.5px;
  flex: 1;
  width: 100%;
}
.filter-btn {
  white-space: nowrap;
}

.table-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--shadow);
}

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

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

.data-table thead {
  background: var(--elevated);
}
.data-table th {
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--t3);
  text-transform: uppercase;
  letter-spacing: .5px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

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

.data-table tbody tr:hover {
  background: rgba(37,211,102,0.04);
}

.lbl-mobile { display: none; }

.table-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--t3);
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px 12px;
}
.empty-state span { font-size: 32px; }
.empty-state-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--t3);
  box-shadow: inset 0 0 0 1px var(--border);
}

/* ═══════════════════════════════════════════════════════════════
   FORMS
   ═══════════════════════════════════════════════════════════════ */

.compose-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--t2);
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  background: var(--elevated);
  border: 1px solid var(--border-md);
  border-radius: 8px;
  color: var(--t1);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(37,211,102,0.1);
}
.form-input::placeholder { color: var(--t3); }

.field-prefix-wrap {
  display: flex;
  align-items: stretch;
}
.field-prefix {
  display: flex; align-items: center;
  padding: 0 12px;
  background: var(--elevated);
  border: 1px solid var(--border-md);
  border-right: none;
  border-radius: 8px 0 0 8px;
  color: var(--t2);
  font-size: 14px;
}
.field-prefix-wrap .form-input {
  border-radius: 0 8px 8px 0;
}
.field-hint {
  font-size: 11px;
  color: var(--t3);
  margin-top: 2px;
}
.field-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(59,130,246,.1);
  color: #2563eb;
  margin-left: 6px;
  vertical-align: middle;
}

/* ═══════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  transition: background .15s, transform .1s;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--green);
  color: #fff;
}
.btn-primary:hover { background: var(--green-dark); }
.btn-primary:disabled {
  background: #cbd5e1;
  color: #fff;
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--card);
  color: var(--t1);
  border: 1px solid var(--border-md);
}
.btn-secondary:hover { background: var(--elevated); }

.btn-danger {
  background: var(--red);
  color: #fff;
}
.btn-danger:hover { background: #dc2626; }

.btn-danger-outline {
  background: transparent;
  color: #ef4444;
  border: 1px solid rgba(239,68,68,.2);
}
.btn-danger-outline:hover { background: rgba(239,68,68,.08); }

.btn-outline {
  background: transparent;
  color: var(--t1);
  border: 1px solid var(--border-md);
}
.btn-outline:hover { background: var(--elevated); }

.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-xs { padding: 4px 10px; font-size: 11px; }
.btn-block { width: 100%; justify-content: center; }
.compose-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

/* ═══════════════════════════════════════════════════════════════
   RESULTS / BADGES / PROGRESS
   ═══════════════════════════════════════════════════════════════ */

.res-success {
  padding: 12px 16px;
  background: rgba(37,211,102,.08);
  border: 1px solid rgba(37,211,102,.25);
  border-radius: 8px;
  color: #166534;
  font-size: 13px;
}
.res-error {
  padding: 12px 16px;
  background: rgba(239,68,68,.08);
  border: 1px solid rgba(239,68,68,.25);
  border-radius: 8px;
  color: #991b1b;
  font-size: 13px;
}
.res-info {
  padding: 12px 16px;
  background: rgba(59,130,246,.08);
  border: 1px solid rgba(59,130,246,.2);
  border-radius: 8px;
  color: #2563eb;
  font-size: 13px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.3;
}
.badge-green { background: rgba(37,211,102,.12); color: #1da851; border: 1px solid rgba(37,211,102,.25); }
.badge-red { background: rgba(239,68,68,.1); color: #dc2626; border: 1px solid rgba(239,68,68,.2); }
.badge-blue { background: rgba(59,130,246,.12); color: #3b82f6; border: 1px solid rgba(59,130,246,.25); }
.badge-purple { background: rgba(168,85,247,.12); color: #a855f7; border: 1px solid rgba(168,85,247,.25); }
.badge-amber { background: rgba(245,158,11,.12); color: #f59e0b; border: 1px solid rgba(245,158,11,.25); }

.progress-bar {
  width: 80px; height: 6px;
  background: var(--elevated);
  border-radius: 3px;
  overflow: hidden;
  display: inline-block;
  vertical-align: middle;
  margin-right: 6px;
}
.progress-fill {
  height: 100%;
  background: var(--green);
  border-radius: 3px;
  transition: width .3s;
}

.text-sm { font-size: 11px; color: var(--t3); }
.text-muted { color: var(--t3); }
.text-green { color: #1da851; }
.text-red { color: #dc2626; }

/* ═══════════════════════════════════════════════════════════════
   BULK RESULTS
   ═══════════════════════════════════════════════════════════════ */

.bulk-list {
  margin-top: 10px;
  max-height: 300px;
  overflow-y: auto;
}
.bulk-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  margin-bottom: 3px;
}
.bulk-item.ok { background: rgba(37,211,102,.05); }
.bulk-item.err { background: rgba(239,68,68,.05); }

/* ═══════════════════════════════════════════════════════════════
   MODALS
   ═══════════════════════════════════════════════════════════════ */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  backdrop-filter: blur(2px);
  padding: 20px;
}
.modal-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  animation: modalIn .2s ease;
  box-shadow: var(--shadow-lg);
}
.modal-card-wide { max-width: 780px; }
.modal-card-sm { max-width: 380px; padding: 18px 20px; }
.modal-card-sm .modal-header-wrap { margin-bottom: 12px; padding-bottom: 6px; }
.modal-card-sm .modal-actions { margin-top: 14px; }
.modal-card-fixed { overflow: hidden !important; }

.table-scroll-fixed {
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--r);
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
  transition: scrollbar-color .3s ease;
}

.table-scroll-fixed:hover {
  scrollbar-color: var(--border) transparent;
}

.table-scroll-fixed table thead th {
  position: sticky;
  top: 0;
  background: var(--card);
  z-index: 5;
  box-shadow: 0 1px 0 var(--border);
}

/* Stylish Autohide Scrollbar */
.table-scroll-fixed::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
.table-scroll-fixed::-webkit-scrollbar-track {
  background: transparent;
}
.table-scroll-fixed::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 10px;
  transition: background .3s ease;
}
.table-scroll-fixed:hover::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.4);
}
.table-scroll-fixed::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.8);
}

.modal-header-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--t3);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all .15s ease;
}
.modal-close-btn:hover {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

/* Password Strength Indicator Component */
.pwd-meter-wrap {
  margin-top: 6px;
}
.pwd-bar-bg {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 4px;
}
.pwd-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 2px;
  transition: width 0.3s ease, background-color 0.3s ease;
}
.pwd-bar-fill.weak { width: 25%; background-color: #ef4444; }
.pwd-bar-fill.fair { width: 50%; background-color: #f59e0b; }
.pwd-bar-fill.good { width: 75%; background-color: #3b82f6; }
.pwd-bar-fill.strong { width: 100%; background-color: #10b981; }

.forgot-pwd-wrap {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
}
.forgot-pwd-link {
  color: var(--accent);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}
.forgot-pwd-link:hover {
  color: var(--accent);
  text-decoration: underline;
  opacity: 0.9;
}

.modal-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 0; }
.modal-card > p { font-size: 13px; color: var(--t2); margin-bottom: 20px; }
.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* ═══════════════════════════════════════════════════════════════
   TOASTS
   ═══════════════════════════════════════════════════════════════ */

.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 200;
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
}
.toast {
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: toastIn .3s ease;
  box-shadow: var(--shadow-lg);
  max-width: 380px;
}
.toast-success {
  background: #ffffff;
  color: #166534;
  border: 1px solid rgba(37,211,102,.3);
  border-left: 4px solid var(--green);
}
.toast-error {
  background: #ffffff;
  color: #991b1b;
  border: 1px solid rgba(239,68,68,.3);
  border-left: 4px solid var(--red);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════════════════
   WHATSAPP CONNECT
   ═══════════════════════════════════════════════════════════════ */

.whatsapp-connect {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 20px 0;
}
.qr-box-large {
  width: 200px; height: 200px;
  background: #fff;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  padding: 10px;
}
.qr-box-large img {
  width: 100%; height: 100%;
  image-rendering: pixelated;
}
.qr-placeholder {
  text-align: center;
  color: var(--t3);
  font-size: 12px;
}
.qr-placeholder .spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--border-md);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 10px;
}
/* Connected state shown in the QR box once WhatsApp is linked. */
.qr-placeholder.qr-connected {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px;
}
.qr-connected-tick {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.12);
  border: 2px solid rgba(34, 197, 94, 0.3);
  display: grid;
  place-items: center;
  margin-bottom: 4px;
  animation: qrTickPop 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes qrTickPop {
  0%   { transform: scale(0); opacity: 0; }
  70%  { transform: scale(1.12); }
  100% { transform: scale(1); opacity: 1; }
}
.status-info { text-align: center; }

/* ═══════════════════════════════════════════════════════════════
   MISC
   ═══════════════════════════════════════════════════════════════ */

.spinner {
  width: 28px; height: 28px;
  border: 2px solid var(--border-md);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.3} }

.col-preview { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-time {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.25;
  font-size: 11.5px;
  color: var(--t1);
  white-space: nowrap;
}
.t-time .t-sub {
  font-size: 10.5px;
  color: var(--t3);
  margin-top: 1px;
}
.col-phone {
  font-family: var(--font-mono, monospace);
  font-weight: 600;
  font-size: 12px;
  white-space: nowrap;
  letter-spacing: -0.2px;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-md); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--t3); }

/* ═══════════════════════════════════════════════════════════════
   API INTEGRATION PAGE
   ═══════════════════════════════════════════════════════════════ */

.api-block {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 18px 20px;
  margin-bottom: 14px;
}
.api-block-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--t3);
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.api-url-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--elevated);
  border: 1px solid var(--border-md);
  border-radius: 8px;
  padding: 10px 14px;
}
.api-url-text {
  flex: 1;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  color: var(--t1);
  word-break: break-all;
}
.api-key-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--elevated);
  border: 1px solid var(--border-md);
  border-radius: 8px;
  padding: 10px 14px;
  flex-wrap: wrap;
}
.api-key-code {
  font-family: 'Courier New', monospace;
  font-size: 13px;
  color: var(--amber);
  letter-spacing: .5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 140px;
}
.api-key-btns {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.copy-btn {
  background: var(--elevated);
  border: 1px solid var(--border-md);
  color: var(--t2);
  font-size: 11px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, color .15s;
  font-family: inherit;
}
.copy-btn:hover { background: var(--card); color: var(--t1); }

.api-endpoints { display: flex; flex-direction: column; gap: 14px; }

.endpoint-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  transition: border-color .2s;
}
.endpoint-card:hover { border-color: var(--border-md); }

.endpoint-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.endpoint-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.method-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 5px;
  letter-spacing: .5px;
  text-transform: uppercase;
  flex-shrink: 0;
}
.method-post { background: rgba(37,211,102,.12); color: var(--green); border: 1px solid rgba(37,211,102,.25); }
.method-get  { background: rgba(59,130,246,.12); color: #2563eb;    border: 1px solid rgba(59,130,246,.25); }

.endpoint-path {
  font-family: 'Courier New', monospace;
  font-size: 13px;
  color: var(--t1);
  background: var(--elevated);
  border: 1px solid var(--border-md);
  border-radius: 6px;
  padding: 6px 10px;
  word-break: break-all;
  width: 100%;
  box-sizing: border-box;
}
.endpoint-desc {
  padding: 10px 18px;
  font-size: 13px;
  color: var(--t2);
  border-bottom: 1px solid var(--border);
}

.snippet-tabs {
  display: flex;
  gap: 2px;
  padding: 10px 18px 0;
  background: var(--elevated);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.stab {
  background: none;
  border: none;
  color: var(--t3);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color .15s;
  font-family: inherit;
  white-space: nowrap;
}
.stab:hover { color: var(--t2); }
.stab.active { color: var(--green); border-bottom-color: var(--green); }

.snippet-block {
  margin: 0;
  padding: 16px 18px;
  background: #0f172a;
  color: #e2e8f0;
  font-family: 'Courier New', monospace;
  font-size: 11.5px;
  line-height: 1.65;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  -webkit-overflow-scrolling: touch;
  border-top: none;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════
   LANDING PAGE
   ═══════════════════════════════════════════════════════════════ */
#landingView { min-height:100vh; background:var(--bg); overflow-x:hidden; }

.ln-nav {
  position: absolute; top: 0; left: 0; right: 0; width: 100%; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 40px;
  background: transparent;
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  border-bottom: 1px solid transparent;
  box-shadow: none;
  transition: background 0.3s ease, padding 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

.ln-nav.scrolled {
  position: fixed; top: 0; left: 0; right: 0; width: 100%;
  padding: 12px 40px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  animation: navSlideDown 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes navSlideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.ln-nav-logo { display:flex; align-items:center; gap:12px; font-size:22px; font-weight:900; color:var(--t1); letter-spacing:-0.6px; }
.ln-nav-links { display:flex; align-items:center; gap:14px; }
.ln-nav-link { color:var(--t2); font-size:13px; font-weight:500; text-decoration:none; transition:color .15s; }
.ln-nav-link:hover { color:var(--t1); }
.ln-admin-link { font-size:11px; color:var(--t3); text-decoration:none; transition:color .15s; }
.ln-admin-link:hover { color:var(--t2); }

.ln-hero {
  min-height:88vh; display:flex; align-items:center; justify-content:center;
  background: radial-gradient(ellipse at 50% 40%, rgba(37,211,102,0.1) 0%, transparent 65%);
  padding: 120px 24px 60px 24px;
}
.ln-hero-inner { max-width:700px; text-align:center; }
.ln-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px 6px 14px;
  border-radius: 30px;
  background: rgba(37, 211, 102, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(37, 211, 102, 0.3);
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.12);
  margin-bottom: 24px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.ln-hero-badge:hover {
  transform: translateY(-2px);
  border-color: rgba(37, 211, 102, 0.5);
  box-shadow: 0 8px 28px rgba(37, 211, 102, 0.2);
}

.badge-pulse {
  position: relative;
  width: 8px;
  height: 8px;
  background: #25D366;
  border-radius: 50%;
  box-shadow: 0 0 10px #25D366;
}
.badge-pulse::after {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(37, 211, 102, 0.4);
  animation: badgePulseRing 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

@keyframes badgePulseRing {
  0% { transform: scale(0.5); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}

.ln-hero-badge .badge-text {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--t1);
  letter-spacing: -0.1px;
}

.badge-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 12px;
  background: rgba(37, 211, 102, 0.15);
  color: #1da851;
  border: 1px solid rgba(37, 211, 102, 0.3);
}
.ln-hero-title { font-size:clamp(36px,6vw,64px); font-weight:900; letter-spacing:-2px; line-height:1.1; margin-bottom:20px; color:var(--t1); }
.ln-hero-accent { background:linear-gradient(135deg,#25D366,#1da851); -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text; }
.ln-hero-sub { font-size:17px; color:var(--t2); line-height:1.7; margin-bottom:36px; max-width:520px; margin-left:auto; margin-right:auto; }
.ln-hero-btns { display:flex; gap:12px; justify-content:center; flex-wrap:wrap; }

.ln-features { padding:80px 24px; }
.ln-section-inner { max-width:1060px; margin:0 auto; }
.ln-section-title { font-size:32px; font-weight:800; text-align:center; margin-bottom:8px; letter-spacing:-0.5px; }
.ln-section-sub { text-align:center; color:var(--t2); font-size:15px; margin-bottom:48px; }

/* Interactive feature tabs */
.ln-feat-wrap { display:grid; grid-template-columns:340px 1fr; gap:0; min-height:420px; background:var(--card); border:1px solid var(--border); border-radius:16px; overflow:hidden; box-shadow:var(--shadow-md); }
.ln-feat-tabs { display:flex; flex-direction:column; border-right:1px solid var(--border); }
.ln-feat-tab {
  display:flex; align-items:center; gap:14px; padding:22px 24px;
  background:none; border:none; border-bottom:1px solid var(--border);
  text-align:left; cursor:pointer; font-family:inherit;
  transition:background .2s; position:relative; color:var(--t2);
}
.ln-feat-tab:last-child { border-bottom:none; }
.ln-feat-tab:hover { background:var(--elevated); }
.ln-feat-tab.active { background:var(--elevated); color:var(--t1); }
.ln-feat-tab.active::before {
  content:''; position:absolute; left:0; top:0; bottom:0; width:3px;
  background:var(--green); border-radius:0 2px 2px 0;
}
.ln-feat-tab-num { font-size:11px; font-weight:800; color:var(--t3); min-width:22px; font-family:'Courier New',monospace; }
.ln-feat-tab.active .ln-feat-tab-num { color:var(--green); }
.ln-feat-tab-body { flex:1; }
.ln-feat-tab-name { font-size:13px; font-weight:600; }
.ln-feat-tab-sub { font-size:11px; color:var(--t3); margin-top:2px; }
.ln-feat-tab-arrow { color:var(--t3); opacity:0; transition:opacity .2s; flex-shrink:0; }
.ln-feat-tab.active .ln-feat-tab-arrow { opacity:1; color:var(--green); }

/* Feature panel */
.ln-feat-panel { overflow:hidden; animation:fpFadeIn .3s ease; }
@keyframes fpFadeIn { from{opacity:0;transform:translateX(10px)} to{opacity:1;transform:translateX(0)} }
.fp-inner { display:grid; grid-template-columns:1fr 1fr; gap:0; height:100%; }
.fp-preview {
  background:var(--bg); border-right:1px solid var(--border);
  display:flex; align-items:center; justify-content:center; padding:24px;
}
.fp-text { padding:32px 28px; display:flex; flex-direction:column; justify-content:center; }
.fp-icon-badge { font-size:28px; margin-bottom:12px; }
.fp-title { font-size:17px; font-weight:700; margin-bottom:10px; color:var(--t1); }
.fp-desc { font-size:13px; color:var(--t2); line-height:1.7; margin-bottom:18px; }
.fp-points { list-style:none; display:flex; flex-direction:column; gap:8px; }
.fp-points li { font-size:12px; color:var(--t2); display:flex; align-items:center; gap:8px; }
.fp-check { color:var(--green); font-weight:700; flex-shrink:0; }

/* QR Preview */
.fp-mock-screen { background:var(--card); border:1px solid var(--border); border-radius:10px; overflow:hidden; width:100%; max-width:240px; }
.fp-topbar { display:flex; align-items:center; gap:5px; padding:8px 12px; background:var(--elevated); border-bottom:1px solid var(--border); }
.fp-dot { width:8px; height:8px; border-radius:50%; display:inline-block; }
.fp-qr-box { width:100px; height:100px; background:#fff; border-radius:8px; padding:8px; position:relative; overflow:hidden; }
.fp-qr-grid { display:grid; grid-template-columns:repeat(3,1fr); grid-template-rows:repeat(3,1fr); gap:3px; width:100%; height:100%; }
.fp-qr-corner-tl,.fp-qr-corner-tr,.fp-qr-corner-bl { background:#000; border-radius:2px; }
.fp-qr-mid,.fp-qr-mid-row,.fp-qr-dot { background:rgba(0,0,0,0.3); border-radius:1px; }
.fp-qr-dot { background:#000; width:12px; height:12px; border-radius:2px; margin:auto; }
.fp-scan-line {
  position:absolute; left:0; right:0; height:2px; background:rgba(37,211,102,.8);
  top:0; animation:scan 2s ease-in-out infinite; box-shadow:0 0 8px rgba(37,211,102,.6);
}
@keyframes scan { 0%,100%{top:0} 50%{top:calc(100% - 2px)} }
.fp-status-row { display:flex; align-items:center; gap:8px; font-size:11px; color:var(--t2); margin-top:12px; }
.fp-pulse-dot { width:7px; height:7px; border-radius:50%; background:var(--amber); display:inline-block; animation:blink 1.4s ease infinite; }

/* Bulk Preview */
.fp-bulk-wrap { width:100%; max-width:260px; }
.fp-msg-row { display:flex; align-items:center; gap:10px; padding:8px 0; border-bottom:1px solid var(--border); }
.fp-msg-row:last-child { border-bottom:none; }
.fp-msg-av { width:30px; height:30px; border-radius:50%; display:grid; place-items:center; font-size:11px; font-weight:700; color:var(--t2); flex-shrink:0; }
.fp-msg-info { flex:1; min-width:0; }
.fp-msg-name { font-size:12px; font-weight:600; color:var(--t1); }
.fp-msg-prev { font-size:10px; color:var(--t3); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.fp-msg-st { font-size:10px; font-weight:600; white-space:nowrap; }
.fp-bulk-footer { text-align:center; font-size:10px; color:var(--t3); margin-top:10px; padding-top:8px; border-top:1px solid var(--border); }

/* Code Preview */
.fp-code-wrap { background:#0f172a; border:1px solid #1e293b; border-radius:10px; overflow:hidden; width:100%; max-width:260px; }
.fp-code { margin:0; padding:14px; font-size:10.5px; line-height:1.7; color:#e2e8f0; font-family:'Courier New',monospace; overflow-x:auto; }
.fc-k { color:#60a5fa; } .fc-s { color:#86efac; } .fc-bs { color:#94a3b8; } .fc-b { color:#fbbf24; } .fc-n { color:#fb7185; }
.fp-code-resp { padding:10px 14px; background:var(--elevated); border-top:1px solid var(--border); font-size:10px; color:var(--t2); display:flex; align-items:center; gap:8px; }
.fp-resp-badge { background:rgba(37,211,102,.15); color:var(--green); font-size:10px; font-weight:700; padding:2px 7px; border-radius:4px; }

/* Analytics Preview */
.fp-stats-wrap { width:100%; max-width:260px; }
.fp-stats-grid { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-bottom:14px; }
.fp-stat-box { background:var(--elevated); border:1px solid var(--border); border-radius:8px; padding:10px 12px; }
.fp-stat-val { font-size:18px; font-weight:800; letter-spacing:-0.5px; }
.fp-stat-lbl { font-size:10px; color:var(--t3); margin-top:2px; }
.fp-bar-chart { display:flex; align-items:flex-end; gap:5px; height:60px; }
.fp-bar-col { flex:1; display:flex; align-items:flex-end; }
.fp-bar { width:100%; background:linear-gradient(to top,var(--green),rgba(37,211,102,.3)); border-radius:3px 3px 0 0; animation:barGrow .6s ease both; }
@keyframes barGrow { from{height:0} }
.fp-bar-labels { display:flex; justify-content:space-between; font-size:9px; color:var(--t3); margin-top:4px; }

@media (max-width:900px) {
  .ln-feat-wrap { grid-template-columns:1fr; }
  .ln-feat-tabs { flex-direction:row; border-right:none; border-bottom:1px solid var(--border); overflow-x:auto; }
  .ln-feat-tab { border-bottom:none; border-right:1px solid var(--border); flex-direction:column; text-align:center; gap:4px; padding:14px; min-width:100px; }
  .ln-feat-tab.active::before { left:0; right:0; top:auto; bottom:0; width:auto; height:3px; }
  .fp-inner { grid-template-columns:1fr; }
  .fp-preview { border-right:none; border-bottom:1px solid var(--border); }
}

.ln-pricing { padding:80px 24px; background:var(--surface); }
.ln-pricing-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:20px; margin-top:48px; }
.ln-price-card {
  background:var(--card); border:1px solid var(--border); border-radius:var(--r);
  padding:32px 28px; position:relative; box-shadow:var(--shadow);
}
.ln-price-featured { border-color:var(--green); box-shadow:0 0 40px rgba(37,211,102,.15); }
.ln-price-badge-top {
  position:absolute; top:-12px; left:50%; transform:translateX(-50%);
  background:var(--green); color:#fff; font-size:11px; font-weight:700;
  padding:3px 14px; border-radius:20px;
}
.ln-price-tier { font-size:13px; font-weight:700; color:var(--t2); text-transform:uppercase; letter-spacing:.5px; margin-bottom:12px; }
.ln-price-amount { font-size:42px; font-weight:900; letter-spacing:-1px; margin-bottom:20px; }
.ln-price-list { list-style:none; margin-bottom:28px; display:flex; flex-direction:column; gap:9px; }
.ln-price-list li { font-size:13px; color:var(--t2); }

.ln-footer { padding:30px 40px; border-top:1px solid var(--border); text-align:center; color:var(--t3); font-size:12px; }

/* ═══════════════════════════════════════════════════════════════
   REGISTRATION PAGE — REDESIGNED
   ═══════════════════════════════════════════════════════════════ */
.reg-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}
.reg-page::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(37,211,102,0.08) 0%, transparent 70%);
  top: -10%; right: -5%;
  pointer-events: none;
}

/* Main content area (left info + right form) */
.reg-main {
  display: flex;
  flex: 1;
  min-height: 0;
}

/* Left Info Panel — sleek dark mode with green glow accents */
.reg-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px 64px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, var(--surface) 0%, var(--bg) 100%);
  border-right: 1px solid var(--border);
  color: var(--t1);
}
.reg-info::before {
  content: '';
  position: absolute;
  top: -20%; left: -20%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.12) 0%, transparent 65%);
  pointer-events: none;
}
.reg-info::after {
  content: '';
  position: absolute;
  bottom: -15%; right: -10%;
  width: 450px; height: 450px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.06) 0%, transparent 70%);
  pointer-events: none;
}
.reg-info-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
  position: relative;
  z-index: 1;
}
.reg-info-logo-badge {
  width: 42px;
  height: 42px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 12px;
  display: grid;
  place-items: center;
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.15);
}
.reg-info-logo-badge svg { width: 24px; height: 24px; color: var(--green); fill: var(--green); }
.reg-info-logo-text {
  font-size: 26px;
  font-weight: 900;
  color: var(--t1);
  letter-spacing: -0.8px;
}
.reg-info h1 {
  font-size: 38px;
  font-weight: 800;
  color: var(--t1);
  line-height: 1.15;
  letter-spacing: -1px;
  margin-bottom: 20px;
  max-width: 480px;
  position: relative;
  z-index: 1;
}

/* Custom Admin Search Box */
.reg-search-box {
  position: relative;
  width: 280px;
  max-width: 100%;
}
.reg-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--t3);
  pointer-events: none;
  transition: color 0.2s ease;
}
.reg-search-input {
  width: 100%;
  height: 38px;
  padding: 0 32px 0 36px;
  font-size: 13px;
  font-weight: 500;
  color: var(--t1);
  background: var(--card-bg, rgba(255, 255, 255, 0.04));
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}
.reg-search-input:focus {
  border-color: rgba(37, 211, 102, 0.5);
  box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.15), 0 4px 12px rgba(0, 0, 0, 0.08);
  background: var(--bg);
}
.reg-search-input:focus ~ .reg-search-icon {
  color: var(--green);
}
.reg-search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--t3);
  cursor: pointer;
  width: 22px;
  height: 22px;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 12px;
  transition: all 0.15s ease;
}
.reg-search-clear:hover {
  color: var(--t1);
  background: rgba(255, 255, 255, 0.12);
}
.reg-info > p {
  font-size: 15px;
  color: var(--t2);
  line-height: 1.7;
  margin-bottom: 48px;
  max-width: 440px;
  position: relative;
  z-index: 1;
}
.reg-benefits {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 22px;
  position: relative;
  z-index: 1;
}
.reg-benefit-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.reg-benefit-icon {
  width: 36px; height: 36px;
  background: var(--elevated);
  border: 1px solid var(--border-md);
  color: var(--green);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  transition: transform 0.2s, border-color 0.2s;
}
.reg-benefit-item:hover .reg-benefit-icon {
  transform: translateY(-2px);
  border-color: rgba(34, 197, 94, 0.4);
}
.reg-benefit-icon svg { width: 18px; height: 18px; stroke: var(--green); }
.reg-benefit-text {
  font-size: 14.5px;
  color: var(--t1);
  font-weight: 600;
  line-height: 1.4;
}
.reg-benefit-text span {
  display: block;
  font-size: 13px;
  color: var(--t2);
  font-weight: 400;
  margin-top: 3px;
}

/* Right Form Panel */
.reg-form-panel {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 32px 40px;
  background: transparent;
  overflow-y: auto;
  max-height: 100vh;
}
.reg-form-panel .reg-container {
  max-width: 540px;
  width: 100%;
}

/* Footer */
.reg-footer {
  text-align: center;
  padding: 20px 40px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--t3);
  flex-shrink: 0;
}
.reg-footer a {
  color: var(--t3);
  text-decoration: none;
  transition: color 0.15s;
}
.reg-footer a:hover { color: var(--t1); }

/* Mobile responsive */
@media (max-width:900px) {
  .reg-main { flex-direction: column; }
  .reg-info {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 40px 32px;
    align-items: center;
    text-align: center;
  }
  .reg-info h1 { max-width: 100%; }
  .reg-info > p { max-width: 100%; }
  .reg-benefits { align-items: center; }
  .reg-form-panel { padding: 32px 24px; }
}

/* Progress Bar */
.reg-progress-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  padding: 0 4px;
}
.reg-progress-bar {
  flex: 1;
  height: 4px;
  background: var(--elevated);
  border-radius: 2px;
  overflow: hidden;
}
.reg-progress-fill {
  height: 100%;
  background: var(--green);
  border-radius: 2px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.reg-progress-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--t3);
  white-space: nowrap;
  min-width: 40px;
  text-align: right;
}

/* Card */
.reg-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 32px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

/* Step content area */
.reg-step-area {
  position: relative;
  overflow: hidden;
}
.reg-step-content {
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.reg-step-content.entering {
  opacity: 0;
  transform: translateX(30px);
}
.reg-step-content.active {
  opacity: 1;
  transform: translateX(0);
}
.reg-step-content.exiting {
  opacity: 0;
  transform: translateX(-30px);
}

/* Inner step wrapper (rendered inside #regStepContent by each step).
   Kept opaque by default so content is always visible even if the
   entering/active class swap is missed during the transition. */
.reg-step-inner {
  opacity: 1;
}
.reg-step-inner.entering {
  opacity: 1;
}

/* Account Type Toggle — segmented control */
.reg-type-toggle {
  display: flex;
  background: var(--elevated);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 24px;
  gap: 4px;
}
.reg-type-option {
  flex: 1;
  position: relative;
}
.reg-type-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.reg-type-option label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--t3);
  transition: all 0.2s;
}
.reg-type-option label svg { width: 16px; height: 16px; flex-shrink: 0; }
.reg-type-option input:checked + label {
  background: var(--card);
  color: var(--t1);
  box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.reg-type-card { display: none; }
.type-desc { display: none; }

/* Form Fields */
.reg-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.reg-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  animation: fieldIn 0.4s ease both;
}
.reg-field:nth-child(1) { animation-delay: 0.05s; }
.reg-field:nth-child(2) { animation-delay: 0.1s; }
.reg-field:nth-child(3) { animation-delay: 0.15s; }
.reg-field:nth-child(4) { animation-delay: 0.2s; }
.reg-field:nth-child(5) { animation-delay: 0.25s; }
.reg-field:nth-child(6) { animation-delay: 0.3s; }
.reg-field:nth-child(7) { animation-delay: 0.35s; }

@keyframes fieldIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Two-column grid layout for compact form */
.reg-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
}
.reg-field-half { }
.reg-field-full {
  grid-column: 1 / -1;
}

.reg-field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--t2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.reg-field label .req {
  color: var(--red);
  font-size: 14px;
  line-height: 1;
}
.reg-field .form-input {
  width: 100%;
  padding: 11px 14px;
  background: var(--elevated);
  border: 1px solid var(--border-md);
  border-radius: 10px;
  color: var(--t1);
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.reg-field .form-input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(37,211,102,0.1);
}
.reg-field .form-input::placeholder {
  color: var(--t3);
}
.reg-field select.form-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%237f98b8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}
textarea.form-input {
  resize: vertical;
  min-height: 64px;
}

/* Username availability status */
.reg-user-status {
  display: inline-flex;
  align-items: center;
  font-size: 14px;
}
.reg-user-status.checking {
  color: var(--t3);
  animation: spin 0.8s linear infinite;
}
.reg-user-status.available {
  color: var(--green);
}
.reg-user-status.taken {
  color: var(--red);
}
.reg-user-msg {
  font-size: 11px;
  min-height: 14px;
  transition: color 0.2s;
}
.reg-user-msg.available { color: var(--green); }
.reg-user-msg.taken { color: var(--red); }
.reg-user-msg.checking { color: var(--t3); }
.reg-user-msg.error { color: var(--amber); }

/* Conditional fields animation */
.reg-conditional {
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.3s ease;
}
.reg-conditional.collapsed {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  margin-bottom: 0;
  gap: 0;
}
.reg-conditional.expanded {
  max-height: 600px;
  opacity: 1;
  margin-top: 4px;
  margin-bottom: 4px;
}

/* Buttons */
.reg-actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}
.reg-actions .btn { padding: 11px 22px; font-size: 14px; border-radius: 10px; }
.reg-actions .btn-primary { flex: 1; justify-content: center; }
.reg-error {
  color: var(--red);
  font-size: 13px;
  padding: 10px 14px;
  background: rgba(239,68,68,0.06);
  border: 1px solid rgba(239,68,68,0.15);
  border-radius: 8px;
  margin-top: 4px;
  animation: fieldIn 0.3s ease;
}

/* Back link */
.reg-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--t3);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  padding: 4px 0;
  margin-bottom: 20px;
  transition: color 0.15s;
}
.reg-back:hover { color: var(--t2); }
.reg-back svg { transition: transform 0.15s; }
.reg-back:hover svg { transform: translateX(-2px); }

/* ═══════════════════════════════════════════════════════════════
   STEP 2 — UPLOADS
   ═══════════════════════════════════════════════════════════════ */
.reg-upload-hint {
  font-size: 13px;
  color: var(--t2);
  margin-bottom: 20px;
  line-height: 1.5;
}
.reg-upload-hint strong {
  color: var(--t1);
  font-weight: 600;
}

.reg-upload-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.reg-upload-zone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px 12px;
  background: var(--elevated);
  border: 2px dashed var(--border-md);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: center;
  overflow: hidden;
}
.reg-upload-zone:hover {
  border-color: rgba(37,211,102,0.4);
  background: rgba(37,211,102,0.03);
}
.reg-upload-zone.dragover {
  border-color: var(--green);
  background: rgba(37,211,102,0.06);
  transform: scale(1.02);
}
.reg-upload-zone.uploaded {
  border-style: solid;
  border-color: rgba(37,211,102,0.3);
  background: rgba(37,211,102,0.04);
}
.reg-upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.reg-upload-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: rgba(37,211,102,0.08);
  display: grid;
  place-items: center;
  transition: all 0.25s ease;
}
.reg-upload-zone:hover .reg-upload-icon {
  background: rgba(37,211,102,0.14);
}
.reg-upload-icon svg {
  width: 20px; height: 20px;
  color: var(--green);
}
.reg-upload-zone.uploaded .reg-upload-icon {
  background: rgba(37,211,102,0.18);
}

.reg-upload-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--t1);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.reg-upload-status {
  font-size: 11px;
  color: var(--t3);
  line-height: 1.4;
  transition: color 0.2s;
}
.reg-upload-zone.uploaded .reg-upload-status {
  color: var(--green);
  font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════
   SUCCESS STATE
   ═══════════════════════════════════════════════════════════════ */
.reg-success {
  text-align: center;
  padding: 20px 0;
}
.reg-success-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: rgba(37,211,102,0.1);
  border: 2px solid rgba(37,211,102,0.2);
  display: grid;
  place-items: center;
  margin: 0 auto 20px;
  animation: successPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.reg-success-icon svg {
  width: 28px; height: 28px;
  color: var(--green);
}
@keyframes successPop {
  0%   { transform: scale(0); opacity: 0; }
  70%  { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}
.reg-success h3 {
  font-size: 20px;
  font-weight: 800;
  color: var(--green);
  margin-bottom: 8px;
}
.reg-success p {
  font-size: 14px;
  color: var(--t2);
  line-height: 1.6;
  max-width: 360px;
  margin: 0 auto 24px;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE MEDIA QUERIES (COMPREHENSIVE)
   ═══════════════════════════════════════════════════════════════ */

/* ── 992px Breakpoint (Laptops / Tablets) ───────────────────── */
@media (max-width: 992px) {
  .login-wrapper {
    flex-direction: column;
    max-width: 540px;
    border-radius: 20px;
  }
  .login-hero-card {
    padding: 32px 28px;
  }
  .login-card {
    padding: 36px 28px;
  }
  .login-hero-stats {
    margin: 20px 0;
  }
  .hero-feature-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .ln-grid {
    grid-template-columns: 1fr;
  }
  .ln-pricing-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
}

/* ── 768px Breakpoint (Tablets & Mobile Devices) ───────────── */
@media (max-width: 768px) {
  /* Landing Navigation */
  .ln-nav {
    padding: 12px 18px;
  }
  .ln-nav-links {
    gap: 8px;
  }
  .ln-hero {
    padding: 100px 20px 60px 20px;
  }
  .ln-hero-title {
    font-size: 32px;
  }

  /* Off-Canvas Sidebar */
  .sidebar {
    transform: translateX(-100%);
    box-shadow: var(--shadow-lg);
    z-index: 100;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-wrapper {
    margin-left: 0;
  }
  .menu-btn { display: flex; }
  .sb-close { display: block; }
  .content { padding: 16px; }

  /* Topbar & Section Headers */
  .topbar {
    padding: 0 16px;
    gap: 12px;
  }
  .section-head {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
  }
  .section-head > div:first-child {
    flex: 1;
    min-width: 200px;
  }
  .sec-badge {
    margin-top: 4px;
    align-self: flex-start;
  }

  /* Grid & Card Containers */
  .stats-row {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
  }
  .stat-card {
    grid-column: auto !important;
    min-width: 0;
  }
  .page-section { max-width: 100%; }
  .compose-card { padding: 18px; }
  .modal-card { padding: 20px; width: 92%; }

  /* Section Head & Table Filter Responsiveness */
  .section-head {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
  }
  .section-head-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
  }
  .table-filter-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px;
  }
  .filter-input-wrap {
    max-width: 100%;
    width: 100%;
  }
  .filter-lbl {
    display: none;
  }
  .filter-btn {
    width: 100%;
    justify-content: center;
  }

  /* Mobile Data Table Card View Transformation with Key-Value Labeling */
  .lbl-mobile {
    display: inline-block !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    color: var(--t3) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    margin-right: 8px !important;
  }
  .table-card {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }
  .table-wrap {
    overflow: visible !important;
  }
  .data-table {
    min-width: 100% !important;
    width: 100% !important;
    display: block !important;
  }
  .data-table thead {
    display: none !important;
  }
  .data-table tbody {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    width: 100% !important;
  }
  .data-table tbody tr {
    display: flex !important;
    flex-direction: column !important;
    background: var(--card) !important;
    border: 1px solid var(--border) !important;
    border-radius: 14px !important;
    padding: 14px 16px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03) !important;
    width: 100% !important;
    box-sizing: border-box !important;
    transition: transform 0.15s ease, border-color 0.15s ease;
  }
  .data-table tbody tr:hover {
    border-color: var(--border-md) !important;
  }
  .data-table td {
    padding: 6px 0 !important;
    border-bottom: 1px dashed var(--border) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    box-sizing: border-box !important;
    font-size: 13px !important;
    color: var(--t1) !important;
  }
  .data-table td:last-child {
    border-bottom: none !important;
    padding-top: 10px !important;
    margin-top: 4px !important;
  }
  .data-table td .btn {
    width: 100% !important;
    justify-content: center !important;
  }

  /* Centered Empty State in Responsive View */
  tr.table-empty,
  td.table-empty,
  .data-table tr.table-empty,
  .data-table td.table-empty {
    display: table-cell !important;
    width: 100% !important;
    text-align: center !important;
    padding: 36px 16px !important;
    border-bottom: none !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  .data-table tbody tr.table-empty {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 20px 0 !important;
  }
  .empty-state {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    width: 100% !important;
    margin: 0 auto !important;
    gap: 12px !important;
    padding: 20px 12px !important;
  }
  .empty-state-icon {
    margin: 0 auto 8px auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  .empty-state p {
    margin: 0 !important;
    text-align: center !important;
    width: 100% !important;
  }

  /* Specific Mobile Card Overrides for Message Logs (.msg-card-table) */
  .msg-card-table .col-user {
    order: 0 !important;
    margin-bottom: 2px !important;
  }
  .msg-card-table .col-phone {
    order: 1 !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: var(--t1) !important;
    letter-spacing: 0 !important;
  }
  .msg-card-table .col-status {
    order: 2 !important;
    margin-top: 4px !important;
    margin-bottom: 6px !important;
  }
  .msg-card-table .col-preview {
    order: 3 !important;
    max-width: 100% !important;
    white-space: normal !important;
    word-break: break-word !important;
    font-size: 13px !important;
    color: var(--t2) !important;
    line-height: 1.45 !important;
    background: var(--elevated) !important;
    padding: 10px 12px !important;
    border-radius: 10px !important;
    border: 1px solid var(--border-md) !important;
    margin: 4px 0 8px 0 !important;
  }
  .msg-card-table .col-time {
    order: 4 !important;
    border-top: 1px dashed var(--border-md) !important;
    padding-top: 10px !important;
    margin-top: 4px !important;
    font-size: 11.5px !important;
    color: var(--t3) !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    width: 100% !important;
  }
  .table-pagination {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    text-align: center;
  }
  .pg-info {
    text-align: center;
    font-size: 12px;
  }
  .pg-controls {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
  }
  .pg-btn {
    min-width: 28px;
    height: 28px;
    padding: 4px 8px;
    font-size: 11.5px;
  }
  .pg-size-wrap {
    justify-content: center;
    font-size: 12px;
  }

  /* Topbar & Crumb Mobile Optimizations */
  .topbar {
    padding: 0 12px;
    gap: 8px;
  }
  .crumb-root, .crumb-sep {
    display: none;
  }
  .crumb-current {
    font-size: 13.5px;
    font-weight: 700;
  }
  .conn-indicator {
    padding: 4px 8px;
    font-size: 10.5px;
  }
  .conn-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80px;
  }
  .profile-trigger {
    padding: 2px 4px;
    gap: 4px;
  }
  .profile-avatar {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }

  .content { padding: 14px 10px; }
  .section-head { margin-bottom: 16px; }
  .section-title { font-size: 20px; }
  .section-sub { font-size: 12px; padding-left: 0; margin-top: 2px; }

  /* API Integration Mobile Responsive */
  .api-block {
    padding: 16px 14px;
    border-radius: 14px;
  }

  /* Registration Form */
  .reg-container { max-width: 100%; padding: 0 12px; }
  .reg-card { padding: 22px 18px; }
  .reg-header h1 { font-size: 22px; }
  .reg-upload-grid { grid-template-columns: 1fr; }
  .reg-type-toggle { gap: 8px; }
  .reg-type-card { padding: 16px 12px; }
  .reg-actions { flex-direction: column-reverse; }
  .reg-actions .btn { width: 100%; justify-content: center; }
  .reg-row-2 { grid-template-columns: 1fr; }
}

/* ── 480px Breakpoint (Small Smartphones) ───────────────────── */
@media (max-width: 480px) {
  .login-container {
    padding: 20px 12px;
  }
  .login-hero-card {
    padding: 24px 20px;
  }
  .login-card {
    padding: 28px 20px;
  }
  .hero-feature-list {
    grid-template-columns: 1fr;
  }
  .login-hero-stats {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .login-brand {
    margin-bottom: 20px;
  }
  .stats-row {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }
  .stat-card {
    grid-column: 1 / -1 !important;
    padding: 14px 16px;
    gap: 12px;
  }
  .stat-icon-wrap {
    width: 36px;
    height: 36px;
  }
  .stat-num {
    font-size: 18px;
  }
  .compose-card {
    padding: 14px;
  }
  .btn {
    padding: 10px 14px;
  }
  .compose-actions {
    flex-wrap: wrap;
    gap: 8px;
  }
  .compose-actions .btn {
    width: 100%;
  }
  .field-prefix-wrap input {
    padding-left: 28px;
  }
  .reg-step-bar {
    overflow-x: auto;
    padding-bottom: 8px;
  }
  .reg-step {
    white-space: nowrap;
  }
}

/* ── Table Pagination Footer ────────────────────────────────── */
.table-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: var(--card);
  gap: 16px;
  flex-wrap: wrap;
  border-bottom-left-radius: var(--r);
  border-bottom-right-radius: var(--r);
}
.pg-info {
  font-size: 13px;
  color: var(--t2);
}
.pg-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}
.pg-btn {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-md);
  background: var(--elevated);
  color: var(--t1);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
}
.pg-btn:hover:not(:disabled) {
  border-color: var(--green);
  color: var(--green);
  background: rgba(37,211,102,0.06);
}
.pg-btn.active {
  background: var(--green);
  border-color: var(--green);
  color: #000;
  font-weight: 700;
}
.pg-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.pg-size-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--t3);
}
.pg-select {
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--border-md);
  background: var(--elevated);
  color: var(--t1);
  font-size: 12.5px;
  cursor: pointer;
}

/* Full Screen Image Viewer Modal */
.fs-viewer-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #000;
  z-index: 999999;
  display: flex;
  flex-direction: column;
}
.fs-viewer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: rgba(0, 0, 0, 0.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
}
.fs-viewer-title-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.fs-viewer-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
}
.fs-viewer-sub {
  font-size: 11px;
  color: #aaa;
}
.fs-viewer-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}
.fs-zoom-controls {
  display: flex;
  align-items: center;
  background: #111;
  border-radius: 6px;
  overflow: hidden;
}
.fs-zoom-btn {
  background: none;
  border: none;
  color: #fff;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 14px;
}
.fs-zoom-btn:hover { background: #222; }
.fs-zoom-level {
  font-size: 12px;
  font-weight: 600;
  padding: 0 12px;
  min-width: 50px;
  text-align: center;
}
.fs-btn-close {
  background: #E50914;
  color: white;
  border: none;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}
.fs-btn-close:hover { background: #F6121D; }
.fs-viewer-body {
  flex: 1;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.fs-viewer-content {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.2s ease-out;
  transform-origin: center center;
}
