/* ============================================================
   PracticePath - App Styles
   Yoga Teacher Virtual Studio Platform
   ============================================================ */

/* ---- DESIGN TOKENS ---- */
:root {
  --sage: #8B9D77;
  --sage-light: #A8B896;
  --sage-dark: #6B7D5A;
  --cream: #F5F0E8;
  --warm-white: #FDFBF7;
  --charcoal: #2C2C2C;
  --stone: #5A5A5A;
  --terracotta: #C4784A;
  --terracotta-light: #D4956E;
  --terracotta-dark: #A8613A;
  --sand: #E8DDD0;

  --danger: #C0392B;
  --danger-light: #E74C3C;
  --danger-bg: #FDEDEC;
  --success: #5A8B5C;
  --success-bg: #EAF2EA;

  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-pill: 100px;

  --shadow-sm: 0 1px 3px rgba(44, 44, 44, 0.04), 0 1px 2px rgba(44, 44, 44, 0.06);
  --shadow-md: 0 4px 12px rgba(44, 44, 44, 0.06), 0 2px 4px rgba(44, 44, 44, 0.04);
  --shadow-lg: 0 10px 30px rgba(44, 44, 44, 0.08), 0 4px 8px rgba(44, 44, 44, 0.04);

  --nav-height: 72px;

  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;
}


/* ============================================================
   1. RESET & BASE
   ============================================================ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--charcoal);
  background: var(--warm-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--terracotta);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--terracotta-dark);
}

ul, ol {
  list-style: none;
}

input,
textarea,
select,
button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}


/* ============================================================
   2. TYPOGRAPHY
   ============================================================ */
h1, h2, h3 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--charcoal);
}

h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
}

h3 {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
}

p {
  line-height: 1.65;
  color: var(--stone);
}

small {
  font-size: 0.85rem;
}

.text-sage { color: var(--sage-dark); }
.text-terracotta { color: var(--terracotta); }
.text-stone { color: var(--stone); }
.text-center { text-align: center; }


/* ============================================================
   3. LAYOUT UTILITIES
   ============================================================ */
.container {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 2rem;
}

.container-narrow {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 0 2rem;
}

.page-wrapper {
  min-height: 100vh;
  padding-top: var(--nav-height);
}

.section {
  padding: 3.5rem 0;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sage-dark);
  margin-bottom: 1rem;
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.gap-4 { gap: 2rem; }


/* ============================================================
   4. NAVIGATION BAR
   ============================================================ */
.app-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(253, 251, 247, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(139, 157, 119, 0.1);
}

.app-nav .logo {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--sage-dark);
  letter-spacing: -0.02em;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.app-nav .logo span {
  color: var(--terracotta);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--stone);
  text-decoration: none;
  transition: color var(--transition-fast);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--charcoal);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--terracotta);
  border-radius: 1px;
}

.nav-links .nav-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  background: var(--terracotta);
  border-radius: var(--radius-md);
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.nav-links .nav-btn:hover {
  background: var(--terracotta-dark);
  color: #fff;
  transform: translateY(-1px);
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--charcoal);
}

.nav-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(139, 157, 119, 0.2);
}

.nav-user-avatar-placeholder {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--sage-light);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
}

/* Mobile hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--charcoal);
  border-radius: 1px;
  transition: transform var(--transition-base), opacity var(--transition-base);
}


/* ============================================================
   5. AUTH FORMS (.auth-page)
   ============================================================ */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: var(--cream);
  position: relative;
  overflow: hidden;
}

.auth-page::before {
  content: '';
  position: absolute;
  top: -15%;
  right: -10%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 157, 119, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.auth-page::after {
  content: '';
  position: absolute;
  bottom: -10%;
  left: -8%;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196, 120, 74, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(139, 157, 119, 0.15);
  box-shadow: var(--shadow-lg);
  padding: 2.75rem 2.5rem;
  animation: fadeInUp 0.4s ease both;
}

.auth-card .logo {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--sage-dark);
  text-align: center;
  margin-bottom: 0.5rem;
}

.auth-card .logo span {
  color: var(--terracotta);
}

.auth-card h1 {
  font-size: 1.5rem;
  text-align: center;
  margin-bottom: 0.5rem;
}

