@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

:root {
  --primary: #FF385C;
  --primary-dark: #E31C5F;
  --text-primary: #222222;
  --text-secondary: #717171;
  --text-tertiary: #B0B0B0;
  --background: #FFFFFF;
  --surface: #F7F7F7;
  --border: #DDDDDD;
  --border-light: #EBEBEB;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, .08);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, .08);
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1280px;
  --header-height: 80px;
  --gold: #FFC107;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--background);
  min-height: 100vh;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
ul, ol { list-style: none; }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ─── Header ─── */
.studio-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-height);
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.studio-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  transition: background var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  background: var(--surface);
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

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

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

.btn--outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-primary);
}

.btn--outline:hover {
  border-color: var(--text-primary);
}

.btn--ghost {
  background: transparent;
  color: var(--text-primary);
}

.btn--sm { padding: 10px 18px; font-size: 14px; }
.btn--block { width: 100%; }
.btn--pill { border-radius: var(--radius-pill); }

/* ─── Shell ─── */
.studio-shell {
  padding-top: var(--header-height);
}

/* ─── Page Hero ─── */
.page-hero {
  padding: 48px 0;
  border-bottom: 1px solid var(--border-light);
}

.page-hero__title {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.page-hero__subtitle {
  font-size: 16px;
  color: var(--text-secondary);
}

/* ─── Auth Hero ─── */
.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.auth-visual {
  background: linear-gradient(135deg, rgba(0,0,0,0.4), rgba(0,0,0,0.2)),
              url('https://images.unsplash.com/photo-1492691527719-9d1e07e534b4?auto=format&fit=crop&w=1400&q=80') center/cover no-repeat;
  display: flex;
  align-items: flex-end;
  padding: 60px;
  color: #fff;
}

.auth-visual h1 { font-size: 40px; font-weight: 800; margin-bottom: 12px; }
.auth-visual p { font-size: 18px; color: rgba(255,255,255,0.8); }

.auth-form-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 48px;
}

.auth-card {
  width: 100%;
  max-width: 480px;
}

.auth-card__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 32px;
}

.auth-card__title { font-size: 28px; font-weight: 800; margin-bottom: 8px; }
.auth-card__subtitle { font-size: 15px; color: var(--text-secondary); margin-bottom: 32px; }

/* ─── Forms ─── */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; }

.form-input,
.form-select {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 15px;
  color: var(--text-primary);
  background: #fff;
  outline: none;
  transition: border-color var(--transition);
}

.form-input:focus,
.form-select:focus {
  border-color: var(--text-primary);
  box-shadow: 0 0 0 2px rgba(34, 34, 34, 0.1);
}

.form-input::placeholder { color: var(--text-tertiary); }
textarea.form-input { resize: vertical; min-height: 100px; }

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

.password-toggle { position: relative; }
.password-toggle .form-input { padding-right: 52px; }
.password-toggle__btn {
  position: absolute; top: 50%; right: 12px; transform: translateY(-50%);
  border: none; background: none; color: var(--text-secondary); cursor: pointer;
  font-size: 16px;
  /* Minimum 40x40 touch target */
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  touch-action: manipulation;
}

.form-link { font-size: 14px; font-weight: 600; color: var(--primary); }
.form-link:hover { text-decoration: underline; }

.form-check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
}

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

.quiet-link { color: var(--primary); font-weight: 600; }
.quiet-link:hover { text-decoration: underline; }

/* ─── Cards ─── */
.panel {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.profile-card {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-md);
  margin-top: -40px;
  position: relative;
  z-index: 2;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  background: #fff;
}

.avatar {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border: 4px solid #fff;
  border-radius: 50%;
  box-shadow: var(--shadow-md);
}

/* ─── Metric Cards ─── */
.metric-card {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 20px;
  text-align: center;
}

.metric-card strong {
  display: block;
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
}

.metric-card span {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ─── Portfolio Cards ─── */
.portfolio-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

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

.portfolio-card img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  /* Prevent layout shift - explicit dimensions */
  aspect-ratio: 4 / 3;
}

.portfolio-card__body {
  padding: 16px;
}

.portfolio-card__body h3 {
  font-size: 16px;
  font-weight: 700;
  margin-top: 8px;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portfolio-card__body p {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ─── Calendar ─── */
.calendar-grid-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
  border-radius: var(--radius-sm);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  min-width: 420px;
}

.calendar-cell {
  min-height: 80px;
  padding: 8px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  background: #fff;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
  cursor: pointer;               /* Make all cells look clickable */
  user-select: none;
}

.calendar-cell:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(255,56,92,0.10);
}

.calendar-cell strong {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
}

.calendar-cell small {
  font-size: 11px;
  color: var(--text-secondary);
}

.calendar-cell.booked {
  background: #FFF0F0;
  border-color: #FFCDD2;
  cursor: default;               /* Booked dates are not selectable */
}

