/* ==========================================================================
   WHATSAPP BIRTHDAY AUTOMATION & MESSAGING HUB - STYLESHEET
   Design Theme: Deep Dark Glassmorphism, Emerald & Amethyst Accents
   ========================================================================== */

:root {
  --bg-primary: #070a12;
  --bg-secondary: #0d1322;
  --card-bg: rgba(17, 24, 39, 0.78);
  --card-border: rgba(255, 255, 255, 0.08);
  --card-hover-border: rgba(16, 185, 129, 0.3);
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --emerald-400: #34d399;
  --emerald-500: #10b981;
  --emerald-600: #059669;
  --emerald-glow: rgba(16, 185, 129, 0.35);

  --violet-400: #a78bfa;
  --violet-500: #8b5cf6;
  --violet-600: #7c3aed;
  --violet-glow: rgba(139, 92, 246, 0.35);

  --amber-400: #fbbf24;
  --amber-500: #f59e0b;
  --rose-500: #f43f5e;
  --cyan-400: #38bdf8;

  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 25px rgba(16, 185, 129, 0.25);

  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  line-height: 1.5;
}

/* --- Ambient Glowing Mesh Background --- */
.app-background-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
  animation: floatOrb 18s ease-in-out infinite alternate;
}

.glow-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #059669 0%, rgba(5, 150, 105, 0) 70%);
  top: -100px;
  left: -100px;
}

.glow-2 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #7c3aed 0%, rgba(124, 58, 237, 0) 70%);
  bottom: -150px;
  right: -100px;
  animation-delay: -6s;
}

.glow-3 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, #0284c7 0%, rgba(2, 132, 199, 0) 70%);
  top: 45%;
  left: 35%;
  animation-delay: -12s;
  opacity: 0.25;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, 40px) scale(1.1); }
  100% { transform: translate(-40px, 80px) scale(0.95); }
}

/* --- App Container --- */
.app-container {
  max-width: 1380px;
  margin: 0 auto;
  padding: 24px 24px 48px;
  position: relative;
  z-index: 1;
}

/* --- Header Section --- */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--card-border);
}

.brand-area {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-icon-wrapper {
  position: relative;
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, var(--emerald-500), var(--violet-600));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px var(--emerald-glow);
}

.brand-icon {
  width: 28px;
  height: 28px;
  color: #fff;
}

.brand-pulse {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 12px;
  height: 12px;
  background: var(--emerald-400);
  border: 2px solid var(--bg-primary);
  border-radius: 50%;
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(52, 211, 153, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(to right, #ffffff, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.header-badges {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-indicator.green {
  background-color: var(--emerald-400);
  box-shadow: 0 0 8px var(--emerald-400);
}

.status-indicator.yellow {
  background-color: var(--amber-400);
  box-shadow: 0 0 8px var(--amber-400);
}

.status-indicator.red {
  background-color: var(--rose-500);
  box-shadow: 0 0 8px var(--rose-500);
}

/* --- Navigation Tabs --- */
.nav-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  background: rgba(13, 19, 34, 0.6);
  backdrop-filter: blur(16px);
  padding: 6px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--card-border);
  overflow-x: auto;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
}

.tab-btn.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(139, 92, 246, 0.25));
  border: 1px solid rgba(16, 185, 129, 0.4);
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.15);
}

.tab-btn i {
  width: 18px;
  height: 18px;
}

.tab-badge {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  font-weight: 700;
}

.tab-badge.green {
  background: rgba(16, 185, 129, 0.2);
  color: var(--emerald-400);
}

/* --- Layout Grids --- */
.grid-2-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 1024px) {
  .grid-2-col {
    grid-template-columns: 1fr;
  }
}

