/* ============================================================================
   WANexus AI Pro — Canva-Inspired Minimalist Light Theme
   Clean, simple, non-flashy, elegant typography and soft neutral colors
   ============================================================================ */

:root {
  --bg-app: #f8fafc;
  --bg-sidebar: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-input: #ffffff;
  --bg-subtle: #f8fafc;
  --border: #e2e8f0;
  --border-focus: #0d9488;
  --border-light: #f1f5f9;
  
  --text-main: #0f172a;
  --text-body: #334155;
  --text-muted: #64748b;
  --text-dim: #94a3b8;
  
  --primary: #0f766e;
  --primary-hover: #115e59;
  --primary-light: #f0fdfa;
  --primary-border: #ccfbf1;
  
  --accent: #2563eb;
  --accent-light: #eff6ff;
  
  --danger: #dc2626;
  --danger-light: #fef2f2;
  --danger-border: #fecaca;
  
  --warning: #d97706;
  --warning-light: #fffbeb;
  --warning-border: #fde68a;
  
  --success: #059669;
  --success-light: #ecfdf5;
  --success-border: #a7f3d0;
  
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.03);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background: var(--bg-app);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ==========================================
   SIDEBAR (Canva Style: Pure White, Delicate Border)
   ========================================== */
.app-sidebar {
  width: 296px;
  min-width: 296px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  box-shadow: 1px 0 3px rgba(0, 0, 0, 0.02);
}

.sidebar-header {
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--border);
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.brand-logo svg {
  display: block;
}

.brand-title-wrap {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.brand-title {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: var(--text-main);
}

.brand-version {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  background: var(--bg-subtle);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

/* WhatsApp Quick Status Widget */
.wa-status-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.wa-status-pill:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-dot.connected {
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.2);
}

.status-dot.qrcode {
  background: var(--warning);
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.2);
}

.status-dot.disconnected {
  background: var(--danger);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2);
}

.status-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.status-text {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
}

.status-user {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Search Box */
.menu-search-box {
  position: relative;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
}

.menu-search-box input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  font-size: 13px;
  width: 100%;
  font-family: inherit;
}

.menu-search-box input::placeholder {
  color: var(--text-dim);
}

.menu-search-box button {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 12px;
}

/* Sidebar Menu Items */
.sidebar-menu {
  flex: 1;
  overflow-y: auto;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-menu::-webkit-scrollbar {
  width: 4px;
}
.sidebar-menu::-webkit-scrollbar-thumb {
  background: #e2e8f0;
  border-radius: 4px;
}

.menu-item {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 9px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.12s ease;
  color: var(--text-body);
}

.menu-item:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
}

.menu-item.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
  border: 1px solid var(--primary-border);
}

.menu-icon {
  margin-top: 1px;
  flex-shrink: 0;
  color: inherit;
}

.menu-item.active .menu-icon svg {
  stroke: var(--primary);
}

.menu-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.menu-title {
  font-size: 13.5px;
  font-weight: 600;
  color: inherit;
}

.menu-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.3;
}

.menu-item.active .menu-desc {
  color: #0f766e;
}

.sidebar-footer {
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  background: #fafbfc;
}

.footer-switcher-btn {
  display: block;
  text-align: center;
  font-size: 11.5px;
  font-weight: 600;
  color: #475569;
  background: #ffffff;
  border: 1px solid var(--border);
  padding: 8px 12px;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-sm);
}

.footer-switcher-btn:hover {
  background: #f8fafc;
  color: var(--text-main);
  border-color: #cbd5e1;
}

/* ==========================================
   MAIN CONTENT AREA
   ========================================== */
.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  max-height: 100vh;
}

