/* Engagement Driver — Shared Styles */
:root {
  --bg: #0D0B08;
  --bg-card: #1a1815;
  --bg-card-hover: #252220;
  --gold: #FAE2B7;
  --gold-dim: #c4a96e;
  --white: #FFFFFF;
  --text: #e8e4de;
  --text-muted: #888888;
  --green: #4ade80;
  --red: #ef4444;
  --orange: #f97316;
  --blue: #60a5fa;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

.container { max-width: 960px; margin: 0 auto; padding: 20px; }
.container-wide { max-width: 1200px; margin: 0 auto; padding: 20px; }

h1, h2, h3 {
  font-family: 'Montserrat', 'Inter', sans-serif;
  font-weight: 700;
  color: var(--white);
}

h1 { font-size: 1.75rem; margin-bottom: 8px; }
h2 { font-size: 1.25rem; margin-bottom: 6px; }
h3 { font-size: 1rem; }

a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-primary {
  background: var(--gold);
  color: var(--bg);
}
.btn-primary:hover { background: var(--gold-dim); }

.btn-fire {
  background: var(--orange);
  color: white;
}
.btn-fire:hover { background: #ea580c; }

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

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid #333;
}
.btn-ghost:hover { border-color: var(--gold-dim); color: var(--gold); }

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

/* Cards */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid #2a2520;
  transition: border-color 0.2s;
}
.card:hover { border-color: #3a352f; }

/* Stats */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
  border: 1px solid #2a2520;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

/* Status badges */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-live { background: rgba(74,222,128,0.15); color: var(--green); }
.badge-queued { background: rgba(250,226,183,0.12); color: var(--gold); }
.badge-expired { background: rgba(136,136,136,0.15); color: var(--text-muted); }
.badge-draft { background: rgba(96,165,250,0.15); color: var(--blue); }
.badge-cancelled { background: rgba(239,68,68,0.15); color: var(--red); }

/* Pulse animation for live indicators */
.pulse {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

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

.toast {
  background: var(--bg-card);
  border: 1px solid #3a352f;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  min-width: 280px;
  box-shadow: var(--shadow);
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Forms */
input, select, textarea {
  background: var(--bg);
  color: var(--text);
  border: 1px solid #333;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.9rem;
  font-family: inherit;
  width: 100%;
  transition: border-color 0.2s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--gold-dim);
}

label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

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

/* Connection status bar */
.status-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 20px;
}

.status-bar.connected { border-left: 3px solid var(--green); }
.status-bar.disconnected { border-left: 3px solid var(--red); }

/* Mobile-first responsive */
@media (max-width: 600px) {
  .container { padding: 12px; }
  h1 { font-size: 1.4rem; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-value { font-size: 1.5rem; }
}
