/* ============================================================
   AriaStage — Design System v3
   White/light theme — inspired by modern music platforms
   ============================================================ */

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

:root {
  color-scheme: light;
  --bg:         #ffffff;
  --surface:    #f4f4f8;
  --surface2:   #ebebf0;
  --surface3:   #e0e0e8;
  --border:     #e2e2ea;
  --border2:    #cacad6;
  --text:       #111827;
  --text-muted: #6b7280;
  --text-dim:   #9ca3af;
  --primary:    #7c3aed;
  --primary-d:  #6d28d9;
  --primary-l:  #8b5cf6;
  --danger:     #dc2626;
  --success:    #16a34a;
  --info:       #2563eb;
  --radius:     10px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --shadow:     0 4px 24px rgba(0,0,0,.08);
  --shadow-sm:  0 2px 8px rgba(0,0,0,.06);
  --transition: .15s ease;
  --font: 'Inter', 'Helvetica Neue', Arial, sans-serif;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-d); }
img { display: block; max-width: 100%; }
button, input, textarea, select { font-family: inherit; font-size: inherit; }

/* ─── Typography ───────────────────────────────────────────── */
h1, h2, h3, h4, h5 {
  color: var(--text); font-weight: 800;
  line-height: 1.2; letter-spacing: -.025em;
}
h1 { font-size: clamp(1.7rem, 5vw, 2.5rem); }
h2 { font-size: clamp(1.3rem, 4vw, 1.8rem); }
h3 { font-size: 1.15rem; }
p  { margin-bottom: .9rem; color: var(--text); }
small { font-size: .82rem; color: var(--text-muted); }

/* ─── Navbar ───────────────────────────────────────────────── */
.navbar {
  position: sticky; top: 0; z-index: 200;
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1280px; margin: 0 auto;
  padding: .7rem 1.5rem;
  display: flex; align-items: center; gap: .75rem;
  position: relative;
}

/* Brand */
.nav-brand {
  font-size: 1.25rem; font-weight: 900; letter-spacing: -.05em;
  color: var(--text); flex-shrink: 0; white-space: nowrap;
  text-decoration: none;
}
.nav-brand em { color: var(--primary); font-style: normal; }
.nav-brand:hover { color: var(--text); opacity: .85; }
.nav-brand--logo { display: inline-flex; align-items: center; }
.nav-logo { height: 36px; width: auto; display: block; object-fit: contain; }

