/* ──────────────────────────────────────────────────────
   APP UI — Galvox dashboard / forms / tables
   Extends theme.css variables; does not duplicate them.
────────────────────────────────────────────────────── */

/* HERO ENHANCEMENTS */
.hero-nav-cta {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-decoration: none;
  border: 1px solid var(--accent);
  padding: 0.4rem 1rem;
  border-radius: 2rem;
  transition: background 0.2s;
}
.hero-nav-cta:hover { background: var(--accent-glow); }

.hero-ctas {
  display: flex;
  gap: 1rem;
  margin-top: 2.5rem;
  align-items: center;
  flex-wrap: wrap;
}
.btn-hero-primary {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  color: #0a0a0b;
  background: var(--accent);
  border: none;
  padding: 0.85rem 2rem;
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.2s;
}
.btn-hero-primary:hover { opacity: 0.88; }
.btn-hero-secondary {
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--fg-muted);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1px;
  transition: color 0.2s;
}
.btn-hero-secondary:hover { color: var(--fg); }

/* APP SHELL */
.app-body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  min-height: 100vh;
}

/* APP NAV */
.app-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 1.1rem 2rem;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.app-nav .logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.15em;
  color: var(--fg);
  text-decoration: none;
  margin-right: 0.5rem;
}
.app-nav-links {
  display: flex;
  gap: 0.25rem;
  flex: 1;
}
.nav-link {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--fg-muted);
  text-decoration: none;
  padding: 0.4rem 0.9rem;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
.nav-link:hover { color: var(--fg); background: var(--bg-card); }
.nav-link.active { color: var(--fg); background: var(--bg-card); }

/* MAIN CONTENT */
.app-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 2rem 4rem;
}

/* PAGE HEADER */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.page-label {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 0.35rem;
}
.page-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.page-meta {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.6rem;
  flex-wrap: wrap;
}
.header-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

/* BUTTONS */
.btn {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.5rem 1.1rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: opacity 0.15s, background 0.15s;
  white-space: nowrap;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: #0a0a0b; }
.btn-primary:hover:not(:disabled) { opacity: 0.88; }
.btn-secondary { background: var(--bg-card); color: var(--fg); border: 1px solid var(--border); }
.btn-secondary:hover:not(:disabled) { background: var(--bg-elevated); }
.btn-ghost { background: transparent; color: var(--fg-muted); border: 1px solid var(--border); }
.btn-ghost:hover:not(:disabled) { color: var(--fg); background: var(--bg-card); }
.btn-sm { padding: 0.35rem 0.8rem; font-size: 0.8rem; }
.btn-xs { padding: 0.25rem 0.6rem; font-size: 0.75rem; }
.btn-lg { padding: 0.75rem 1.6rem; font-size: 0.95rem; }
.btn-full { width: 100%; justify-content: center; }

/* STATS */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
}
.stat-card.accent { border-color: var(--accent); }
.stat-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--fg);
  line-height: 1;
  margin-bottom: 0.35rem;
}
.stat-card.accent .stat-value { color: var(--accent); }
.stat-label {
  font-size: 0.8rem;
  color: var(--fg-muted);
  font-weight: 500;
}

/* CARDS */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}
.card-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--fg);
}
.card-link {
  font-size: 0.82rem;
  color: var(--accent);
  text-decoration: none;
}
.card-link:hover { text-decoration: underline; }

/* TWO COLUMN LAYOUT */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

/* ITEM LISTS (inside cards) */
.item-list { display: flex; flex-direction: column; gap: 0; }
.item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: background 0.1s;
  border-radius: 4px;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}
.item-row:last-child { border-bottom: none; }
.item-row:hover { background: var(--bg-elevated); }
.item-name { font-size: 0.9rem; font-weight: 500; color: var(--fg); }
.item-meta { font-size: 0.78rem; color: var(--fg-muted); margin-top: 0.15rem; }

