@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary: #FF385C;
  --primary-hover: #E00B41;
  --primary-gradient: linear-gradient(135deg, #FF385C 0%, #E61E4D 50%, #D70466 100%);
  --dark: #222222;
  --medium-gray: #717171;
  --light-gray: #F7F7F7;
  --border: #EBEBEB;
  --border-subtle: #F0F0F0;
  --white: #FFFFFF;
  --card-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  --card-hover-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  --accent-green: #008A05;
  --accent-green-bg: #E6F4EA;
  --accent-amber: #D97706;
  --accent-amber-bg: #FEF3C7;
  --accent-red: #E11D48;
  --accent-red-bg: #FFE4E6;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'SF Pro Display', Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  background-color: #FFFFFF;
  color: var(--dark);
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
}

/* ===================================================
   DESKTOP & MOBILE RESPONSIVE TOP NAV
   =================================================== */
.top-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: calc(0.6rem + var(--safe-top)) 1.5rem 0.6rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
}

.brand-badge {
  width: 36px;
  height: 36px;
  background: var(--primary-gradient);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 4px 10px rgba(255, 56, 92, 0.3);
}

.brand-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  letter-spacing: -0.5px;
}

.brand-sub {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--medium-gray);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-top: 2px;
}

/* Desktop Switcher (Hidden on Mobile) */
.desktop-nav-center {
  display: flex;
  background: #F1F5F9;
  padding: 3px;
  border-radius: var(--radius-full);
  border: 1px solid #E2E8F0;
}

.nav-tab-btn {
  border: none;
  background: transparent;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--medium-gray);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.nav-tab-btn.active {
  background: white;
  color: var(--dark);
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.desktop-nav-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.live-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--accent-green-bg);
  border: 1px solid rgba(0, 138, 5, 0.2);
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--accent-green);
}

.live-dot {
  width: 7px;
  height: 7px;
  background: var(--accent-green);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(0, 138, 5, 0.25);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 138, 5, 0.4); }
  70% { transform: scale(1); box-shadow: 0 0 0 5px rgba(0, 138, 5, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 138, 5, 0); }
}

.action-btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: white;
  border: 1px solid #D0D5DD;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--dark);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-btn-pill:hover, .action-btn-pill:active {
  background: #F8FAFC;
  border-color: #94A3B8;
}

.action-btn-pill.sync.spinning svg {
  animation: spin 1s linear infinite;
}

@keyframes spin { 100% { transform: rotate(360deg); } }

/* ===================================================
   MAIN APP CONTENT WRAPPER
   =================================================== */
.app-container {
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
  padding: 1.25rem 1.5rem 6rem 1.5rem;
}

/* ===================================================
   AIRBNB MOBILE-FRIENDLY SEARCH PILL
   =================================================== */
.airbnb-search-bar {
  background: white;
  border: 1px solid #DDDDDD;
  border-radius: var(--radius-full);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
  padding: 6px 10px 6px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0.5rem auto 1.5rem auto;
  max-width: 760px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.airbnb-search-bar:hover {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  border-color: #B0B0B0;
}

.search-info-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  overflow: hidden;
}

.search-pill-title {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--dark);
  white-space: nowrap;
}

.search-pill-sub {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--medium-gray);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-divider {
  width: 1px;
  height: 18px;
  background: #E5E7EB;
}

.search-date-input {
  border: none;
  outline: none;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--dark);
  background: transparent;
  cursor: pointer;
}

.search-submit-circle {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  border: none;
  cursor: pointer;
}

/* ===================================================
   HORIZONTAL SCROLLABLE FILTER & PRICING BAR
   =================================================== */
.horizontal-scroll-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 1.5rem;
}

.scroll-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.scroll-strip::-webkit-scrollbar {
  display: none;
}

.price-mode-chip {
  padding: 7px 15px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  border: 1px solid #E2E8F0;
  background: white;
  color: #475569;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.price-mode-chip.active {
  background: var(--dark);
  color: white;
  border-color: var(--dark);
}

.category-filter-chip {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid #E5E7EB;
  background: #F8FAFC;
  color: #334155;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.category-filter-chip.active {
  background: #E2E8F0;
  color: var(--dark);
  font-weight: 800;
  border-color: #94A3B8;
}

/* ===================================================
   LISTINGS GRID & CARDS (AIRBNB NATIVE STYLE)
   =================================================== */
.listings-grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.75rem;
}