/* Search */
.nav-search {
  flex: 1; max-width: 360px; margin: 0 .5rem;
  position: relative;
}
.nav-search svg {
  position: absolute; left: .85rem; top: 50%;
  transform: translateY(-50%); color: var(--text-dim);
  width: 15px; height: 15px; pointer-events: none; flex-shrink: 0;
}
.nav-search input {
  width: 100%; background: var(--surface);
  border: 1px solid var(--border); border-radius: 100px;
  padding: .5rem 1rem .5rem 2.4rem;
  color: var(--text); font-size: .875rem;
  outline: none; transition: border-color var(--transition), background var(--transition);
}
.nav-search input:focus { border-color: var(--primary); background: #fff; }
.nav-search input::placeholder { color: var(--text-dim); }

/* Nav links */
.nav-links {
  display: flex; align-items: center; gap: .2rem; margin-left: auto;
}
.nav-link {
  padding: .45rem .85rem; border-radius: 100px;
  color: var(--text-muted); font-size: .875rem; font-weight: 500;
  transition: color var(--transition), background var(--transition);
  white-space: nowrap; text-decoration: none;
}
.nav-link:hover { color: var(--text); background: var(--surface); }
.nav-cta {
  background: var(--primary); color: #fff !important;
  font-weight: 700; border-radius: 100px; padding: .45rem 1.1rem;
}
.nav-cta:hover { background: var(--primary-d); color: #fff !important; }

/* Hamburger */
.nav-burger {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  background: none; border: none; cursor: pointer;
  padding: 8px; margin-left: auto; flex-shrink: 0;
  width: 40px; height: 40px;
}
.nav-burger span {
  display: block; width: 22px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}

/* ── Mobile navbar ── */
@media (max-width: 768px) {
  .nav-inner  { padding: .6rem 1rem; flex-wrap: nowrap; }
  .nav-search { display: none; }
  .nav-burger { display: flex; }

  .nav-links {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
    z-index: 300;
  }
  .navbar.open .nav-links { display: flex; }

  .nav-link {
    padding: .85rem 1.25rem;
    border-radius: 0;
    font-size: .9rem;
    border-bottom: 1px solid var(--border);
    color: var(--text);
  }
  .nav-link:last-child { border-bottom: none; }

  .nav-cta {
    margin: .5rem 1rem .5rem;
    border-radius: var(--radius);
    text-align: center;
    justify-content: center;
  }

  /* Burger → X animation */
  .navbar.open .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .navbar.open .nav-burger span:nth-child(2) { opacity: 0; }
  .navbar.open .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ─── Main / layout ────────────────────────────────────────── */
.main { flex: 1; }

.container     { max-width: 1280px; margin: 0 auto; padding: 1.5rem 1.5rem; }
.container--sm { max-width: 480px;  margin: 0 auto; padding: 2rem 1.25rem; }
.container--md { max-width: 720px;  margin: 0 auto; padding: 2rem 1.25rem; }
.container--lg { max-width: 960px;  margin: 0 auto; padding: 2rem 1.25rem; }

/* ─── Alerts ───────────────────────────────────────────────── */
.alert {
  padding: .85rem 1.25rem; border-radius: var(--radius);
  margin: .75rem auto; max-width: 1280px; padding-left: 1.5rem;
  font-size: .9rem; font-weight: 500;
  transition: opacity .6s ease;
}
.alert--success { background: #f0fdf4; border-left: 3px solid var(--success); color: #15803d; }
.alert--error   { background: #fef2f2; border-left: 3px solid var(--danger);  color: #b91c1c; }
.alert--info    { background: #eff6ff; border-left: 3px solid var(--info);    color: #1d4ed8; }

/* ─── Cards ────────────────────────────────────────────────── */
.card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.card + .card { margin-top: 1rem; }

/* ─── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .6rem 1.5rem; border-radius: 100px;
  font-size: .875rem; font-weight: 700; cursor: pointer;
  border: 2px solid transparent; transition: var(--transition);
  white-space: nowrap; letter-spacing: .01em;
}
.btn--primary  { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn--primary:hover { background: var(--primary-d); border-color: var(--primary-d); color: #fff; }
.btn--outline  { background: transparent; border-color: var(--border2); color: var(--text); }
.btn--outline:hover { border-color: var(--primary); color: var(--primary); }
.btn--ghost    { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn--ghost:hover { background: var(--surface2); border-color: var(--border2); }
.btn--danger   { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn--danger:hover { opacity: .85; }
.btn--sm       { padding: .35rem .9rem; font-size: .8rem; }
.btn--lg       { padding: .85rem 2.25rem; font-size: 1rem; }
.btn--full     { width: 100%; }
.btn:disabled  { opacity: .4; cursor: not-allowed; }

/* ─── Forms ────────────────────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; margin-bottom: .4rem; font-size: .85rem; font-weight: 600; color: var(--text-muted); }
.form-label span { color: var(--danger); }

.form-control {
  width: 100%; padding: .72rem 1rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124,58,237,.12);
  background: #fff;
}
.form-control::placeholder { color: var(--text-dim); }
textarea.form-control { resize: vertical; min-height: 120px; }
select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .9rem center;
  padding-right: 2.5rem;
}
.form-hint  { font-size: .8rem; color: var(--text-dim); margin-top: .35rem; }
.form-error { font-size: .82rem; color: var(--danger); margin-top: .35rem; }
.form-row   { display: grid; gap: 1rem; }
@media (min-width: 560px) { .form-row--2 { grid-template-columns: 1fr 1fr; } }

/* ─── Auth ─────────────────────────────────────────────────── */
.auth-wrap {
  min-height: calc(100vh - 60px); display: flex;
  align-items: center; justify-content: center;
  padding: 2rem 1.25rem;
  background: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(124,58,237,.07) 0%, transparent 65%);
}
.auth-card {
  width: 100%; max-width: 440px;
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 2.5rem 2rem;
  box-shadow: var(--shadow);
}
.auth-card h1 { margin-bottom: .35rem; font-size: 1.75rem; }
.auth-card .auth-sub { color: var(--text-muted); margin-bottom: 2rem; font-size: .9rem; }
.auth-footer { text-align: center; margin-top: 1.25rem; font-size: .88rem; color: var(--text-muted); }

.role-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; margin-bottom: 1.25rem; }
.role-card  { display: none; }
.role-card + label {
  display: flex; flex-direction: column; align-items: center; gap: .4rem;
  padding: 1rem .5rem; background: var(--surface); border: 2px solid var(--border);
  border-radius: var(--radius-lg); cursor: pointer; text-align: center;
  font-size: .82rem; font-weight: 600; color: var(--text-muted); transition: var(--transition);
}
.role-card:checked + label {
  border-color: var(--primary); background: rgba(124,58,237,.06); color: var(--primary);
}
.role-card + label .role-icon { font-size: 1.8rem; }

/* ─── Artist profile — banner ──────────────────────────────── */
.profile-banner {
  width: 100%; height: 240px; object-fit: cover;
  background: linear-gradient(135deg, #ede9fe 0%, #f5f3ff 50%, #f4f4f8 100%);
  display: block;
}
@media (min-width: 768px) { .profile-banner { height: 320px; } }

/* ─── Profile header ───────────────────────────────────────── */
.profile-header {
  max-width: 1280px; margin: 0 auto; padding: 0 1.5rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.profile-avatar-wrap {
  margin-top: -58px; margin-bottom: .75rem;
  display: inline-block; position: relative;
}
.profile-avatar {
  width: 110px; height: 110px; border-radius: 50%;
  border: 4px solid #fff; object-fit: cover;
  background: var(--surface2);
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
}
@media (min-width: 768px) {
  .profile-avatar { width: 140px; height: 140px; }
  .profile-avatar-wrap { margin-top: -70px; }
}
.profile-meta { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-start; }
.profile-name-block { flex: 1; min-width: 200px; }
.profile-name { font-size: clamp(1.5rem, 4vw, 2.2rem); margin-bottom: .3rem; letter-spacing: -.035em; }
.profile-type {
  display: inline-block; padding: .2rem .8rem; border-radius: 100px;
  background: rgba(124,58,237,.08); border: 1px solid rgba(124,58,237,.2);
  font-size: .72rem; text-transform: uppercase; letter-spacing: 1px;
  color: var(--primary); font-weight: 700;
}
.profile-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .5rem; }

/* ─── Profile body & sidebar ───────────────────────────────── */
.profile-body {
  max-width: 1280px; margin: 1.5rem auto 0; padding: 0 1.5rem;
  display: grid; gap: 1.5rem;
}
@media (min-width: 900px) {
  .profile-body { grid-template-columns: 1fr 320px; align-items: start; }
  .profile-sidebar { grid-row: 1 / 4; grid-column: 2; }
}

/* ─── Tabs — pill style ────────────────────────────────────── */
.tab-nav {
  display: flex; gap: .4rem; flex-wrap: nowrap;
  overflow-x: auto; scrollbar-width: none; margin-bottom: 1.5rem;
  padding-bottom: .1rem;
}
.tab-nav::-webkit-scrollbar { display: none; }
.tab-btn {
  padding: .45rem 1.15rem; border: 1px solid var(--border);
  background: var(--surface); border-radius: 100px; cursor: pointer;
  color: var(--text-muted); font-size: .85rem; font-weight: 600;
  white-space: nowrap; transition: var(--transition);
}
.tab-btn:hover { color: var(--text); border-color: var(--border2); background: var(--surface2); }
.tab-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ─── Section title ────────────────────────────────────────── */
.section-title {
  font-size: .72rem; text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--text-dim); font-weight: 700; margin-bottom: 1rem;
}

/* ─── Repertoire ───────────────────────────────────────────── */
.repertoire-list { list-style: none; }
.repertoire-list li {
  padding: .65rem 0; border-bottom: 1px solid var(--border);
  display: flex; gap: .75rem; align-items: baseline;
}
.repertoire-list li:last-child { border-bottom: none; }
.rep-composer { color: var(--primary); font-size: .82rem; font-weight: 700; min-width: 120px; }
.rep-piece    { color: var(--text); font-size: .9rem; }

/* ─── Events ───────────────────────────────────────────────── */
.event-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem; margin-bottom: .6rem;
  display: grid; grid-template-columns: 56px 1fr; gap: .75rem; align-items: start;
}
.event-date-block {
  background: rgba(124,58,237,.08); border-radius: 8px;
  text-align: center; padding: .4rem;
  border: 1px solid rgba(124,58,237,.15);
}
.event-day   { font-size: 1.4rem; font-weight: 800; color: var(--primary); line-height: 1; }
.event-month { font-size: .62rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); }
.event-title { font-weight: 700; color: var(--text); font-size: .95rem; }
.event-venue { font-size: .82rem; color: var(--text-muted); }

/* ─── Members grid ─────────────────────────────────────────── */
.members-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 1rem;
}
.member-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1rem; text-align: center;
}
.member-name  { font-weight: 700; font-size: .88rem; color: var(--text); }
.member-role  { font-size: .78rem; color: var(--text-muted); }