.main-topbar {
  padding: 18px 36px;
  border-bottom: 1px solid var(--border);
  background: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.topbar-title-wrap h1 {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: var(--text-main);
}

.topbar-subtitle {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 500;
}

.topbar-actions {
  display: flex;
  gap: 10px;
}

.panel-content-area {
  padding: 28px 36px 60px;
  max-width: 1080px;
  width: 100%;
}

.feature-panel {
  display: none;
}

.feature-panel.active {
  display: block;
  animation: fadeIn 0.15s ease-out;
}

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

/* ==========================================
   CARDS (Clean White Canvas)
   ========================================== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 18px;
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.2px;
  margin-bottom: 4px;
}

.card-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
}

/* ==========================================
   BUTTONS (Muted, Clean & Modern)
   ========================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.12s ease;
  font-family: inherit;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 118, 110, 0.2);
}
.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-secondary {
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--text-body);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: var(--text-main);
}

.btn-danger {
  background: var(--danger-light);
  color: var(--danger);
  border: 1px solid var(--danger-border);
}
.btn-danger:hover {
  background: var(--danger);
  color: #ffffff;
}

.btn-accent {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}
.btn-accent:hover {
  background: #16a34a;
  color: #ffffff;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-block {
  width: 100%;
}

.btn-group-row {
  display: flex;
  gap: 8px;
}

/* ==========================================
   FORMS & INPUTS
   ========================================== */
.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-body);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-main);
  font-size: 13.5px;
  outline: none;
  font-family: inherit;
  transition: all 0.15s ease;
}

.form-control:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}

.form-helper {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 5px;
  display: block;
}

.code-editor {
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.55;
  background: #f8fafc;
  color: #0f172a;
}

/* ==========================================
   SWITCH TOGGLES (Clean Soft Pill)
   ========================================== */
.switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #cbd5e1;
  border-radius: 24px;
  transition: 0.2s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

input:checked + .slider {
  background: var(--primary);
}

input:checked + .slider:before {
  transform: translateX(18px);
}

/* TOGGLE LIST ROW */
.toggle-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.toggle-info {
  display: flex;
  flex-direction: column;
}

.toggle-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-main);
}

.toggle-note {
  font-size: 11.5px;
  color: var(--text-muted);
}

/* ==========================================
   TABLES (Clean Modern Striping)
   ========================================== */
.table-responsive {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
}

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

.data-table th {
  background: #f8fafc;
  padding: 10px 14px;
  font-weight: 700;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.data-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-body);
}

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

.data-table tr:hover {
  background: #f8fafc;
}

/* ==========================================
   BADGES (Soft Pastel, Not Flashy)
   ========================================== */
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}

.badge-success { background: var(--success-light); color: var(--success); border: 1px solid var(--success-border); }
.badge-danger { background: var(--danger-light); color: var(--danger); border: 1px solid var(--danger-border); }
.badge-warning { background: var(--warning-light); color: var(--warning); border: 1px solid var(--warning-border); }
.badge-info { background: var(--accent-light); color: var(--accent); border: 1px solid #bfdbfe; }

/* ==========================================
   STAT GRIDS (Canva Metrics)
   ========================================== */
.stat-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.stat-box {
  padding: 16px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #ffffff;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.stat-box.success { background: #f0fdf4; border-color: #bbf7d0; }
.stat-box.danger { background: #fef2f2; border-color: #fecaca; }
.stat-box.warning { background: #fffbeb; border-color: #fde68a; }
.stat-box.info { background: #eff6ff; border-color: #bfdbfe; }

.stat-num {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 2px;
  color: var(--text-main);
}

.stat-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
}

/* ==========================================
   PROGRESS BAR
   ========================================== */
.progress-bar-wrap {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #0d9488, #10b981);
  transition: width 0.3s ease;
}

/* ==========================================
   CHAT SANDBOX
   ========================================== */
.chat-card-container {
  display: flex;
  flex-direction: column;
  height: 560px;
  padding: 0;
  overflow: hidden;
}

.chat-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
}

.chat-messages-box {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #fafbfc;
}

.chat-bubble {
  max-width: 75%;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.5;
}

.chat-bubble.ai {
  align-self: flex-start;
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
  border-bottom-left-radius: 3px;
}

.chat-bubble.user {
  align-self: flex-end;
  background: var(--primary);
  color: #ffffff;
  font-weight: 500;
  border-bottom-right-radius: 3px;
}

.chat-input-bar {
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  background: #ffffff;
}

.chat-input-bar input {
  flex: 1;
  padding: 10px 14px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-main);
  outline: none;
  font-size: 13.5px;
}

/* ==========================================
   LOG STREAM BOX
   ========================================== */
.log-stream-box {
  max-height: 240px;
  overflow-y: auto;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-body);
}

.log-entry {
  padding: 5px 0;
  border-bottom: 1px solid var(--border-light);
}

/* ==========================================
   MODAL QR
   ========================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.modal-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 26px;
  width: 90%;
  max-width: 440px;
  box-shadow: var(--shadow-lg);
}

.modal-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-main);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
}

.qr-display-area {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin: 14px 0;
  min-height: 250px;
}

.qr-display-area img {
  max-width: 100%;
  height: auto;
  display: block;
}

.qr-loading {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 13px;
}

/* ==========================================
   TOAST POPUP
   ========================================== */
.toast-popup {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0f172a;
  color: #ffffff;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 13px;
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 1000;
  animation: slideUp 0.2s ease-out;
}

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

/* ==========================================
   UTILITY CLASSES
   ========================================== */
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-gap { display: flex; gap: 8px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 14px; }
.mb-4 { margin-bottom: 20px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 14px; }
.max-w-700 { max-width: 700px; }
.max-h-300 { max-height: 300px; }
.max-h-400 { max-height: 400px; }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }

