/* ============================
   Reset & Base
   ============================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --color-primary: #25d366;
  --color-primary-dark: #128c7e;
  --color-bg: #f9fafb;
  --color-surface: #ffffff;
  --color-border: #e5e7eb;
  --color-text: #111827;
  --color-text-muted: #6b7280;
  --color-danger: #ef4444;
  --color-success: #22c55e;
  --color-warning: #f59e0b;
  --color-blue: #3b82f6;
  --color-purple: #8b5cf6;
  --sidebar-width: 240px;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
}

html { font-size: 14px; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: var(--color-bg); color: var(--color-text); line-height: 1.5; }
a { color: var(--color-primary-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
input, select, textarea, button { font-family: inherit; font-size: inherit; }

/* ============================
   Portal Layout
   ============================ */
.portal-layout { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-width);
  background: #111827;
  color: #e5e7eb;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1.25rem 1rem;
  border-bottom: 1px solid #1f2937;
}
.brand-icon { font-size: 1.5rem; }
.brand-name { font-size: 1.1rem; font-weight: 700; color: #fff; }

.sidebar-nav { list-style: none; padding: 0.75rem 0; flex: 1; }
.sidebar-nav li a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 1rem;
  color: #9ca3af;
  transition: all 0.15s;
  border-radius: 0;
  text-decoration: none;
  font-size: 0.9rem;
}
.sidebar-nav li a:hover { background: #1f2937; color: #fff; text-decoration: none; }
.sidebar-nav li.active a { background: #1f2937; color: #fff; border-left: 3px solid var(--color-primary); }
.nav-icon { font-size: 1rem; width: 1.2rem; text-align: center; }

.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid #1f2937;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.merchant-name { font-size: 0.85rem; color: #9ca3af; }
.logout-link { font-size: 0.8rem; color: #6b7280; }
.logout-link:hover { color: var(--color-danger); }

.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.page-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
}
.page-title { font-size: 1.25rem; font-weight: 600; }

.page-body { padding: 1.5rem; }

/* ============================
   Auth Layout
   ============================ */
.auth-layout {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
}
.auth-card {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-md);
}
.auth-brand { text-align: center; margin-bottom: 2rem; }
.brand-icon-lg { font-size: 3rem; display: block; margin-bottom: 0.5rem; }
.auth-brand h1 { font-size: 1.5rem; font-weight: 700; }
.auth-brand p { color: var(--color-text-muted); font-size: 0.9rem; margin-top: 0.25rem; }
.auth-form { display: flex; flex-direction: column; gap: 1rem; }

/* ============================
   Customer Layout
   ============================ */
.customer-layout {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  padding: 1rem;
}
.customer-card {
  background: var(--color-surface);
  border-radius: 16px;
  padding: 2rem;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-md);
}
.customer-brand { text-align: center; margin-bottom: 1.5rem; }
.wa-logo { font-size: 3rem; margin-bottom: 0.5rem; }
.customer-brand h1 { font-size: 1.4rem; font-weight: 700; }
.customer-brand p { color: var(--color-text-muted); font-size: 0.9rem; }

.qr-section { margin: 1.5rem 0; text-align: center; }
.qr-instructions { font-size: 0.85rem; color: var(--color-text-muted); margin-bottom: 1rem; }
.qr-container { display: inline-block; padding: 1rem; border: 2px solid var(--color-border); border-radius: var(--radius); }
.qr-image { max-width: 200px; display: block; }

.divider-text {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  margin: 1rem 0;
  position: relative;
}
.divider-text::before, .divider-text::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: var(--color-border);
}
.divider-text::before { left: 0; }
.divider-text::after { right: 0; }

.btn-wa {
  background: #25d366;
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-wa:hover { background: #22bf5c; color: #fff; text-decoration: none; }

.how-it-works { margin-top: 1.5rem; }
.how-it-works h3 { font-size: 0.9rem; font-weight: 600; margin-bottom: 0.75rem; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.how-it-works ol { padding-left: 1.25rem; font-size: 0.85rem; color: var(--color-text-muted); display: flex; flex-direction: column; gap: 0.4rem; }

/* Manage Preferences */
.manage-form { display: flex; flex-direction: column; gap: 1rem; }
.pref-toggles { display: flex; flex-direction: column; gap: 0; }
.pref-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--color-border);
}
.pref-info { display: flex; flex-direction: column; gap: 0.2rem; }
.pref-info span { font-size: 0.8rem; color: var(--color-text-muted); }
.toggle-switch-wrap { display: flex; align-items: center; }

/* ============================
   Components
   ============================ */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s;
  white-space: nowrap;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--color-primary-dark); color: #fff; border-color: var(--color-primary-dark); }
