:root {
  --pink: #FF9FC7;
  --pink-dark: #8a1a52;
  --blue: #72CCE4;
  --blue-dark: #0d4a63;
  --navy: #042D65;
  --white: #FFFFFF;
  --bg-soft: #FFF6FA;
  --text-secondary: #6b7280;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-pill: 999px;
  --shadow-soft: 0 8px 24px rgba(4, 45, 101, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Quicksand', 'Segoe UI', sans-serif;
  color: var(--navy);
  background: var(--white);
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; border-bottom: 0.5px solid #eee;
}
.logo { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 18px; }
.logo-badge {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--pink); display: flex; align-items: center; justify-content: center;
}
.logo-badge img { width: 20px; height: 20px; }
.nav-links { display: flex; gap: 24px; font-size: 14px; }
.nav-links a:hover { color: var(--pink-dark); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: none; border-radius: var(--radius-pill);
  padding: 10px 22px; font-size: 14px; font-weight: 700;
  cursor: pointer; transition: transform .15s ease;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--pink); color: #fff; }
.btn-secondary { background: var(--white); color: var(--navy); border: 1px solid #ddd; }
.btn-outline-blue { background: rgba(114,204,228,.15); color: var(--blue-dark); }

/* Hero */
.hero {
  position: relative; text-align: center; overflow: hidden;
  padding: 60px 20px; background: linear-gradient(180deg, #fff 0%, var(--bg-soft) 100%);
}
.hero .bubble { position: absolute; border-radius: 50%; opacity: .50; z-index: 0; }
.hero .bubble.b1 { width: 180px; height: 180px; background: var(--blue); top: -60px; right: -40px; }
.hero .bubble.b2 { width: 220px; height: 220px; background: var(--pink); bottom: -80px; left: -60px; }
.hero h1 { position: relative; font-size: 32px; margin: 12px 0; }
.hero p { position: relative; color: var(--text-secondary); max-width: 480px; margin: 0 auto 24px; }
.hero .cta-group { position: relative; display: flex; gap: 12px; justify-content: center; }

/* Bubble cards */
.card-bubble {
  border-radius: var(--radius-md); border: 1px solid #eee;
  padding: 18px; text-align: center; background: #fff; transition: box-shadow .2s;
}
.card-bubble:hover { box-shadow: var(--shadow-soft); }

/* Section titles */
.section-title { font-size: 13px; color: var(--text-secondary); letter-spacing: .03em; margin-bottom: 12px; }

/* Album grid — cố định khung thẻ, không phóng to bất thường khi chỉ có ít ảnh */
.album-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 220px));
  justify-content: center; gap: 18px;
}
.album-cover {
  position: relative; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4/5;
  background-size: cover; background-position: center 30%; display: flex; align-items: flex-end;
  border: 3px solid #fff; outline: 1px solid rgba(4,45,101,.08);
  box-shadow: 0 10px 28px rgba(4,45,101,.14), 0 2px 6px rgba(255,159,199,.25);
  transition: transform .2s ease, box-shadow .2s ease;
}
.album-cover:hover {
  transform: translateY(-4px) scale(1.015);
  box-shadow: 0 16px 36px rgba(4,45,101,.2), 0 4px 10px rgba(255,159,199,.35);
}
/* Lớp phủ kính (glassmorphism) chứa tên album, thay cho gradient đặc trước đây */
.album-cover .label {
  width: 100%; padding: 10px 12px; font-size: 12.5px; color: #fff; font-weight: 700;
  background: rgba(4,45,101,.35);
  backdrop-filter: blur(8px) saturate(140%);
  -webkit-backdrop-filter: blur(8px) saturate(140%);
  border-top: 1px solid rgba(255,255,255,.35);
  text-shadow: 0 1px 3px rgba(0,0,0,.35);
}

/* Forms */
.field { margin-bottom: 16px; text-align: left; }
.field label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 14px; border-radius: var(--radius-md);
  border: 1px solid #ddd; font-size: 14px; font-family: inherit;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--pink);
}

.form-card {
  max-width: 480px; margin: 40px auto; background: #fff; border-radius: var(--radius-lg);
  border: 1px solid #eee; padding: 28px; box-shadow: var(--shadow-soft);
}

