/* AdHacker Meta Audit — CSS */
/* Dark terminal aesthetic · The Ad Hacker brand */

:root {
  --ah-brand: #7C3AED;
  --ah-accent: #10B981;
  --ah-bg: #0d0d0f;
  --ah-surface: #141416;
  --ah-surface2: #1a1a1e;
  --ah-border: rgba(255,255,255,0.08);
  --ah-border-active: rgba(124,58,237,0.5);
  --ah-text: #e8e6f0;
  --ah-text-muted: #6b6880;
  --ah-text-secondary: #9d9ab0;
  --ah-green: #10B981;
  --ah-yellow: #F59E0B;
  --ah-red: #EF4444;
  --ah-purple: #A78BFA;
  --ah-font: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  --ah-radius: 10px;
  --ah-radius-sm: 6px;
}

/* ── App shell ──────────────────────────────────── */

.adhacker-app {
  font-family: var(--ah-font);
  background: var(--ah-bg);
  border: 1px solid var(--ah-border);
  border-radius: 14px;
  overflow: hidden;
  max-width: 900px;
  margin: 0 auto;
  color: var(--ah-text);
  box-shadow: 0 0 60px rgba(124,58,237,0.12), 0 0 0 1px rgba(255,255,255,0.04);
}

/* ── Header ─────────────────────────────────────── */

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

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

.ah-dots {
  display: flex;
  gap: 6px;
}