.auth-card .auth-subtitle {
  text-align: center;
  font-size: 0.95rem;
  color: var(--stone);
  margin-bottom: 2rem;
}

.auth-card .form-group {
  margin-bottom: 1.25rem;
}

.auth-card .form-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sage-dark);
  margin-bottom: 0.5rem;
}

.auth-card .form-group input {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(139, 157, 119, 0.25);
  border-radius: var(--radius-md);
  background: var(--warm-white);
  font-size: 0.95rem;
  color: var(--charcoal);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
}

.auth-card .form-group input:focus {
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(139, 157, 119, 0.12);
}

.auth-card .form-group input::placeholder {
  color: var(--stone);
  opacity: 0.5;
}

.auth-card .btn-primary {
  width: 100%;
  margin-top: 0.5rem;
}

.auth-footer {
  text-align: center;
  margin-top: 1.75rem;
  font-size: 0.9rem;
  color: var(--stone);
}

.auth-footer a {
  color: var(--terracotta);
  font-weight: 500;
}

.auth-footer a:hover {
  color: var(--terracotta-dark);
  text-decoration: underline;
}

.auth-error {
  background: var(--danger-bg);
  color: var(--danger);
  font-size: 0.85rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
  border: 1px solid rgba(192, 57, 43, 0.15);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
  color: var(--stone);
  font-size: 0.8rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--sand);
}


/* ============================================================
   6. DASHBOARD (.dashboard)
   ============================================================ */
.dashboard {
  padding-top: 2rem;
  padding-bottom: 4rem;
}

.dashboard-header {
  margin-bottom: 2rem;
}

.dashboard-header h1 {
  margin-bottom: 0.25rem;
}

.dashboard-header p {
  font-size: 0.95rem;
}

/* ---- Tabs ---- */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--sand);
  margin-bottom: 2.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

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

.tab {
  padding: 0.85rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--stone);
  border: none;
  background: none;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  transition: color var(--transition-fast);
}

.tab:hover {
  color: var(--charcoal);
}

.tab.active {
  color: var(--charcoal);
  font-weight: 600;
}

.tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0.5rem;
  right: 0.5rem;
  height: 2px;
  background: var(--terracotta);
  border-radius: 1px 1px 0 0;
}

/* ---- Tab Content ---- */
.tab-content {
  display: none;
  animation: fadeIn 0.25s ease both;
}

.tab-content.active {
  display: block;
}

/* ---- Profile Section ---- */
.profile-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2.5rem;
  align-items: start;
}

.profile-form-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.profile-photo-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.photo-preview {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(139, 157, 119, 0.2);
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.photo-preview-placeholder {
  font-family: 'Syne', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--sage-light);
}

.photo-upload-zone {
  width: 100%;
  padding: 1.5rem;
  border: 2px dashed rgba(139, 157, 119, 0.3);
  border-radius: var(--radius-md);
  background: rgba(139, 157, 119, 0.03);
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.photo-upload-zone:hover {
  border-color: var(--sage);
  background: rgba(139, 157, 119, 0.06);
}

.photo-upload-zone p {
  font-size: 0.85rem;
  color: var(--stone);
}

.photo-upload-zone .upload-hint {
  font-size: 0.75rem;
  color: var(--sage);
  margin-top: 0.35rem;
}

.photo-upload-zone input[type="file"] {
  display: none;
}

/* ---- Cards ---- */
.card {
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(139, 157, 119, 0.12);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-base);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.card-header h2 {
  font-size: 1.2rem;
}

.card-header h3 {
  font-size: 1.1rem;
}

.card + .card {
  margin-top: 1.5rem;
}


/* ============================================================
   7. COURSE CARDS (.course-card)
   ============================================================ */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.course-card {
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(139, 157, 119, 0.12);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-base), transform var(--transition-base);
  display: flex;
  flex-direction: column;
}