.tab-pane {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-pane.active {
  display: block;
}

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

/* --- Glassmorphic Card Container --- */
.glass-card {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-icon {
  width: 24px;
  height: 24px;
}

.text-accent { color: var(--violet-400); }
.text-success { color: var(--emerald-400); }

.card-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}

.card-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* --- Badges & Statuses --- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.badge.idle { background: rgba(148, 163, 184, 0.15); color: #cbd5e1; }
.badge.running { background: rgba(16, 185, 129, 0.2); color: var(--emerald-400); border: 1px solid rgba(16, 185, 129, 0.4); }
.badge.paused { background: rgba(245, 158, 11, 0.2); color: var(--amber-400); border: 1px solid rgba(245, 158, 11, 0.4); }
.badge.completed { background: rgba(139, 92, 246, 0.2); color: var(--violet-400); }

/* --- Forms & Inputs --- */
.form-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

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

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 640px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

input[type="text"],
input[type="number"],
textarea,
select {
  width: 100%;
  background: rgba(13, 19, 34, 0.85);
  border: 1px solid var(--card-border);
  color: #fff;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: var(--transition);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--emerald-500);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

textarea {
  resize: vertical;
}

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

.input-with-icon i {
  position: absolute;
  left: 12px;
  width: 18px;
  height: 18px;
  color: var(--text-dim);
  pointer-events: none;
}

.input-with-icon input {
  padding-left: 40px;
}

.helper-text {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* --- Interval Buttons --- */
.interval-selector {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(85px, 1fr));
  gap: 8px;
}

.interval-btn {
  background: rgba(13, 19, 34, 0.7);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  padding: 10px 8px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  transition: var(--transition);
}

.interval-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.interval-btn.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(5, 150, 105, 0.4));
  border-color: var(--emerald-500);
  color: #fff;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.3);
}

.interval-btn .sub-label {
  font-size: 0.65rem;
  opacity: 0.8;
  font-weight: 500;
}

.custom-interval-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.custom-interval-input-wrap.hidden {
  display: none;
}

.input-unit {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* --- Radio Cards --- */
.radio-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.radio-card {
  position: relative;
  background: rgba(13, 19, 34, 0.6);
  border: 1px solid var(--card-border);
  padding: 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  gap: 10px;
  transition: var(--transition);
}

.radio-card input {
  margin-top: 3px;
  accent-color: var(--emerald-500);
}

.radio-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.radio-card.active {
  background: rgba(16, 185, 129, 0.08);
  border-color: var(--emerald-500);
}

.radio-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.radio-title i {
  width: 15px;
  height: 15px;
  color: var(--emerald-400);
}

.radio-desc {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 2px;
}

.template-selector-box {
  background: rgba(13, 19, 34, 0.8);
  border: 1px dashed rgba(139, 92, 246, 0.4);
  padding: 14px;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.template-selector-box.hidden {
  display: none;
}

/* --- Wishes Preview List --- */
.wishes-preview-list {
  max-height: 240px;
  overflow-y: auto;
  background: rgba(13, 19, 34, 0.6);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wish-item-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.03);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
}

.wish-item-row:hover {
  border-color: var(--card-border);
}

.wish-hour-tag {
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(139, 92, 246, 0.2);
  color: var(--violet-400);
  padding: 3px 6px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.wish-input-field {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 0.82rem;
}

.wish-input-field:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
}

.btn i {
  width: 18px;
  height: 18px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--emerald-500), var(--emerald-600));
  color: #fff;
  box-shadow: 0 4px 15px var(--emerald-glow);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--emerald-400), var(--emerald-500));
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--emerald-glow);
}

.btn-success {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
}

.btn-warning {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
}

.btn-danger {
  background: linear-gradient(135deg, #f43f5e, #e11d48);
  color: #fff;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid var(--card-border);
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.14);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--card-border);
  color: var(--text-muted);
}

.btn-outline:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.btn-text {
  background: none;
  border: none;
  color: var(--violet-400);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-text:hover {
  color: #fff;
  text-decoration: underline;
}

.btn-icon {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.btn-icon:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.btn-block {
  width: 100%;
}

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

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

/* --- Countdown Hero Monitor --- */
.monitor-card {
  display: flex;
  flex-direction: column;
}

.monitor-dashboard {
  background: rgba(13, 19, 34, 0.7);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.monitor-dashboard::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--emerald-500), transparent);
}

.timer-label {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  font-weight: 700;
}

.timer-digits {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, #ffffff, var(--emerald-400));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 6px 0;
  text-shadow: 0 0 30px rgba(16, 185, 129, 0.2);
}

.timer-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.progress-section {
  margin: 20px 0;
  text-align: left;
}

.progress-meta {
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.meta-label { color: var(--text-dim); }
.meta-val { color: var(--emerald-400); }

.progress-bar-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--emerald-500), var(--cyan-400));
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

.campaign-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

/* --- Queue Section --- */
.queue-section {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.section-subtitle {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.queue-list {
  flex: 1;
  max-height: 280px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
}

.queue-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(13, 19, 34, 0.6);
  border: 1px solid var(--card-border);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  transition: var(--transition);
}

.queue-item.current {
  border-color: var(--emerald-500);
  background: rgba(16, 185, 129, 0.05);
}

.queue-item.sent {
  opacity: 0.75;
}

.queue-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
}

.queue-num {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--text-dim);
  min-width: 24px;
}

.queue-text {
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}

.queue-status-tag {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.queue-status-tag.pending { background: rgba(255, 255, 255, 0.08); color: var(--text-dim); }
.queue-status-tag.sent { background: rgba(16, 185, 129, 0.2); color: var(--emerald-400); }
.queue-status-tag.failed { background: rgba(244, 63, 94, 0.2); color: var(--rose-500); }

/* --- Two-Way Live Chat Interface --- */
.chat-container {
  display: grid;
  grid-template-columns: 320px 1fr;
  height: 680px;
  padding: 0;
  overflow: hidden;
}

@media (max-width: 860px) {
  .chat-container {
    grid-template-columns: 1fr;
    height: 780px;
  }
}

.chat-sidebar {
  border-right: 1px solid var(--card-border);
  background: rgba(10, 15, 28, 0.7);
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sidebar-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
}

.contact-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
}