.ah-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.ah-dots span:nth-child(1) { background: #FF5F57; }
.ah-dots span:nth-child(2) { background: #FFBD2E; }
.ah-dots span:nth-child(3) { background: #28CA41; }

.ah-terminal-title {
  font-size: 12px;
  color: var(--ah-text-muted);
  letter-spacing: 0.05em;
}

.ah-badge {
  font-size: 11px;
  color: var(--ah-accent);
  background: rgba(16,185,129,0.1);
  border: 1px solid rgba(16,185,129,0.2);
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.03em;
}

/* ── Tabs ───────────────────────────────────────── */

.ah-tabs {
  display: flex;
  background: #111115;
  border-bottom: 1px solid var(--ah-border);
  overflow-x: auto;
  scrollbar-width: none;
}

.ah-tabs::-webkit-scrollbar { display: none; }

.ah-tab {
  flex: 1;
  min-width: 130px;
  padding: 12px 16px;
  border: none;
  background: transparent;
  color: var(--ah-text-muted);
  font-family: var(--ah-font);
  font-size: 12px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.ah-tab:hover {
  color: var(--ah-text-secondary);
  background: rgba(255,255,255,0.03);
}

.ah-tab.active {
  color: var(--ah-brand);
  border-bottom-color: var(--ah-brand);
  background: rgba(124,58,237,0.06);
}

.ah-tab-icon {
  margin-right: 4px;
  font-style: normal;
}

/* ── Panels ─────────────────────────────────────── */

.ah-panel {
  padding: 24px;
  display: none;
}

.ah-panel:first-of-type { display: block; }

/* ── Terminal lines ─────────────────────────────── */

.ah-scan-line {
  font-size: 13px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ah-prompt {
  color: var(--ah-accent);
  font-weight: bold;
}

.ah-cmd {
  color: var(--ah-text);
  opacity: 0.8;
}

.ah-desc {
  font-size: 12px;
  color: var(--ah-text-secondary);
  margin: 0 0 20px;
  font-family: -apple-system, sans-serif;
  line-height: 1.5;
}

/* ── Upload zone ────────────────────────────────── */

.ah-upload-zone {
  border: 2px dashed var(--ah-border);
  border-radius: var(--ah-radius);
  transition: border-color 0.2s, background 0.2s;
  margin-bottom: 16px;
  cursor: pointer;
}

.ah-upload-zone:hover,
.ah-upload-zone.drag-over {
  border-color: var(--ah-brand);
  background: rgba(124,58,237,0.05);
}

.ah-upload-inner {
  padding: 36px 24px;
  text-align: center;
}

.ah-upload-icon {
  font-size: 36px;
  margin-bottom: 12px;
  display: block;
}

.ah-upload-text {
  font-size: 13px;
  color: var(--ah-text-secondary);
  margin: 0 0 6px;
  font-family: -apple-system, sans-serif;
}

.ah-upload-link {
  color: var(--ah-brand);
  cursor: pointer;
  text-decoration: underline;
}

.ah-upload-hint {
  font-size: 11px;
  color: var(--ah-text-muted);
  margin: 0;
  font-family: -apple-system, sans-serif;
}

.ah-file-input {
  display: none;
}

/* ── Preview grid ───────────────────────────────── */

.ah-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.ah-preview-item {
  position: relative;
  border-radius: var(--ah-radius-sm);
  overflow: hidden;
  aspect-ratio: 1;
  border: 1px solid var(--ah-border);
}

.ah-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ah-preview-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0,0,0,0.7);
  border: none;
  color: #fff;
  font-size: 10px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ── Form elements ──────────────────────────────── */

.ah-field {
  margin-bottom: 16px;
}

.ah-label {
  display: block;
  font-size: 11px;
  color: var(--ah-text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ah-input,
.ah-select,
.ah-textarea {
  width: 100%;
  background: var(--ah-surface2);
  border: 1px solid var(--ah-border);
  border-radius: var(--ah-radius-sm);
  color: var(--ah-text);
  font-family: var(--ah-font);
  font-size: 12px;
  padding: 10px 12px;
  box-sizing: border-box;
  transition: border-color 0.2s;
  outline: none;
  -webkit-appearance: none;
}

.ah-input:focus,
.ah-select:focus,
.ah-textarea:focus {
  border-color: var(--ah-brand);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.15);
}

.ah-input::placeholder,
.ah-textarea::placeholder {
  color: var(--ah-text-muted);
}

.ah-select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b6880' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 10px;
  padding-right: 32px;
}

.ah-select option {
  background: var(--ah-surface);
  color: var(--ah-text);
}

.ah-textarea {
  resize: vertical;
  min-height: 80px;
}

/* ── Layouts ────────────────────────────────────── */

.ah-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.ah-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

@media (max-width: 600px) {
  .ah-grid-2,
  .ah-metrics-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Checkboxes ─────────────────────────────────── */

.ah-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ah-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ah-text-secondary);
  cursor: pointer;
}

.ah-check input[type="checkbox"] {
  accent-color: var(--ah-brand);
  width: 14px;
  height: 14px;
}

/* ── Buttons ────────────────────────────────────── */

.ah-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: var(--ah-radius-sm);
  border: none;
  font-family: var(--ah-font);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.03em;
  margin-top: 8px;
}

.ah-btn-primary {
  background: var(--ah-brand);
  color: #fff;
}

.ah-btn-primary:hover {
  background: #6D28D9;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(124,58,237,0.3);
}

.ah-btn-primary:active {
  transform: translateY(0);
}

.ah-btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ── Results ────────────────────────────────────── */

.ah-result {
  margin-top: 24px;
  border: 1px solid var(--ah-border);
  border-radius: var(--ah-radius);
  overflow: hidden;
  animation: ah-slide-in 0.3s ease;
}

@keyframes ah-slide-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ah-result-header {
  background: var(--ah-surface2);
  padding: 10px 16px;
  border-bottom: 1px solid var(--ah-border);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--ah-text-secondary);
}

.ah-result-header > span:last-of-type {
  flex: 1;
}

.ah-copy-btn {
  background: rgba(124,58,237,0.15);
  border: 1px solid rgba(124,58,237,0.3);
  color: var(--ah-brand);
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-family: var(--ah-font);
  transition: all 0.2s;
}

.ah-copy-btn:hover {
  background: rgba(124,58,237,0.25);
}

.ah-output {
  padding: 20px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ah-text);
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  white-space: pre-wrap;
  max-height: 600px;
  overflow-y: auto;
}

/* ── Output formatting ──────────────────────────── */

.ah-output h1, .ah-output h2, .ah-output h3 {
  font-family: var(--ah-font);
  margin: 16px 0 8px;
}

