/* ── Variables ────────────────────────────────────────────────── */
:root {
  --red:    #e63946;
  --blue:   #3a86ff;
  --dark:   #1d1f20;
  --light:  #f8f9fa;
  --border: #dee2e6;
  --radius: 6px;
  --shadow: 0 2px 8px rgba(0,0,0,.1);
}

/* ── Reset ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: system-ui, sans-serif; color: var(--dark); line-height: 1.5;
  background:
    linear-gradient(rgba(255,255,255,.66), rgba(255,255,255,.66)),
    url("logo_cslgj.png") center center / 50% no-repeat fixed,
    #fff;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

/* ── Navbar ──────────────────────────────────────────────────── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: var(--dark); color: #fff;
  display: flex; align-items: center; justify-content: space-between;
  padding: .75rem 1.25rem; gap: 1rem;
}
.navbar-brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; font-size: 1.1rem; color: #fff; cursor: pointer; }
.navbar-brand:hover { color: #fff; text-decoration: none; }
.navbar-links {
  display: flex; flex-direction: column; align-items: flex-start; gap: .5rem;
  position: fixed; top: 0; right: 0; bottom: 0; width: 280px; max-width: 80vw;
  background: var(--dark); border-left: 1px solid rgba(255,255,255,.15);
  padding: 4.5rem 1.25rem 1.5rem; box-shadow: var(--shadow); z-index: 200;
  transform: translateX(100%); transition: transform .25s ease;
  overflow-y: auto;
}
.navbar-links.open { transform: translateX(0); }
.navbar-links .btn { width: 100%; justify-content: flex-start; }
.navbar-backdrop {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 190;
}
.navbar-backdrop.open { display: block; }
.badge-role { background: var(--blue); color: #fff; font-size: .7rem; padding: .2rem .5rem; border-radius: 99px; text-transform: uppercase; font-weight: 700; }
.badge-role.admin { background: var(--red); }
.navbar-section-label { color: rgba(255,255,255,.5); font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.navbar-divider { width: 100%; border: none; border-top: 1px solid rgba(255,255,255,.15); margin: .1rem 0; }
.card-divider { width: 100%; border: none; border-top: 1px solid var(--border); margin: 1.5rem 0; }
.hamburger { display: block; background: none; border: none; color: #fff; font-size: 1.5rem; cursor: pointer; }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .9rem; border-radius: var(--radius); border: none; cursor: pointer; font-size: .9rem; font-weight: 600; transition: opacity .15s; }
.btn:hover { opacity: .85; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn-primary   { background: var(--red);   color: #fff; }
.btn-secondary { background: var(--light); color: var(--dark); border: 1px solid #b9c1c9; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.btn-secondary:hover { background: #e9ecef; opacity: 1; }
.btn-ghost     { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.3); }
.btn-danger    { background: #dc3545; color: #fff; }
.btn-sm        { padding: .3rem .65rem; font-size: .8rem; }
.btn-block     { width: 100%; justify-content: center; }

/* ── Layout ──────────────────────────────────────────────────── */
.page { max-width: 1100px; margin: 0 auto; padding: 5.5rem 1.25rem 2rem; }
.section-title { color: var(--blue); font-size: 1.4rem; font-weight: 700; margin-bottom: 1.25rem; border-bottom: 3px solid var(--blue); padding-bottom: .4rem; display: inline-block; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }

/* ── Cards ───────────────────────────────────────────────────── */
.card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem; box-shadow: var(--shadow); }
.card-title { font-size: 1rem; font-weight: 700; margin-bottom: .3rem; }
.card-meta  { font-size: .8rem; color: #666; margin-bottom: .6rem; }
.card-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .9rem; }

/* ── Status badges ───────────────────────────────────────────── */
.status { display: inline-block; font-size: .75rem; font-weight: 700; padding: .2rem .55rem; border-radius: 99px; text-transform: uppercase; }
.status-open      { background: #d4edda; color: #155724; }
.status-full      { background: #fff3cd; color: #856404; }
.status-cancelled { background: #f8d7da; color: #721c24; }
.status-waitlist  { background: #cce5ff; color: #004085; }
.status-confirmed { background: #d4edda; color: #155724; }
.status-age        { background: #e0d4f7; color: #4a2e83; }

/* ── Forms ───────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .85rem; }
.form-group label { font-size: .85rem; font-weight: 600; }
.form-group input, .form-group select, .form-group textarea {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: .5rem .75rem; font-size: .9rem; width: 100%;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: 2px solid var(--blue); outline-offset: -1px;
}
.form-error { color: var(--red); font-size: .83rem; margin-top: .25rem; }
.password-field { position: relative; }
.password-field input { padding-right: 2.4rem; }
.password-toggle {
  position: absolute; right: .4rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; padding: .3rem;
  font-size: 1.05rem; line-height: 1; color: #666;
}
.password-toggle:hover { color: var(--blue); }
.form-box { max-width: 420px; margin: 0 auto; }
.phone-input { display: flex; gap: .4rem; align-items: stretch; }
.phone-input .phone-prefix {
  font-size: small;
  display: flex; align-items: center; padding: .5rem .65rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--light); font-weight: 600; color: var(--dark);
}
.phone-input input { flex: 1; min-width: 0; }

/* ── Table ───────────────────────────────────────────────────── */
.table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.table th, .table td { padding: .6rem .85rem; border-bottom: 1px solid var(--border); text-align: left; }
.table th { background: var(--light); font-weight: 700; }
.table tr:hover td { background: #f0f4ff; }

/* ── Modal ───────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.modal-box { position: relative; background: #fff; border-radius: var(--radius); padding: 1.5rem; max-width: 480px; width: 100%; box-shadow: var(--shadow); }
.modal-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 1rem; }
.modal-close {
  position: absolute; top: .75rem; right: .75rem;
  background: none; border: none; font-size: 1.4rem; line-height: 1; color: #888; cursor: pointer;
  width: 2rem; height: 2rem; display: flex; align-items: center; justify-content: center; border-radius: 99px;
}
.modal-close:hover { background: var(--light); color: var(--dark); }
.modal-actions { display: flex; gap: .6rem; justify-content: flex-end; margin-top: 1.25rem; }

/* ── Toast ───────────────────────────────────────────────────── */
.toast-wrap { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 300; display: flex; flex-direction: column; gap: .5rem; }
.toast { padding: .75rem 1.1rem; border-radius: var(--radius); color: #fff; font-weight: 600; font-size: .9rem; min-width: 240px; max-width: 360px; box-shadow: var(--shadow); }
.toast-success { background: #198754; }
.toast-error   { background: var(--red); }

/* ── Slot group ──────────────────────────────────────────────── */
.slot-group { margin-bottom: 2.5rem; }
.slot-header { font-size: 1rem; font-weight: 700; color: var(--dark); background: var(--light); border: 1px solid var(--border); border-radius: var(--radius); padding: .6rem 1rem; margin-bottom: .85rem; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .navbar-links { width: 85vw; max-width: 320px; }
}

/* ── Utilities ───────────────────────────────────────────────── */
.text-muted  { color: #666; font-size: .85rem; }
.text-center { text-align: center; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.gap-1 { gap: .5rem; }
.flex { display: flex; align-items: center; gap: .5rem; }