/* ==========================================
   MULTI-SESSION WHATSAPP STYLING
   ========================================== */
.modal-card.modal-lg {
  max-width: 680px;
  width: 95%;
  max-height: 90vh;
  overflow-y: auto;
}

.session-list-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 14px 0;
}

.session-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: all 0.15s ease;
}

.session-card:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-sm);
}

.session-card.selected {
  border-color: var(--primary);
  background: #f0fdfa;
}

.session-info-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.session-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.session-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-main);
}

.session-phone {
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.session-star {
  font-size: 11px;
  font-weight: 700;
  color: #d97706;
  background: #fef3c7;
  padding: 1px 6px;
  border-radius: 6px;
}

.session-actions-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.session-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
}

.session-badge.connected {
  background: #dcfce7;
  color: #15803d;
}

.session-badge.qrcode {
  background: #fef3c7;
  color: #b45309;
}

.session-badge.connecting {
  background: #e0f2fe;
  color: #0369a1;
}

.session-badge.disconnected {
  background: #f1f5f9;
  color: #64748b;
}

.qr-viewer-box {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-top: 14px;
}

/* ========================================================
   CONTACTS EXTRACTOR & QUICK GRAB STYLES (1:1 Extension Fidelity)
   ======================================================== */
.ap-ct-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
@media (max-width: 900px) {
  .ap-ct-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.ap-ct-stat {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #ffffff;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  cursor: pointer;
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
}
.ap-ct-stat:hover {
  transform: translateY(-2px);
  border-color: var(--primary, #0f766e);
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.08);
}
.ap-ct-stat.active {
  border-color: var(--primary, #0f766e);
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.2);
}
.ap-ct-stat-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ap-ct-stat-body {
  min-width: 0;
}
.ap-ct-stat-num {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text-main, #0f172a);
}
.ap-ct-stat-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted, #64748b);
  text-transform: uppercase;
  letter-spacing: .4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

/* Grab Box & Assign Label Box */
.ap-grab-box {
  background: #f8fafc;
  border: 1.5px solid #0f766e;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}
.ap-assign-label-box {
  background: #fffbeb;
  border: 1.5px dashed #f59e0b;
  border-radius: 10px;
  padding: 14px;
  margin-top: 12px;
}

/* Contacts Table */
.ap-ct-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.ap-ct-table th {
  background: #f8fafc;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--text-muted, #64748b);
  padding: 8px 10px;
  text-align: left;
  border-bottom: 2px solid var(--border, #e2e8f0);
}
.ap-ct-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border, #e2e8f0);
  vertical-align: middle;
}
.ap-ct-table tbody tr:hover {
  background: #f1f5f9;
}
.ap-ct-cell-name {
  font-weight: 600;
  color: var(--text-main, #0f172a);
}
.ap-ct-cell-id {
  font-family: monospace;
  font-size: 11px;
  color: var(--text-muted, #64748b);
}
.ap-ct-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
  line-height: 1.4;
}
.ap-ct-badge-user { background: #e0f2fe; color: #0284c7; }
.ap-ct-badge-group { background: #f3e8ff; color: #7e22ce; }
.ap-ct-badge-label { background: #fef3c7; color: #b45309; }
.ap-ct-badge-admin { background: #fee2e2; color: #b91c1c; }



/* ============================================================================
   WANEXUS BROADCAST 1:1 STYLES & LIVE MONITOR HUD (Canva-Inspired Minimalist Light)
   ============================================================================ */

.wapilot-panel-base {
  --ap-bg-header: #ffffff;
  --ap-text-header: #0f172a;
  --ap-text: #0f172a;
  --ap-bg-body: #ffffff;
  --ap-bg-item: #ffffff;
  --ap-border-item: #e2e8f0;
  --ap-text-title: #0f172a;
  --ap-text-desc: #64748b;
  --ap-text-section: #0f766e;
  --ap-text-footer: #94a3b8;
  --ap-bg-footer: #ffffff;
  --ap-border-footer: transparent;
  --ap-icon-bg: rgba(15, 118, 110, 0.08);
  --ap-icon-color: #0f766e;
  --ap-hover-bg: #f8fafc;
  --ap-input-bg: #ffffff;
  --ap-border: #e2e8f0;
  --ap-primary: #0f766e;
  --ap-primary-hover: #115e59;
  --ap-accent-green: #10b981;
  --ap-accent-red: #ef4444;
  --ap-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  --ap-shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.08);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ap-text-title);
}

.wapilot-panel-base .ap-card {
  background: var(--ap-bg-item);
  border: 1px solid var(--ap-border);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 10px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.wapilot-panel-base .ap-section {
  font-size: 14px;
  font-weight: 700;
  color: var(--ap-text-title);
  margin-bottom: 8px;
}

.wapilot-panel-base label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--ap-text-desc);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.wapilot-panel-base input[type="text"],
.wapilot-panel-base input[type="url"],
.wapilot-panel-base input[type="number"],
.wapilot-panel-base select,
.wapilot-panel-base textarea {
  width: 100%;
  background: var(--ap-input-bg);
  border: 1px solid var(--ap-border);
  border-radius: 6px;
  padding: 8px 12px;
  color: var(--ap-text-title);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.wapilot-panel-base input:focus,
.wapilot-panel-base select:focus,
.wapilot-panel-base textarea:focus {
  border-color: var(--ap-primary);
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.12);
}

.wapilot-panel-base .ap-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s;
  text-decoration: none;
  line-height: 1.4;
}

.wapilot-panel-base .ap-btn-primary {
  background: var(--ap-primary);
  color: #fff;
  border-color: var(--ap-primary);
}
.wapilot-panel-base .ap-btn-primary:hover {
  background: var(--ap-primary-hover);
}

.wapilot-panel-base .ap-btn-secondary {
  background: #ffffff;
  color: var(--ap-text-title);
  border-color: var(--ap-border);
}
.wapilot-panel-base .ap-btn-secondary:hover {
  background: var(--ap-hover-bg);
  border-color: #cbd5e1;
}

.wapilot-panel-base .ap-btn-danger {
  background: var(--ap-accent-red);
  color: #fff;
  border-color: var(--ap-accent-red);
}
.wapilot-panel-base .ap-btn-danger:hover {
  filter: brightness(0.9);
}

.wapilot-panel-base .ap-btn-accent {
  background: #f0fdfa;
  color: var(--ap-primary);
  border: 1px solid var(--ap-primary);
}
.wapilot-panel-base .ap-btn-accent:hover {
  background: rgba(15, 118, 110, 0.12);
}

.wapilot-panel-base .ap-btn-sm {
  padding: 4px 10px;
  font-size: 11px;
}

.wapilot-panel-base .ap-badge {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.wapilot-panel-base .ap-badge.active {
  background: rgba(16, 185, 129, 0.12);
  color: var(--ap-accent-green);
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.wapilot-panel-base .ap-badge.inactive {
  background: rgba(100, 116, 139, 0.12);
  color: var(--ap-text-desc);
  border: 1px solid rgba(100, 116, 139, 0.25);
}

.wapilot-panel-base .ap-helper {
  margin: 0;
  font-size: 11.5px;
  color: var(--ap-text-desc);
  line-height: 1.45;
}

/* Stepper dots (1) (2) (3) (4) (5) (6) */
.wapilot-panel-base .ap-blast-steps {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 10px 0 14px;
}
.wapilot-panel-base .ap-blast-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--ap-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--ap-text-desc);
  background: #ffffff;
  cursor: pointer;
  transition: all 0.2s;
}
.wapilot-panel-base .ap-blast-dot.active {
  border-color: var(--ap-primary);
  color: var(--ap-primary);
  background: rgba(15, 118, 110, 0.08);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}
.wapilot-panel-base .ap-blast-dot.done {
  border-color: var(--ap-accent-green);
  color: #fff;
  background: var(--ap-accent-green);
}

/* Target and Mode Cards */
.wapilot-panel-base .ap-mode-card {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1.5px solid var(--ap-border);
  border-radius: 8px;
  cursor: pointer;
  background: #ffffff;
  color: var(--ap-text-desc);
  transition: all 0.18s;
}
.wapilot-panel-base .ap-mode-card:hover {
  border-color: rgba(15, 118, 110, 0.4);
}
.wapilot-panel-base .ap-mode-card.active {
  border-color: var(--ap-primary);
  background: rgba(15, 118, 110, 0.05);
  color: var(--ap-text-title);
  box-shadow: 0 1px 3px rgba(15, 118, 110, 0.08);
}
.wapilot-panel-base .ap-mode-card svg {
  color: var(--ap-primary);
}

.wapilot-panel-base .ap-blast-panel {
  display: none;
}
.wapilot-panel-base .ap-blast-panel.active {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wapilot-panel-base .ap-blast-nav {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}

/* Step 3: Column chips & interactive spreadsheet table */
.wapilot-panel-base #ap-blast-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.wapilot-panel-base .ap-blast-col-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  background: #f1f5f9;
  border: 1px solid var(--ap-border);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ap-text-title);
}
.wapilot-panel-base .ap-blast-col-del {
  cursor: pointer;
  color: var(--ap-text-desc);
  font-size: 11px;
}
.wapilot-panel-base .ap-blast-col-del:hover {
  color: var(--ap-accent-red);
}

.wapilot-panel-base .ap-blast-scroll {
  max-height: 280px;
  overflow: auto;
  border: 1px solid var(--ap-border);
  border-radius: 8px;
  background: #ffffff;
}
.wapilot-panel-base table.ap-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.wapilot-panel-base table.ap-table th {
  background: #f8fafc;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--ap-text-desc);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--ap-border);
  position: sticky;
  top: 0;
  z-index: 2;
}
.wapilot-panel-base table.ap-table td {
  padding: 6px 10px;
  border-bottom: 1px solid var(--ap-border);
  vertical-align: middle;
}
.wapilot-panel-base table.ap-table input {
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 4px;
}

/* Step 4: Variable chips & formatting toolbar */
.wapilot-panel-base .ap-var-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 8px;
}
.wapilot-panel-base .ap-var-chip {
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  padding: 3px 8px;
  border: 1px solid var(--ap-border);
  border-radius: 99px;
  background: #f8fafc;
  color: var(--ap-primary);
  cursor: pointer;
  font-weight: 600;
}
.wapilot-panel-base .ap-var-chip:hover {
  background: rgba(15, 118, 110, 0.1);
  border-color: var(--ap-primary);
}
.wapilot-panel-base .ap-fmt-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--ap-border);
}
.wapilot-panel-base .ap-fmt-btn {
  min-width: 28px;
  height: 26px;
  padding: 0 6px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid var(--ap-border);
  border-radius: 5px;
  background: #ffffff;
  color: var(--ap-text-title);
  cursor: pointer;
}
.wapilot-panel-base .ap-fmt-btn:hover {
  border-color: var(--ap-primary);
  color: var(--ap-primary);
}