/* ─── Social links ─────────────────────────────────────────── */
.social-links { display: flex; flex-wrap: wrap; gap: .5rem; }
.social-link {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .35rem .85rem; background: var(--surface); border: 1px solid var(--border);
  border-radius: 100px; font-size: .82rem; color: var(--text-muted); transition: var(--transition);
}
.social-link:hover { border-color: var(--primary); color: var(--primary); }

/* ─── Sidebar widgets ──────────────────────────────────────── */
.widget {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.25rem; margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
}
.widget-title {
  font-size: .7rem; text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--text-dim); font-weight: 700; margin-bottom: 1rem;
}
.stat-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: .5rem; }
.stat-num  { font-size: 1.5rem; font-weight: 800; color: var(--text); letter-spacing: -.04em; }
.stat-label{ font-size: .78rem; color: var(--text-muted); }

/* ─── Follow button ────────────────────────────────────────── */
.btn--follow { background: var(--surface); border: 2px solid var(--border2); color: var(--text); border-radius: 100px; }
.btn--follow:hover  { border-color: var(--primary); color: var(--primary); }
.btn--follow.active { background: rgba(124,58,237,.08); border-color: var(--primary); color: var(--primary); }

/* ─── Edit profile ─────────────────────────────────────────── */
.edit-wrap { max-width: 860px; margin: 2rem auto; padding: 0 1.25rem 3rem; }
.edit-tabs { margin-bottom: 2rem; }