.calendar-cell.booked:hover {
  transform: none;
  box-shadow: none;
  border-color: #FFCDD2;
}

.calendar-cell.open {
  background: #F0FFF4;
  border-color: #C8E6C9;
  cursor: pointer;
}

.calendar-cell.open:hover {
  background: #E8F5E9;
  border-color: var(--primary);
}

.calendar-cell.blocked {
  background: #ECEFF1;
  border-color: #B0BEC5;
  cursor: pointer;
}

.calendar-cell.blocked:hover {
  background: #CFD8DC;
  border-color: #90A4AE;
}

.calendar-cell.blocked-mixed {
  background: #FFF8E1;
  border-color: #FFE082;
}

.calendar-cell.blocked-mixed:hover {
  background: #FFF3C4;
}

.calendar-cell.past {
  opacity: 0.4;
  cursor: default;
  background: #FAFAFA;
}

.calendar-cell.past:hover {
  transform: none;
  box-shadow: none;
}

/* Selected state — clear ring + primary tint */
.calendar-cell.selected,
.calendar-cell.open.selected {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
  background: #FFF0F3;
  border-color: var(--primary);
}

.calendar-cell.selected strong {
  color: var(--primary);
}

/* ─── Timeline ─── */
.timeline { display: grid; gap: 16px; }

.timeline-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
}

.timeline-item:last-child { padding-bottom: 0; border-bottom: none; }

.time-pill {
  align-self: start;
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  background: #E8F5E9;
  color: #2E7D32;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

/* ─── Message Cards ─── */
.message-card {
  display: flex;
  gap: 16px;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  transition: box-shadow var(--transition);
}

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

.message-card img {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
}

.message-card strong {
  font-size: 15px;
}

.message-card p {
  font-size: 14px;
  color: var(--text-secondary);
}

.status-dot {
  width: 8px;
  height: 8px;
  display: inline-block;
  border-radius: 50%;
  background: var(--primary);
}

/* ─── Progress Bar (Multi-step) ─── */
.progress-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 40px;
}

.progress-bar__step {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  transition: background var(--transition);
}

.progress-bar__step.active {
  background: var(--primary);
}

.progress-bar__step.done {
  background: #4CAF50;
}

/* ─── Section Spacing ─── */
.section-pad { padding: 48px 0; }

/* ─── Success Toast ─── */
.success-toast {
  padding: 16px 20px;
  background: #E8F5E9;
  border: 1px solid #C8E6C9;
  border-radius: var(--radius-sm);
  color: #2E7D32;
  font-size: 14px;
  font-weight: 500;
  display: none;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.success-toast.show { display: flex; }

/* ─── Footer ─── */
.studio-footer {
  background: var(--surface);
  padding: 40px 0;
  border-top: 1px solid var(--border-light);
}

.studio-footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  font-size: 14px;
  color: var(--text-secondary);
}

.studio-footer a {
  color: var(--text-primary);
  font-weight: 600;
}

/* ─── Responsive & Mobile Navigation ─── */
.studio-hamburger {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: #fff;
  color: var(--text-primary);
  font-size: 18px;
  cursor: pointer;
  place-items: center;
  flex-shrink: 0;
  transition: background var(--transition);
}

.studio-hamburger:hover {
  background: var(--surface);
}

.studio-mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.5);
}

.studio-mobile-nav.open {
  display: block;
}

.studio-mobile-nav__panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 300px;
  max-width: 85vw;
  height: 100%;
  background: #fff;
  padding: 24px;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideInRight 0.3s ease;
}

.studio-mobile-nav__close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: #fff;
  color: var(--text-primary);
  font-size: 16px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background var(--transition);
}

.studio-mobile-nav__close:hover {
  background: var(--surface);
}

.studio-mobile-nav__links {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 60px;
}

.studio-mobile-nav__links a {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}

.studio-mobile-nav__links a:hover,
.studio-mobile-nav__links a.active {
  background: var(--surface);
}

/* ─── Studio Grid Layout Classes ─── */
.studio-hero-flex {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px;
}

.profile-card-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

/* Avatar + name group inside profile card (replaces inline flex style) */
.profile-avatar-group {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  min-width: 0;
}

.metrics-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.studio-two-cols {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
}

.studio-about-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 24px;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.enquiry-columns {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 32px;
}

/* Enquiry list sidebar (replaces inline grid style) */
.enquiry-list {
  display: grid;
  gap: 16px;
  align-content: start;
}

.enquiry-meta-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.schedule-columns {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 32px;
}

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