.airbnb-room-card {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  background: white;
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.airbnb-room-card:active {
  transform: scale(0.98);
}

.card-img-box {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #F1F5F9;
}

.card-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-status-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 800;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.card-status-badge.available {
  background: rgba(255, 255, 255, 0.94);
  color: var(--accent-green);
}

.card-status-badge.available .dot {
  width: 6px;
  height: 6px;
  background: var(--accent-green);
  border-radius: 50%;
}

.card-status-badge.booked {
  background: rgba(15, 23, 42, 0.9);
  color: #FDA4AF;
}

.card-status-badge.booked .dot {
  width: 6px;
  height: 6px;
  background: #F43F5E;
  border-radius: 50%;
}

.card-status-badge.hourly {
  background: rgba(255, 255, 255, 0.94);
  color: #B45309;
}

.card-status-badge.hourly .dot {
  width: 6px;
  height: 6px;
  background: #F59E0B;
  border-radius: 50%;
}

.card-code-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 9px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--dark);
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.card-meta-box {
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.card-room-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--dark);
}

.card-rating-badge {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 0.82rem;
  font-weight: 700;
}

.card-rating-badge svg {
  color: #FF385C;
}

.card-specs-sub {
  font-size: 0.8rem;
  color: var(--medium-gray);
  font-weight: 500;
}

.card-price-row {
  margin-top: 4px;
  font-size: 0.92rem;
  color: var(--dark);
}

.card-price-val {
  font-weight: 800;
}

.card-price-unit {
  font-weight: 500;
  color: var(--medium-gray);
  font-size: 0.8rem;
}

/* ===================================================
   DASHBOARD STYLES (CLEAN & METRIC-DRIVEN)
   =================================================== */
.dashboard-container {
  display: none;
}

.dashboard-container.active {
  display: block;
}

.guest-container {
  display: none;
}

.guest-container.active {
  display: block;
}

.host-banner-card {
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
  color: white;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.15);
}

.host-banner-title {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.host-banner-sub {
  font-size: 0.82rem;
  color: #94A3B8;
  margin-bottom: 1.25rem;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.85rem;
}

.kpi-item-box {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.kpi-item-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: #94A3B8;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.kpi-item-value {
  font-size: 1.35rem;
  font-weight: 800;
}

.kpi-item-value.green { color: #4ADE80; }
.kpi-item-value.red { color: #F87171; }
.kpi-item-value.amber { color: #FBBF24; }

.kpi-item-note {
  font-size: 0.72rem;
  color: #CBD5E1;
  margin-top: 2px;
}

.dash-card-section {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--card-shadow);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.section-title {
  font-size: 1.05rem;
  font-weight: 800;
}

.table-scroll-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.styled-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  min-width: 500px;
}

.styled-table th {
  text-align: left;
  padding: 9px;
  background: #F8FAFC;
  color: #64748B;
  font-weight: 700;
  border-bottom: 1px solid #E2E8F0;
}

.styled-table td {
  padding: 10px 9px;
  border-bottom: 1px solid #F1F5F9;
}

/* ===================================================
   BOTTOM APP BAR (NATIVE IPHONE FEEL)
   =================================================== */
.mobile-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 99;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid #E5E7EB;
  padding: 6px 12px calc(6px + var(--safe-bottom)) 12px;
  justify-content: space-around;
  align-items: center;
}

.bottom-tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: none;
  border: none;
  color: #717171;
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.bottom-tab-item.active {
  color: var(--primary);
}

.bottom-tab-item.active svg {
  stroke: var(--primary);
}

/* ===================================================
   MODAL / BOTTOM SHEET (IPHONE PERFECT)
   =================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.open,
.modal-overlay.active {
  display: flex;
  animation: fadeIn 0.2s ease;
}

.modal-sheet {
  background: white;
  border-radius: var(--radius-lg);
  max-width: 680px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  position: relative;
  -webkit-overflow-scrolling: touch;
}

.modal-sheet-header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 10;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-sheet-header h3 {
  font-size: 1.05rem;
  font-weight: 800;
}

.modal-close-btn {
  background: #F1F5F9;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
}

.modal-sheet-body {
  padding: 1.25rem;
}

/* ===================================================
   IPHONE & SMARTPHONE SPECIFIC MEDIA QUERIES
   =================================================== */
@media (max-width: 768px) {
  /* Show Mobile Bottom Bar */
  .mobile-bottom-bar {
    display: flex;
  }

  /* Hide Desktop Middle & Right Controls to keep header ultra-clean */
  .desktop-nav-center {
    display: none;
  }

  .desktop-nav-right {
    display: none;
  }

  .top-header {
    padding: calc(0.5rem + var(--safe-top)) 1rem 0.5rem 1rem;
  }

  .app-container {
    padding: 0.75rem 1rem calc(4.5rem + var(--safe-bottom)) 1rem;
  }

  /* Search Bar Compact on iPhone */
  .airbnb-search-bar {
    padding: 6px 8px 6px 14px;
    margin-bottom: 1rem;
  }

  .search-pill-title {
    font-size: 0.8rem;
  }

  .search-pill-sub {
    font-size: 0.74rem;
  }

  /* Grid is 1 column on iPhone for maximum image impact */
  .listings-grid-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .card-img-box {
    aspect-ratio: 16 / 11;
    border-radius: 14px;
  }

  .host-banner-card {
    padding: 1.15rem;
    border-radius: 14px;
  }

  .kpi-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
  }

  .kpi-item-box {
    padding: 0.75rem;
  }

  .kpi-item-value {
    font-size: 1.15rem;
  }

  /* Modal becomes an iOS Bottom Sheet */
  .modal-overlay {
    padding: 0;
    align-items: flex-end;
  }

  .modal-sheet {
    border-radius: 20px 20px 0 0;
    max-height: 92vh;
  }

  .modal-sheet-body {
    padding: 1rem 1rem calc(1.5rem + var(--safe-bottom)) 1rem;
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ==================== REAL PHOTO GALLERY & MANAGER ==================== */

/* Real photo badge on listing card */
.card-real-photo-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.2);
  z-index: 2;
}

/* Modal Gallery Hero */
.room-gallery-hero {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 16px;
  overflow: hidden;
  background: #0f172a;
  margin-bottom: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.room-gallery-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.room-gallery-hero img:hover {
  transform: scale(1.02);
}

.gallery-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: #0f172a;
  border: none;
  font-size: 1.1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  z-index: 3;
  transition: all 0.2s ease;
}

.gallery-nav-btn:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.08);
}