.btn-primary:hover { background: #0e7369; border-color: #0e7369; }
.btn-outline { background: transparent; color: var(--color-text); border-color: var(--color-border); }
.btn-outline:hover { background: var(--color-bg); }
.btn-danger { background: var(--color-danger); color: #fff; border-color: var(--color-danger); }
.btn-danger:hover { background: #dc2626; }
.btn-danger-outline { background: transparent; color: var(--color-danger); border-color: var(--color-danger); }
.btn-sm { padding: 0.3rem 0.65rem; font-size: 0.8rem; }
.btn-xs { padding: 0.2rem 0.45rem; font-size: 0.75rem; }
.btn-lg { padding: 0.7rem 1.4rem; font-size: 0.95rem; }
.btn-block { width: 100%; justify-content: center; }

/* Cards */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}
.card-header {
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fafafa;
}
.card-header h2 { font-size: 0.95rem; font-weight: 600; }

/* Alerts */
.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* Forms */
.form-group { display: flex; flex-direction: column; gap: 0.35rem; }
.form-group label { font-size: 0.85rem; font-weight: 500; color: var(--color-text); }
.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  color: var(--color-text);
  transition: border-color 0.15s;
  width: 100%;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary-dark);
}
.form-hint { font-size: 0.78rem; color: var(--color-text-muted); margin-top: 0.2rem; }
.form-desc { font-size: 0.85rem; color: var(--color-text-muted); margin-bottom: 0.75rem; }
.form-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.form-row > .form-group { flex: 1; min-width: 180px; }
.form-row > .flex-2 { flex: 2; }
.form-section { padding: 1.25rem; border-bottom: 1px solid var(--color-border); }
.form-section:last-child { border-bottom: none; }
.form-section h3 { font-size: 0.9rem; font-weight: 600; margin-bottom: 0.5rem; }
.form-actions { padding-top: 1rem; display: flex; gap: 0.75rem; }
.form-actions-inline { display: flex; gap: 0.5rem; align-items: center; }
.inline-form { padding: 1.25rem; }

/* Radio & Checkbox Cards */
.radio-group, .checkbox-group {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
  margin-top: 0.5rem;
}
.radio-card, .checkbox-card {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s;
}
.radio-card:hover, .checkbox-card:hover { border-color: var(--color-primary-dark); background: #f0fdf4; }
.radio-card input, .checkbox-card input { margin-top: 0.2rem; flex-shrink: 0; }
.radio-content, .checkbox-content { display: flex; flex-direction: column; gap: 0.15rem; }
.radio-content strong, .checkbox-content strong { font-size: 0.85rem; }
.radio-content span, .checkbox-content span { font-size: 0.78rem; color: var(--color-text-muted); }

.checkbox-inline-group { display: flex; gap: 1.5rem; flex-wrap: wrap; align-items: center; }
.check-inline { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; cursor: pointer; white-space: nowrap; }
.check-inline input[type="checkbox"] { width: 16px; height: 16px; flex-shrink: 0; cursor: pointer; }

.label-inline { font-size: 0.85rem; font-weight: 500; margin-bottom: 0.35rem; display: block; }
.form-row-align { align-items: flex-end; }
.required { color: var(--color-danger); }

/* Toggle Switch */
.toggle-input { display: none; }
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  background: #d1d5db;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s;
}
.toggle-switch::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  top: 2px;
  left: 2px;
  transition: transform 0.2s;
  box-shadow: var(--shadow);
}
.toggle-input:checked + .toggle-switch { background: var(--color-primary); }
.toggle-input:checked + .toggle-switch::after { transform: translateX(20px); }
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--color-border);
}
.toggle-info { display: flex; flex-direction: column; gap: 0.2rem; }
.toggle-info strong { font-size: 0.9rem; }
.toggle-info span { font-size: 0.8rem; color: var(--color-text-muted); }