@keyframes pop {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* ─── Responsive Media Queries ─── */
@media (max-width: 1024px) {
  .nav-links {
    display: none;
  }
  .studio-hamburger {
    display: grid;
  }
  .studio-two-cols {
    grid-template-columns: 1fr;
  }
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .enquiry-columns {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .schedule-columns {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  /* studio-hero-flex: portfolio page header stacks at tablet */
  .studio-hero-flex {
    flex-wrap: wrap;
    gap: 16px;
  }
  /* Calendar: keep 7 columns with horizontal scroll — no column change */
}

@media (max-width: 768px) {
  .auth-page {
    grid-template-columns: 1fr;
  }
  .auth-visual {
    display: none;
  }
  .auth-form-wrapper {
    padding: 32px 24px;
    min-height: 100vh;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  /* Calendar: keep 7 columns with horizontal scroll — no column change needed */
  .page-hero__title {
    font-size: 26px;
  }
  .studio-about-cols {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .metrics-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  /* portfolio header button group stacks on mobile */
  .studio-hero-flex {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  /* Calendar: keep 7 columns but scroll horizontally — much more usable than a broken 2-col grid */
  .calendar-grid {
    min-width: 360px;
    gap: 4px;
  }
  .calendar-cell {
    min-height: 56px;
    padding: 4px;
    font-size: 12px;
  }
  .timeline-item {
    grid-template-columns: 1fr;
  }
  .metrics-row {
    grid-template-columns: 1fr;
  }
  .portfolio-grid {
    grid-template-columns: 1fr;
  }
  .enquiry-meta-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  /* Ensure accessible touch target heights on all form inputs */
  .form-input,
  .form-select {
    min-height: 44px;
  }
  /* Page hero: stack CTA buttons on very small screens */
  .page-hero .btn {
    width: 100%;
    text-align: center;
  }
}

@keyframes pop {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* ─── Profile Page ─── */
.profile-cover-wrapper {
  position: relative;
  width: 100%;
  height: 320px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface);
}

.profile-cover-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-cover-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition);
}

.profile-cover-wrapper:hover .profile-cover-overlay {
  opacity: 1;
}

.profile-cover-btn {
  padding: 10px 20px;
  background: rgba(255,255,255,0.95);
  border: none;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: transform var(--transition);
}

.profile-cover-btn:hover {
  transform: scale(1.05);
}

.profile-avatar-upload {
  position: relative;
  width: 120px;
  height: 120px;
  margin-top: -60px;
  z-index: 2;
}

.profile-avatar-upload img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #fff;
  box-shadow: var(--shadow-md);
}

.profile-avatar-overlay {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--transition);
}

.profile-avatar-upload:hover .profile-avatar-overlay {
  opacity: 1;
}

.profile-avatar-overlay i {
  color: #fff;
  font-size: 20px;
}

.profile-section {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.profile-section__title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}

.profile-section__subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}

.checkbox-grid label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  font-size: 14px;
  font-weight: 500;
}

.checkbox-grid label:hover {
  border-color: var(--primary);
  background: #FFF0F3;
}

.checkbox-grid label input:checked + span {
  color: var(--primary);
  font-weight: 600;
}

.checkbox-grid label:has(input:checked) {
  border-color: var(--primary);
  background: #FFF0F3;
}

.checkbox-grid label input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.service-area-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.service-area-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
}

.service-area-tag button {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 14px;
  padding: 0;
  line-height: 1;
}

.service-area-tag button:hover {
  color: var(--primary);
}

.image-upload-area {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px;
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}

.image-upload-area:hover {
  border-color: var(--primary);
  background: #FFF0F3;
}

.image-upload-area i {
  font-size: 24px;
  color: var(--text-tertiary);
}

.image-upload-area span {
  font-size: 14px;
  color: var(--text-secondary);
}

.image-upload-area small {
  font-size: 12px;
  color: var(--text-tertiary);
}

.profile-save-bar {
  position: sticky;
  bottom: 0;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-light);
  padding: 16px 0;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  z-index: 50;
}

.profile-success-toast {
  position: fixed;
  top: 100px;
  right: 24px;
  padding: 16px 24px;
  background: #E8F5E9;
  border: 1px solid #C8E6C9;
  border-radius: var(--radius-sm);
  color: #2E7D32;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 200;
  animation: slideInRight 0.3s ease;
  box-shadow: var(--shadow-md);
}

@media (max-width: 768px) {
  .profile-cover-wrapper {
    height: 200px;
    border-radius: 0;
  }
  .profile-avatar-upload {
    margin-top: -50px;
    width: 100px;
    height: 100px;
  }
  .profile-avatar-upload img {
    width: 100px;
    height: 100px;
  }
  .checkbox-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .profile-section {
    padding: 20px;
  }
}

/* ─── Portfolio Tabs ─── */
.portfolio-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  overflow-x: auto;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
}

.portfolio-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition);
}

.portfolio-tab:hover {
  border-color: var(--text-primary);
  color: var(--text-primary);
}