.course-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.course-card-thumbnail {
  width: 100%;
  height: 180px;
  background: linear-gradient(135deg, var(--cream), var(--sand));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.course-card-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.course-card-thumbnail-placeholder {
  font-family: 'Syne', sans-serif;
  font-size: 2rem;
  color: var(--sage-light);
  opacity: 0.5;
}

.course-card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.course-card-body h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.course-card-body .course-description {
  font-size: 0.9rem;
  color: var(--stone);
  line-height: 1.55;
  margin-bottom: 1rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.course-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid rgba(139, 157, 119, 0.08);
}

.course-meta-item {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--stone);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.course-meta-item.price {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  color: var(--terracotta);
  font-size: 0.9rem;
  margin-left: auto;
}

.course-meta-item.price.free {
  color: var(--sage-dark);
}

.course-card-actions {
  display: flex;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(139, 157, 119, 0.08);
  background: rgba(139, 157, 119, 0.02);
}


/* ============================================================
   8. TIER CARDS (.tier-card)
   ============================================================ */
.tiers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.tier-card {
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(139, 157, 119, 0.15);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-base), transform var(--transition-base);
  position: relative;
}

.tier-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* Free tier styling */
.tier-card.tier-free {
  border-color: rgba(139, 157, 119, 0.25);
}

.tier-card.tier-free .tier-badge {
  background: rgba(139, 157, 119, 0.1);
  color: var(--sage-dark);
}

.tier-card.tier-free .tier-price {
  color: var(--sage-dark);
}

/* Paid tier styling */
.tier-card.tier-paid {
  border-color: rgba(196, 120, 74, 0.2);
}

.tier-card.tier-paid .tier-badge {
  background: rgba(196, 120, 74, 0.1);
  color: var(--terracotta);
}

.tier-card.tier-paid .tier-price {
  color: var(--terracotta);
}

/* Featured / recommended tier */
.tier-card.tier-featured {
  border-color: var(--terracotta);
  border-width: 2px;
  box-shadow: var(--shadow-md);
}

.tier-card.tier-featured::before {
  content: 'Popular';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--terracotta);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.25rem 0.85rem;
  border-radius: var(--radius-pill);
}

.tier-badge {
  display: inline-flex;
  align-self: flex-start;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-pill);
  margin-bottom: 1rem;
}

.tier-name {
  font-family: 'Syne', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--charcoal);
  margin-bottom: 0.75rem;
}

.tier-price {
  font-family: 'Syne', sans-serif;
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.tier-price .period {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--stone);
  font-family: 'DM Sans', sans-serif;
}

.tier-description {
  font-size: 0.9rem;
  color: var(--stone);
  line-height: 1.55;
  margin-bottom: 1.5rem;
}

.tier-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 2rem;
  flex: 1;
}

.tier-features li {
  font-size: 0.9rem;
  color: var(--charcoal);
  padding-left: 1.5rem;
  position: relative;
  line-height: 1.45;
}

.tier-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 14px;
  height: 8px;
  border-left: 2px solid var(--sage);
  border-bottom: 2px solid var(--sage);
  transform: rotate(-45deg);
}

.tier-card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
}


/* ============================================================
   9. PUBLIC STUDIO PAGE (.studio-page)
   ============================================================ */
.studio-page {
  animation: fadeIn 0.4s ease both;
}

/* ---- Studio Hero Banner ---- */
.studio-hero {
  background: var(--cream);
  padding: 3.5rem 0 3rem;
  border-bottom: 1px solid var(--sand);
  position: relative;
  overflow: hidden;
}

.studio-hero::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -5%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 157, 119, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.studio-hero-inner {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  position: relative;
  z-index: 1;
}

.studio-hero-photo {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 3px solid rgba(139, 157, 119, 0.2);
  box-shadow: var(--shadow-md);
}

.studio-hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.studio-hero-photo-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--sage-light), var(--sage));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-size: 3rem;
  font-weight: 800;
  color: #fff;
}

.studio-hero-info h1 {
  margin-bottom: 0.5rem;
}

.studio-hero-bio {
  font-size: 1rem;
  color: var(--stone);
  line-height: 1.6;
  max-width: 540px;
  margin-bottom: 1rem;
}

.studio-hero-styles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ---- Studio Sections ---- */
.studio-section {
  padding: 3rem 0;
}

.studio-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.75rem;
}

.studio-section-header h2 {
  font-size: 1.4rem;
}

