@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400&family=Inter:wght@300;400;500;600&family=Kanit:wght@300;400;500&display=swap');

:root {
  --bg-primary: #0a0a0c;
  --bg-secondary: #121215;
  --panel-bg: rgba(20, 20, 23, 0.85);
  --panel-border: rgba(255, 255, 255, 0.06);
  
  --primary: #c5a880; /* Elegant gold / champagne */
  --primary-glow: rgba(197, 168, 128, 0.15);
  --secondary: #8e8e93; /* Muted silver/gray */
  --secondary-glow: rgba(142, 142, 147, 0.1);
  --accent: #e5d4c0; /* Pearl white / warm silver */
  
  --text-main: #f5f5f7;
  --text-muted: #8e8e93;
  --text-dark: #121215;
  
  --glass-blur: blur(20px);
  --radius-sm: 4px; /* Sharper modern edges */
  --radius-md: 8px;
  --radius-lg: 12px;
  
  --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: 'Inter', 'Kanit', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  letter-spacing: -0.01em;
}

/* Background Gradients */
body::before {
  content: '';
  position: fixed;
  top: -10%;
  left: -10%;
  width: 50%;
  height: 50%;
  background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
  z-index: -1;
  pointer-events: none;
}

body::after {
  content: '';
  position: fixed;
  bottom: -10%;
  right: -10%;
  width: 60%;
  height: 60%;
  background: radial-gradient(circle, var(--secondary-glow) 0%, transparent 70%);
  z-index: -1;
  pointer-events: none;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--panel-border);
  border-radius: var(--radius-sm);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* Premium Typography & Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Cormorant Garamond', 'Kanit', serif;
  font-weight: 500;
  letter-spacing: 0.03em;
}

.studio-title {
  background: linear-gradient(135deg, #ffffff 40%, #c5a880 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 20px var(--primary-glow);
  font-family: 'Cormorant Garamond', serif;
  letter-spacing: 0.15em;
}

/* Glassmorphic Panel Design */
.glass-panel {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  transition: var(--transition);
}

.glass-panel:hover {
  border-color: rgba(197, 168, 128, 0.25);
}

/* Layout Containers */
.app-container {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding-bottom: 90px; /* Tabbar padding */
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-weight: 500;
  font-size: 15px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  font-family: 'Kanit', sans-serif;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--bg-secondary);
  font-weight: 600;
  box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(197, 168, 128, 0.3);
  background-color: #d7be99;
}

.btn-secondary {
  background-color: transparent;
  border: 1px solid var(--panel-border);
  color: var(--text-main);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-danger {
  background-color: #ef4444;
  color: white;
}
.btn-danger:hover {
  background-color: #dc2626;
  transform: translateY(-2px);
}

.btn-block {
  display: flex;
  width: 100%;
}

/* Form Controls */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  background-color: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: 'Kanit', sans-serif;
  font-size: 15px;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 10px var(--primary-glow);
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23f3f4f6'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 40px;
}

/* Navigation Tabbar */
.tab-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: 70px;
  background: rgba(11, 15, 25, 0.85);
  border-top: 1px solid var(--panel-border);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 100;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5);
}

.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 11px;
  transition: var(--transition);
  cursor: pointer;
  background: none;
  border: none;
  outline: none;
}

.tab-item i {
  font-size: 20px;
  margin-bottom: 4px;
}

.tab-item.active {
  color: var(--primary);
  text-shadow: 0 0 15px var(--primary-glow);
}

/* Navigation Screen View */
.view-screen {
  display: none;
  animation: fadeIn 0.4s ease;
}

.view-screen.active {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

/* Portfolio Gallery (Pose guides & Portfolio Examples) */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 15px;
}

.gallery-card {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 3/4;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.gallery-card:hover img {
  transform: scale(1.08);
}

.gallery-card .card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 10px;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
  color: white;
  font-size: 12px;
}

/* Package details & Cards */
.package-card {
  padding: 20px;
  margin-bottom: 15px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
}

.package-card.selected {
  border-color: var(--primary);
  box-shadow: 0 0 15px var(--primary-glow);
}

.package-card.selected::before {
  content: '✓ Selected';
  position: absolute;
  top: 12px;
  right: 12px;
  background-color: var(--primary);
  color: var(--bg-secondary);
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.package-price {
  font-family: 'Outfit', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
}

.package-price span {
  font-size: 14px;
  color: var(--text-muted);
}

/* Interactive Custom Calendar booking picker */
.calendar-wrapper {
  padding: 15px;
  border-radius: var(--radius-md);
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  text-align: center;
}

.calendar-day-name {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  padding-bottom: 5px;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  transition: var(--transition);
  border: 1px solid transparent;
}

.calendar-day:hover:not(.disabled) {
  background-color: rgba(255, 255, 255, 0.08);
}

.calendar-day.active {
  background-color: var(--primary);
  color: var(--bg-secondary);
  font-weight: 600;
}

.calendar-day.disabled {
  color: rgba(255, 255, 255, 0.15);
  cursor: not-allowed;
}

.time-slots-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 15px;
}