.portfolio-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.portfolio-tab--add {
  background: var(--surface);
  border-style: dashed;
}

/* ─── Portfolio Grid (6 columns) ─── */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

@media (max-width: 1024px) {
  .portfolio-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  .portfolio-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 480px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ─── Portfolio Card Overlay ─── */
.portfolio-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 12px;
  opacity: 0;
  transition: opacity var(--transition);
}

.portfolio-card:hover .portfolio-card__overlay {
  opacity: 1;
}

.portfolio-card__caption {
  font-size: 12px;
  color: #fff;
  font-weight: 500;
  margin-bottom: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portfolio-card__delete {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.9);
  color: #E53935;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}

.portfolio-card__delete:hover {
  background: #E53935;
  color: #fff;
}

/* ─── Empty State ─── */
.portfolio-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  text-align: center;
  color: var(--text-secondary);
}

.portfolio-empty i {
  font-size: 48px;
  color: var(--text-tertiary);
  margin-bottom: 16px;
}

.portfolio-empty h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.portfolio-empty p {
  font-size: 14px;
  margin-bottom: 20px;
}

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

.modal-overlay.open {
  display: flex;
}

.modal {
  background: #fff;
  border-radius: var(--radius-md);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--surface);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}

.modal-close:hover {
  background: var(--border);
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--border-light);
}

/* ─── Upload Preview ─── */
.upload-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.upload-preview__item {
  text-align: center;
}

.upload-preview__item img {
  width: 100%;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 4px;
}

.upload-preview__item span {
  display: block;
  font-size: 11px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-preview__item small {
  font-size: 10px;
  color: var(--text-tertiary);
}

.upload-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}

.upload-results {
  grid-column: 1 / -1;
  margin-top: 16px;
}

.upload-progress {
  grid-column: 1 / -1;
  margin-top: 16px;
}

.upload-progress__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

.upload-progress__bar-wrap {
  width: 100%;
  height: 8px;
  background: var(--border-light);
  border-radius: 4px;
  overflow: hidden;
}

.upload-progress__bar {
  height: 100%;
  width: 0%;
  background: var(--primary);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.upload-progress__status {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-tertiary);
}

.upload-result {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 8px;
}

.upload-result.success {
  background: #E8F5E9;
  color: #2E7D32;
}

.upload-result.failed {
  background: #FFEBEE;
  color: #C62828;
}

.upload-result button {
  margin-left: auto;
  padding: 4px 8px;
  border: none;
  border-radius: 4px;
  background: #C62828;
  color: #fff;
  font-size: 11px;
  cursor: pointer;
}

/* ─── Lightbox ─── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.95);
}

.lightbox__overlay {
  position: absolute;
  inset: 0;
}

.lightbox__close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  z-index: 10;
  transition: background var(--transition);
}

.lightbox__close:hover {
  background: rgba(255,255,255,0.2);
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  z-index: 10;
  transition: background var(--transition);
}

.lightbox__nav:hover {
  background: rgba(255,255,255,0.2);
}

.lightbox__nav--prev { left: 20px; }
.lightbox__nav--next { right: 20px; }

.lightbox__content {
  max-width: 90vw;
  max-height: 80vh;
}

.lightbox__content img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 4px;
}

.lightbox__bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
}

.lightbox__counter {
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  white-space: nowrap;
}

.lightbox__caption {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
}

.lightbox__caption::placeholder {
  color: rgba(255,255,255,0.5);
}

.lightbox__caption:focus {
  outline: none;
  border-color: var(--primary);
}

.lightbox__delete {
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  background: rgba(229,57,53,0.8);
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
}

.lightbox__delete:hover {
  background: #E53935;
}

.lightbox__save {
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  background: rgba(255,255,255,0.2);
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
}

.lightbox__save:hover {
  background: rgba(255,255,255,0.35);
}

.lightbox__save.saved {
  background: rgba(76,175,80,0.8);
}

.btn--danger {
  background: #E53935;
  color: #fff;
}

.btn--danger:hover {
  background: #C62828;
  transform: translateY(-1px);
}

/* ─── Schedule Accordion (mobile) ─── */
.schedule-accordion-toggle {
  display: none;
  width: 100%;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
}

@media (max-width: 1024px) {
  .schedule-accordion-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    margin: -20px -20px 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--border-light);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
  }

  .schedule-accordion-toggle:hover {
    background: #F5F5F5;
  }

  .schedule-accordion-toggle .accordion-icon {
    transition: transform 0.2s ease;
    font-size: 12px;
    color: var(--text-secondary);
  }

  .schedule-accordion-toggle.open .accordion-icon {
    transform: rotate(180deg);
  }

  .schedule-accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .schedule-accordion-body.open {
    max-height: 2000px;
  }

  .schedule-columns {
    gap: 24px;
  }
}