.contact-item:hover,
.contact-item.active {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--card-border);
}

.contact-item.active {
  border-color: rgba(16, 185, 129, 0.3);
}

.contact-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--emerald-600), var(--violet-600));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.contact-info {
  flex: 1;
  overflow: hidden;
}

.contact-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-phone {
  font-size: 0.78rem;
  color: var(--text-dim);
}

.online-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald-400);
}

.simulate-reply-box {
  padding: 16px;
  border-top: 1px solid var(--card-border);
  background: rgba(13, 19, 34, 0.9);
}

.simulate-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--violet-400);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.simulate-desc {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.simulate-inputs {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.simulate-inputs input {
  font-size: 0.8rem;
  padding: 6px 10px;
}

/* --- Chat Main Area --- */
.chat-main {
  display: flex;
  flex-direction: column;
  background: rgba(7, 10, 18, 0.5);
}

.chat-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(13, 19, 34, 0.5);
}

.chat-header-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.2);
  color: var(--emerald-400);
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-title {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

.chat-sub {
  font-size: 0.75rem;
  color: var(--text-dim);
}

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

.chat-system-notice {
  text-align: center;
  margin: 10px 0;
}

.chat-system-notice span {
  font-size: 0.72rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-dim);
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

/* Chat Bubbles */
.chat-bubble {
  max-width: 72%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 0.9rem;
  line-height: 1.45;
  position: relative;
  word-break: break-word;
  animation: slideBubble 0.2s ease;
}

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

.chat-bubble.outgoing {
  align-self: flex-end;
  background: linear-gradient(135deg, #059669, #047857);
  color: #fff;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.2);
}

.chat-bubble.incoming {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.09);
  color: #f1f5f9;
  border-bottom-left-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.bubble-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 4px;
  font-size: 0.7rem;
  opacity: 0.75;
}

.bubble-checks {
  font-size: 0.75rem;
  color: #a7f3d0;
}

.bubble-checks.read {
  color: #38bdf8; /* WhatsApp blue checks */
}

/* Chat Composer */
.chat-composer {
  padding: 14px 20px;
  border-top: 1px solid var(--card-border);
  background: rgba(13, 19, 34, 0.8);
}

.composer-form {
  display: flex;
  gap: 10px;
}

.composer-form input {
  flex: 1;
  padding: 12px 16px;
  border-radius: var(--radius-full);
}

.composer-form .btn {
  border-radius: var(--radius-full);
  padding: 0 22px;
}

/* --- Alerts & Guides --- */
.alert-box {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  display: flex;
  gap: 12px;
  font-size: 0.82rem;
  line-height: 1.4;
  margin-bottom: 18px;
}

.alert-warning {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fef3c7;
}

.alert-warning i {
  color: var(--amber-400);
  flex-shrink: 0;
  margin-top: 2px;
}

.webhook-setup-guide {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--card-border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.guide-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
}

.guide-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.guide-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.guide-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
}

.copy-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(13, 19, 34, 0.9);
  border: 1px solid var(--card-border);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
}

.copy-field code {
  font-family: monospace;
  font-size: 0.8rem;
  color: var(--emerald-400);
  word-break: break-all;
}

.btn-copy {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  margin-left: 8px;
  display: flex;
  align-items: center;
}

.btn-copy:hover {
  color: #fff;
}

/* --- Quick Template Box & Templates List --- */
.quick-template-send-box {
  background: rgba(13, 19, 34, 0.7);
  border: 1px solid rgba(139, 92, 246, 0.3);
  padding: 16px;
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quick-box-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--violet-400);
  display: flex;
  align-items: center;
  gap: 8px;
}

.quick-box-desc {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.templates-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 380px;
  overflow-y: auto;
}

.template-card {
  background: rgba(13, 19, 34, 0.6);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: var(--transition);
}

.template-card:hover {
  border-color: rgba(139, 92, 246, 0.4);
}

.template-params-editor {
  background: rgba(8, 12, 22, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.params-editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--violet-400);
}

.params-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.param-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.param-pill-label {
  font-family: monospace;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--emerald-400);
  background: rgba(16, 185, 129, 0.12);
  padding: 2px 6px;
  border-radius: 4px;
  align-self: flex-start;
}

.param-text-input {
  background: rgba(13, 19, 34, 0.9);
  border: 1px solid var(--card-border);
  padding: 6px 10px;
  font-size: 0.82rem;
  border-radius: 6px;
  color: #fff;
}