.ah-output h1 { font-size: 18px; color: var(--ah-text); }
.ah-output h2 { font-size: 15px; color: var(--ah-purple); }
.ah-output h3 { font-size: 13px; color: var(--ah-accent); }

.ah-output strong { color: var(--ah-text); font-weight: 600; }

.ah-output p { margin: 8px 0; }

.ah-output ul, .ah-output ol { padding-left: 20px; }
.ah-output li { margin: 4px 0; }

.ah-output code {
  background: rgba(255,255,255,0.06);
  padding: 1px 6px;
  border-radius: 3px;
  font-family: var(--ah-font);
  font-size: 12px;
}

/* ── Score / health widgets ─────────────────────── */

.ah-score-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: bold;
  margin-bottom: 12px;
}

.ah-score-green  { background: rgba(16,185,129,0.15); color: var(--ah-green); border: 1px solid rgba(16,185,129,0.3); }
.ah-score-yellow { background: rgba(245,158,11,0.15);  color: var(--ah-yellow); border: 1px solid rgba(245,158,11,0.3); }
.ah-score-red    { background: rgba(239,68,68,0.15);   color: var(--ah-red); border: 1px solid rgba(239,68,68,0.3); }

.ah-metric-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--ah-border);
  font-size: 12px;
}

.ah-metric-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ah-metric-status.green  { background: var(--ah-green); }
.ah-metric-status.yellow { background: var(--ah-yellow); }
.ah-metric-status.red    { background: var(--ah-red); }

.ah-copy-card {
  background: var(--ah-surface2);
  border: 1px solid var(--ah-border);
  border-radius: var(--ah-radius-sm);
  padding: 14px;
  margin-bottom: 10px;
}

.ah-copy-card-header {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ah-accent);
  margin-bottom: 10px;
  font-family: var(--ah-font);
}

.ah-copy-field {
  margin-bottom: 8px;
}

.ah-copy-field-label {
  font-size: 10px;
  color: var(--ah-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 3px;
  font-family: var(--ah-font);
}

.ah-copy-field-value {
  font-size: 13px;
  color: var(--ah-text);
  background: rgba(255,255,255,0.04);
  padding: 6px 10px;
  border-radius: 4px;
  border-left: 2px solid var(--ah-brand);
  line-height: 1.5;
}

.ah-step-card {
  border: 1px solid var(--ah-border);
  border-radius: var(--ah-radius-sm);
  margin-bottom: 10px;
  overflow: hidden;
}

.ah-step-header {
  background: var(--ah-surface2);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.ah-step-num {
  width: 24px;
  height: 24px;
  background: var(--ah-brand);
  color: #fff;
  border-radius: 50%;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: var(--ah-font);
}

.ah-step-title {
  font-size: 13px;
  flex: 1;
  color: var(--ah-text);
}

.ah-step-body {
  padding: 14px;
  display: none;
  font-size: 12px;
  line-height: 1.7;
  color: var(--ah-text-secondary);
  border-top: 1px solid var(--ah-border);
}

.ah-step-body.open { display: block; }

.ah-step-body strong { color: var(--ah-accent); }

.ah-pro-tip {
  background: rgba(124,58,237,0.08);
  border-left: 3px solid var(--ah-brand);
  padding: 8px 12px;
  margin: 10px 0;
  border-radius: 0 4px 4px 0;
  font-size: 12px;
}

/* ── Status bar ─────────────────────────────────── */

.ah-statusbar {
  background: #0a0a0d;
  border-top: 1px solid var(--ah-border);
  padding: 6px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--ah-text-muted);
}

.ah-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ah-accent);
  animation: ah-pulse 2s ease-in-out infinite;
}

.ah-status-dot.loading {
  background: var(--ah-yellow);
  animation: ah-pulse-fast 0.6s ease-in-out infinite;
}

@keyframes ah-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

@keyframes ah-pulse-fast {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.2; }
}

/* ── Error message ──────────────────────────────── */

.ah-error {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: var(--ah-radius-sm);
  padding: 12px 16px;
  color: var(--ah-red);
  font-size: 12px;
  margin-top: 16px;
  font-family: -apple-system, sans-serif;
}