/* BADGES */
.badge {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.65rem;
  border-radius: 2rem;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge-lg { font-size: 0.78rem; padding: 0.3rem 0.9rem; }
.badge-new, .badge-active { background: rgba(255,107,43,0.12); color: var(--accent); border: 1px solid rgba(255,107,43,0.3); }
.badge-emailed, .badge-queued { background: rgba(96,165,250,0.1); color: #60a5fa; border: 1px solid rgba(96,165,250,0.25); }
.badge-sent { background: rgba(52,211,153,0.1); color: #34d399; border: 1px solid rgba(52,211,153,0.25); }
.badge-draft { background: rgba(138,138,149,0.1); color: var(--fg-muted); border: 1px solid var(--border); }
.badge-failed { background: rgba(248,113,113,0.1); color: #f87171; border: 1px solid rgba(248,113,113,0.25); }

/* META TAGS */
.meta-tag {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 500;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.2rem 0.6rem;
  color: var(--fg-muted);
  white-space: nowrap;
}

/* EMPTY STATES */
.empty-state {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--fg-muted);
  font-size: 0.9rem;
}
.empty-state p { margin-bottom: 1rem; }
.empty-hint { font-size: 0.82rem; opacity: 0.7; }
.empty-state.large { padding: 4rem 2rem; }
.empty-icon { font-size: 2.5rem; margin-bottom: 1rem; display: block; }
.empty-state h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 0.6rem;
}
.empty-card { margin-top: 2rem; }

/* ONBOARDING BANNER */
.onboarding-banner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: var(--bg-elevated);
  border: 1px solid rgba(255,107,43,0.3);
  border-radius: 12px;
  padding: 1.5rem 2rem;
  margin-top: 1.5rem;
}
.onboarding-icon { font-size: 2rem; flex-shrink: 0; }
.onboarding-banner h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}
.onboarding-banner p { font-size: 0.88rem; color: var(--fg-muted); }
.onboarding-banner .btn { flex-shrink: 0; }

/* ICP GRID */
.icp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}
.icp-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: border-color 0.2s;
}
.icp-card:hover { border-color: var(--accent); }
.icp-card-header { display: flex; justify-content: space-between; align-items: flex-start; }
.icp-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--fg);
}
.icp-meta { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.icp-pain { font-size: 0.85rem; color: var(--fg-muted); line-height: 1.5; flex: 1; }
.icp-footer {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--fg-muted);
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}
.icp-cta { color: var(--accent); font-weight: 500; }

/* ICP DETAIL */
.icp-detail-grid {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}
.detail-chip {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.88rem;
  display: flex;
  gap: 0.75rem;
}
.detail-chip-label {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.1em;
  min-width: 80px;
  padding-top: 2px;
}

/* FORMS */
.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  max-width: 760px;
}
.form-section { margin-bottom: 2.5rem; }
.form-section-title {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.form-group { margin-bottom: 1.25rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 0.4rem;
}
.required { color: var(--accent); }
.form-input, .form-textarea {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 0.65rem 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}
.form-input:focus, .form-textarea:focus { border-color: var(--accent); }
.form-input::placeholder, .form-textarea::placeholder { color: var(--fg-muted); opacity: 0.6; }
.form-textarea { resize: vertical; line-height: 1.5; }
.form-hint { font-size: 0.78rem; color: var(--fg-muted); margin-top: 0.3rem; }
.form-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding-top: 0.5rem;
}