/* ---- Studio Tiers (Public) ---- */
.studio-tiers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.studio-tier-card {
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(139, 157, 119, 0.15);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}

.studio-tier-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.studio-tier-card .tier-name {
  margin-bottom: 0.5rem;
}

.studio-tier-card .tier-features {
  margin-bottom: 1.5rem;
}

.studio-tier-card .btn-primary {
  margin-top: auto;
  width: 100%;
  text-align: center;
}

/* ---- Studio Course Cards (Public) ---- */
.studio-course-card {
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(139, 157, 119, 0.12);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}

.studio-course-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}


/* ============================================================
   10. FORMS
   ============================================================ */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sage-dark);
  margin-bottom: 0.5rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="url"],
.form-group input[type="number"],
.form-group input[type="tel"],
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(139, 157, 119, 0.25);
  border-radius: var(--radius-md);
  background: var(--warm-white);
  font-size: 0.95rem;
  color: var(--charcoal);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(139, 157, 119, 0.12);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--stone);
  opacity: 0.5;
}

.form-group textarea {
  min-height: 100px;
  resize: vertical;
  line-height: 1.6;
}

.form-group textarea.auto-grow {
  overflow: hidden;
  resize: none;
}

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235A5A5A' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.form-hint {
  font-size: 0.78rem;
  color: var(--stone);
  margin-top: 0.35rem;
}

.form-error {
  font-size: 0.78rem;
  color: var(--danger);
  margin-top: 0.35rem;
}

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

.form-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* Checkbox / toggle */
.form-check {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  font-size: 0.9rem;
}

.form-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--sage);
  cursor: pointer;
}


/* ============================================================
   11. BUTTONS
   ============================================================ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  background: var(--terracotta);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
  text-decoration: none;
}

.btn-primary:hover {
  background: var(--terracotta-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(196, 120, 74, 0.25);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn-primary:disabled {
  background: var(--sand);
  color: var(--stone);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--sage-dark);
  background: transparent;
  border: 1.5px solid var(--sage);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
  text-decoration: none;
}

.btn-secondary:hover {
  background: rgba(139, 157, 119, 0.08);
  color: var(--sage-dark);
  transform: translateY(-1px);
}

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

.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--danger);
  background: transparent;
  border: 1.5px solid rgba(192, 57, 43, 0.3);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
  text-decoration: none;
}

.btn-danger:hover {
  background: var(--danger-bg);
  border-color: var(--danger);
  color: var(--danger);
}

.btn-small {
  padding: 0.45rem 1rem;
  font-size: 0.8rem;
}

.btn-icon {
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--stone);
  transition: background var(--transition-fast), color var(--transition-fast);
}

.btn-icon:hover {
  background: rgba(139, 157, 119, 0.08);
  color: var(--charcoal);
}

.btn-icon.danger:hover {
  background: var(--danger-bg);
  color: var(--danger);
}

.btn-group {
  display: flex;
  gap: 0.5rem;
}

/* Loading spinner on buttons */
.btn-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.btn-loading::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.btn-secondary.btn-loading::after {
  border-color: rgba(139, 157, 119, 0.2);
  border-top-color: var(--sage);
}


/* ============================================================
   12. TAGS / PILLS
   ============================================================ */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: var(--radius-pill);
  background: rgba(139, 157, 119, 0.1);
  color: var(--sage-dark);
  white-space: nowrap;
}

.tag.terracotta {
  background: rgba(196, 120, 74, 0.1);
  color: var(--terracotta);
}

.tag.sand {
  background: var(--sand);
  color: var(--stone);
}

.tag-removable {
  gap: 0.35rem;
}

.tag-removable .tag-remove {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(107, 125, 90, 0.15);
  font-size: 0.65rem;
  line-height: 1;
  color: var(--sage-dark);
  transition: background var(--transition-fast);
}

.tag-removable .tag-remove:hover {
  background: rgba(107, 125, 90, 0.3);
}

.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}


/* ============================================================
   13. TOASTS / NOTIFICATIONS
   ============================================================ */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: var(--charcoal);
  color: #fff;
  padding: 0.9rem 1.5rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 280px;
  max-width: 420px;
  animation: toastSlideIn 0.35s ease both;
  position: relative;
  overflow: hidden;
}