/* ── Auth screens ───────────────────────────────── */

.adhacker-auth .ah-auth-wrap {
  padding: 28px 24px;
  max-width: 460px;
  margin: 0 auto;
}

.ah-auth-hero {
  text-align: center;
  margin-bottom: 24px;
}

.ah-auth-logo {
  font-size: 40px;
  margin-bottom: 10px;
}

.ah-auth-title {
  font-size: 20px;
  font-weight: 500;
  color: var(--ah-text);
  margin: 0 0 6px;
  font-family: var(--ah-font);
}

.ah-auth-sub {
  font-size: 13px;
  color: var(--ah-text-secondary);
  font-family: -apple-system, sans-serif;
  margin: 0;
  line-height: 1.5;
}

/* Auth tabs */
.ah-auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--ah-border);
  margin-bottom: 20px;
}

.ah-auth-tab {
  flex: 1;
  padding: 10px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--ah-text-muted);
  font-family: var(--ah-font);
  font-size: 12px;
  cursor: pointer;
  transition: all .2s;
  letter-spacing: .02em;
}

.ah-auth-tab:hover    { color: var(--ah-text-secondary); }
.ah-auth-tab.active   { color: var(--ah-brand); border-bottom-color: var(--ah-brand); }

/* Auth form */
.ah-auth-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.ah-auth-error {
  background: rgba(239,68,68,.1);
  border: 1px solid rgba(239,68,68,.25);
  border-radius: 6px;
  padding: 10px 14px;
  color: var(--ah-red);
  font-size: 12px;
  margin-bottom: 14px;
  font-family: -apple-system, sans-serif;
}

.ah-auth-success {
  background: rgba(16,185,129,.1);
  border: 1px solid rgba(16,185,129,.25);
  border-radius: 6px;
  padding: 10px 14px;
  color: var(--ah-green);
  font-size: 12px;
  margin-bottom: 14px;
  font-family: -apple-system, sans-serif;
}

.ah-auth-link {
  color: var(--ah-brand);
  text-decoration: none;
  font-size: 12px;
}

.ah-auth-link:hover { text-decoration: underline; }

.ah-auth-footer {
  text-align: center;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--ah-border);
  font-family: -apple-system, sans-serif;
  font-size: 12px;
  color: var(--ah-text-muted);
}

/* ── Client dashboard ───────────────────────────── */

.ah-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ah-brand), #A78BFA);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  font-family: var(--ah-font);
}

/* Usage cards */
.ah-usage-card {
  background: var(--ah-surface2);
  border: 1px solid var(--ah-border);
  border-radius: 8px;
  padding: 14px 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  transition: border-color .2s;
}

.ah-usage-card:hover { border-color: rgba(124,58,237,.3); }

.ah-usage-card.ah-usage-empty {
  opacity: .45;
}

.ah-usage-icon {
  font-size: 20px;
  line-height: 1;
}

.ah-usage-count {
  font-size: 24px;
  font-weight: 700;
  color: var(--ah-brand);
  font-family: var(--ah-font);
  line-height: 1;
}

.ah-usage-count.ah-usage-zero {
  color: var(--ah-text-muted);
}

.ah-usage-label {
  font-size: 10px;
  color: var(--ah-text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-family: var(--ah-font);
}

/* History rows */
.ah-history-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--ah-border);
}

.ah-history-row:last-child { border-bottom: none; }

.ah-history-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

.ah-history-info {
  flex: 1;
  min-width: 0;
}

.ah-history-title {
  font-size: 13px;
  color: var(--ah-text);
  font-weight: 500;
}

.ah-history-imgs {
  color: var(--ah-text-muted);
  font-weight: 400;
  font-size: 12px;
}

.ah-history-preview {
  font-size: 11px;
  color: var(--ah-text-muted);
  font-family: -apple-system, sans-serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 3px;
}

.ah-history-date {
  font-size: 11px;
  color: var(--ah-text-muted);
  white-space: nowrap;
  flex-shrink: 0;
  font-family: -apple-system, sans-serif;
}

/* ── Admin plan badges (extra plans) ────────────── */