.param-text-input:focus {
  border-color: var(--emerald-500);
  outline: none;
}

.template-preview-live {
  background: rgba(13, 19, 34, 0.9);
  border-left: 3px solid var(--emerald-500);
  padding: 10px 14px;
  border-radius: 4px;
  font-size: 0.82rem;
  line-height: 1.5;
  color: #e2e8f0;
  white-space: pre-line;
}

.highlight-param {
  background: rgba(16, 185, 129, 0.25);
  color: var(--emerald-400);
  padding: 1px 4px;
  border-radius: 3px;
  font-weight: 700;
}

.card-actions-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Scheduler Template Dynamic Rows */
.template-wish-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  transition: all 0.2s ease;
}

.template-wish-row:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(16, 185, 129, 0.3);
}

.template-wish-row.active-preview {
  border-color: var(--emerald-500);
  background: rgba(16, 185, 129, 0.04);
}

.wish-row-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.btn-preview-row-msg {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
}

.btn-preview-row-msg:hover,
.template-wish-row.active-preview .btn-preview-row-msg {
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald-400);
  border-color: var(--emerald-500);
}

.template-params-row-grid {
  display: flex;
  gap: 8px;
  width: 100%;
  align-items: flex-start;
  flex-wrap: wrap;
}

.param-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.param-mini-label {
  font-family: monospace;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--emerald-400);
  background: rgba(16, 185, 129, 0.12);
  padding: 1px 6px;
  border-radius: 3px;
  align-self: flex-start;
}

.template-param-input {
  background: rgba(13, 19, 34, 0.85);
  border: 1px solid var(--card-border);
  padding: 6px 10px;
  font-size: 0.82rem;
  border-radius: 4px;
  color: #fff;
  width: 100%;
}

.template-param-input:focus {
  border-color: var(--emerald-500);
  outline: none;
  background: rgba(16, 185, 129, 0.05);
}

.template-no-params-tag {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
  padding: 4px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.template-zero-params-alert {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 8px;
}

.template-zero-params-alert .alert-icon {
  color: var(--cyan-400);
  margin-top: 2px;
}

.template-zero-params-alert .alert-content {
  font-size: 0.8rem;
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.quick-switch-btn {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: var(--emerald-400);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.quick-switch-btn:hover {
  background: rgba(16, 185, 129, 0.3);
  color: #fff;
  border-color: var(--emerald-400);
}

.template-info-banner {
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.template-info-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--violet-300);
}

.template-live-preview-box {
  background: rgba(13, 19, 34, 0.95);
  border-left: 3px solid var(--emerald-500);
  padding: 10px 12px;
  border-radius: 4px;
  font-size: 0.82rem;
  color: #e2e8f0;
  line-height: 1.5;
  white-space: pre-line;
}

.batch-autofill-box {
  background: rgba(16, 185, 129, 0.05);
  border: 1px dashed rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.batch-autofill-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--emerald-400);
}

.template-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.template-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
}

.template-tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  background: rgba(16, 185, 129, 0.2);
  color: var(--emerald-400);
}

.template-tag.pending {
  background: rgba(245, 158, 11, 0.2);
  color: var(--amber-400);
}

.template-body-preview {
  font-size: 0.8rem;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.2);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  white-space: pre-line;
}

/* --- Logs Console --- */
.logs-console {
  background: #03060c;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 16px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.82rem;
  height: 520px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.log-entry {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 4px 6px;
  border-radius: 4px;
  line-height: 1.4;
}

.log-entry:hover {
  background: rgba(255, 255, 255, 0.03);
}

.log-time {
  color: var(--text-dim);
  font-size: 0.75rem;
  white-space: nowrap;
}

.log-level {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  white-space: nowrap;
}

.log-level.INFO { background: rgba(56, 189, 248, 0.15); color: var(--cyan-400); }
.log-level.SUCCESS { background: rgba(16, 185, 129, 0.15); color: var(--emerald-400); }
.log-level.WARN { background: rgba(245, 158, 11, 0.15); color: var(--amber-400); }
.log-level.ERROR { background: rgba(244, 63, 94, 0.15); color: var(--rose-500); }

.log-category {
  color: var(--violet-400);
  font-weight: 600;
  font-size: 0.75rem;
  white-space: nowrap;
}

.log-msg {
  flex: 1;
  color: #e2e8f0;
  word-break: break-all;
}

/* Empty States */
.empty-state {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-dim);
}

.empty-state i {
  width: 36px;
  height: 36px;
  margin-bottom: 8px;
  opacity: 0.5;
}

.empty-state p {
  font-size: 0.85rem;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 1000;
}

.toast {
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  color: #fff;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease;
  min-width: 280px;
}

.toast.success { border-color: var(--emerald-500); }
.toast.error { border-color: var(--rose-500); }
.toast.info { border-color: var(--cyan-400); }

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