/* ---- APP SHELL ---- */
.app-body {
  min-height: 100vh;
  display: flex;
  background: var(--bg);
}

/* ---- AUTH ---- */
.auth-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  z-index: 100;
  padding: 24px;
}

.auth-box {
  width: 100%;
  max-width: 420px;
  background: var(--bg-elevated);
  border: 1px solid rgba(232,168,72,0.15);
  border-radius: 20px;
  padding: 48px 40px;
}

.auth-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.8rem;
  text-align: center;
  margin-bottom: 32px;
  letter-spacing: -0.5px;
}

.auth-tabs {
  display: flex;
  gap: 4px;
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 28px;
}

.auth-tab {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  color: var(--fg-muted);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.auth-tab.active {
  background: var(--accent);
  color: #0a0a0c;
}

.auth-form { display: flex; flex-direction: column; gap: 20px; }
.auth-form.hidden { display: none; }

.auth-back {
  display: block;
  text-align: center;
  margin-top: 20px;
  color: var(--fg-muted);
  font-size: 0.875rem;
  text-decoration: none;
  transition: color 0.2s;
}

.auth-back:hover { color: var(--accent); }

/* ---- SIDEBAR ---- */
.sidebar {
  width: 240px;
  min-height: 100vh;
  background: var(--bg-elevated);
  border-right: 1px solid rgba(255,255,255,0.05);
  display: flex;
  flex-direction: column;
  padding: 0;
  flex-shrink: 0;
}

.sidebar-header {
  padding: 28px 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.sidebar-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.3px;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

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

.nav-item:hover { background: rgba(255,255,255,0.04); color: var(--fg); }
.nav-item.active { background: var(--accent-glow); color: var(--accent); }

.nav-icon { font-size: 1rem; }

.nav-badge {
  margin-left: auto;
  background: var(--accent);
  color: #0a0a0c;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  min-width: 20px;
  text-align: center;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255,255,255,0.05);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-user {
  font-size: 0.82rem;
  color: var(--fg-muted);
  padding: 4px 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---- MAIN CONTENT ---- */
.main-content {
  flex: 1;
  min-height: 100vh;
  overflow-y: auto;
  padding: 40px 48px;
  max-width: 1000px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 36px;
  gap: 16px;
  flex-wrap: wrap;
}

.page-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.8rem;
  letter-spacing: -0.5px;
}

/* ---- VIEWS ---- */
.view { display: none; }
.view.active { display: block; }

/* ---- BUTTONS ---- */
.btn-primary {
  background: var(--accent);
  color: #0a0a0c;
  border: none;
  padding: 12px 24px;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-primary:hover { background: var(--accent-bright); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-secondary {
  background: transparent;
  color: var(--fg);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 10px 20px;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

.btn-ghost {
  background: transparent;
  color: var(--fg-muted);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 8px 16px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-ghost:hover { color: var(--fg); border-color: rgba(255,255,255,0.15); }
.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-full { width: 100%; }

.btn-inline {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: inherit;
  font-family: inherit;
  padding: 0;
  text-decoration: underline;
}

/* ---- FORMS ---- */
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--fg-muted);
}

.label-hint {
  font-weight: 400;
  font-style: italic;
  font-size: 0.8rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea,
.filter-input {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color 0.2s;
  width: 100%;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
textarea:focus,
.filter-input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(232,168,72,0.04);
}

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

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.rate-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rate-row input { flex: 1; }

.rate-sep { color: var(--fg-muted); font-size: 1.1rem; }

.form-error {
  background: rgba(196, 64, 48, 0.12);
  border: 1px solid rgba(196, 64, 48, 0.3);
  color: #e87060;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.875rem;
}

.form-success {
  background: rgba(72, 180, 120, 0.12);
  border: 1px solid rgba(72, 180, 120, 0.3);
  color: #60c890;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.875rem;
}

/* ---- PROGRESS CARD ---- */
.progress-card {
  background: var(--bg-elevated);
  border: 1px solid rgba(232,168,72,0.2);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 28px;
}

.progress-inner {
  display: flex;
  align-items: center;
  gap: 20px;
}

.progress-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(232,168,72,0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

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

.progress-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--accent);
  margin-bottom: 4px;
}

.progress-sub {
  font-size: 0.875rem;
  color: var(--fg-muted);
}

/* ---- RESULT CARD ---- */
.result-card {
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 28px;
  font-size: 0.9rem;
}

.result-card.success {
  background: rgba(72, 180, 120, 0.08);
  border: 1px solid rgba(72, 180, 120, 0.2);
  color: #60c890;
}

.result-card.error {
  background: rgba(196, 64, 48, 0.08);
  border: 1px solid rgba(196, 64, 48, 0.25);
  color: #e87060;
}

/* ---- STATS ---- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.stat-card {
  background: var(--bg-elevated);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 14px;
  padding: 24px;
  text-align: center;
  transition: border-color 0.2s;
}

.stat-card:hover { border-color: rgba(232,168,72,0.15); }

.stat-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.4rem;
  line-height: 1;
  margin-bottom: 8px;
}

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

/* ---- CTA CARD ---- */
.cta-card {
  background: var(--bg-elevated);
  border: 1px dashed rgba(232,168,72,0.25);
  border-radius: 16px;
  padding: 56px 40px;
  text-align: center;
}

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

.cta-card h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  margin-bottom: 12px;
}

.cta-card p {
  color: var(--fg-muted);
  max-width: 400px;
  margin: 0 auto 28px;
  line-height: 1.6;
}

/* ---- SECTION HEADING ---- */
.section-heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 0.8rem;
  margin-bottom: 20px;
}

/* ---- MATCH CARDS ---- */
.matches-list { display: flex; flex-direction: column; gap: 14px; }

.matches-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.match-card {
  background: var(--bg-elevated);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 24px;
  transition: all 0.2s;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: start;
}

.match-card:hover {
  border-color: rgba(232,168,72,0.2);
  box-shadow: 0 0 30px rgba(232,168,72,0.06);
}

.match-card.accepted { border-left: 3px solid #48b478; }
.match-card.declined { opacity: 0.5; }
.match-card.saved { border-left: 3px solid var(--accent); }

.match-main { min-width: 0; }

.match-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.match-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  flex: 1;
  min-width: 0;
}

.score-badge {
  background: var(--accent-glow);
  border: 1px solid rgba(232,168,72,0.3);
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.score-badge.high { background: rgba(72,180,120,0.1); border-color: rgba(72,180,120,0.3); color: #60c890; }
.score-badge.mid  { background: var(--accent-glow); border-color: rgba(232,168,72,0.3); color: var(--accent); }
.score-badge.low  { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.1); color: var(--fg-muted); }

.match-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.match-meta-item {
  font-size: 0.83rem;
  color: var(--fg-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.match-reasoning {
  font-size: 0.875rem;
  color: var(--fg-muted);
  line-height: 1.6;
  margin-bottom: 12px;
}

.match-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.highlight-tag {
  background: rgba(232,168,72,0.08);
  border: 1px solid rgba(232,168,72,0.15);
  color: var(--accent);
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 20px;
}

.match-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.match-status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: capitalize;
}

.match-status-badge.accepted { background: rgba(72,180,120,0.15); color: #60c890; }
.match-status-badge.declined { background: rgba(196,64,48,0.1); color: #e87060; }
.match-status-badge.saved { background: var(--accent-glow); color: var(--accent); }

.action-btn {
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid;
  transition: all 0.2s;
  font-family: var(--font-body);
}

.action-btn.accept {
  background: rgba(72,180,120,0.1);
  border-color: rgba(72,180,120,0.3);
  color: #60c890;
}

.action-btn.accept:hover { background: rgba(72,180,120,0.2); }

.action-btn.save {
  background: var(--accent-glow);
  border-color: rgba(232,168,72,0.3);
  color: var(--accent);
}

.action-btn.save:hover { background: rgba(232,168,72,0.25); }

.action-btn.decline {
  background: transparent;
  border-color: rgba(255,255,255,0.08);
  color: var(--fg-muted);
}

.action-btn.decline:hover { border-color: rgba(196,64,48,0.4); color: #e87060; }

/* ---- BROWSE GIGS ---- */
.browse-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.browse-filters .filter-input { width: 160px; }

.browse-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }

.gig-card {
  background: var(--bg-elevated);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 24px;
  transition: all 0.2s;
}

.gig-card:hover { border-color: rgba(232,168,72,0.2); }

.gig-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 10px;
  line-height: 1.3;
}

.gig-venue { color: var(--accent); font-size: 0.88rem; font-weight: 500; margin-bottom: 8px; }

.gig-meta {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 12px;
}

.gig-meta-row { font-size: 0.82rem; color: var(--fg-muted); }

.gig-desc {
  font-size: 0.875rem;
  color: var(--fg-muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
}

.gig-source-link {
  font-size: 0.8rem;
  color: var(--accent);
  text-decoration: none;
  opacity: 0.8;
}

.gig-source-link:hover { opacity: 1; }

/* ---- PROFILE ---- */
.profile-layout { display: grid; grid-template-columns: 200px 1fr; gap: 48px; }

.profile-photo-section { display: flex; flex-direction: column; align-items: center; gap: 16px; padding-top: 8px; }

.headshot-wrap {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(255,255,255,0.04);
  border: 2px solid rgba(232,168,72,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.headshot {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.headshot-placeholder {
  font-size: 3rem;
}

.upload-label { cursor: pointer; text-align: center; display: inline-block; }

.profile-form-section { display: flex; flex-direction: column; gap: 22px; }

/* ---- FILTER BUTTONS ---- */
.filter-row { display: flex; gap: 6px; flex-wrap: wrap; }

.filter-btn {
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.1);
  background: transparent;
  color: var(--fg-muted);
  font-family: var(--font-body);
  transition: all 0.2s;
}

.filter-btn:hover { color: var(--fg); border-color: rgba(255,255,255,0.2); }
.filter-btn.active { background: var(--accent-glow); color: var(--accent); border-color: rgba(232,168,72,0.3); }

/* ---- EMPTY STATE ---- */
.empty-state {
  text-align: center;
  padding: 80px 24px;
  color: var(--fg-muted);
}

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

/* ---- UTILITY ---- */
.hidden { display: none !important; }
.accent { color: var(--accent); }

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
  .sidebar { display: none; }
  .main-content { padding: 24px; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }
  .profile-layout { grid-template-columns: 1fr; }
  .profile-photo-section { flex-direction: row; align-items: center; }
  .match-card { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .auth-box { padding: 32px 24px; }
  .stats-row { grid-template-columns: 1fr; }
}