.adhacker-admin .adhacker-stats {
  display: flex;
  gap: 16px;
  margin: 20px 0;
  flex-wrap: wrap;
}

.adhacker-admin .stat-card {
  background: #1e1e24;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 16px 24px;
  text-align: center;
  min-width: 120px;
}

.adhacker-admin .stat-num {
  display: block;
  font-size: 28px;
  font-weight: 700;
  color: #7C3AED;
}

.adhacker-admin .stat-label {
  font-size: 12px;
  color: #888;
}

.adhacker-admin .type-badge {
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.type-badge.type-audit   { background: rgba(124,58,237,0.15); color: #A78BFA; }
.type-badge.type-copy    { background: rgba(16,185,129,0.15);  color: #34D399; }
.type-badge.type-guide   { background: rgba(245,158,11,0.15);  color: #FCD34D; }
.type-badge.type-metrics { background: rgba(59,130,246,0.15);  color: #93C5FD; }

/* ── v3.0 additions ──────────────────────────────── */

/* Demo banner */
.ah-demo-banner {
  background: rgba(245,158,11,.1);
  border: 1px solid rgba(245,158,11,.25);
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 12px;
  color: var(--ah-yellow);
  margin-bottom: 12px;
  font-family: -apple-system, sans-serif;
  line-height: 1.5;
}
.ah-demo-banner a { color: var(--ah-brand); }

/* Qty selector for images */
.ah-qty-btn {
  width: 40px; height: 40px;
  border: 1px solid var(--ah-border);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-family: var(--ah-font);
  cursor: pointer; color: var(--ah-text-secondary);
  transition: all .2s; background: var(--ah-surface2);
}
.ah-qty-btn.selected {
  border-color: var(--ah-brand);
  background: rgba(124,58,237,.15);
  color: var(--ah-brand);
}

/* Neuro checks */
.ah-neuro-checks { max-height: 120px; overflow-y: auto; }
.ah-neuro-check { cursor: help; }

/* Generated images grid */
.ah-images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  padding: 16px;
}
.ah-gen-image {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--ah-border);
  aspect-ratio: 1;
  background: var(--ah-surface2);
  cursor: pointer;
  transition: transform .2s;
}
.ah-gen-image:hover { transform: scale(1.02); }
.ah-gen-image img { width: 100%; height: 100%; object-fit: cover; }
.ah-gen-image-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.8));
  padding: 20px 10px 8px;
  display: flex; gap: 6px; opacity: 0; transition: opacity .2s;
}
.ah-gen-image:hover .ah-gen-image-overlay { opacity: 1; }
.ah-gen-action {
  flex: 1; font-size: 10px; padding: 4px 8px;
  border: 1px solid rgba(255,255,255,.3); border-radius: 4px;
  background: rgba(0,0,0,.4); color: #fff; cursor: pointer;
  font-family: var(--ah-font); text-align: center;
}
.ah-gen-action:hover { background: rgba(124,58,237,.6); }
.ah-demo-img-badge {
  position: absolute; top: 6px; right: 6px;
  background: rgba(245,158,11,.9); color: #000;
  font-size: 9px; font-weight: 700; padding: 2px 6px;
  border-radius: 10px; font-family: var(--ah-font);
}

/* Prompt display */
.ah-prompt-display {
  font-size: 11px; color: var(--ah-text-muted);
  background: var(--ah-surface2); padding: 10px 12px;
  border-radius: 6px; line-height: 1.6;
  border: 1px solid var(--ah-border); font-family: -apple-system, sans-serif;
  max-height: 80px; overflow-y: auto;
}

/* Meta Ads connect */
.ah-meta-connect-box {
  background: var(--ah-surface2);
  border: 1px solid var(--ah-border);
  border-radius: 12px;
  padding: 28px;
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
}
.ah-meta-logo { font-size: 40px; margin-bottom: 12px; }
.ah-meta-title { font-size: 16px; color: var(--ah-text); margin-bottom: 8px; font-family: var(--ah-font); }
.ah-meta-sub { font-size: 12px; color: var(--ah-text-secondary); line-height: 1.6; margin-bottom: 16px; font-family: -apple-system, sans-serif; }

