/* app.css — CloutBot app shell styles (extends theme.css tokens) */

/* ── Navigation ───────────────────────────────────────────── */
.app-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.app-nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--fg);
  text-decoration: none;
  background: linear-gradient(135deg, var(--accent-bright), #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  gap: 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 10px;
  color: var(--fg-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s, background 0.2s;
}

.nav-link:hover {
  color: var(--fg);
  background: var(--bg-elevated);
}

.nav-link.active {
  color: var(--fg);
  background: var(--bg-elevated);
}

/* ── App Shell ────────────────────────────────────────────── */
.app-main {
  min-height: calc(100vh - 60px);
  padding: 40px 24px 80px;
}

.app-container {
  max-width: 1100px;
  margin: 0 auto;
}

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

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

.btn-primary:hover {
  background: var(--accent-bright);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--fg);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: rgba(124, 58, 237, 0.4);
  color: var(--accent-bright);
}

.btn-ghost {
  background: transparent;
  color: var(--fg-muted);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  color: var(--fg);
  border-color: rgba(255,255,255,0.15);
}

.btn-sm { padding: 7px 14px; font-size: 0.82rem; }
.btn-xs { padding: 4px 10px; font-size: 0.78rem; }

/* ── Artist Card ──────────────────────────────────────────── */
.artist-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  margin-bottom: 32px;
}

.artist-header {
  display: flex;
  gap: 28px;
  margin-bottom: 32px;
}

.artist-avatar-wrap {
  flex-shrink: 0;
  position: relative;
}

.artist-avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}

.artist-avatar-placeholder {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent-bright);
  border: 2px solid var(--border);
}

.platform-badges {
  display: flex;
  gap: 4px;
  margin-top: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.platform-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 100px;
  text-transform: uppercase;
}