.toast.toast-success {
  border-left: 4px solid var(--sage);
}

.toast.toast-error {
  border-left: 4px solid var(--danger-light);
}

.toast.toast-info {
  border-left: 4px solid var(--terracotta-light);
}

.toast.toast-dismiss {
  animation: toastSlideOut 0.3s ease both;
}

.toast-close {
  margin-left: auto;
  cursor: pointer;
  opacity: 0.6;
  font-size: 1.1rem;
  transition: opacity var(--transition-fast);
  flex-shrink: 0;
}

.toast-close:hover {
  opacity: 1;
}

/* Auto-dismiss progress bar */
.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.25);
  animation: toastProgress 4s linear both;
}


/* ============================================================
   14. MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(44, 44, 44, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  animation: fadeIn 0.2s ease both;
}

.modal {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 2rem;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalSlideIn 0.25s ease both;
  position: relative;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}

.modal-header h2 {
  font-size: 1.2rem;
}

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--stone);
  font-size: 1.2rem;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
  flex-shrink: 0;
}

.modal-close:hover {
  background: var(--cream);
  color: var(--charcoal);
}

.modal-body {
  margin-bottom: 1.5rem;
}

.modal-body p {
  font-size: 0.95rem;
  line-height: 1.6;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}


/* ============================================================
   15. EMPTY STATES
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--stone);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.3;
  display: block;
}

.empty-state h3 {
  font-size: 1.15rem;
  color: var(--charcoal);
  margin-bottom: 0.5rem;
}

.empty-state p {
  font-size: 0.95rem;
  color: var(--stone);
  max-width: 360px;
  margin: 0 auto 1.5rem;
  line-height: 1.6;
}


/* ============================================================
   16. RESPONSIVE
   ============================================================ */

