/* =============================================================
   PLATAFORMA DE INVITACIONES WEB — CSS
   Design: Elegant, festive, mobile-first
   ============================================================= */

:root {
  --primary:    #e8386d;
  --secondary:  #f4a261;
  --bg:         #fdf4f8;
  --dark:       #1a1020;
  --gray:       #7a6b72;
  --gray-light: #f5eef2;
  --white:      #ffffff;
  --shadow:     0 4px 24px rgba(0,0,0,0.1);
  --shadow-lg:  0 12px 48px rgba(0,0,0,0.18);
  --radius:     16px;
  --radius-sm:  10px;
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: var(--font-body); color: var(--dark); background: var(--bg); -webkit-font-smoothing: antialiased; }

/* ── INVITATION PAGE ──────────────────────────────────────── */
.invitation-page { background: var(--dark); }

/* HERO */
.inv-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}
.hero-bg-img {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transform: scale(1.05);
  animation: heroZoom 20s ease-in-out infinite alternate;
}
@keyframes heroZoom { from{transform:scale(1.05)} to{transform:scale(1.12)} }
.hero-bg-gradient {
  position: absolute; inset: 0;
  background: linear-gradient(145deg, var(--primary) 0%, var(--secondary) 50%, #1a1020 100%);
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.6) 100%);
}
.hero-content {
  position: relative; z-index: 2;
  padding: 40px 24px;
  color: white;
  max-width: 700px;
  animation: fadeUp 1s ease;
}
@keyframes fadeUp { from{opacity:0;transform:translateY(30px)} to{opacity:1;transform:translateY(0)} }

.event-type-badge {
  display: inline-block;
  padding: 6px 18px;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.event-title {
  font-family: var(--font-display);
  font-size: clamp(40px, 8vw, 80px);
  font-weight: 600;
  line-height: 1.1;
  margin-bottom: 12px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.event-subtitle {
  font-size: clamp(16px, 3vw, 22px);
  opacity: 0.9;
  margin-bottom: 24px;
  font-weight: 300;
}
.event-date-display {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  opacity: 0.9;
  margin-bottom: 32px;
  padding: 10px 20px;
  background: rgba(255,255,255,0.15);
  border-radius: 50px;
  backdrop-filter: blur(4px);
}

/* Countdown */
.countdown-wrap {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 36px;
}
.countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  min-width: 72px;
}
.cd-num {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 600;
  line-height: 1;
}
.cd-label { font-size: 11px; opacity: 0.8; margin-top: 4px; text-transform: uppercase; letter-spacing: 1px; }

.event-past-badge {
  display: inline-block;
  padding: 10px 24px;
  background: rgba(255,255,255,0.2);
  border-radius: 50px;
  font-size: 16px;
  margin-bottom: 32px;
}

.btn-hero {
  display: inline-block;
  padding: 16px 36px;
  background: white;
  color: var(--primary);
  border-radius: 50px;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  transition: all .25s;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.btn-hero:hover { transform: translateY(-2px); box-shadow: 0 16px 48px rgba(0,0,0,0.3); }

.hero-scroll-hint {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.6);
  font-size: 20px;
  animation: bounce 2s infinite;
}
@keyframes bounce { 0%,100%{transform:translateX(-50%) translateY(0)} 50%{transform:translateX(-50%) translateY(8px)} }

/* ── SECTIONS ─────────────────────────────────────────────── */
.inv-section { padding: 60px 24px; }
.inv-section.inv-info { background: var(--bg); }
.inv-section.inv-map  { background: white; }
.inv-section.inv-login { background: var(--bg); }

.section-inner { max-width: 900px; margin: 0 auto; }
.section-title {
  font-family: var(--font-display);
  font-size: 32px;
  color: var(--primary);
  text-align: center;
  margin-bottom: 32px;
}

/* INFO GRID */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.info-card {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0,0,0,0.06);
  transition: transform .2s;
}
.info-card:hover { transform: translateY(-2px); }
.info-card.wide { grid-column: 1/-1; }
.info-card h3 { font-family: var(--font-display); font-size: 20px; color: var(--primary); margin-bottom: 10px; }
.info-icon { font-size: 28px; margin-bottom: 10px; }
.info-main { font-size: 17px; font-weight: 600; color: var(--dark); margin-bottom: 4px; }
.info-sub  { font-size: 14px; color: var(--gray); }
.big-number { font-size: 48px; font-family: var(--font-display); color: var(--primary); }
.rsvp-stat-card { text-align: center; }