.dynamic-row {
  display: grid; gap: .75rem; align-items: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: .75rem 1rem; margin-bottom: .6rem;
}
.dynamic-row--member { grid-template-columns: 1fr 1fr 1fr auto; }
.dynamic-row--rep    { grid-template-columns: 1fr 2fr auto; }
.dynamic-row--event  { grid-template-columns: 1fr 1fr 150px auto; }
.dynamic-row--avail  { grid-template-columns: 1fr 1fr 2fr auto; }
@media (max-width: 600px) {
  .dynamic-row--member,
  .dynamic-row--rep,
  .dynamic-row--event,
  .dynamic-row--avail { grid-template-columns: 1fr auto; }
}
.btn--remove-row {
  background: none; border: 1px solid var(--border); color: var(--text-dim);
  border-radius: 6px; padding: .35rem .6rem; cursor: pointer; font-size: 1rem;
  transition: var(--transition); line-height: 1;
}
.btn--remove-row:hover { border-color: var(--danger); color: var(--danger); }

/* ─── Upload previews ──────────────────────────────────────── */
.upload-preview {
  width: 100px; height: 100px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--border); background: var(--surface2);
}
.banner-preview {
  width: 100%; height: 120px; object-fit: cover;
  border-radius: var(--radius); border: 2px solid var(--border);
  background: var(--surface2);
}

/* ─── Homepage hero ────────────────────────────────────────── */
.hero {
  padding: 7rem 1.5rem 5rem; text-align: center;
  background:
    radial-gradient(ellipse 90% 55% at 50% -10%, rgba(124,58,237,.1) 0%, transparent 65%),
    linear-gradient(180deg, #faf9ff 0%, var(--bg) 100%);
  position: relative; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Ccircle cx='30' cy='30' r='1' fill='%237c3aed' opacity='.04'/%3E%3C/svg%3E") repeat;
  pointer-events: none;
}
.hero h1 {
  margin-bottom: 1.25rem; position: relative;
  background: linear-gradient(135deg, var(--text) 40%, var(--primary) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub { font-size: 1.15rem; color: var(--text-muted); max-width: 520px; margin: 0 auto 2.5rem; position: relative; }
.hero-actions { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; position: relative; }

/* Hero search bar */
.hero-search {
  max-width: 520px; margin: 0 auto 2rem;
  position: relative;
}
.hero-search input {
  width: 100%; padding: 1rem 1.25rem 1rem 3rem;
  background: #fff; border: 1px solid var(--border2);
  border-radius: 100px; color: var(--text); font-size: 1rem;
  outline: none; transition: border-color var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 16px rgba(0,0,0,.06);
}
.hero-search input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124,58,237,.12), 0 4px 16px rgba(0,0,0,.06);
}
.hero-search input::placeholder { color: var(--text-dim); }
.hero-search svg {
  position: absolute; left: 1.1rem; top: 50%;
  transform: translateY(-50%); color: var(--text-dim);
  width: 18px; height: 18px; pointer-events: none;
}

/* ─── Section header ───────────────────────────────────────── */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.25rem;
}
.section-header h2 { font-size: 1.3rem; }

/* ─── Artist grid ──────────────────────────────────────────── */
.artist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 1rem;
}
.artist-tile {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  cursor: pointer; display: block;
}
.artist-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(124,58,237,.3);
  box-shadow: 0 12px 32px rgba(124,58,237,.12);
  color: inherit;
}
.artist-tile-img {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  background: linear-gradient(135deg, var(--surface2), var(--surface3));
  display: block;
}
.artist-tile-body { padding: .9rem; }
.artist-tile-name { font-weight: 700; color: var(--text); margin-bottom: .15rem; font-size: .95rem; letter-spacing: -.01em; }
.artist-tile-type { font-size: .75rem; color: var(--text-muted); text-transform: capitalize; }

/* ─── Dashboard ────────────────────────────────────────────── */
.dash-grid { display: grid; gap: 1rem; }
@media (min-width: 768px) { .dash-grid { grid-template-columns: repeat(3, 1fr); } }
.dash-stat {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.25rem;
  transition: border-color var(--transition);
  box-shadow: var(--shadow-sm);
}
.dash-stat:hover { border-color: var(--border2); }

/* ─── Availability badge ───────────────────────────────────── */
.avail-badge { display: inline-flex; align-items: center; gap: .35rem; font-size: .78rem; color: var(--text-muted); }
.avail-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); flex-shrink: 0; }