.gallery-nav-btn.prev { left: 12px; }
.gallery-nav-btn.next { right: 12px; }

.gallery-counter-pill {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 9999px;
  z-index: 3;
}

/* Gallery Thumbnails Strip */
.gallery-thumbnails-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 16px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.gallery-thumbnails-strip::-webkit-scrollbar {
  height: 4px;
}
.gallery-thumbnails-strip::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.thumb-item {
  flex: 0 0 76px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  opacity: 0.65;
  transition: all 0.2s ease;
}

.thumb-item.active {
  border-color: #ff385c;
  opacity: 1;
  transform: scale(1.04);
}

.thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Button to open photo editor modal */
.btn-manage-photos {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 12px;
  background: linear-gradient(135deg, #ff385c 0%, #e00b41 100%);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(255, 56, 92, 0.35);
  margin-top: 16px;
  margin-bottom: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-manage-photos:active {
  transform: scale(0.98);
}

/* Photo Management Modal (iOS & Desktop) */
#photoManagerModal {
  z-index: 3500;
}

.photo-manager-box {
  background: #fff;
  width: 100%;
  max-width: 650px;
  border-radius: 20px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
  animation: slideUpModal 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUpModal {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.pm-header {
  padding: 16px 20px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
}

.pm-header h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.pm-body {
  padding: 18px 20px;
  overflow-y: auto;
  flex: 1;
}

.pm-upload-zone {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.pm-upload-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px 12px;
  background: #f8fafc;
  border: 2px dashed #cbd5e1;
  border-radius: 14px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
}

.pm-upload-card:hover, .pm-upload-card:active {
  background: #fff1f2;
  border-color: #ff385c;
  transform: translateY(-2px);
}

.pm-upload-card .icon {
  font-size: 1.8rem;
}

.pm-upload-card .title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #0f172a;
}

.pm-upload-card .sub {
  font-size: 0.75rem;
  color: #64748b;
}

.pm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.pm-photo-card {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  background: #e2e8f0;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  border: 2px solid transparent;
}

.pm-photo-card.is-cover {
  border-color: #ff385c;
}

.pm-photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pm-photo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 60%);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 8px;
}

.pm-cover-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: #ff385c;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.pm-btn-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.9);
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.75rem;
  transition: all 0.2s ease;
}

.pm-btn-icon:hover {
  background: #fff;
  transform: scale(1.1);
}

.pm-btn-icon.delete {
  background: rgba(239, 68, 68, 0.9);
  color: #fff;
}

.pm-footer {
  padding: 14px 20px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
}

/* Fullscreen Lightbox */
#photoLightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.96);
  z-index: 5000;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

#photoLightbox.active,
#photoLightbox.open {
  display: flex;
}

.lightbox-img-wrapper {
  max-width: 94vw;
  max-height: 82vh;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.lightbox-img-wrapper img {
  max-width: 100%;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.lightbox-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255,255,255,0.2);
  color: #fff;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5010;
  transition: background 0.2s;
}

.lightbox-close-btn:hover {
  background: rgba(255,255,255,0.4);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.25);
  color: #fff;
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5010;
  transition: all 0.2s ease;
}

.lightbox-nav:hover {
  background: rgba(255,255,255,0.5);
  transform: translateY(-50%) scale(1.1);
}

.lightbox-nav.prev { left: 16px; }
.lightbox-nav.next { right: 16px; }
