/* ===== Design Tokens ===== */
:root {
  --accent:      #E53535;
  --accent-hover:#C82828;
  --accent-dark: #B82020;
  --navy:        #0F1729;
  --navy-mid:    #162040;
  --navy-light:  #1A2B4A;
}

/* ===== Global ===== */
body {
  background: var(--navy);
  padding-bottom: 80px;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ===== Auth Page Layout ===== */
.auth-page {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-y: auto;
  background: #f1f5f9;
  z-index: 9999;
  padding: 0 16px 40px;
}

.auth-hero {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 52px 28px 32px;
  text-align: center;
  width: 100%;
  max-width: 420px;
}

.auth-hero-logo {
  height: 64px;
  width: auto;
}

.auth-hero-title {
  font-size: 26px;
  font-weight: 800;
  color: #111827;
  line-height: 1.3;
  margin-bottom: 12px;
  letter-spacing: -0.3px;
}

.auth-hero-title .text-accent {
  color: var(--accent);
}

.auth-hero-sub {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 28px;
  line-height: 1.6;
  max-width: 290px;
}

.auth-features {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.auth-feature {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  background: rgba(229, 53, 53, 0.1);
  border: 1px solid rgba(229, 53, 53, 0.25);
  padding: 5px 13px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.auth-card {
  flex-shrink: 0;
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 20px;
  padding: 32px 24px 36px;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.08), 0 1px 4px rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.auth-card-title {
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 6px;
  letter-spacing: -0.4px;
}

.auth-card-sub {
  font-size: 13.5px;
  color: #64748b;
  margin-bottom: 28px;
  line-height: 1.55;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 22px;
}

.auth-field {
  margin-bottom: 18px;
}

.auth-field label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 8px;
}

.auth-field .form-control {
  border-radius: 10px;
  border: 1.5px solid #e2e8f0;
  padding: 13px 16px;
  font-size: 14px;
  color: #0f172a;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.auth-field .form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(229, 53, 53, 0.12), 0 1px 3px rgba(15, 23, 42, 0.06);
  outline: none;
}

.auth-field .form-control::placeholder {
  color: #94a3b8;
}

.btn-auth {
  display: block;
  width: 100%;
  padding: 15px;
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
  box-shadow: 0 4px 16px rgba(229, 53, 53, 0.4);
  letter-spacing: 0.2px;
}

.btn-auth:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(229, 53, 53, 0.45);
}

.btn-auth:active {
  transform: translateY(0);
  background: var(--accent-dark);
}

.auth-link-row {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: #6b7280;
}

.auth-link-row a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.auth-link-row a:hover {
  text-decoration: underline;
}

.auth-card-footer {
  text-align: center;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid #f1f5f9;
  font-size: 12px;
  color: #94a3b8;
}

.auth-card-footer strong {
  color: #475569;
  font-weight: 600;
}

/* ===== Shared form helpers (fallback) ===== */
.form-label { font-weight: 500; color: #333; }

.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 0.2rem rgba(229, 53, 53, 0.25);
}

.btn-primary-custom {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-primary-custom:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
}

.btn-primary-custom:active {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.auth-link { text-align: center; margin-top: 20px; color: #666; }
.auth-link a { color: var(--accent); text-decoration: none; font-weight: 500; }
.auth-link a:hover { color: var(--accent-hover); text-decoration: underline; }

.auth-title { font-size: 28px; font-weight: 700; color: #333; text-align: center; margin-bottom: 30px; }

.alert-success { background-color: #d4edda; border-color: #c3e6cb; color: #155724; margin-bottom: 20px; }

.invalid-feedback { color: #dc3545; font-size: 0.875em; display: block; }
.is-invalid { border-color: #dc3545; }
.is-invalid:focus { border-color: #dc3545; box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25); }

/* ===== Bottom Tab Bar ===== */
#bottom-tabbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1030;
  background: var(--navy-mid);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.5);
  padding: 6px 0 10px;
}

#bottom-tabbar .nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

#bottom-tabbar .nav-icon { width: 22px; height: 22px; }

#bottom-tabbar .nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.38);
  padding: 0;
  text-decoration: none;
  transition: color 0.2s;
}

#bottom-tabbar .nav-link:hover,
#bottom-tabbar .nav-link.active {
  color: var(--accent);
}

#bottom-tabbar .nav-item form { display: contents; }

#bottom-tabbar .logout-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.38);
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s;
}

#bottom-tabbar .logout-btn:hover { color: #ff6b6b; }

/* ===== Profile Page ===== */
.profile-wrap { max-width: 480px; margin: 0 auto; }

.profile-title {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
}

.profile-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.profile-card-banner {
  background: linear-gradient(135deg, var(--navy-light) 0%, var(--navy) 100%);
  height: 88px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.profile-avatar {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: var(--navy-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 4px solid #fff;
  box-shadow: 0 6px 20px rgba(229, 53, 53, 0.35);
  transform: translateY(46px);
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
}

.profile-avatar .avatar-icon { width: 54px; height: 54px; }

.profile-card-body { padding: 58px 24px 32px; text-align: center; }

.profile-name { font-size: 20px; font-weight: 700; color: #1a1a2e; margin-bottom: 6px; }
.profile-email { font-size: 13px; color: #888; margin-bottom: 22px; }

.badge-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }

.badge-type {
  background: rgba(229, 53, 53, 0.1);
  color: var(--accent);
  border: 1px solid rgba(229, 53, 53, 0.28);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 13px;
  border-radius: 20px;
}

.badge-status {
  background: rgba(40, 199, 111, 0.1);
  color: #28c76f;
  border: 1px solid rgba(40, 199, 111, 0.3);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 13px;
  border-radius: 20px;
}

.badge-date {
  background: rgba(108, 117, 125, 0.08);
  color: #6c757d;
  border: 1px solid rgba(108, 117, 125, 0.2);
  font-size: 12px;
  padding: 5px 13px;
  border-radius: 20px;
}

/* ===== History Card ===== */
.history-card {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.22);
}

.section-label {
  font-size: 13px;
  font-weight: 700;
  color: #1a1a2e;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 8px;
}

/* ===== Branch Filter ===== */
.filter-bar { display: flex; align-items: center; }
.filter-bar form { width: 100%; }

.filter-field {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  background: #fff;
  border: 1.5px solid #ececf1;
  border-radius: 16px;
  padding: 8px 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}

.filter-field:hover { border-color: #d8d8e0; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.07); }

.filter-field:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(229, 53, 53, 0.14), 0 4px 14px rgba(229, 53, 53, 0.10);
}

.filter-field.is-active {
  border-color: rgba(229, 53, 53, 0.55);
  background: linear-gradient(180deg, rgba(229, 53, 53, 0.05) 0%, #fff 65%);
  box-shadow: 0 4px 16px rgba(229, 53, 53, 0.12);
}

.filter-field.is-open {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(229, 53, 53, 0.14), 0 10px 28px rgba(229, 53, 53, 0.14);
}

.filter-trigger {
  flex: 1;
  display: flex;
  align-items: center;
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  text-align: left;
  color: inherit;
  min-width: 0;
  font: inherit;
}

.filter-trigger:focus { outline: none; }

.filter-icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(229, 53, 53, 0.1);
  color: var(--accent);
  margin-right: 10px;
  transition: background 0.25s, transform 0.25s;
}

.filter-field:hover .filter-icon { background: rgba(229, 53, 53, 0.15); }

.filter-field.is-active .filter-icon {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: #fff;
  box-shadow: 0 4px 10px rgba(229, 53, 53, 0.35);
}

.filter-content { flex: 1; display: flex; flex-direction: column; justify-content: center; min-width: 0; }

.filter-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: #9a9aa8;
  line-height: 1;
  margin-bottom: 3px;
}

.filter-field.is-active .filter-label { color: var(--accent); }

.filter-value {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #1a1a2e;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.filter-field.is-active .filter-value { color: var(--accent-hover); }

.filter-chevron {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #b5b5c0;
  margin-left: 6px;
  transition: color 0.25s, transform 0.25s;
  pointer-events: none;
}

.filter-field.is-open .filter-chevron,
.filter-field:focus-within .filter-chevron { color: var(--accent); transform: rotate(180deg); }

.filter-clear {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(229, 53, 53, 0.12);
  color: var(--accent);
  text-decoration: none;
  margin-left: 6px;
  transition: background 0.2s, color 0.2s, transform 0.3s;
}

.filter-clear:hover { background: var(--accent); color: #fff; transform: rotate(90deg); }

/* ===== Dropdown Menu ===== */
.filter-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1.5px solid #ececf1;
  border-radius: 18px;
  padding: 10px;
  box-shadow: 0 18px 44px rgba(20, 20, 40, 0.14), 0 4px 14px rgba(20, 20, 40, 0.06);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.98);
  transform-origin: top center;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  max-height: 360px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.filter-field.is-open .filter-menu { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }

.filter-menu-header {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #9a9aa8;
  padding: 6px 12px 8px;
}

.filter-menu-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: #b5b5c0;
  padding: 8px 12px 6px;
}

.filter-menu-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, #ececf1 15%, #ececf1 85%, transparent 100%);
  margin: 6px 4px 0;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 12px;
  text-decoration: none;
  color: #1a1a2e;
  transition: background 0.18s ease, transform 0.18s ease;
  position: relative;
}

.filter-option + .filter-option { margin-top: 2px; }
.filter-option:hover { background: rgba(229, 53, 53, 0.07); transform: translateX(2px); }
.filter-option:active { transform: translateX(2px) scale(0.99); }

.filter-option.is-selected {
  background: linear-gradient(90deg, rgba(229, 53, 53, 0.12) 0%, rgba(229, 53, 53, 0.04) 100%);
}

.filter-option.is-selected::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
}

.option-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(108, 117, 125, 0.08);
  color: #6c757d;
  transition: background 0.18s, color 0.18s;
}

.option-icon-all { background: rgba(229, 53, 53, 0.1); color: var(--accent); }
.filter-option:hover .option-icon { background: rgba(229, 53, 53, 0.14); color: var(--accent); }

.filter-option.is-selected .option-icon {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: #fff;
  box-shadow: 0 4px 10px rgba(229, 53, 53, 0.35);
}

.option-body { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; line-height: 1.2; }

.option-label {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a2e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.filter-option.is-selected .option-label { color: var(--accent-hover); font-weight: 700; }

.option-sub {
  font-size: 11px;
  font-weight: 500;
  color: #9a9aa8;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.filter-option.is-selected .option-sub { color: var(--accent); }

.option-indicator {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: transparent;
  transition: background 0.18s, color 0.18s;
}

.filter-option.is-selected .option-indicator {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 10px rgba(229, 53, 53, 0.4);
}

.filter-menu::-webkit-scrollbar { width: 6px; }
.filter-menu::-webkit-scrollbar-track { background: transparent; }
.filter-menu::-webkit-scrollbar-thumb { background: rgba(229, 53, 53, 0.2); border-radius: 3px; }
.filter-menu::-webkit-scrollbar-thumb:hover { background: rgba(229, 53, 53, 0.4); }

/* ===== Class List ===== */
.page-header { display: flex; align-items: baseline; justify-content: space-between; }
.page-count { font-size: 12px; color: #aaa; font-weight: 500; }

.class-list { display: flex; flex-direction: column; gap: 10px; }

.class-item {
  display: flex;
  align-items: stretch;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}

.class-item:hover { box-shadow: 0 6px 22px rgba(0, 0, 0, 0.3); transform: translateY(-1px); }

.class-item.is-today {
  box-shadow: 0 4px 18px rgba(229, 53, 53, 0.25);
  border: 1px solid rgba(229, 53, 53, 0.35);
}

.class-item-date {
  flex-shrink: 0;
  width: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 6px;
  background: linear-gradient(180deg, rgba(229, 53, 53, 0.10) 0%, rgba(229, 53, 53, 0.02) 100%);
  border-right: 1px solid rgba(229, 53, 53, 0.14);
  position: relative;
}

.class-item.is-weekend .class-item-date {
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.14) 0%, rgba(245, 158, 11, 0.03) 100%);
  border-right-color: rgba(245, 158, 11, 0.22);
}

.class-item.is-today .class-item-date {
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-hover) 100%);
  border-right-color: rgba(229, 53, 53, 0.4);
}