/* ─── Footer ───────────────────────────────────────────────── */
.site-footer {
  background: var(--surface); border-top: 1px solid var(--border);
  padding: 2.5rem 1.5rem; margin-top: auto;
}
.footer-inner {
  max-width: 1280px; margin: 0 auto;
  display: flex; flex-wrap: wrap; gap: 1.5rem 3rem;
  align-items: flex-start; justify-content: space-between;
}
.footer-brand { flex-shrink: 0; }
.footer-logo {
  font-size: 1.15rem; font-weight: 900; letter-spacing: -.04em; color: var(--text); display: block;
}
.footer-logo em { color: var(--primary); font-style: normal; }
.footer-logo:hover { color: var(--text); }
.footer-tagline { font-size: .8rem; color: var(--text-dim); margin-top: .3rem; }
.footer-company { font-size: .75rem; color: var(--text-dim); margin-top: .55rem; line-height: 1.6; }
.footer-company-link { color: var(--primary); text-decoration: none; }
.footer-company-link:hover { text-decoration: underline; }
.footer-nav { display: flex; gap: 1.75rem; flex-wrap: wrap; align-items: center; }
.footer-nav a { font-size: .85rem; color: var(--text-muted); transition: color var(--transition); }
.footer-nav a:hover { color: var(--text); }
.footer-nav--legal { width: 100%; gap: 1.25rem; padding-top: .75rem; border-top: 1px solid var(--border); }
.footer-nav--legal a { font-size: .78rem; color: var(--text-dim); }
.footer-nav--legal a:hover { color: var(--text-muted); }
.footer-copy { width: 100%; font-size: .75rem; color: var(--text-dim); border-top: 1px solid var(--border); padding-top: 1rem; margin-top: .25rem; }

/* ─── Utility ──────────────────────────────────────────────── */
.text-muted    { color: var(--text-muted); }
.text-primary  { color: var(--primary); }
.text-center   { text-align: center; }
.text-dim      { color: var(--text-dim); }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.d-flex           { display: flex; }
.gap-1            { gap: .5rem; }
.gap-2            { gap: 1rem; }
.flex-wrap        { flex-wrap: wrap; }
.align-center     { align-items: center; }
.justify-between  { justify-content: space-between; }
.hidden           { display: none !important; }
[hidden]          { display: none !important; }

/* ============================================================
   Mobile Responsiveness — v3 additions
   All breakpoints: 380px / 480px / 600px / 768px / 900px
   ============================================================ */

/* ─── Table scroll wrapper ────────────────────────────────── */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}
.table-scroll table {
  min-width: 540px;
}