/* Tablet and below */
@media (max-width: 768px) {
  .container,
  .container-narrow {
    padding: 0 1.5rem;
  }

  /* Nav */
  .app-nav {
    padding: 0 1.5rem;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(253, 251, 247, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(139, 157, 119, 0.1);
    box-shadow: var(--shadow-md);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--transition-slow), opacity var(--transition-slow);
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links a {
    display: block;
    padding: 0.85rem 1.5rem;
    width: 100%;
  }

  .nav-links a.active::after {
    display: none;
  }

  .nav-links .nav-btn {
    margin: 0.5rem 1.5rem;
    width: calc(100% - 3rem);
    justify-content: center;
  }

  /* Tabs - horizontal scroll */
  .tabs {
    gap: 0;
    margin-bottom: 2rem;
  }

  .tab {
    padding: 0.75rem 1.25rem;
    font-size: 0.85rem;
  }

  /* Profile layout stacks */
  .profile-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .profile-photo-section {
    order: -1;
  }

  /* Courses and tiers go single column */
  .courses-grid {
    grid-template-columns: 1fr;
  }

  .tiers-grid {
    grid-template-columns: 1fr;
  }

  .studio-tiers-grid {
    grid-template-columns: 1fr;
  }

  /* Studio hero stacks */
  .studio-hero-inner {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }

  .studio-hero-bio {
    margin: 0 auto 1rem;
  }

  .studio-hero-styles {
    justify-content: center;
  }

  /* Form rows stack */
  .form-row {
    grid-template-columns: 1fr;
  }

  /* Auth card */
  .auth-card {
    padding: 2rem 1.75rem;
  }

  /* Section padding */
  .section {
    padding: 2.5rem 0;
  }

  .studio-section {
    padding: 2.5rem 0;
  }

  /* Modal */
  .modal {
    margin: 1rem;
    max-height: calc(100vh - 2rem);
  }

  /* Toast */
  .toast-container {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
  }

  .toast {
    min-width: auto;
    max-width: 100%;
  }
}

/* Mobile */
@media (max-width: 480px) {
  .container,
  .container-narrow {
    padding: 0 1rem;
  }

  .app-nav {
    padding: 0 1rem;
    height: 60px;
  }

  :root {
    --nav-height: 60px;
  }

  h1 {
    font-size: 1.6rem;
  }

  h2 {
    font-size: 1.3rem;
  }

  h3 {
    font-size: 1.05rem;
  }

  /* Auth */
  .auth-card {
    padding: 1.75rem 1.25rem;
    border-radius: 12px;
  }

  .auth-card h1 {
    font-size: 1.3rem;
  }

  /* Dashboard */
  .dashboard {
    padding-top: 1.5rem;
    padding-bottom: 3rem;
  }

  .card {
    padding: 1.5rem;
  }

  /* Tier cards compact */
  .tier-card {
    padding: 1.5rem;
  }

  .tier-price {
    font-size: 1.85rem;
  }

  /* Course card thumbnail */
  .course-card-thumbnail {
    height: 150px;
  }

  .course-card-body {
    padding: 1.25rem;
  }

  /* Studio hero */
  .studio-hero {
    padding: 2.5rem 0 2rem;
  }

  .studio-hero-photo {
    width: 100px;
    height: 100px;
  }

  /* Buttons tighter */
  .btn-primary,
  .btn-secondary,
  .btn-danger {
    padding: 0.7rem 1.25rem;
    font-size: 0.85rem;
  }

  /* Form inputs */
  .form-group input[type="text"],
  .form-group input[type="email"],
  .form-group input[type="password"],
  .form-group input[type="url"],
  .form-group input[type="number"],
  .form-group input[type="tel"],
  .form-group textarea,
  .form-group select {
    padding: 0.7rem 0.85rem;
    font-size: 0.9rem;
  }

  /* Photo preview smaller */
  .photo-preview {
    width: 120px;
    height: 120px;
  }

  /* Form actions stack */
  .form-actions {
    flex-direction: column;
  }

  .form-actions .btn-primary,
  .form-actions .btn-secondary {
    width: 100%;
  }

  /* Modal footer stacks */
  .modal-footer {
    flex-direction: column-reverse;
  }

  .modal-footer .btn-primary,
  .modal-footer .btn-secondary,
  .modal-footer .btn-danger {
    width: 100%;
  }
}


/* ============================================================
   17. ANIMATIONS
   ============================================================ */

/* Page-level fade in */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

/* Toast animations */
@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateX(40px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes toastSlideOut {
  from {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateX(40px) scale(0.96);
  }
}

@keyframes toastProgress {
  from {
    width: 100%;
  }
  to {
    width: 0%;
  }
}

/* Modal slide in */
@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

/* Staggered fade in for lists */
.fade-in-stagger > * {
  animation: fadeInUp 0.4s ease both;
}

.fade-in-stagger > *:nth-child(1) { animation-delay: 0ms; }
.fade-in-stagger > *:nth-child(2) { animation-delay: 60ms; }
.fade-in-stagger > *:nth-child(3) { animation-delay: 120ms; }
.fade-in-stagger > *:nth-child(4) { animation-delay: 180ms; }
.fade-in-stagger > *:nth-child(5) { animation-delay: 240ms; }
.fade-in-stagger > *:nth-child(6) { animation-delay: 300ms; }
.fade-in-stagger > *:nth-child(7) { animation-delay: 360ms; }
.fade-in-stagger > *:nth-child(8) { animation-delay: 420ms; }
.fade-in-stagger > *:nth-child(9) { animation-delay: 480ms; }
.fade-in-stagger > *:nth-child(10) { animation-delay: 540ms; }


/* ============================================================
   MISC UTILITIES
   ============================================================ */

/* Dividers */
.divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--sand), transparent);
  margin: 2rem 0;
}

/* Visually hidden (accessible) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Truncate text */
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Loading skeleton */
.skeleton {
  background: linear-gradient(90deg, var(--cream) 25%, var(--sand) 50%, var(--cream) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-text {
  height: 1em;
  margin-bottom: 0.5rem;
}

.skeleton-text.short {
  width: 60%;
}

.skeleton-circle {
  border-radius: 50%;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(139, 157, 119, 0.2);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(139, 157, 119, 0.35);
}

/* Focus styles for accessibility */
:focus-visible {
  outline: 2px solid var(--sage);
  outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--sage);
  outline-offset: 2px;
}

/* Selection color */
::selection {
  background: rgba(139, 157, 119, 0.2);
  color: var(--charcoal);
}