/* ALERTS */
.alert {
  padding: 0.85rem 1rem;
  border-radius: 8px;
  font-size: 0.88rem;
  margin-bottom: 1.25rem;
}
.alert-error { background: rgba(248,113,113,0.1); border: 1px solid rgba(248,113,113,0.3); color: #f87171; }
.alert-warning { background: rgba(251,191,36,0.1); border: 1px solid rgba(251,191,36,0.3); color: #fbbf24; }
.alert-success { background: rgba(52,211,153,0.1); border: 1px solid rgba(52,211,153,0.3); color: #34d399; }

/* STATUS BAR */
.status-bar {
  padding: 0.85rem 1.25rem;
  border-radius: 8px;
  font-size: 0.88rem;
  margin-bottom: 1.25rem;
  font-weight: 500;
}
.status-info { background: rgba(96,165,250,0.1); border: 1px solid rgba(96,165,250,0.25); color: #60a5fa; }
.status-success { background: rgba(52,211,153,0.1); border: 1px solid rgba(52,211,153,0.25); color: #34d399; }
.status-error { background: rgba(248,113,113,0.1); border: 1px solid rgba(248,113,113,0.25); color: #f87171; }

/* DATA TABLES */
.table-wrap { overflow-x: auto; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.87rem;
}
.data-table th {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--fg-muted);
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table td {
  padding: 0.85rem 0.75rem;
  border-bottom: 1px solid rgba(42,42,48,0.6);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(255,107,43,0.03); }
.table-link { color: var(--fg); text-decoration: none; font-weight: 500; }
.table-link:hover { color: var(--accent); }
.table-sub { font-size: 0.77rem; color: var(--fg-muted); margin-top: 0.15rem; }
.table-ext { color: var(--fg-muted); text-decoration: none; margin-left: 0.3rem; font-size: 0.75rem; }
.table-ext:hover { color: var(--accent); }
.table-actions { display: flex; gap: 0.4rem; }
.subject-cell { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.date-cell { white-space: nowrap; color: var(--fg-muted); }

/* PROSPECT DETAIL */
.prospect-grid { display: grid; grid-template-columns: 280px 1fr; gap: 1.25rem; align-items: start; }
.prospect-info .card-title { margin-bottom: 1rem; }
.prospect-right { display: flex; flex-direction: column; gap: 1.25rem; }
.info-list { display: flex; flex-direction: column; gap: 0; }
.info-row {
  display: flex;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(42,42,48,0.6);
  font-size: 0.87rem;
}
.info-row:last-child { border-bottom: none; }
.info-label {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--fg-muted);
  min-width: 90px;
  padding-top: 1px;
}
.info-value { color: var(--fg); flex: 1; }
.info-value.link { color: var(--accent); text-decoration: none; }
.info-value.link:hover { text-decoration: underline; }
.prose { font-size: 0.9rem; line-height: 1.65; color: var(--fg-muted); }
.accent-prose { color: var(--fg); border-left: 2px solid var(--accent); padding-left: 1rem; }

/* EMAIL REVIEW */
.email-review-layout { display: grid; grid-template-columns: 1fr 300px; gap: 1.25rem; align-items: start; }
.email-body-textarea { font-family: var(--font-body); font-size: 0.9rem; line-height: 1.65; min-height: 280px; }
.email-actions-panel { display: flex; flex-direction: column; gap: 1.25rem; }
.action-buttons { display: flex; flex-direction: column; gap: 0.65rem; }
.sent-confirmation {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: rgba(52,211,153,0.08);
  border: 1px solid rgba(52,211,153,0.2);
  border-radius: 8px;
}
.sent-icon { font-size: 1.25rem; color: #34d399; }
.sent-time { font-size: 0.78rem; color: var(--fg-muted); margin-top: 0.1rem; }
.prospect-context .card-title { margin-bottom: 0.75rem; }

/* EMAIL QUEUE */
.filter-tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.filter-tab {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 500;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--fg-muted);
  padding: 0.4rem 0.85rem;
  cursor: pointer;
  transition: all 0.15s;
}
.filter-tab:hover { color: var(--fg); }
.filter-tab.active { color: var(--fg); border-color: var(--accent); background: var(--accent-glow); }

/* MOBILE */
@media (max-width: 768px) {
  .app-main { padding: 1.5rem 1rem 3rem; }
  .app-nav { padding: 0.9rem 1rem; gap: 1rem; }
  .two-col { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .prospect-grid { grid-template-columns: 1fr; }
  .email-review-layout { grid-template-columns: 1fr; }
  .icp-grid { grid-template-columns: 1fr; }
  .hero-ctas { flex-direction: column; align-items: flex-start; }
  .onboarding-banner { flex-direction: column; text-align: center; }
}