/* Live Run HUD & Progress */
.wapilot-panel-base .ap-progress {
  margin: 6px 0;
}
.wapilot-panel-base .ap-progress-track {
  height: 8px;
  background: #e2e8f0;
  border-radius: 99px;
  overflow: hidden;
}
.wapilot-panel-base .ap-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--ap-accent-green);
  transition: width 0.25s ease-out;
}
.wapilot-panel-base .ap-progress-text {
  font-size: 11px;
  color: var(--ap-text-desc);
  margin-top: 4px;
  font-weight: 600;
}

/* Tabs: Live Feed vs Report */
.wapilot-panel-base .ap-blast-run-tabs {
  display: flex;
  gap: 6px;
  margin: 8px 0 10px;
  border-bottom: 1px solid var(--ap-border);
}
.wapilot-panel-base .ap-blast-run-tab {
  padding: 8px 16px;
  border: none;
  border-bottom: 2px solid transparent;
  background: none;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ap-text-desc);
  cursor: pointer;
  transition: all 0.15s;
}
.wapilot-panel-base .ap-blast-run-tab.active {
  color: var(--ap-primary);
  border-bottom-color: var(--ap-primary);
}

/* Live Feed Rows */
.wapilot-panel-base .ap-blast-log {
  max-height: 380px;
  overflow-y: auto;
  border: 1px solid var(--ap-border);
  border-radius: 8px;
  background: #ffffff;
}
.wapilot-panel-base .ap-blast-log-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--ap-border);
  font-size: 12px;
  transition: background 0.15s;
}
.wapilot-panel-base .ap-blast-log-row:last-child {
  border-bottom: none;
}
.wapilot-panel-base .ap-blast-log-icon {
  flex-shrink: 0;
  width: 18px;
  text-align: center;
  font-weight: 700;
  color: var(--ap-text-desc);
}
.wapilot-panel-base .ap-blast-log-row.is-sent .ap-blast-log-icon {
  color: var(--ap-accent-green);
}
.wapilot-panel-base .ap-blast-log-row.is-failed .ap-blast-log-icon {
  color: var(--ap-accent-red);
}
.wapilot-panel-base .ap-blast-log-row.is-sending {
  background: #f0fdfa;
}
.wapilot-panel-base .ap-blast-log-row.is-pending {
  opacity: 0.65;
}
.wapilot-panel-base .ap-blast-log-main {
  flex: 1;
  min-width: 0;
  color: var(--ap-text-title);
  overflow-wrap: anywhere;
}
.wapilot-panel-base .ap-blast-log-id,
.wapilot-panel-base .ap-blast-log-err {
  display: block;
  font-size: 10.5px;
  color: var(--ap-text-desc);
}
.wapilot-panel-base .ap-blast-log-err {
  color: var(--ap-accent-red);
  margin-top: 2px;
  font-weight: 600;
}
.wapilot-panel-base .ap-blast-log-time {
  flex-shrink: 0;
  font-size: 10.5px;
  color: var(--ap-text-desc);
  white-space: nowrap;
}