/* ─── Touch-friendly minimum sizes ───────────────────────── */
@media (max-width: 768px) {
  .btn {
    min-height: 44px;
  }
  .btn--sm {
    min-height: 36px;
  }
  .nav-link {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
}

/* ─── iOS input zoom prevention (font-size >= 16px) ──────── */
@media (max-width: 768px) {
  input,
  select,
  textarea,
  .form-control {
    font-size: 16px !important;
  }
  .nav-search input {
    font-size: 16px !important;
  }
}

/* ─── Layout containers — smaller padding on mobile ──────── */
@media (max-width: 600px) {
  .container,
  .container--sm,
  .container--md,
  .container--lg {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* ─── Cards — reduced padding on small screens ───────────── */
@media (max-width: 480px) {
  .card {
    padding: 1rem;
  }
  .widget {
    padding: 1rem;
  }
}

/* ─── Forms — single column on narrow screens ────────────── */
@media (max-width: 480px) {
  .form-row--2 {
    grid-template-columns: 1fr;
  }
}

/* ─── Dynamic edit rows — single column on very small ───── */
@media (max-width: 480px) {
  .dynamic-row--member,
  .dynamic-row--rep,
  .dynamic-row--event,
  .dynamic-row--avail {
    grid-template-columns: 1fr;
  }
  .dynamic-row--member > *:last-child,
  .dynamic-row--rep    > *:last-child,
  .dynamic-row--event  > *:last-child,
  .dynamic-row--avail  > *:last-child {
    justify-self: start;
  }
}

/* ─── Artist profile — banner height on mobile ───────────── */
@media (max-width: 480px) {
  .profile-banner {
    height: 180px;
  }
}

/* ─── Artist profile — avatar smaller on phone ───────────── */
@media (max-width: 480px) {
  .profile-avatar {
    width: 80px;
    height: 80px;
  }
  .profile-avatar-wrap {
    margin-top: -44px;
  }
}

/* ─── Profile meta — stack vertically on phone ───────────── */
@media (max-width: 600px) {
  .profile-meta {
    flex-direction: column;
    gap: .5rem;
  }
  .profile-name-block {
    min-width: 0;
  }
  .profile-actions {
    flex-wrap: wrap;
  }
}

/* ─── Profile body — single column, sidebar after content ── */
@media (max-width: 899px) {
  .profile-body {
    grid-template-columns: 1fr;
    padding: 0 1rem;
  }
  .profile-sidebar {
    grid-row: auto;
    grid-column: auto;
  }
}
@media (max-width: 600px) {
  .profile-body {
    padding: 0 .75rem;
    margin-top: 1rem;
  }
}

/* ─── Profile header — padding on mobile ─────────────────── */
@media (max-width: 600px) {
  .profile-header {
    padding: 0 .75rem 1rem;
  }
}

/* ─── Tabs — horizontally scrollable, touch-friendly ──────── */
.tab-nav {
  -webkit-overflow-scrolling: touch;
}
@media (max-width: 600px) {
  .tab-btn {
    padding: .5rem 1rem;
    font-size: .8rem;
    min-height: 40px;
  }
}

/* ─── Tab panels — full width ─────────────────────────────── */
.tab-panel {
  width: 100%;
}

/* ─── Artist grid — responsive columns ─────────────────────── */
@media (max-width: 479px) {
  .artist-grid {
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
  }
}
@media (max-width: 360px) {
  .artist-grid {
    grid-template-columns: 1fr;
  }
}
@media (min-width: 480px) and (max-width: 767px) {
  .artist-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}

/* ─── Dashboard stat grid — 1 column on phone ───────────── */
@media (max-width: 600px) {
  .dash-grid {
    grid-template-columns: 1fr;
  }
}

/* ─── Members grid — 2 columns min on phone ──────────────── */
@media (max-width: 480px) {
  .members-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
}

/* ─── Event cards — handle overflow on small screens ─────── */
@media (max-width: 480px) {
  .event-card {
    grid-template-columns: 48px 1fr;
    gap: .5rem;
    padding: .75rem;
  }
  .event-title {
    font-size: .85rem;
  }
}

/* ─── Hero section — mobile adjustments ──────────────────── */
@media (max-width: 600px) {
  .hero {
    padding: 4rem 1rem 3rem;
  }
  .hero-sub {
    font-size: 1rem;
  }
  .hero-search {
    margin-bottom: 1.25rem;
  }
  .hero-search input {
    font-size: 16px !important;
    padding: .875rem 1rem .875rem 2.75rem;
  }
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }
  .hero-actions .btn {
    width: 100%;
    max-width: 320px;
  }
}

/* ─── Auth cards — full-width on phone ──────────────────── */
@media (max-width: 480px) {
  .auth-card {
    padding: 1.75rem 1.25rem;
    border-radius: var(--radius-lg);
  }
  .role-cards {
    grid-template-columns: 1fr 1fr 1fr;
    gap: .5rem;
  }
  .role-card + label {
    padding: .75rem .4rem;
    font-size: .75rem;
  }
  .role-card + label .role-icon {
    font-size: 1.5rem;
  }
}

/* ─── Typography — reduce heading sizes on mobile ───────── */
@media (max-width: 600px) {
  h1 { font-size: clamp(1.4rem, 6vw, 2rem); }
  h2 { font-size: clamp(1.15rem, 5vw, 1.5rem); }
  h3 { font-size: 1.05rem; }
  .stat-num { font-size: 1.25rem; }
}

/* ─── Repertoire list — wrap on small screens ───────────── */
@media (max-width: 480px) {
  .repertoire-list li {
    flex-direction: column;
    gap: .2rem;
  }
  .rep-composer {
    min-width: 0;
  }
}

/* ─── Footer — stack columns on mobile ───────────────────── */
@media (max-width: 600px) {
  .footer-inner {
    flex-direction: column;
    gap: 1.25rem;
  }
  .footer-nav {
    gap: 1rem;
    flex-wrap: wrap;
  }
}

/* ─── Edit profile wrap — mobile padding ─────────────────── */
@media (max-width: 600px) {
  .edit-wrap {
    padding: 0 .75rem 2rem;
    margin-top: 1rem;
  }
}

/* ─── Section header — stack on very small ────────────────── */
@media (max-width: 480px) {
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: .5rem;
  }
}

/* ─── Audio player — mobile layout ───────────────────────── */
@media (max-width: 600px) {
  /* Allow ap-controls to wrap; reduce gap */
  .ap-controls {
    flex-wrap: wrap;
    gap: .5rem;
  }
}
@media (max-width: 380px) {
  /* Hide volume on very small screens */
  .ap-volume {
    display: none;
  }
}

/* ─── Playlist items — comfortable touch targets ─────────── */
@media (max-width: 768px) {
  .playlist-item {
    min-height: 44px;
    padding: .6rem .75rem;
  }
}

/* ─── General: no horizontal overflow on body ────────────── */
html, body {
  overflow-x: hidden;
}

/* ─── Footer mini-player ────────────────────────────────────── */
#aria-mini-player {
  position: fixed;
  bottom: -80px;
  left: 0; right: 0;
  z-index: 300;
  height: 64px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 24px rgba(0,0,0,.10);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1.25rem;
  transition: bottom .3s cubic-bezier(.4,0,.2,1);
  color-scheme: light;
}
#aria-mini-player.mp-active {
  bottom: 0;
}
body.has-mini-player {
  padding-bottom: 64px;
}
.mp-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  flex: 0 0 180px;
}
.mp-title {
  font-size: .82rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mp-artist {
  font-size: .72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mp-controls {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex: 1;
}
.mp-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  font-size: 1rem;
  padding: .3rem .4rem;
  border-radius: 4px;
  transition: color var(--transition), background var(--transition);
  flex-shrink: 0;
}
.mp-btn:hover { color: var(--primary); background: var(--surface2); }
.mp-play {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff !important;
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem;
  flex-shrink: 0;
}
.mp-play:hover { background: var(--primary-d); }
.mp-progress {
  flex: 1;
  height: 4px;
  background: var(--border2);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
}
.mp-filled {
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
  width: 0;
  pointer-events: none;
  transition: width .1s linear;
}
.mp-time {
  font-size: .72rem;
  color: var(--text-muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.mp-time-cur { color: var(--text); font-weight: 600; }
.mp-volume {
  -webkit-appearance: none;
  appearance: none;
  width: 64px; height: 4px;
  background: var(--border2);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  flex-shrink: 0;
}
.mp-volume::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
}
.mp-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1rem;
  padding: .3rem;
  flex-shrink: 0;
  line-height: 1;
}
.mp-close:hover { color: var(--danger); }

@media (max-width: 600px) {
  .mp-info  { flex: 0 0 120px; }
  .mp-volume { display: none; }
}
@media (max-width: 400px) {
  .mp-info { display: none; }
}

/* ─── Subscription widget — full-width button on mobile ──── */
@media (max-width: 480px) {
  .profile-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE ADDITIONS — tablet & mobile
   ═══════════════════════════════════════════════════════════ */

/* ─── Multi-column form rows ─────────────────────────────── */
/* form-row--3 : used for venue name / city / country fields */
@media (min-width: 560px) {
  .form-row--3 { grid-template-columns: 2fr 1fr 1fr; }
}
/* form-row--4 : used for search/filter bars               */
@media (min-width: 560px) {
  .form-row--4 { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .form-row--4 { grid-template-columns: 2fr 1fr 1fr 1fr; }
}

/* ─── Filter bar (discover / search pages) ───────────────── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  align-items: flex-end;
}
.filter-bar select,
.filter-bar input[type="text"],
.filter-bar input[type="search"] {
  flex: 1 1 140px;
  min-width: 0;
}
@media (max-width: 480px) {
  .filter-bar select,
  .filter-bar input[type="text"],
  .filter-bar input[type="search"] {
    flex: 1 1 100%;
  }
  .filter-bar .btn { width: 100%; justify-content: center; }
}

/* ─── Tables: always wrap in scroll container ────────────── */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}
.table-responsive table { min-width: 480px; }

/* ─── Legal pages: table font size on mobile ─────────────── */
@media (max-width: 600px) {
  .legal-table { font-size: .8rem; }
  .legal-table th, .legal-table td { padding: .45rem .6rem; }
}

/* ─── Campaign form: email preview box ───────────────────── */
.campaign-preview-box {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  overflow: hidden;
  max-width: 100%;
  font-family: Arial, sans-serif;
}

/* ─── Dashboard stats grid ───────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: .75rem;
}
@media (max-width: 400px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

/* ─── Artist profile: event cards ────────────────────────── */
@media (max-width: 480px) {
  .event-card { flex-wrap: wrap; }
  .event-card .event-date-block { min-width: 40px !important; }
}

/* ─── Event modal: full-width on mobile ──────────────────── */
@media (max-width: 540px) {
  #event-modal > div {
    margin: .5rem auto;
    border-radius: 8px;
  }
  #event-modal > div > div:last-child {
    padding: 1rem 1rem 1rem;
  }
}