/* Tables */
.table { width: 100%; border-collapse: collapse; }
.table th {
  padding: 0.65rem 1.25rem;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: #fafafa;
  border-bottom: 1px solid var(--color-border);
}
.table td {
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.85rem;
  vertical-align: middle;
}
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: #f9fafb; }

.empty-state { text-align: center; color: var(--color-text-muted); padding: 2rem !important; }
.empty-state-lg { padding: 3rem; text-align: center; color: var(--color-text-muted); }
.phone-cell { font-family: monospace; font-size: 0.85rem; }
.time-cell { font-size: 0.8rem; color: var(--color-text-muted); }
.message-preview { font-size: 0.8rem; color: var(--color-text-muted); max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.check-yes { color: var(--color-success); font-weight: 700; }
.check-no { color: var(--color-border); }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge-blue { background: #dbeafe; color: #1d4ed8; }
.badge-purple { background: #ede9fe; color: #6d28d9; }
.badge-green { background: #dcfce7; color: #166534; }
.badge-orange { background: #ffedd5; color: #c2410c; }
.badge-red { background: #fef2f2; color: #991b1b; }
.badge-gray { background: #f3f4f6; color: #4b5563; }

.badge-status-opted_in { background: #dcfce7; color: #166534; }
.badge-status-opted_out { background: #fef2f2; color: #991b1b; }
.badge-status-pending { background: #fef9c3; color: #854d0e; }

.badge-type-otp { background: #dbeafe; color: #1d4ed8; }
.badge-type-trx { background: #ede9fe; color: #6d28d9; }
.badge-type-marketing { background: #dcfce7; color: #166534; }
.badge-type-optin { background: #f3f4f6; color: #4b5563; }

.badge-status-queued { background: #fef9c3; color: #854d0e; }
.badge-status-sent { background: #dbeafe; color: #1d4ed8; }
.badge-status-delivered { background: #dcfce7; color: #166534; }
.badge-status-failed { background: #fef2f2; color: #991b1b; }

.badge-channel-private { background: #f3f4f6; color: #4b5563; }
.badge-channel-meta { background: #dbeafe; color: #1d4ed8; }

.badge-tier-seedling { background: #fef2f2; color: #991b1b; }
.badge-tier-sprouting { background: #ffedd5; color: #c2410c; }
.badge-tier-growing { background: #fef9c3; color: #854d0e; }
.badge-tier-established { background: #dcfce7; color: #166534; }
.badge-tier-trusted { background: #cffafe; color: #0e7490; }

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.stat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.stat-icon { font-size: 1.75rem; width: 3rem; height: 3rem; display: flex; align-items: center; justify-content: center; border-radius: var(--radius); }
.stat-blue { background: #dbeafe; }
.stat-green { background: #dcfce7; }
.stat-purple { background: #ede9fe; }
.stat-orange { background: #ffedd5; }
.stat-value { font-size: 1.5rem; font-weight: 700; }
.stat-label { font-size: 0.8rem; color: var(--color-text-muted); margin-top: 0.1rem; }

/* Grid layouts */
.grid-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 900px) { .grid-2col { grid-template-columns: 1fr; } }

/* Instances */
.instances-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}
.instance-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}
.instance-card-header {
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fafafa;
  border-bottom: 1px solid var(--color-border);
}
.instance-card-body { padding: 1rem; }
.instance-label { font-size: 0.95rem; font-weight: 600; margin-bottom: 0.25rem; }
.instance-number { font-size: 0.85rem; color: var(--color-text-muted); margin-bottom: 0.75rem; }
.instance-card-actions {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  gap: 0.5rem;
  background: #fafafa;
}

.instance-status { display: flex; align-items: center; gap: 0.4rem; font-size: 0.8rem; }
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-connected { background: var(--color-success); }
.status-disconnected { background: #9ca3af; }
.status-pending { background: var(--color-warning); }
.status-paused { background: var(--color-warning); }
.status-banned { background: var(--color-danger); }
.status-text { color: var(--color-text-muted); font-size: 0.8rem; }

.tier-row { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; }
.trust-bar { flex: 1; height: 6px; background: #e5e7eb; border-radius: 3px; overflow: hidden; }
.trust-fill { height: 100%; background: var(--color-primary); border-radius: 3px; }
.trust-score-text { font-size: 0.75rem; color: var(--color-text-muted); white-space: nowrap; }

.handles-row { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.75rem; }

.usage-stats { display: flex; flex-direction: column; gap: 0.4rem; }
.usage-row { display: flex; align-items: center; gap: 0.5rem; }
.usage-label { font-size: 0.75rem; color: var(--color-text-muted); width: 70px; }
.usage-val { font-size: 0.75rem; white-space: nowrap; width: 80px; text-align: right; }
.usage-bar { flex: 1; height: 4px; background: #e5e7eb; border-radius: 2px; overflow: hidden; }
.usage-fill { height: 100%; background: var(--color-primary-dark); border-radius: 2px; }

.instances-mini-grid { display: flex; flex-wrap: wrap; gap: 0.75rem; padding: 1rem; }
.instance-mini-card {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 0.85rem;
}
.instance-info { display: flex; flex-direction: column; gap: 0.1rem; }
.phone-small { font-size: 0.75rem; color: var(--color-text-muted); }
.instance-mini-row { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1.25rem; border-bottom: 1px solid var(--color-border); font-size: 0.85rem; }

/* Empty card */
.empty-card {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--color-surface);
  border: 2px dashed var(--color-border);
  border-radius: var(--radius);
}
.empty-icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-card h2 { margin-bottom: 0.5rem; }
.empty-card p { color: var(--color-text-muted); margin-bottom: 1.5rem; }

/* Onboarding */
.onboarding-steps {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  padding: 1rem 0;
}
.onboarding-steps .step {
  flex: 1;
  padding: 0.5rem;
  text-align: center;
  font-size: 0.8rem;
  border-radius: var(--radius);
  background: #f3f4f6;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}
.onboarding-steps .step.active { background: #0e7369; color: #fff; border-color: #0e7369; font-weight: 600; }
.onboarding-steps .step.done { background: #dcfce7; color: #166534; border-color: #bbf7d0; }

.onboarding-form { max-width: 720px; margin: 0 auto; }

/* Channel type cards */
.channel-type-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  max-width: 700px;
  margin: 0 auto;
}
.channel-type-card {
  display: block;
  padding: 1.5rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  text-align: center;
  transition: all 0.2s;
  text-decoration: none;
  color: var(--color-text);
  background: var(--color-surface);
}
.channel-type-card:hover { border-color: var(--color-primary-dark); box-shadow: var(--shadow-md); text-decoration: none; }
.channel-type-meta:hover { border-color: var(--color-blue); }
.channel-type-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.channel-type-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.channel-type-desc { font-size: 0.85rem; color: var(--color-text-muted); margin-bottom: 1rem; }
.channel-pros, .channel-cons { list-style: none; text-align: left; font-size: 0.82rem; display: flex; flex-direction: column; gap: 0.3rem; margin-bottom: 0.5rem; }
.channel-type-cta { margin-top: 1rem; font-weight: 600; color: var(--color-primary-dark); font-size: 0.9rem; }

/* Trust Score */
.score-card { max-width: 600px; margin: 0 auto; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); overflow: hidden; }
.score-gauge-wrap { padding: 2rem; display: flex; justify-content: center; background: #fafafa; }
.score-gauge { max-width: 200px; }
.tier-display { padding: 1.5rem; text-align: center; border-bottom: 1px solid var(--color-border); }
.tier-badge { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1.25rem; border-radius: 50px; font-size: 1rem; font-weight: 700; margin-bottom: 0.75rem; }
.tier-badge-seedling { background: #fef2f2; color: #991b1b; }
.tier-badge-sprouting { background: #ffedd5; color: #c2410c; }
.tier-badge-growing { background: #fef9c3; color: #854d0e; }
.tier-badge-established { background: #dcfce7; color: #166534; }
.tier-badge-trusted { background: #cffafe; color: #0e7490; }
.tier-desc { font-size: 0.85rem; color: var(--color-text-muted); }
.limits-section, .warmup-section, .tips-section { padding: 1.25rem; border-bottom: 1px solid var(--color-border); }
.limits-section h3, .warmup-section h3, .tips-section h3 { font-size: 0.9rem; font-weight: 600; margin-bottom: 0.75rem; }
.limits-table { margin-top: 0.5rem; }
.warmup-timeline { display: flex; flex-direction: column; gap: 0.75rem; }
.warmup-item { display: flex; gap: 1rem; font-size: 0.85rem; }
.warmup-week { font-weight: 600; min-width: 80px; color: var(--color-primary-dark); }
.tips-list { padding-left: 1.25rem; font-size: 0.85rem; display: flex; flex-direction: column; gap: 0.4rem; color: var(--color-text-muted); }
.score-actions { padding: 1.25rem; display: flex; gap: 0.75rem; justify-content: center; }

/* Meta setup info */
.meta-setup-info { padding: 1rem; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: var(--radius); margin-bottom: 1.5rem; font-size: 0.85rem; }
.meta-setup-info h3 { font-weight: 600; margin-bottom: 0.3rem; }

/* Campaign Detail */
.campaign-detail-grid { display: grid; grid-template-columns: 300px 1fr; gap: 1.5rem; align-items: start; }
.campaign-qr-card .qr-container { padding: 1rem; text-align: center; }
.campaign-qr-card .qr-image { max-width: 180px; margin: 0 auto; display: block; }
.campaign-links { padding: 1rem; display: flex; flex-direction: column; gap: 0.75rem; }
.link-row { display: flex; flex-direction: column; gap: 0.35rem; }
.link-label { font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-text-muted); }
.link-copy-row { display: flex; gap: 0.5rem; }
.link-input { flex: 1; padding: 0.4rem 0.6rem; border: 1px solid var(--color-border); border-radius: var(--radius); font-size: 0.8rem; font-family: monospace; background: #f9fafb; }
.detail-list { padding: 1.25rem; display: grid; grid-template-columns: 100px 1fr; gap: 0.5rem 1rem; font-size: 0.85rem; }
.detail-list dt { font-weight: 600; color: var(--color-text-muted); }
.instructions { padding: 1.25rem; font-size: 0.85rem; display: flex; flex-direction: column; gap: 0.5rem; }

/* Broadcast */
.broadcast-layout { display: grid; grid-template-columns: 1fr 340px; gap: 1.5rem; align-items: start; }
.broadcast-compose { padding: 1.25rem; display: flex; flex-direction: column; gap: 1rem; }
.wa-phone-mockup { padding: 1.25rem; background: #e5ddd5; min-height: 200px; border-radius: var(--radius); }
.wa-bubble {
  background: #dcf8c6;
  border-radius: 8px 8px 2px 8px;
  padding: 0.75rem;
  font-size: 0.85rem;
  max-width: 85%;
  margin-left: auto;
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 40px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.wa-timestamp { font-size: 0.7rem; color: #6b7280; text-align: right; margin-top: 0.25rem; }
.preview-placeholder { color: #9ca3af; font-style: italic; }
.eligible-info { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; }
.eligible-label { font-weight: 600; }
.eligible-count { color: var(--color-primary-dark); font-weight: 600; }

/* Pagination */
.pagination { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 1.25rem; border-top: 1px solid var(--color-border); font-size: 0.85rem; }
.page-info { color: var(--color-text-muted); }

/* Filter form */
.filter-form { padding: 1rem 1.25rem; }
.filter-form .form-row { flex-wrap: wrap; gap: 0.75rem; }

/* Settings */
.settings-section .form-section:first-child { padding-top: 1.25rem; }

/* API Keys */
.key-masked { font-family: monospace; font-size: 0.85rem; }
.code-examples { padding: 1.25rem; display: flex; flex-direction: column; gap: 1.25rem; }
.code-examples h4 { font-size: 0.85rem; font-weight: 600; margin-bottom: 0.35rem; }
.code-block {
  background: #1e293b;
  color: #e2e8f0;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  font-family: monospace;
  font-size: 0.78rem;
  overflow-x: auto;
  white-space: pre;
  line-height: 1.6;
}

/* Toast */
.toast-notification {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: #1e293b;
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.85rem;
  z-index: 1000;
  box-shadow: var(--shadow-md);
  animation: slideIn 0.2s ease;
}
@keyframes slideIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* Text helpers */
.text-muted { color: var(--color-text-muted); }
.text-danger { color: var(--color-danger); }
code { font-family: monospace; background: #f3f4f6; padding: 0.1rem 0.35rem; border-radius: 3px; font-size: 0.85em; }

/* OTP Input */
.otp-input { text-align: center; font-size: 1.5rem; letter-spacing: 0.5rem; font-family: monospace; }