.date-day { font-size: 22px; font-weight: 800; line-height: 1; color: #1a1a2e; letter-spacing: -0.5px; }
.class-item.is-weekend .date-day { color: #b45309; }
.class-item.is-today .date-day { color: #fff; }

.date-month { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-top: 4px; color: var(--accent-hover); }
.class-item.is-weekend .date-month { color: #b45309; }
.class-item.is-today .date-month { color: rgba(255, 255, 255, 0.9); }

.date-year { font-size: 9px; font-weight: 600; letter-spacing: 0.4px; margin-top: 3px; color: #9a9aa8; }
.class-item.is-weekend .date-year { color: #b68149; }
.class-item.is-today .date-year { color: rgba(255, 255, 255, 0.75); }

.class-item-body { flex: 1; padding: 13px 12px; min-width: 0; }

.class-item-name {
  font-size: 15px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.class-item-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }

.badge-day { font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 20px; white-space: nowrap; }

.badge-day-weekday {
  background: rgba(229, 53, 53, 0.1);
  color: var(--accent);
  border: 1px solid rgba(229, 53, 53, 0.28);
}

.badge-day-weekend {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-rel { font-size: 10px; font-weight: 700; padding: 3px 9px; border-radius: 20px; white-space: nowrap; text-transform: uppercase; letter-spacing: 0.5px; }

.badge-rel-today {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: #fff;
  box-shadow: 0 3px 8px rgba(229, 53, 53, 0.35);
}

.badge-rel-tomorrow {
  background: rgba(40, 199, 111, 0.12);
  color: #28c76f;
  border: 1px solid rgba(40, 199, 111, 0.3);
}

.class-item-time { font-size: 13px; color: #555; font-weight: 500; }
.class-item-sub { font-size: 12px; color: #aaa; display: flex; align-items: center; gap: 2px; }
.sub-sep { margin: 0 4px; color: #ccc; }

.class-item-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  padding: 12px 12px 12px 8px;
  flex-shrink: 0;
}

.book-form { margin: 0; display: block; }

.btn-book {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(229, 53, 53, 0.35);
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
}

.btn-book:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(229, 53, 53, 0.45); filter: brightness(1.05); }
.btn-book:active { transform: translateY(0); box-shadow: 0 2px 6px rgba(229, 53, 53, 0.3); }

/* ===== Booking Modal ===== */
.booking-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: modalFadeIn 0.22s ease-out;
}

.booking-modal.is-closing { animation: modalFadeOut 0.2s ease-in forwards; }

@keyframes modalFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalFadeOut { from { opacity: 1; } to { opacity: 0; } }

.booking-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.booking-modal-card {
  position: relative;
  background: #fff;
  border-radius: 20px;
  padding: 28px 24px 22px;
  width: 100%;
  max-width: 340px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.4);
  animation: modalPop 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.booking-modal-icon {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  animation: iconPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s backwards;
}

@keyframes iconPop { from { opacity: 0; transform: scale(0.4); } to { opacity: 1; transform: scale(1); } }

.booking-modal-card.is-success .booking-modal-icon {
  background: linear-gradient(135deg, #28c76f 0%, #1ea455 100%);
  color: #fff;
  box-shadow: 0 8px 20px rgba(40, 199, 111, 0.4);
}

.booking-modal-card.is-error .booking-modal-icon {
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  color: #fff;
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.4);
}

.booking-modal-title { font-size: 19px; font-weight: 800; color: #1a1a2e; margin-bottom: 4px; }
.booking-modal-sub { font-size: 14px; font-weight: 600; color: var(--accent-hover); margin-bottom: 14px; }
.booking-modal-message { font-size: 13px; color: #555; line-height: 1.5; margin: 10px 0 18px; }

.booking-modal-meta {
  background: linear-gradient(180deg, rgba(229, 53, 53, 0.06) 0%, rgba(229, 53, 53, 0.02) 100%);
  border: 1px solid rgba(229, 53, 53, 0.18);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 18px;
  text-align: left;
}

.booking-modal-row { display: flex; justify-content: space-between; align-items: center; padding: 5px 0; font-size: 13px; }
.booking-modal-row + .booking-modal-row { border-top: 1px dashed rgba(229, 53, 53, 0.2); }
.booking-modal-label { color: #888; font-weight: 500; }
.booking-modal-value { color: #1a1a2e; font-weight: 700; }

.booking-modal-code {
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  color: var(--accent-hover);
  letter-spacing: 0.5px;
  font-size: 12px;
  word-break: break-all;
  text-align: right;
}

.booking-modal-meta-error {
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.06) 0%, rgba(239, 68, 68, 0.02) 100%);
  border-color: rgba(239, 68, 68, 0.22);
}

.booking-modal-meta-error .booking-modal-code { color: #b91c1c; }
.booking-modal-meta-error .booking-modal-row + .booking-modal-row { border-top-color: rgba(239, 68, 68, 0.2); }

.booking-modal-trace {
  text-align: left;
  margin: -4px 0 16px;
  background: #0f172a;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.booking-modal-trace summary {
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 700;
  color: #fca5a5;
  cursor: pointer;
  user-select: none;
  letter-spacing: 0.3px;
  list-style: none;
}

.booking-modal-trace summary::-webkit-details-marker { display: none; }
.booking-modal-trace summary::before { content: '▸'; display: inline-block; margin-right: 8px; transition: transform 0.2s; }
.booking-modal-trace[open] summary::before { transform: rotate(90deg); }
.booking-modal-trace summary:hover { background: rgba(239, 68, 68, 0.1); }

.booking-modal-trace pre {
  margin: 0;
  padding: 12px 14px;
  max-height: 260px;
  overflow: auto;
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-size: 11px;
  line-height: 1.55;
  color: #e2e8f0;
  white-space: pre;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.booking-modal-trace pre::-webkit-scrollbar { width: 6px; height: 6px; }
.booking-modal-trace pre::-webkit-scrollbar-track { background: transparent; }
.booking-modal-trace pre::-webkit-scrollbar-thumb { background: rgba(239, 68, 68, 0.4); border-radius: 3px; }

.booking-modal-btn {
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 12px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
}

.booking-modal-card.is-success .booking-modal-btn {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  box-shadow: 0 4px 12px rgba(229, 53, 53, 0.35);
}

.booking-modal-card.is-error .booking-modal-btn {
  background: linear-gradient(135deg, #64748b 0%, #475569 100%);
  box-shadow: 0 4px 12px rgba(100, 116, 139, 0.3);
}

.booking-modal-btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
.booking-modal-btn:active { transform: translateY(0); }

/* ===== Shared Badges ===== */
.badge-branch {
  background: rgba(229, 53, 53, 0.1);
  color: var(--accent);
  border: 1px solid rgba(229, 53, 53, 0.28);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
  white-space: nowrap;
}

/* ===== List Card ===== */
.list-card {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.22);
}

.no-data { text-align: center; color: #aaa; font-size: 13px; padding: 16px 0 4px; margin: 0; }

/* ===== Flash Banners ===== */
.flash-banner { border-radius: 10px; padding: 10px 14px; font-size: 13px; font-weight: 500; margin-bottom: 14px; text-align: center; }
.flash-success { background: rgba(40, 199, 111, 0.12); color: #1e8f4e; border: 1px solid rgba(40, 199, 111, 0.3); }
.flash-error { background: rgba(220, 53, 69, 0.1); color: #c0392b; border: 1px solid rgba(220, 53, 69, 0.25); }

/* ===== Edit Button ===== */
.btn-edit {
  display: block;
  width: 100%;
  padding: 14px;
  background: var(--accent);
  color: #fff;
  text-align: center;
  border-radius: 14px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: background 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 14px rgba(229, 53, 53, 0.35);
}

.btn-edit:hover { background: var(--accent-hover); color: #fff; box-shadow: 0 6px 18px rgba(229, 53, 53, 0.45); }

/* ===== Attendance Calendar ===== */
.cal-nav-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 4px 6px; }
.cal-month-label { font-weight: 600; font-size: 15px; color: #1a1a2e; }

.cal-nav-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--accent);
  font-size: 22px;
  font-weight: 700;
  text-decoration: none;
  line-height: 1;
  transition: background 0.2s;
}

.cal-nav-btn:hover { background: rgba(229, 53, 53, 0.12); }

.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; padding: 0 2px; }

.cal-head { text-align: center; font-size: 11px; font-weight: 600; color: #999; padding: 4px 0 6px; text-transform: uppercase; letter-spacing: 0.3px; }

.cal-cell { display: flex; align-items: center; justify-content: center; height: 38px; }

.cal-day {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 13px;
  color: #444;
  font-weight: 500;
}

.cal-day.cal-visited { background: var(--accent); color: #fff; font-weight: 700; }
.cal-day.cal-today { border: 2px solid var(--accent); color: var(--accent); font-weight: 700; }

.cal-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 4px 4px;
  font-size: 13px;
  color: #666;
  border-top: 1px solid #f0f0f0;
  margin-top: 6px;
}

.cal-legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  flex-shrink: 0;
}