.alert { padding: 12px 16px; border-radius: var(--radius-md); font-size: 13px; margin-bottom: 16px; }
.alert-success { background: #e1f5ee; color: #0f6e56; }
.alert-error { background: #fcebeb; color: #a32d2d; }

footer { text-align: center; padding: 24px; color: var(--text-secondary); font-size: 12px; }

/* Admin */
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar { width: 220px; background: var(--navy); color: #fff; padding: 20px; }
.admin-sidebar a { display: block; padding: 10px 12px; border-radius: var(--radius-md); color: #cfe0f5; font-size: 14px; margin-bottom: 4px; }
.admin-sidebar a:hover, .admin-sidebar a.active { background: rgba(255,255,255,.12); color: #fff; }
.admin-main { flex: 1; padding: 28px; background: #fafbfc; }
.calendar-table { width: 100%; border-collapse: collapse; }
.calendar-table th, .calendar-table td {
  border: 1px solid #eee; padding: 10px; font-size: 13px; text-align: left;
}
.calendar-table th { background: #f5f7fa; }
.badge { padding: 3px 10px; border-radius: var(--radius-pill); font-size: 11px; font-weight: 700; }
.badge-pending { background: #FAEEDA; color: #854F0B; }
.badge-confirmed { background: #E1F5EE; color: #0F6E56; }
.badge-completed { background: #E6F1FB; color: #0C447C; }
.badge-cancelled { background: #FCEBEB; color: #A32D2D; }

/* Calendar grid — ô vuông thật (aspect-ratio 1), không dồn thành hàng dài */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-bottom: 24px; }
.cal-dow { text-align: center; font-size: 12px; color: var(--text-secondary); padding-bottom: 2px; font-weight: 700; }
.cal-cell {
  position: relative; aspect-ratio: 1; border: 1px solid #eee; border-radius: 14px;
  background: #fff; display: flex; align-items: center; justify-content: center;
  text-decoration: none; color: var(--navy); transition: all .15s;
}
.cal-cell:hover { border-color: var(--pink); box-shadow: 0 4px 12px rgba(255,159,199,.25); transform: translateY(-1px); }
.cal-cell-empty { border: none; background: transparent; }
.cal-cell-selected { background: var(--pink); border-color: var(--pink); color: #fff; }
.cal-cell-selected:hover { transform: none; }
.cal-cell-today:not(.cal-cell-selected) { border: 2px solid var(--blue); }
.cal-daynum { font-size: 14px; font-weight: 500; }
.cal-badge {
  position: absolute; bottom: 6px; right: 6px; min-width: 18px; height: 18px; border-radius: 999px;
  background: var(--navy); color: #fff; font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}
.cal-cell-selected .cal-badge { background: #fff; color: var(--pink-dark); }

/* Danh sách lịch của ngày được chọn */
.day-list { display: flex; flex-direction: column; gap: 8px; }
.day-list-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px;
  border: 1px solid #eee; background: #fff; cursor: pointer; transition: all .15s;
}
.day-list-item:hover { box-shadow: 0 4px 14px rgba(4,45,101,.08); transform: translateY(-1px); border-color: var(--border-strong, #ddd); }
.day-list-item:active { cursor: grabbing; }
.day-list-time { font-weight: 700; font-size: 13px; color: var(--pink-dark); min-width: 44px; }

/* Modal popup */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(4,45,101,.45); backdrop-filter: blur(1px);
  display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 16px;
}
.modal-box {
  background: #fff; border-radius: var(--radius-lg); padding: 24px; max-width: 520px; width: 100%;
  max-height: 90vh; overflow-y: auto; box-shadow: 0 24px 60px rgba(4,45,101,.3);
}

/* Hover effects dùng chung */
.btn:hover { filter: brightness(0.97); }
.btn-primary:hover { box-shadow: 0 4px 14px rgba(255,159,199,.4); }
.btn-outline-blue:hover { box-shadow: 0 4px 14px rgba(114,204,228,.35); }
.album-cover { transition: transform .2s; }
.album-cover:hover { transform: scale(1.02); }
a.nav-links, .nav-links a { transition: color .15s; }
.calendar-table tbody tr:hover { background: #fafbfc; }

/* Responsive */
@media (max-width: 640px) {
  .admin-shell { flex-direction: column; }
  .admin-sidebar { width: 100%; display: flex; flex-wrap: wrap; gap: 4px; padding: 12px; }
  .admin-sidebar a { padding: 6px 10px; font-size: 13px; margin-bottom: 0; }
  .admin-main { padding: 16px; }
  .cal-grid { gap: 4px; }
  .cal-cell { border-radius: 10px; }
  .cal-daynum { font-size: 12px; }
  .cal-badge { min-width: 15px; height: 15px; font-size: 9px; bottom: 3px; right: 3px; }
  .cal-dow { font-size: 10px; }
  .day-list-item { padding: 10px; gap: 8px; }
  .hero h1 { font-size: 24px; }
  .hero .cta-group { flex-direction: column; }
  .site-header { flex-wrap: wrap; gap: 10px; padding: 12px; }
  .nav-links { display: none; }
  .calendar-table { display: block; overflow-x: auto; white-space: nowrap; }
  .form-card { margin: 16px; padding: 20px; }
  .modal-box { padding: 18px; }
}

@media (max-width: 400px) {
  .cal-grid { grid-template-columns: repeat(7, 1fr); }
  .cal-daynum { font-size: 11px; }
}