.btn-info-action {
  display: inline-block;
  margin-top: 14px;
  padding: 9px 20px;
  background: var(--primary);
  color: white;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all .2s;
}
.btn-info-action:hover { opacity: .88; }

/* MAP */
.map-container { position: relative; }
.map-fallback {
  position: absolute; inset: 0;
  background: linear-gradient(145deg, #f0f0f0, #e0e0e0);
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
}
.map-fallback-inner { text-align: center; padding: 32px; }
.map-address-card {
  background: white;
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
}
.map-address-card h3 { font-family: var(--font-display); font-size: 22px; margin-bottom: 8px; color: var(--primary); }
.btn-directions {
  display: inline-block;
  margin-top: 16px;
  padding: 12px 28px;
  background: var(--primary);
  color: white;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  transition: all .2s;
}
.btn-directions:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }

/* ── LOGIN SECTION ────────────────────────────────────────── */
.login-card {
  background: white;
  border-radius: 24px;
  padding: 40px;
  max-width: 480px;
  margin: 0 auto;
  box-shadow: var(--shadow-lg);
}
.login-card-header { text-align: center; margin-bottom: 28px; }
.login-icon { font-size: 40px; display: block; margin-bottom: 10px; }
.login-card-header h2 { font-family: var(--font-display); font-size: 26px; color: var(--dark); margin-bottom: 6px; }
.login-card-header p { font-size: 14px; color: var(--gray); }