/* ─── Footer: legal nav wrap on mobile ──────────────────── */
@media (max-width: 600px) {
  .footer-nav--legal { gap: .75rem; }
  .footer-company { font-size: .78rem; }
}

/* ─── Booking detail / quote forms ─────────────────────────*/
@media (max-width: 600px) {
  .booking-meta-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ─── Masterclass cards ──────────────────────────────────── */
@media (max-width: 600px) {
  .mc-card-inner { flex-direction: column !important; }
  .mc-card-img   { width: 100% !important; height: 180px !important; }
}

/* ─── News / blog post grid ─────────────────────────────── */
@media (max-width: 480px) {
  .news-grid { grid-template-columns: 1fr !important; }
}

/* ─── Profile tab bar: scroll horizontally on mobile ─────── */
@media (max-width: 600px) {
  .tab-bar {
    overflow-x: auto;
    flex-wrap: nowrap !important;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
    scrollbar-width: none;
  }
  .tab-bar::-webkit-scrollbar { display: none; }
  .tab-btn { white-space: nowrap; flex-shrink: 0; }
}

/* ─── Cookie banner: stack on tiny screens ───────────────── */
@media (max-width: 480px) {
  #cookie-banner { flex-direction: column; align-items: flex-start; }
  #cookie-banner > div:last-child { width: 100%; }
  #cookie-banner > div:last-child a,
  #cookie-banner > div:last-child button { flex: 1; text-align: center; }
}

/* ─── Hero search bar ────────────────────────────────────── */
@media (max-width: 480px) {
  .hero-actions { flex-direction: column; gap: .6rem; }
  .hero-actions .btn { width: 100%; justify-content: center; }
}

/* ═══════════════════════════════════════════════════════════
   MOBILE v4 — Phone & tablet fixes (iPhone Air / 393px+)
   ═══════════════════════════════════════════════════════════ */

/* ─── Footer copyright: allow wrap on small screens ─────── */
@media (max-width: 700px) {
  .footer-copy-inline {
    white-space: normal !important;
    margin-left: 0 !important;
    width: 100%;
    padding-top: .4rem;
  }
}

/* ─── Plays breakdown modal: stack columns on mobile ─────── */
@media (max-width: 600px) {
  .plays-grid {
    grid-template-columns: 1fr !important;
    gap: .75rem !important;
  }
}

/* ─── Profile: PDF score cards — wrap button on tiny phones  */
@media (max-width: 420px) {
  .pdf-score-card {
    flex-wrap: wrap !important;
  }
  .pdf-score-card > .btn, .pdf-score-card > a.btn {
    width: 100%;
    justify-content: center;
  }
}

/* ─── Profile: masterclass cards — stack on mobile ───────── */
@media (max-width: 480px) {
  .mc-card-flex {
    flex-direction: column !important;
    gap: .75rem !important;
  }
  .mc-card-flex > img {
    width: 100% !important;
    height: 160px !important;
    border-radius: var(--radius) var(--radius) 0 0;
  }
}

/* ─── Profile event row: allow title+buttons to wrap ─────── */
@media (max-width: 480px) {
  .event-title-row {
    flex-wrap: wrap !important;
  }
}

/* ─── Profile bio name row: stack on narrow phones ───────── */
@media (max-width: 420px) {
  .profile-bio-name-row {
    flex-direction: column !important;
    align-items: flex-start !important;
  }
  .profile-bio-name-row .profile-actions {
    width: 100%;
  }
  .profile-bio-name-row .profile-actions .btn {
    flex: 1;
    justify-content: center;
  }
}

/* ─── Agenda hero: add horizontal padding ────────────────── */
@media (max-width: 600px) {
  .agenda-hero {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
}

/* ─── Home section headers: allow wrap on narrow ─────────── */
@media (max-width: 400px) {
  .home-sec-head {
    flex-direction: column;
    align-items: flex-start;
    gap: .4rem;
  }
}

/* ─── Artist directory: 2-column min on very small ──────── */
@media (max-width: 360px) {
  .artist-dir-grid { grid-template-columns: 1fr !important; }
}

/* ─── Bio strip: photo smaller on very small phones ─────── */
@media (max-width: 360px) {
  .profile-bio-photo,
  .profile-bio-initials {
    width: 90px !important;
    height: 90px !important;
  }
}

/* ─── Container: minimum padding on phones ───────────────── */
@media (max-width: 400px) {
  .container,
  .container--sm,
  .container--md,
  .container--lg {
    padding-left: .75rem;
    padding-right: .75rem;
  }
  .profile-body {
    padding: 0 .6rem;
  }
}

/* ─── Cards: reduce padding on very small screens ────────── */
@media (max-width: 360px) {
  .card { padding: .85rem; }
  .widget { padding: .85rem; }
}

/* ─── Agenda row: reduce padding on phone ────────────────── */
@media (max-width: 480px) {
  .agenda-wrap { padding: 1rem .9rem; }
  .agenda-row { padding: .65rem .75rem; gap: .5rem; }
  .agenda-date-day { font-size: 1.3rem; }
}

/* ─── Profile sidebar: full-width on mobile ──────────────── */
@media (max-width: 899px) {
  .profile-sidebar {
    width: 100%;
  }
}

/* ─── Prevent any element from overflowing viewport ─────── */
.profile-bio-text-col,
.profile-bio-photo-col,
.profile-main,
.profile-sidebar {
  min-width: 0;
  max-width: 100%;
}

/* ─── Audio player: volume hidden on mobile ──────────────── */
@media (max-width: 480px) {
  .ap-volume { display: none; }
}

/* ─── News/post cards: share buttons wrap ────────────────── */
@media (max-width: 480px) {
  .news-share-row {
    flex-wrap: wrap;
    flex-shrink: 1 !important;
  }
}

/* ─── Artist directory: reduce outer padding on phone ─────── */
@media (max-width: 480px) {
  .dir-hero { padding: 2rem 1rem 1.5rem; }
  .dir-filters { padding: 0 .75rem; }
}

/* ─── Wallet / nav wallet link: shorter on mobile ────────── */
@media (max-width: 768px) {
  .nav-wallet-label { display: none; }
}

/* ─── Prevent long words / URLs breaking layout ──────────── */
.card, .widget, .tab-panel, .profile-bio-text {
  overflow-wrap: break-word;
  word-break: break-word;
}

/* ─── Global: ensure containers can't cause horizontal scroll */
main.main {
  overflow-x: hidden;
  width: 100%;
}

/* ─── Profile actions on very small screens ──────────────── */
@media (max-width: 360px) {
  .profile-actions {
    flex-direction: column;
    width: 100%;
  }
  .profile-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ── Artist quick nav ──────────────────────────────────────────────────────── */
.artist-quicknav {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .75rem 1rem;
  margin-bottom: 1.5rem;
}
.artist-quicknav-label {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  margin-bottom: .6rem;
}
.artist-quicknav-links {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
}

/* ── Cart add button states ────────────────────────────────────────────────── */
.cart-add-form { display: contents }
.btn--incart {
  background: #166534 !important;
  color: #4ade80 !important;
  cursor: default;
}
.btn--incart:hover { background: #166534 !important; }