.time-slot {
  padding: 12px;
  background-color: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: var(--transition);
}

.time-slot.selected {
  border-color: var(--primary);
  background-color: var(--primary-glow);
}

.time-slot.booked {
  opacity: 0.3;
  cursor: not-allowed;
  background-color: rgba(239, 68, 68, 0.05);
}

.slot-status-badge {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 500;
}

.slot-status-badge.available {
  background-color: var(--primary-glow);
  color: var(--primary);
}

.slot-status-badge.booked {
  background-color: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

/* User photos selection, previews, and cart */
.photo-shop-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.photo-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 3/4;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 20px;
  font-weight: 600;
  text-transform: uppercase;
}

.photo-badge.uploaded {
  background-color: #6b7280;
  color: white;
}

.photo-badge.selected {
  background-color: var(--accent);
  color: var(--bg-secondary);
}

.photo-badge.purchased {
  background-color: var(--primary);
  color: var(--bg-secondary);
  box-shadow: 0 0 10px var(--primary);
}

.photo-actions {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
  padding: 10px;
  display: flex;
  gap: 8px;
}

.btn-icon-only {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: rgba(255,255,255,0.15);
  color: white;
  transition: var(--transition);
}

.btn-icon-only:hover {
  background-color: var(--primary);
  color: var(--bg-secondary);
}

/* Cart overlay indicator */
.cart-header-icon {
  position: relative;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  background-color: rgba(255,255,255,0.05);
  border: 1px solid var(--panel-border);
  display: inline-flex;
}

.cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background-color: #ef4444;
  color: white;
  font-size: 9px;
  font-weight: bold;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Modal Popup Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.8);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}

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

.modal-content {
  width: 100%;
  max-width: 400px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  transition: var(--transition);
}

.close-btn:hover {
  color: white;
}

/* Drag and Drop Upload Styles */
.dropzone {
  border: 2px dashed var(--panel-border);
  border-radius: var(--radius-sm);
  padding: 30px;
  text-align: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.dropzone:hover {
  border-color: var(--primary);
  color: var(--text-main);
  background-color: rgba(197, 168, 128, 0.05);
}

/* Desktop Admin Layout */
.admin-layout {
  display: flex;
  min-height: 100vh;
  background-color: #090d16;
}

.admin-sidebar {
  width: 250px;
  background-color: #0b0f19;
  border-right: 1px solid var(--panel-border);
  display: flex;
  flex-direction: column;
  padding: 24px;
  gap: 30px;
}

.admin-sidebar h1 {
  font-size: 20px;
  background: linear-gradient(135deg, #fff 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.admin-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  list-style: none;
}

.admin-menu-item a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-weight: 500;
  transition: var(--transition);
}

.admin-menu-item.active a,
.admin-menu-item a:hover {
  background-color: rgba(197, 168, 128, 0.1);
  color: var(--primary);
  border-left: 3px solid var(--primary);
}

.admin-main {
  flex-grow: 1;
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  overflow-y: auto;
}

.admin-card-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.stat-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary);
  font-family: 'Outfit', sans-serif;
}

/* Tables style for admin */
.admin-table-container {
  overflow-x: auto;
  border-radius: var(--radius-sm);
  background-color: var(--bg-secondary);
  border: 1px solid var(--panel-border);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

.admin-table th, 
.admin-table td {
  padding: 16px;
  border-bottom: 1px solid var(--panel-border);
}

.admin-table th {
  background-color: rgba(255,255,255,0.02);
  color: var(--text-muted);
  font-weight: 500;
}

.admin-table tbody tr:hover {
  background-color: rgba(255,255,255,0.01);
}

.badge {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-pending { background-color: rgba(245, 158, 11, 0.15); color: var(--accent); }
.badge-approved { background-color: rgba(197, 168, 128, 0.15); color: var(--primary); }
.badge-rejected { background-color: rgba(239, 68, 68, 0.15); color: #ef4444; }
.badge-active { background-color: rgba(99, 102, 241, 0.15); color: var(--secondary); }

.slip-preview-img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid var(--panel-border);
}

/* Toast Notification styling */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  padding: 16px 24px;
  background-color: var(--bg-secondary);
  border-left: 4px solid var(--primary);
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.5);
  color: white;
  border-radius: var(--radius-sm);
  font-size: 14px;
  animation: slideIn 0.3s ease;
  display: flex;
  align-items: center;
  gap: 12px;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* User view active booking details */
.booking-item-card {
  padding: 16px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