.platform-badge.spotify  { background: rgba(29, 185, 84, 0.15); color: #1db954; border: 1px solid rgba(29,185,84,0.3); }
.platform-badge.soundcloud { background: rgba(255, 85, 0, 0.15); color: #ff5500; border: 1px solid rgba(255,85,0,0.3); }
.platform-badge.apple    { background: rgba(252, 60, 68, 0.15); color: #fc3c44; border: 1px solid rgba(252,60,68,0.3); }

.artist-info { flex: 1; }

.artist-name {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 10px;
}

.genre-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }

.genre-tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 12px;
  border-radius: 100px;
  background: rgba(124, 58, 237, 0.15);
  color: var(--accent-bright);
  border: 1px solid rgba(124, 58, 237, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.artist-bio {
  color: var(--fg-muted);
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 20px;
  max-width: 560px;
}

.artist-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── Stats Row ────────────────────────────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}

.stat-card-num {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 4px;
}

.stat-card-label {
  font-size: 0.75rem;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stat-card-src {
  font-size: 0.68rem;
  color: var(--fg-muted);
  opacity: 0.6;
  margin-top: 4px;
}

/* ── Tracks Section ───────────────────────────────────────── */
.tracks-section { margin-top: 8px; }

.section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.track-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

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

.track-num {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--fg-muted);
  width: 20px;
  text-align: right;
  flex-shrink: 0;
}

.track-thumb {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.track-thumb-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  background: var(--bg-elevated);
  flex-shrink: 0;
}

.track-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.track-title {
  font-weight: 500;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-album {
  font-size: 0.8rem;
  color: var(--fg-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.track-streams {
  font-size: 0.82rem;
  color: var(--fg-muted);
}

.track-date {
  font-size: 0.75rem;
  color: var(--fg-muted);
  opacity: 0.6;
}

.track-link {
  color: var(--accent-bright);
  font-size: 1rem;
  text-decoration: none;
  flex-shrink: 0;
  transition: opacity 0.2s;
}

.track-link:hover { opacity: 0.7; }

.loading-placeholder, .empty-tracks {
  color: var(--fg-muted);
  font-size: 0.9rem;
  padding: 20px 0;
  text-align: center;
}

.sync-meta {
  font-size: 0.75rem;
  color: var(--fg-muted);
  opacity: 0.5;
  margin-top: 16px;
  text-align: right;
}

.add-artist-btn-row {
  text-align: center;
  padding: 16px 0;
}

/* ── Contacts Page ────────────────────────────────────────── */
.stats-strip {
  display: flex;
  align-items: center;
  gap: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 28px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.strip-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.strip-num {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--fg);
}

.strip-num.green  { color: var(--green); }
.strip-num.accent { color: var(--accent-bright); }
.strip-num.gold   { color: #f59e0b; }

.strip-label {
  font-size: 0.72rem;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.strip-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

.controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filter-form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.search-input { min-width: 200px; }

.form-input {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 14px;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}

.form-input:focus {
  border-color: rgba(124, 58, 237, 0.5);
}

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

.form-select {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 14px;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238888a0' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
}

.table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  overflow-x: auto;
}

.contacts-table {
  width: 100%;
  border-collapse: collapse;
}

.contacts-table th {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--fg-muted);
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}

.contacts-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  vertical-align: middle;
}

.contacts-table tr:last-child td { border-bottom: none; }

.contacts-table tr:hover td { background: rgba(255,255,255,0.02); }

.contact-name-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.contact-name { font-weight: 500; }

.contact-email {
  font-size: 0.8rem;
  color: var(--accent-bright);
}

.org-link {
  color: var(--fg-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.org-link:hover { color: var(--fg); }

.genre-cell {
  color: var(--fg-muted);
  font-size: 0.82rem;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Type badges */
.type-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.type-blog     { background: rgba(34,197,94,0.12); color: #22c55e; border: 1px solid rgba(34,197,94,0.25); }
.type-playlist { background: rgba(124,58,237,0.12); color: var(--accent-bright); border: 1px solid rgba(124,58,237,0.25); }
.type-ar       { background: rgba(245,158,11,0.12); color: #f59e0b; border: 1px solid rgba(245,158,11,0.25); }
.type-pr       { background: rgba(59,130,246,0.12); color: #60a5fa; border: 1px solid rgba(59,130,246,0.25); }
.type-other    { background: rgba(255,255,255,0.06); color: var(--fg-muted); border: 1px solid var(--border); }

/* Status select */
.status-select {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 0.82rem;
  color: var(--fg);
  cursor: pointer;
  outline: none;
  font-family: var(--font-body);
}

.status-select.status-contacted  { border-color: rgba(34,197,94,0.4); color: #22c55e; }
.status-select.status-responded  { border-color: rgba(124,58,237,0.4); color: var(--accent-bright); }
.status-select.status-placed     { border-color: rgba(245,158,11,0.4); color: #f59e0b; }
.status-select.status-declined   { border-color: rgba(239,68,68,0.3); color: #f87171; }

.table-meta {
  font-size: 0.8rem;
  color: var(--fg-muted);
  padding: 12px 4px 0;
  text-align: right;
}

/* ── Form Layouts ─────────────────────────────────────────── */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

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

.form-group label {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.form-hint {
  font-size: 0.78rem;
  color: var(--fg-muted);
}

.required { color: var(--accent-bright); }

/* ── Modal ────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.modal-header h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  color: var(--fg-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color 0.2s;
}

.modal-close:hover { color: var(--fg); }

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

/* ── Toast ────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 9999;
  animation: fadeIn 0.2s ease;
}

.toast-success { background: rgba(34,197,94,0.15); color: #22c55e; border: 1px solid rgba(34,197,94,0.3); }
.toast-error   { background: rgba(239,68,68,0.15); color: #f87171; border: 1px solid rgba(239,68,68,0.3); }

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

/* ── Empty & Alert States ─────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 80px 24px;
}

.empty-icon { font-size: 3rem; margin-bottom: 20px; }

.empty-state h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.empty-state p { color: var(--fg-muted); margin-bottom: 24px; }

.alert {
  padding: 14px 20px;
  border-radius: 10px;
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.alert-error { background: rgba(239,68,68,0.1); color: #f87171; border: 1px solid rgba(239,68,68,0.3); }

/* ── Spinner ──────────────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid var(--border);
  border-top-color: var(--accent-bright);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .artist-header { flex-direction: column; align-items: center; text-align: center; }
  .artist-actions { justify-content: center; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }
  .controls-row { flex-direction: column; align-items: stretch; }
  .filter-form { flex-direction: column; }
  .stats-strip { gap: 20px; justify-content: center; }
  .app-container { padding: 0; }
  .app-main { padding: 24px 16px 60px; }
  .artist-card { padding: 24px 20px; }
}