/* Donut Chart & Report */
.wapilot-panel-base .ap-blast-report-top, .ap-blast-report-top {
  display: flex;
  gap: 18px;
  align-items: center;
}
.wapilot-panel-base .ap-blast-donut, .ap-blast-donut {
  flex-shrink: 0;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wapilot-panel-base .ap-blast-donut-hole, .ap-blast-donut-hole {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.1;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.06);
}
.wapilot-panel-base .ap-blast-donut-hole b, .ap-blast-donut-hole b {
  font-size: 16px;
  color: var(--ap-text-title, #0f172a);
}
.wapilot-panel-base .ap-blast-donut-hole span, .ap-blast-donut-hole span {
  font-size: 9.5px;
  color: var(--ap-text-desc, #64748b);
  text-transform: uppercase;
}
.wapilot-panel-base .ap-blast-stats, .ap-blast-stats {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  min-width: 0;
}
.wapilot-panel-base .ap-blast-stats div, .ap-blast-stats div {
  display: flex;
  flex-direction: column;
}
.wapilot-panel-base .ap-blast-stats span, .ap-blast-stats span {
  font-size: 10.5px;
  color: var(--ap-text-desc, #64748b);
}
.wapilot-panel-base .ap-blast-stats b, .ap-blast-stats b {
  font-size: 13.5px;
  color: var(--ap-text-title, #0f172a);
}

.wapilot-panel-base .ap-blast-bars, .ap-blast-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 110px;
  margin-top: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.wapilot-panel-base .ap-blast-bar, .ap-blast-bar {
  flex: 1 0 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}
.wapilot-panel-base .ap-blast-bar-stack, .ap-blast-bar-stack {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.wapilot-panel-base .ap-blast-bar-ok, .ap-blast-bar-ok {
  background: var(--ap-accent-green, #10b981);
  border-radius: 2px 2px 0 0;
}
.wapilot-panel-base .ap-blast-bar-fail, .ap-blast-bar-fail {
  background: var(--ap-accent-red, #ef4444);
}
.wapilot-panel-base .ap-blast-bar span, .ap-blast-bar span {
  font-size: 9px;
  color: var(--ap-text-desc, #64748b);
  margin-top: 3px;
}
.wapilot-panel-base .ap-blast-legend, .ap-blast-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 11px;
  color: var(--ap-text-desc, #64748b);
}
.wapilot-panel-base .ap-blast-legend span, .ap-blast-legend span {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
}
.wapilot-panel-base .ap-blast-legend .ok, .ap-blast-legend .ok {
  background: var(--ap-accent-green, #10b981);
}
.wapilot-panel-base .ap-blast-legend .fail, .ap-blast-legend .fail {
  background: var(--ap-accent-red, #ef4444);
  margin-left: 6px;
}
.wapilot-panel-base .ap-blast-reasons, .ap-blast-reasons {
  margin: 6px 0 0 16px;
  padding: 0;
  font-size: 12px;
  color: var(--ap-text-title, #0f172a);
}

/* Session List in Hub */
.wapilot-panel-base .ap-session-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 520px;
  overflow-y: auto;
  padding-right: 2px;
}

/* ==========================================================================
   Hierarchical Session Grouping (Year -> Month Accordion)
   ========================================================================== */
.ap-session-year-group {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.ap-session-year-group:hover {
  border-color: #cbd5e1;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.ap-session-year-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #f8fafc;
  cursor: pointer;
  user-select: none;
  font-weight: 700;
  font-size: 13.5px;
  color: #1e293b;
  border-bottom: 1px solid transparent;
  transition: background 0.15s;
}

.ap-session-year-header:hover {
  background: #f1f5f9;
}

.ap-session-year-group.is-open > .ap-session-year-header {
  border-bottom-color: #e2e8f0;
  background: #f1f5f9;
}

.ap-session-year-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ap-session-year-chevron,
.ap-session-month-chevron {
  font-size: 11px;
  color: #64748b;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-block;
  width: 14px;
  text-align: center;
}

.ap-session-year-group.is-open > .ap-session-year-header .ap-session-year-chevron,
.ap-session-month-group.is-open > .ap-session-month-header .ap-session-month-chevron {
  transform: rotate(0deg);
}

.ap-session-year-group:not(.is-open) > .ap-session-year-header .ap-session-year-chevron,
.ap-session-month-group:not(.is-open) > .ap-session-month-header .ap-session-month-chevron {
  transform: rotate(-90deg);
}

.ap-session-year-content {
  display: none;
  padding: 10px;
  flex-direction: column;
  gap: 10px;
}

.ap-session-year-group.is-open > .ap-session-year-content {
  display: flex;
}

/* Month Sub-Group */
.ap-session-month-group {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fafafa;
  overflow: hidden;
  border-left: 3.5px solid var(--ap-primary, #0f766e);
  transition: border-color 0.15s;
}

.ap-session-month-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #ffffff;
  cursor: pointer;
  user-select: none;
  font-weight: 600;
  font-size: 12.5px;
  color: #334155;
  border-bottom: 1px solid transparent;
  transition: background 0.15s;
}

.ap-session-month-header:hover {
  background: #f8fafc;
}

.ap-session-month-group.is-open > .ap-session-month-header {
  border-bottom-color: #edf2f7;
}

.ap-session-month-title {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ap-session-month-content {
  display: none;
  padding: 8px;
  flex-direction: column;
  gap: 8px;
  background: #f8fafc;
}

.ap-session-month-group.is-open > .ap-session-month-content {
  display: flex;
}
.wapilot-panel-base .ap-session-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--ap-border);
  border-radius: 8px;
  background: #ffffff;
  transition: all 0.15s;
}
.wapilot-panel-base .ap-session-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.wapilot-panel-base .ap-session-card.is-running {
  border-color: var(--ap-accent-green);
  background: #f0fdfa;
}
.wapilot-panel-base .ap-session-card-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.wapilot-panel-base .ap-empty {
  padding: 20px;
  text-align: center;
  color: var(--ap-text-desc);
  font-size: 12px;
}
.wapilot-panel-base .ap-inline-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* Grid & Checkbox */
.wapilot-panel-base .ap-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.wapilot-panel-base .ap-checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  font-size: 12px;
  font-weight: 500;
  color: var(--ap-text-title);
}
.wapilot-panel-base .ap-checkbox-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--ap-primary);
  cursor: pointer;
}

/* ==========================================================================
   CANVA-STYLE AUTH & LOGIN SCREEN (LIGHT MODE, CLEAN & ELEGANT)
   ========================================================================== */

.auth-login-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: radial-gradient(100% 100% at 50% 0%, #f8fafc 0%, #e2e8f0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.auth-login-card {
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  border-radius: 24px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.08), 0 0 1px 1px rgba(15, 23, 42, 0.04);
  padding: 36px 32px 28px;
  animation: authSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes authSlideUp {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.auth-login-header {
  text-align: center;
  margin-bottom: 24px;
}

.auth-login-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  background: #f8fafc;
  padding: 6px 14px 6px 8px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
}

.auth-logo-box {
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-brand-info {
  text-align: left;
}

.auth-app-name {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.3px;
  line-height: 1.2;
}

.auth-app-tagline {
  font-size: 10.5px;
  font-weight: 600;
  color: #64748b;
}

.auth-welcome-title {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 6px;
  letter-spacing: -0.5px;
}

.auth-welcome-desc {
  font-size: 13px;
  color: #64748b;
  margin: 0;
  line-height: 1.5;
}

.auth-alert {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 18px;
  line-height: 1.4;
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #b91c1c;
  animation: authFadeIn 0.2s ease;
}

@keyframes authFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-form-group {
  margin-bottom: 16px;
}

.auth-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 6px;
  letter-spacing: -0.2px;
}

.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-icon {
  position: absolute;
  left: 14px;
  font-size: 14px;
  pointer-events: none;
  opacity: 0.6;
}

.auth-input {
  width: 100%;
  height: 44px;
  padding: 0 42px 0 38px;
  border-radius: 12px;
  border: 1.5px solid #e2e8f0;
  background: #f8fafc;
  font-size: 13.5px;
  color: #0f172a;
  font-family: inherit;
  transition: all 0.2s ease;
}

.auth-input:focus {
  outline: none;
  background: #ffffff;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.auth-pwd-toggle {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  font-size: 14px;
  opacity: 0.6;
  transition: opacity 0.15s;
}

.auth-pwd-toggle:hover {
  opacity: 1;
}

.auth-form-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.auth-forgot-link:hover {
  text-decoration: underline !important;
}

.auth-remember-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
}

.auth-remember-wrap input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #6366f1;
  border-radius: 4px;
  cursor: pointer;
}

.auth-btn-submit {
  width: 100%;
  height: 46px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.2px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.auth-btn-submit:hover {
  background: linear-gradient(135deg, #4338ca 0%, #4f46e5 100%);
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.35);
  transform: translateY(-1px);
}

.auth-btn-submit:active {
  transform: translateY(0);
}

.auth-default-hint {
  margin-top: 20px;
  padding: 12px 14px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px dashed #cbd5e1;
  font-size: 11.5px;
  color: #475569;
  line-height: 1.5;
}

.auth-hint-header {
  font-weight: 700;
  color: #334155;
  margin-bottom: 4px;
}

.auth-hint-body code {
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  background: #ffffff;
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  display: inline-block;
  color: #0f766e;
}

.auth-hint-note {
  margin: 4px 0 0;
  font-size: 10.5px;
  color: #64748b;
}

.auth-security-badge {
  margin-top: 16px;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: #0f766e;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* TOPBAR AUTH PROFILE WIDGET */
.auth-user-dropdown {
  position: relative;
}

.auth-profile-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 8px;
}

.auth-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 220px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
  padding: 6px;
  z-index: 1000;
  animation: authFadeIn 0.15s ease;
}

.auth-dropdown-header {
  padding: 8px 10px 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.auth-dropdown-header strong {
  font-size: 13px;
  color: #0f172a;
}

.auth-dropdown-header .badge {
  align-self: flex-start;
  font-size: 10px;
  padding: 2px 6px;
  background: #e0f2fe;
  color: #0369a1;
  border-radius: 4px;
  font-weight: 700;
}

.auth-dropdown-divider {
  height: 1px;
  background: #e2e8f0;
  margin: 4px 0;
}

.auth-dropdown-item {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.15s ease;
}

.auth-dropdown-item:hover {
  background: #f1f5f9;
}

.auth-dropdown-item.text-danger {
  color: #e11d48;
}

.auth-dropdown-item.text-danger:hover {
  background: #fff1f2;
}

/* User Admin Table in Modal */
.admin-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 12px;
}

.admin-user-row:last-child {
  border-bottom: none;
}

.admin-user-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-user-info strong {
  color: #0f172a;
  font-size: 12.5px;
}

.admin-user-info span {
  color: #64748b;
  font-size: 11px;
}