/* Tabs */
.auth-tabs { display: flex; background: #f0f0f0; border-radius: 50px; padding: 4px; margin-bottom: 24px; }
.auth-tab {
  flex: 1; padding: 10px; border: none; background: transparent;
  border-radius: 50px; font-family: var(--font-body); font-size: 13px;
  font-weight: 500; color: var(--gray); cursor: pointer; transition: all .2s;
}
.auth-tab.active { background: white; color: var(--primary); font-weight: 600; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.auth-panel { display: none; }
.auth-panel.active { display: block; animation: fadeIn .3s ease; }
@keyframes fadeIn { from{opacity:0;transform:translateY(6px)} to{opacity:1;transform:translateY(0)} }

.auth-message { margin-top: 14px; padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14px; }
.auth-message.error   { background:#fff0f3; color:#c0152a; border:1px solid #f5b8c4; }
.auth-message.info    { background:#f0f8ff; color:#1a6a9a; border:1px solid #b8d8f5; }
.auth-message.success { background:#f0fff4; color:#1a7a3a; border:1px solid #b8f0c8; }

/* Code inputs */
.code-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  margin: 20px 0;
}
.code-digit {
  width: 44px !important; height: 54px; text-align: center;
  font-size: 22px; font-weight: 700; padding: 0 !important;
  border: 2px solid #e0d0da !important; border-radius: 10px !important;
  color: var(--primary) !important; background: white;
  outline: none; transition: border-color .2s;
}
.code-digit:focus { border-color: var(--primary) !important; box-shadow: 0 0 0 3px rgba(var(--primary-rgb,232,56,109),.1); }
.code-sep { font-size: 20px; color: var(--gray); padding: 0 4px; }

.hint-text { font-size: 14px; color: var(--gray); margin-bottom: 16px; line-height: 1.5; }
.auth-links { display: flex; gap: 16px; justify-content: center; margin-top: 12px; }
.btn-text { background: none; border: none; color: var(--primary); font-size: 13px; cursor: pointer; text-decoration: underline; font-family: var(--font-body); }

.success-box { text-align: center; padding: 28px; background: linear-gradient(135deg,#f0fff4,#fff8f0); border-radius: var(--radius); }
.success-icon { font-size: 48px; margin-bottom: 12px; }
.success-box h3 { font-family: var(--font-display); color: var(--primary); margin-bottom: 8px; }
.success-box p { font-size: 14px; color: var(--gray); line-height: 1.5; }

/* ── FORMS ────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--dark); margin-bottom: 5px; }
input, textarea, select {
  width: 100%; padding: 11px 14px; font-family: var(--font-body); font-size: 14px;
  border: 2px solid #e0d0da; border-radius: var(--radius-sm); outline: none;
  background: white; color: var(--dark); transition: border-color .2s, box-shadow .2s;
}
input:focus, textarea:focus, select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(232,56,109,0.1); }
textarea { resize: vertical; }
small, .hint-small { font-size: 11px; color: var(--gray); margin-top: 3px; display: block; }
code { background: #f0f0f0; padding: 2px 6px; border-radius: 4px; font-size: 12px; }

/* ── BUTTONS ──────────────────────────────────────────────── */
.btn-primary {
  display: block; width: 100%; padding: 13px 24px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white; border: none; border-radius: 50px;
  font-family: var(--font-body); font-size: 15px; font-weight: 600;
  cursor: pointer; transition: all .25s; text-align: center;
  letter-spacing: 0.3px; text-decoration: none;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(232,56,109,0.35); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-secondary {
  display: inline-block; padding: 11px 24px;
  background: white; color: var(--primary);
  border: 2px solid var(--primary); border-radius: 50px;
  font-family: var(--font-body); font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all .2s; text-decoration: none;
}
.btn-secondary:hover { background: var(--primary); color: white; }

/* ── APP HEADER ───────────────────────────────────────────── */
.app-header {
  background: white; border-bottom: 1px solid rgba(0,0,0,0.08);
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.header-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 20px;
  height: 58px; display: flex; align-items: center; justify-content: space-between;
}
.header-logo {
  font-family: var(--font-display); font-size: 18px; color: var(--primary);
  font-weight: 600; text-decoration: none; display: flex; align-items: center; gap: 8px;
}
.header-right { display: flex; align-items: center; gap: 12px; }
.user-name { font-size: 13px; color: var(--gray); }
.btn-logout, .btn-link-header {
  font-size: 13px; color: var(--primary); text-decoration: none; font-weight: 600;
  padding: 6px 14px; border-radius: 20px; border: 1.5px solid var(--primary); transition: all .2s;
}
.btn-logout:hover, .btn-link-header:hover { background: var(--primary); color: white; }
.admin-badge {
  font-style: normal; font-family: var(--font-body); font-size: 10px;
  background: var(--primary); color: white; padding: 2px 8px; border-radius: 20px; font-weight: 600;
}

/* ── DASHBOARD ────────────────────────────────────────────── */
.dashboard-main { padding-bottom: 60px; }

/* RSVP Banner */
.rsvp-banner {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white; padding: 16px 24px;
}
.rsvp-banner-inner {
  max-width: 900px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.rsvp-q { font-size: 15px; font-weight: 500; }
.rsvp-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.rsvp-btn {
  padding: 9px 20px; border: none; border-radius: 50px;
  font-family: var(--font-body); font-size: 13px; font-weight: 700;
  cursor: pointer; transition: all .2s; background: rgba(255,255,255,0.2);
  color: white; border: 1.5px solid rgba(255,255,255,0.4);
}
.rsvp-btn:hover { background: white; color: var(--primary); }
.rsvp-status {
  padding: 12px 24px; font-size: 14px; font-weight: 600;
  display: flex; align-items: center; gap: 12px;
}
.rsvp-yes    { background: #f0fff4; color: #1a7a3a; border-bottom: 1px solid #c8efd4; }
.rsvp-no     { background: #fff0f4; color: #c0152a; border-bottom: 1px solid #f5c8d0; }
.rsvp-maybe  { background: #fffbf0; color: #856404; border-bottom: 1px solid #f0dca0; }
.btn-change-rsvp {
  padding: 5px 14px; border-radius: 50px; border: 1.5px solid currentColor;
  background: none; cursor: pointer; font-size: 12px; font-family: var(--font-body); color: inherit;
}

/* DASH NAV */
.dash-nav {
  display: flex; gap: 4px; padding: 12px 20px;
  border-bottom: 1px solid rgba(0,0,0,0.07);
  background: white; overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; position: sticky; top: 58px; z-index: 90;
}
.dash-nav::-webkit-scrollbar { display: none; }
.dash-tab {
  padding: 9px 18px; border: none; background: transparent; border-radius: 50px;
  font-family: var(--font-body); font-size: 14px; font-weight: 500; color: var(--gray);
  cursor: pointer; transition: all .2s; white-space: nowrap;
}
.dash-tab.active { background: var(--primary); color: white; font-weight: 600; }
.tab-badge {
  display: inline-block; background: rgba(255,255,255,0.3); border-radius: 50px;
  font-size: 11px; padding: 1px 7px; margin-left: 4px; font-weight: 700;
}
.dash-tab.active .tab-badge { background: rgba(255,255,255,0.4); }

.dash-panel { display: none; padding: 20px; max-width: 1100px; margin: 0 auto; }
.dash-panel.active { display: block; animation: fadeIn .25s ease; }

/* FEED */
.feed-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.feed-event-card {
  background: white; border-radius: var(--radius); padding: 20px 24px;
  box-shadow: var(--shadow); border: 1px solid rgba(0,0,0,0.06);
}
.feed-event-header { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 16px; }
.feed-type-icon { font-size: 36px; flex-shrink: 0; }
.feed-event-header h2 { font-family: var(--font-display); font-size: 22px; color: var(--dark); margin-bottom: 4px; }
.feed-event-header p { font-size: 13px; color: var(--gray); }

.mini-countdown {
  display: flex; gap: 12px; padding: 12px 0;
  border-top: 1px solid rgba(0,0,0,0.06); margin-top: 12px;
}
.mini-countdown > div { text-align: center; }
.mcd-n { display: block; font-family: var(--font-display); font-size: 28px; font-weight: 600; color: var(--primary); line-height: 1; }
.mcd-l { font-size: 11px; color: var(--gray); }

.btn-maps {
  display: inline-block; margin-top: 14px; padding: 9px 20px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white; border-radius: 50px; font-size: 13px; font-weight: 600; text-decoration: none; transition: all .2s;
}
.btn-maps:hover { transform: translateY(-1px); box-shadow: var(--shadow); }

.feed-recent-photos, .feed-messages {
  background: white; border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow); border: 1px solid rgba(0,0,0,0.06);
}
.feed-recent-photos h3, .feed-messages h3 { font-size: 15px; font-weight: 600; margin-bottom: 14px; color: var(--dark); }
.feed-photo-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px;
}
.feed-photo-thumb {
  aspect-ratio: 1; border-radius: 8px; overflow: hidden; cursor: pointer;
}
.feed-photo-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.feed-photo-thumb:hover img { transform: scale(1.05); }

/* PHOTOS */
.upload-zone-wrap {
  background: white; border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow); border: 1px solid rgba(0,0,0,0.06); margin-bottom: 20px;
}
.upload-zone-wrap h3 { font-size: 15px; font-weight: 600; margin-bottom: 14px; }
.upload-zone {
  border: 2px dashed #ddc8d8; border-radius: var(--radius);
  padding: 36px 20px; text-align: center; cursor: pointer;
  background: #fdf5f8; transition: all .2s;
}
.upload-zone:hover, .upload-zone.drag-over { border-color: var(--primary); background: #fce8f0; }
.uz-icon { font-size: 36px; margin-bottom: 10px; }
.upload-zone p { font-size: 14px; color: var(--gray); }

/* Photo editor */
.photo-preview-wrap { text-align: center; margin-bottom: 16px; }
.effects-bar { margin-bottom: 16px; }
.effects-bar h4 { font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.effects-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.effect-btn {
  padding: 6px 14px; border: 1.5px solid #e0d0da; background: white;
  border-radius: 50px; font-size: 12px; font-weight: 500; cursor: pointer;
  transition: all .2s; font-family: var(--font-body); color: var(--gray);
}
.effect-btn.active, .effect-btn:hover { border-color: var(--primary); color: var(--primary); background: #fce8f0; }
.editor-btns { display: flex; gap: 10px; margin-top: 14px; }
.editor-btns .btn-primary, .editor-btns .btn-secondary { flex: 1; }

/* Progress bar */
.progress-bar { background: #f0e0ea; border-radius: 50px; height: 6px; overflow: hidden; margin-bottom: 6px; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--secondary)); border-radius: 50px; width: 0%; transition: width .3s; }
.progress-text { font-size: 13px; color: var(--gray); text-align: center; }

/* Catalog */
.catalog-section { margin-bottom: 20px; }
.catalog-section h3 { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.catalog-grid, .catalog-grid-modal {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px;
  max-height: 360px; overflow-y: auto; padding: 4px;
}
.catalog-item {
  aspect-ratio: 4/3; border-radius: 10px; overflow: hidden; cursor: pointer;
  border: 2px solid transparent; transition: all .2s; position: relative;
}
.catalog-item:hover { border-color: var(--primary); transform: translateY(-2px); }
.catalog-item.selected { border-color: var(--primary); }
.catalog-item img { width: 100%; height: 100%; object-fit: cover; }
.catalog-item-label { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(0,0,0,0.6); color: white; font-size: 11px; padding: 4px 6px; text-align: center; }

/* My photos */
.my-photos-section h3, .album-header h2 { font-family: var(--font-display); font-size: 20px; margin-bottom: 16px; }
.album-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }

/* Gallery / Album grid */
.gallery-grid, .album-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px;
}
.photo-card {
  border-radius: var(--radius); overflow: hidden; background: white;
  box-shadow: var(--shadow); cursor: pointer; transition: all .25s;
  border: 1px solid rgba(0,0,0,0.06); position: relative;
}
.photo-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.photo-card-thumb { aspect-ratio: 4/3; overflow: hidden; }
.photo-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.photo-card:hover .photo-card-thumb img { transform: scale(1.05); }
.photo-card-body { padding: 10px; }
.photo-card-uploader { font-size: 12px; font-weight: 600; color: var(--primary); margin-bottom: 2px; }
.photo-card-caption { font-size: 11px; color: var(--gray); font-style: italic; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.photo-card-effect { font-size: 10px; color: var(--gray); }
.card-del-btn {
  position: absolute; top: 6px; right: 6px; width: 26px; height: 26px;
  background: rgba(255,255,255,0.9); border: none; border-radius: 50%;
  cursor: pointer; font-size: 12px; color: #c0152a; display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .2s; box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.photo-card:hover .card-del-btn { opacity: 1; }

/* ── MUSIC ────────────────────────────────────────────────── */
.add-song-wrap, .add-msg-wrap {
  background: white; border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow); border: 1px solid rgba(0,0,0,0.06); margin-bottom: 20px;
}
.add-song-wrap h3, .add-msg-wrap h3 { font-size: 15px; font-weight: 600; margin-bottom: 14px; }
.music-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.music-tab {
  padding: 8px 18px; border: 1.5px solid #e0d0da; background: white;
  border-radius: 50px; font-size: 13px; font-weight: 500; cursor: pointer;
  transition: all .2s; font-family: var(--font-body); color: var(--gray);
}
.music-tab.active { border-color: var(--primary); color: var(--primary); background: #fce8f0; }
.music-panel { display: none; }
.music-panel.active { display: block; animation: fadeIn .3s ease; }

.song-item {
  background: white; border-radius: var(--radius-sm); padding: 14px 16px;
  margin-bottom: 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  display: flex; align-items: flex-start; gap: 12px; border: 1px solid rgba(0,0,0,0.05);
}
.song-type-icon { font-size: 24px; flex-shrink: 0; }
.song-info { flex: 1; min-width: 0; }
.song-title { font-size: 14px; font-weight: 600; color: var(--dark); }
.song-artist { font-size: 12px; color: var(--gray); margin-top: 2px; }
.song-added { font-size: 11px; color: var(--gray); margin-top: 2px; }
.song-notes { font-size: 12px; font-style: italic; color: var(--primary); margin-top: 4px; }
.song-del { background: none; border: none; color: #c0152a; cursor: pointer; font-size: 16px; flex-shrink: 0; padding: 4px; opacity: 0.7; }
.song-del:hover { opacity: 1; }
.songs-list-wrap h3, .msgs-wrap h3 { font-size: 15px; font-weight: 600; margin-bottom: 14px; }

/* SPOTIFY EMBED */
.spotify-embed { margin-top: 10px; border-radius: 12px; overflow: hidden; }
.spotify-embed iframe { border: none; width: 100%; height: 152px; }

/* ── MESSAGES ─────────────────────────────────────────────── */
.msg-item {
  background: white; border-radius: var(--radius-sm); padding: 16px;
  margin-bottom: 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); border: 1px solid rgba(0,0,0,0.05);
  transition: all .2s;
}
.msg-item.pinned { border-left: 4px solid var(--primary); }
.msg-author { font-size: 13px; font-weight: 600; color: var(--primary); margin-bottom: 4px; }
.msg-text { font-size: 14px; color: var(--dark); line-height: 1.5; }
.msg-answer { margin-top: 10px; padding: 10px; background: linear-gradient(135deg,#f9f5ff,#fff5f9); border-radius: 8px; font-size: 13px; color: var(--dark); }
.msg-answer-label { font-size: 11px; font-weight: 700; color: var(--primary); margin-bottom: 4px; }
.msg-actions { display: flex; gap: 8px; margin-top: 10px; }
.msg-action-btn { padding: 5px 12px; border-radius: 20px; border: 1px solid; font-size: 12px; cursor: pointer; font-family: var(--font-body); background: white; }
.msg-action-btn.delete { border-color: #c0152a; color: #c0152a; }
.msg-action-btn.pin    { border-color: var(--primary); color: var(--primary); }
.msg-action-btn.answer { border-color: #1a7a3a; color: #1a7a3a; }
.answer-form { margin-top: 10px; }
.answer-form textarea { height: 70px; }

/* ── LIGHTBOX ─────────────────────────────────────────────── */
.lightbox {
  position: fixed; inset: 0; background: rgba(0,0,0,0.95); z-index: 1000;
  display: flex; align-items: center; justify-content: center;
}
.lb-close { position: fixed; top: 16px; right: 16px; background: rgba(255,255,255,0.15); border: none; color: white; width: 44px; height: 44px; border-radius: 50%; font-size: 20px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.lb-nav { position: fixed; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.15); border: none; color: white; width: 52px; height: 52px; border-radius: 50%; font-size: 28px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.lb-prev { left: 16px; }
.lb-next { right: 16px; }
.lb-content { max-width: 90vw; max-height: 80vh; }
.lb-content img { max-width: 90vw; max-height: 80vh; object-fit: contain; border-radius: 10px; }
.lb-caption { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,0.6); color: white; padding: 8px 20px; border-radius: 50px; font-size: 13px; max-width: 80vw; text-align: center; }

/* ── MODAL ────────────────────────────────────────────────── */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 500; display: flex; align-items: center; justify-content: center; padding: 20px; animation: fadeIn .2s ease; }
.modal-card { background: white; border-radius: 20px; padding: 28px; max-width: 480px; width: 100%; box-shadow: var(--shadow-lg); max-height: 90vh; overflow-y: auto; }
.modal-card.modal-wide { max-width: 680px; }
.modal-card h3 { font-family: var(--font-display); font-size: 22px; margin-bottom: 20px; color: var(--dark); }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.modal-header h3 { margin-bottom: 0; }
.modal-close-btn { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--gray); }
.modal-btns { display: flex; gap: 10px; margin-top: 20px; }
.modal-btns .btn-primary, .modal-btns .btn-secondary { flex: 1; }

/* ── ADMIN ────────────────────────────────────────────────── */
.admin-tabs {
  display: flex; gap: 4px; padding: 4px; background: #f0f0f0;
  border-radius: 50px; width: fit-content; margin-bottom: 24px;
  overflow-x: auto; max-width: 100%; scrollbar-width: none;
}
.admin-tab {
  padding: 9px 18px; border: none; background: transparent; border-radius: 50px;
  font-family: var(--font-body); font-size: 13px; font-weight: 500; color: var(--gray);
  cursor: pointer; white-space: nowrap; transition: all .2s;
}
.admin-tab.active { background: white; color: var(--primary); font-weight: 600; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.admin-panel { display: none; }
.admin-panel.active { display: block; animation: fadeIn .3s ease; }
.panel-title { font-family: var(--font-display); font-size: 26px; color: var(--dark); margin-bottom: 20px; }

/* Events grid (admin) */
.events-admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.event-admin-card { background: white; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; border: 1px solid rgba(0,0,0,0.06); }
.eac-header { padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; }
.eac-type { color: white; font-size: 13px; font-weight: 600; }
.eac-body { padding: 16px 18px; }
.eac-body h3 { font-family: var(--font-display); font-size: 18px; color: var(--dark); margin-bottom: 4px; }
.eac-body p { font-size: 13px; color: var(--gray); margin-bottom: 10px; }
.eac-stats { display: flex; gap: 12px; font-size: 12px; color: var(--gray); margin-bottom: 12px; flex-wrap: wrap; }
.eac-url { display: flex; gap: 6px; margin-bottom: 12px; }
.eac-url input { font-size: 12px; border-radius: 8px; flex: 1; }
.eac-url button { padding: 6px 10px; border: none; background: var(--primary); color: white; border-radius: 8px; cursor: pointer; }
.eac-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Stats bar */
.stats-bar { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin-bottom: 24px; }
.stat-card { background: white; border-radius: var(--radius-sm); padding: 16px; text-align: center; box-shadow: var(--shadow); border: 1px solid rgba(0,0,0,0.06); }
.stat-card.success { border-top: 3px solid #1a7a3a; }
.stat-card.warning { border-top: 3px solid #856404; }
.stat-card.danger  { border-top: 3px solid #c0152a; }
.stat-card.highlight { border-top: 3px solid var(--primary); }
.stat-num { display: block; font-family: var(--font-display); font-size: 32px; font-weight: 600; color: var(--dark); line-height: 1; }
.stat-label { font-size: 11px; color: var(--gray); margin-top: 4px; }

/* Action buttons */
.action-btn {
  padding: 7px 16px; border-radius: 50px; font-family: var(--font-body);
  font-size: 12px; font-weight: 600; border: 1.5px solid; cursor: pointer; text-decoration: none; display: inline-block; transition: all .2s;
}
.action-btn.primary   { border-color: var(--primary); color: var(--primary); background: white; }
.action-btn.primary:hover  { background: var(--primary); color: white; }
.action-btn.secondary { border-color: var(--gray); color: var(--gray); background: white; }
.action-btn.secondary:hover { background: var(--gray); color: white; }
.action-btn.danger    { border-color: #c0152a; color: #c0152a; background: white; }
.action-btn.danger:hover   { background: #c0152a; color: white; }

/* Form cards */
.form-card { background: white; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); border: 1px solid rgba(0,0,0,0.06); }
.form-section { margin-bottom: 28px; }
.form-section h3 { font-family: var(--font-display); font-size: 20px; color: var(--dark); margin-bottom: 16px; padding-bottom: 8px; border-bottom: 1px solid rgba(0,0,0,0.08); }
.form-section h4 { font-size: 14px; font-weight: 600; color: var(--dark); margin-bottom: 12px; }
.form-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.form-btns .btn-primary, .form-btns .btn-secondary { flex: 1; min-width: 180px; }

/* Type selector */
.type-selector { display: flex; flex-wrap: wrap; gap: 8px; }
.type-opt { cursor: pointer; }
.type-opt input { display: none; }
.type-opt-label {
  display: block; padding: 9px 18px; border: 2px solid #e0d0da;
  border-radius: 50px; font-size: 13px; font-weight: 500; color: var(--gray);
  transition: all .2s; user-select: none;
}
.type-opt input:checked + .type-opt-label { border-color: var(--primary); color: var(--primary); background: #fce8f0; font-weight: 600; }

/* Toggle switches */
.permissions-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.perm-row { display: flex; align-items: center; }
.toggle-label { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13px; color: var(--dark); }
.toggle-label input { display: none; }
.toggle-sw {
  width: 40px; height: 22px; background: #e0d0da; border-radius: 50px;
  position: relative; flex-shrink: 0; transition: background .2s;
}
.toggle-sw::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; background: white; border-radius: 50%;
  transition: transform .2s; box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
.toggle-label input:checked ~ .toggle-sw { background: var(--primary); }
.toggle-label input:checked ~ .toggle-sw::after { transform: translateX(18px); }

/* Badges */
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.badge-active   { background: #f0fff4; color: #1a7a3a; }
.badge-draft    { background: #f5f5f5; color: #666; }
.badge-ended    { background: #e8f4ff; color: #1a6a9a; }
.badge-disabled { background: #f5f5f5; color: #999; }

/* Users list */
.users-list { display: flex; flex-direction: column; gap: 10px; }
.user-card {
  background: white; border-radius: var(--radius-sm); padding: 14px 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06); border: 1px solid rgba(0,0,0,0.05); flex-wrap: wrap;
}
.user-info { flex: 1; min-width: 0; }
.user-name-row { font-size: 14px; font-weight: 600; color: var(--dark); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.user-email-row { font-size: 12px; color: var(--gray); margin-top: 2px; }
.user-meta { font-size: 11px; color: var(--gray); margin-top: 2px; }
.user-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* Add guests card */
.add-guests-card { background: white; border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); border: 1px solid rgba(0,0,0,0.06); }
.add-guests-card h3 { font-size: 15px; font-weight: 600; margin-bottom: 14px; }

/* Filter bar */
.admin-filter-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.status-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.sf-btn {
  padding: 7px 14px; border: 1.5px solid #e0d0da; background: white;
  border-radius: 50px; font-family: var(--font-body); font-size: 12px;
  font-weight: 500; color: var(--gray); cursor: pointer; transition: all .2s;
}
.sf-btn.active { border-color: var(--primary); color: var(--primary); background: #fce8f0; }
.filter-bar { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-btn {
  padding: 7px 16px; border: 1.5px solid #e0d0da; background: white;
  border-radius: 50px; font-size: 13px; font-weight: 500; color: var(--gray);
  cursor: pointer; transition: all .2s; font-family: var(--font-body); white-space: nowrap;
}
.filter-btn.active { border-color: var(--primary); color: var(--primary); background: #fce8f0; font-weight: 600; }

/* Settings */
.settings-form-card { background: white; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); max-width: 600px; }
.catalog-admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }

/* ── MISC ─────────────────────────────────────────────────── */
.loading-text { text-align: center; color: var(--gray); padding: 32px; font-size: 14px; }
.empty-state { text-align: center; padding: 48px 20px; color: var(--gray); }
.pagination { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 24px; }
.page-btn {
  padding: 7px 14px; border: 1.5px solid #e0d0da; background: white;
  border-radius: 50px; font-size: 13px; cursor: pointer; transition: all .2s; color: var(--gray); font-family: var(--font-body);
}
.page-btn.active { background: var(--primary); border-color: var(--primary); color: white; }
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  padding: 12px 24px; border-radius: 50px; font-size: 14px; color: white;
  background: var(--dark); z-index: 9999; white-space: nowrap; box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  animation: slideUp .3s ease;
}
.toast.success { background: linear-gradient(135deg,#1a7a3a,#2ecc71); }
.toast.error   { background: linear-gradient(135deg,#c0152a,#e74c3c); }
@keyframes slideUp { from{transform:translateX(-50%) translateY(20px);opacity:0} to{transform:translateX(-50%) translateY(0);opacity:1} }

.inv-footer { text-align: center; padding: 24px; background: #1a1020; color: rgba(255,255,255,0.4); font-size: 13px; }

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .form-row { grid-template-columns: 1fr; }
  .permissions-grid { grid-template-columns: 1fr; }
  .gallery-grid, .album-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .info-grid { grid-template-columns: 1fr; }
  .countdown-wrap { gap: 8px; }
  .countdown-unit { min-width: 58px; padding: 10px 14px; }
  .cd-num { font-size: 34px; }
  .events-admin-grid { grid-template-columns: 1fr; }
  .stats-bar { grid-template-columns: repeat(3, 1fr); }
  .dash-nav { padding: 10px 14px; }
  .login-card { padding: 24px 18px; }
  .rsvp-banner-inner { flex-direction: column; gap: 10px; }
  .admin-tabs { border-radius: var(--radius-sm); }
  .modal-card { padding: 20px 16px; }
}
@media (max-width: 400px) {
  .gallery-grid, .album-grid { grid-template-columns: 1fr 1fr; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .code-sep { display: none; }
}