.ah-meta-perms {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
  margin-bottom: 20px; text-align: left;
}
.ah-meta-perm { font-size: 12px; color: var(--ah-text-secondary); font-family: -apple-system, sans-serif; }

.ah-btn-meta {
  background: #1877F2;
  color: #fff;
  border: none;
  padding: 11px 24px;
  border-radius: 6px;
  font-family: var(--ah-font);
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: background .2s;
  margin-top: 4px;
}
.ah-btn-meta:hover { background: #166FE5; color: #fff; }

/* Meta connected bar */
.ah-meta-connected-bar {
  display: flex; align-items: center; gap: 10px;
  background: rgba(16,185,129,.08);
  border: 1px solid rgba(16,185,129,.2);
  border-radius: 8px; padding: 10px 14px;
  font-size: 13px; color: var(--ah-text);
  font-family: -apple-system, sans-serif;
}
.ah-meta-conn-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ah-green); flex-shrink: 0;
  animation: pulse 2s ease-in-out infinite;
}
.ah-meta-disconnect {
  margin-left: auto; font-size: 11px; color: var(--ah-red);
  background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.2);
  padding: 3px 10px; border-radius: 4px; cursor: pointer; font-family: var(--ah-font);
}

/* Campaign card */
.ah-campaign-card {
  border: 1px solid var(--ah-border);
  border-radius: 8px; padding: 12px 14px;
  margin-bottom: 8px; cursor: pointer;
  transition: border-color .2s, background .2s;
  display: flex; align-items: center; gap: 12px;
}
.ah-campaign-card:hover { border-color: var(--ah-brand); background: rgba(124,58,237,.04); }
.ah-campaign-card.selected { border-color: var(--ah-brand); background: rgba(124,58,237,.08); }
.ah-campaign-status { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.ah-campaign-status.active { background: var(--ah-green); }
.ah-campaign-status.paused { background: var(--ah-yellow); }
.ah-campaign-status.archived { background: var(--ah-text-muted); }
.ah-campaign-info { flex: 1; min-width: 0; }
.ah-campaign-name { font-size: 13px; font-weight: 500; color: var(--ah-text); }
.ah-campaign-meta { font-size: 11px; color: var(--ah-text-muted); font-family: -apple-system, sans-serif; margin-top: 2px; }
.ah-campaign-obj { font-size: 10px; color: var(--ah-brand); background: rgba(124,58,237,.1); padding: 2px 7px; border-radius: 10px; font-family: var(--ah-font); white-space: nowrap; }

/* Change suggestion cards */
.ah-change-card {
  background: var(--ah-surface2);
  border: 1px solid var(--ah-border);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 8px;
  display: flex; align-items: center; gap: 12px;
}
.ah-change-priority { width: 22px; height: 22px; border-radius: 50%; font-size: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-family: var(--ah-font); font-weight: 700; }
.ah-change-priority.high   { background: rgba(239,68,68,.15);  color: var(--ah-red); }
.ah-change-priority.medium { background: rgba(245,158,11,.15); color: var(--ah-yellow); }
.ah-change-priority.low    { background: rgba(16,185,129,.15); color: var(--ah-green); }
.ah-change-info { flex: 1; font-size: 12px; font-family: -apple-system, sans-serif; }
.ah-change-title { font-weight: 600; color: var(--ah-text); margin-bottom: 2px; }
.ah-change-desc  { color: var(--ah-text-secondary); font-size: 11px; }
.ah-apply-btn {
  padding: 5px 12px; border-radius: 5px;
  font-size: 11px; font-family: var(--ah-font);
  cursor: pointer; border: none; flex-shrink: 0;
  transition: all .2s;
}
.ah-apply-btn.primary   { background: var(--ah-brand); color: #fff; }
.ah-apply-btn.primary:hover { background: #6D28D9; }
.ah-apply-btn.applied   { background: rgba(16,185,129,.15); color: var(--ah-green); border: 1px solid rgba(16,185,129,.3); cursor: default; }
.ah-apply-btn.custom    { background: transparent; color: var(--ah-brand); border: 1px solid var(--ah-border); }
.ah-apply-btn.custom:hover { border-color: var(--ah-brand); }

/* ── Meta Andrómeda / P.D.A. Image Gen ─────────── */

.ah-andromeda-banner {
  display: flex; align-items: flex-start; gap: 12px;
  background: linear-gradient(135deg, rgba(124,58,237,.08), rgba(16,185,129,.05));
  border: 1px solid rgba(124,58,237,.2);
  border-radius: 10px; padding: 14px 16px; margin-bottom: 18px;
}
.ah-andromeda-banner-icon { font-size: 24px; flex-shrink: 0; margin-top: 2px; }
.ah-andromeda-banner-title { font-size: 13px; font-weight: 500; color: var(--ah-brand); margin-bottom: 3px; font-family: var(--ah-font); }
.ah-andromeda-banner-sub { font-size: 12px; color: var(--ah-text-secondary); font-family: -apple-system,sans-serif; line-height: 1.5; }

/* Mode tabs */
.ah-imagegen-mode-tabs {
  display: flex; gap: 8px; margin-bottom: 18px;
}
.ah-mode-tab {
  flex: 1; padding: 9px 14px; border: 1px solid var(--ah-border);
  background: var(--ah-surface2); color: var(--ah-text-muted);
  border-radius: 7px; font-family: var(--ah-font); font-size: 12px;
  cursor: pointer; transition: all .2s; text-align: center;
}
.ah-mode-tab:hover { border-color: var(--ah-brand); color: var(--ah-text); }
.ah-mode-tab.active {
  background: rgba(124,58,237,.12); border-color: var(--ah-brand);
  color: var(--ah-brand);
}

/* P.D.A. section */
.ah-pda-section {
  background: var(--ah-surface2);
  border: 1px solid var(--ah-border);
  border-radius: 10px; padding: 16px; margin-bottom: 16px;
}
.ah-pda-header {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
}
.ah-pda-badge {
  background: var(--ah-brand); color: #fff;
  font-size: 10px; font-weight: 700; padding: 2px 8px;
  border-radius: 4px; font-family: var(--ah-font); letter-spacing: .06em;
}
.ah-pda-title {
  font-size: 12px; color: var(--ah-text-secondary); font-family: -apple-system,sans-serif;
}
.ah-pda-toggle { margin-bottom: 12px; }
.ah-pda-fields { animation: ah-slide-in .2s ease; }

/* Persona pills */
.ah-pda-presets { margin-bottom: 8px; }
.ah-persona-pill {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(124,58,237,.08); border: 1px solid rgba(124,58,237,.2);
  color: var(--ah-text-secondary); font-size: 11px; padding: 4px 10px;
  border-radius: 20px; cursor: pointer; margin: 3px;
  transition: all .2s; font-family: -apple-system,sans-serif;
}
.ah-persona-pill:hover,
.ah-persona-pill.active {
  background: rgba(124,58,237,.2); border-color: var(--ah-brand);
  color: var(--ah-brand);
}

/* Batch info */
.ah-batch-info {
  display: flex; gap: 10px; align-items: flex-start;
  background: rgba(16,185,129,.07); border: 1px solid rgba(16,185,129,.2);
  border-radius: 8px; padding: 12px 14px; margin-bottom: 12px;
  font-size: 12px; color: var(--ah-text-secondary); font-family: -apple-system,sans-serif; line-height: 1.6;
}
.ah-batch-info strong { color: var(--ah-accent); }

/* Generated image card with P.D.A. label */
.ah-gen-image-pda {
  position: absolute; top: 6px; left: 6px;
  background: rgba(124,58,237,.9); color: #fff;
  font-size: 9px; font-weight: 700; padding: 2px 7px;
  border-radius: 10px; font-family: var(--ah-font); max-width: 90%;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.ah-gen-image-awareness {
  position: absolute; bottom: 36px; left: 6px;
  background: rgba(0,0,0,.65); color: #fff;
  font-size: 9px; padding: 2px 7px; border-radius: 10px;
  font-family: var(--ah-font);
}
