/* ============================================
   Auth pages + Dashboard layout
   ============================================ */

/* ---------- AUTH (login / register / verify) ---------- */
.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  background: var(--bg);
}
.auth-art {
  position: relative;
  background: var(--primary);
  color: white;
  padding: 56px 48px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.auth-art::before {
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'><g fill='none' stroke='rgba(255,255,255,0.05)' stroke-width='0.6'><path d='M40 10 L40 70 M10 40 L70 40'/><circle cx='40' cy='40' r='12'/></g></svg>");
  pointer-events: none;
}
.auth-art-brand {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
}
.auth-art-brand img { width: 44px; height: 44px; }
.auth-art-body { position: relative; }
.auth-art-eyebrow {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--accent-light); margin-bottom: 18px;
}
.auth-art-body h2 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.6rem, 2.5vw, 2.2rem); color: white; line-height: 1.2;
  margin-bottom: 14px;
}
.auth-art-body p { color: rgba(255,255,255,0.75); line-height: 1.7; max-width: 380px; font-size: 0.94rem; }
.auth-art-features {
  position: relative;
  display: flex; flex-direction: column; gap: 14px;
  margin-top: 28px;
}
.auth-art-feat { display: flex; align-items: center; gap: 12px; color: rgba(255,255,255,0.85); font-size: 0.88rem; }
.auth-art-feat-icon {
  width: 32px; height: 32px; border-radius: 9px;
  background: rgba(46,196,182,0.18);
  display: grid; place-items: center; color: var(--accent-light); flex-shrink: 0;
}
.auth-art-feat-icon svg { width: 16px; height: 16px; }
.auth-art-foot {
  position: relative;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
}

.auth-form-side {
  display: flex; flex-direction: column;
  justify-content: center;
  padding: 56px 48px;
}
.auth-form-wrap {
  width: 100%; max-width: 420px; margin: 0 auto;
}
.auth-top {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.84rem; color: var(--muted);
  margin-bottom: 36px;
}
.auth-top a { color: var(--accent); font-weight: 600; }
.auth-top a:hover { text-decoration: underline; }
.auth-form-wrap h1 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.6rem, 2.2vw, 2rem);
  color: var(--ink); margin-bottom: 8px;
}
.auth-form-wrap > .sub {
  color: var(--ink-soft); font-size: 0.92rem; margin-bottom: 28px; line-height: 1.6;
}
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-field label {
  font-size: 0.78rem; font-weight: 600; color: var(--ink-soft); letter-spacing: 0.02em;
}
.auth-field input {
  padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 11px;
  background: white; font-size: 0.94rem;
  transition: border .2s, box-shadow .2s;
  font-family: var(--font-body);
}
.auth-field input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(46,196,182,0.18);
}
.auth-submit {
  width: 100%; justify-content: center;
  padding: 13px 22px; font-size: 0.95rem; margin-top: 6px;
}
.auth-msg {
  padding: 12px 14px; border-radius: 10px;
  font-size: 0.86rem; line-height: 1.5;
  display: flex; align-items: flex-start; gap: 10px;
}
.auth-msg.ok       { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.auth-msg.err      { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.auth-msg.info     { background: #f0fbf9; color: #0A2540; border: 1px solid #b8ede7; }

/* OTP single input */
.otp-single {
  width: 100%;
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 5vw, 2.2rem);
  font-weight: 600;
  letter-spacing: clamp(8px, 2vw, 16px);
  padding: 18px 12px;
  border: 1.5px solid var(--line); border-radius: 12px;
  background: white;
  font-variant-numeric: tabular-nums;
  caret-color: var(--accent);
}
.otp-single::placeholder {
  font-weight: 400; opacity: 0.4;
  letter-spacing: clamp(6px, 1.8vw, 14px);
}
.otp-single:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(46,196,182,0.2);
}
.otp-resend {
  text-align: center; font-size: 0.84rem; color: var(--muted); margin-top: 12px;
}
.otp-resend button {
  background: none; border: none; color: var(--accent); font-weight: 600; cursor: pointer; font-size: 0.84rem;
}
.otp-resend button:disabled { color: var(--muted); cursor: not-allowed; }
.otp-resend button:hover:not(:disabled) { text-decoration: underline; }

@media (max-width: 880px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .auth-form-side { padding: 32px 24px; min-height: 100vh; }
}

/* ============================================
   DASHBOARD layout (user + admin share this)
   ============================================ */
.dash-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
  background: var(--bg);
}
.dash-sidebar {
  background: var(--primary);
  color: white;
  padding: 26px 18px;
  display: flex; flex-direction: column;
  gap: 18px;
  position: sticky; top: 0;
  height: 100vh; overflow-y: auto;
}
.dash-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 0 8px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-family: var(--font-display); font-weight: 600;
  color: white;
}
.dash-brand img { width: 38px; height: 38px; }
.dash-brand small { display: block; font-family: var(--font-body); font-weight: 400; font-size: 0.66rem; letter-spacing: 0.1em; color: rgba(255,255,255,0.6); text-transform: uppercase; margin-top: 2px; }
.dash-nav { display: flex; flex-direction: column; gap: 2px; }
.dash-nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border-radius: 10px;
  color: rgba(255,255,255,0.78); font-size: 0.9rem; font-weight: 500;
  transition: background .2s, color .2s;
}
.dash-nav a svg { width: 17px; height: 17px; opacity: 0.8; flex-shrink: 0; }
.dash-nav a:hover { background: rgba(255,255,255,0.06); color: white; }
.dash-nav a.active { background: var(--accent); color: white; }
.dash-nav a.active svg { opacity: 1; }
.dash-nav-section {
  font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.12em;
  color: rgba(255,255,255,0.4); padding: 14px 14px 4px;
}
.dash-sidebar-foot {
  margin-top: auto;
  padding: 16px 8px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 0.78rem;
}
.dash-user-pill {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 12px;
  background: rgba(255,255,255,0.06);
  margin-bottom: 10px;
}
.dash-user-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent); color: white;
  display: grid; place-items: center; font-weight: 600;
  font-size: 0.86rem; flex-shrink: 0;
}
.dash-user-info { line-height: 1.2; overflow: hidden; }
.dash-user-info strong { display: block; font-size: 0.84rem; color: white; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-user-info span { font-size: 0.72rem; color: rgba(255,255,255,0.55); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.dash-logout {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 9px;
  color: rgba(255,255,255,0.7); font-size: 0.84rem;
}
.dash-logout:hover { background: rgba(239,68,68,0.18); color: #fca5a5; }
.dash-logout svg { width: 15px; height: 15px; }

.dash-main {
  padding: 32px clamp(20px, 4vw, 44px);
  min-width: 0;
}
.dash-topbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 32px; gap: 16px; flex-wrap: wrap;
}
.dash-page-title { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.4rem, 2vw, 1.8rem); color: var(--ink); }
.dash-page-title small { display: block; font-family: var(--font-body); font-size: 0.84rem; font-weight: 400; color: var(--muted); margin-top: 4px; letter-spacing: 0; }
.dash-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.dash-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px; margin-bottom: 28px;
}
.stat-tile {
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.stat-tile .lbl { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); font-weight: 600; }
.stat-tile .val { font-family: var(--font-display); font-weight: 600; font-size: 1.8rem; color: var(--ink); margin-top: 2px; line-height: 1; }
.stat-tile .ico { width: 44px; height: 44px; border-radius: 12px; background: var(--bg-tint); color: var(--accent); display: grid; place-items: center; flex-shrink: 0; }
.stat-tile .ico svg { width: 22px; height: 22px; }

/* Card / panel */
.dash-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.dash-card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-bottom: 1px solid var(--line); gap: 12px; flex-wrap: wrap;
}
.dash-card-head h3 { font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; color: var(--ink); }
.dash-card-body { padding: 4px 0; }

/* Table */
.dash-table { width: 100%; border-collapse: collapse; }
.dash-table th, .dash-table td { padding: 14px 22px; text-align: left; font-size: 0.88rem; vertical-align: middle; }
.dash-table thead th {
  font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); background: var(--bg-tint); border-bottom: 1px solid var(--line);
}
.dash-table tbody tr { border-bottom: 1px solid var(--line); transition: background .15s; }
.dash-table tbody tr:last-child { border-bottom: none; }
.dash-table tbody tr:hover { background: var(--bg); }
.dash-table .row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.dash-table .row-actions button,
.dash-table .row-actions a {
  width: 32px; height: 32px; border-radius: 8px;
  display: inline-grid; place-items: center;
  background: var(--bg-tint); color: var(--ink-soft);
  transition: all .2s; cursor: pointer; border: 1px solid transparent;
}
.dash-table .row-actions svg { width: 15px; height: 15px; }
.dash-table .row-actions .act-view:hover { background: #e8faf8; color: var(--accent); border-color: #b8ede7; }
.dash-table .row-actions .act-edit:hover { background: #dbeafe; color: var(--primary); border-color: #bfdbfe; }
.dash-table .row-actions .act-del:hover  { background: #fee2e2; color: #b91c1c; border-color: #fecaca; }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em;
}
.badge-pending   { background: #fef9c3; color: #b45309; }
.badge-confirmed { background: #dbeafe; color: #1e40af; }
.badge-completed { background: #dcfce7; color: #15803d; }
.badge-cancelled { background: #fee2e2; color: #b91c1c; }
.badge-online    { background: #d6f4f0; color: #1d8a80; }
.badge-onsite    { background: #fef9c3; color: #b45309; }
.badge-admin     { background: #fee2e2; color: #b91c1c; }
.badge-user      { background: #d6f4f0; color: #1d8a80; }

.empty-state {
  padding: 60px 24px; text-align: center; color: var(--muted);
}
.empty-state svg { width: 48px; height: 48px; color: var(--line); margin-bottom: 12px; }
.empty-state h4 { font-family: var(--font-display); font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; }
.empty-state p { font-size: 0.88rem; line-height: 1.6; max-width: 320px; margin: 0 auto; }

/* Forms within dashboards */
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid-2 .full { grid-column: 1/-1; }
@media (max-width: 640px) { .form-grid-2 { grid-template-columns: 1fr; } }

/* Modal */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(10,37,64,0.55);
  display: none; place-items: center;
  z-index: 1000; padding: 20px;
}
.modal-overlay.show { display: grid; animation: fadeUp .2s ease; }
.modal-card {
  background: white; border-radius: 16px;
  padding: 28px; width: 100%; max-width: 540px;
  max-height: 88vh; overflow-y: auto;
  position: relative;
  box-shadow: 0 30px 80px rgba(10,37,64,0.3);
}
.modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--bg-tint); color: var(--ink-soft);
  display: grid; place-items: center; cursor: pointer; border: none;
}
.modal-close:hover { background: #fee2e2; color: #b91c1c; }
.modal-card h2 { font-family: var(--font-display); font-size: 1.2rem; margin-bottom: 14px; padding-right: 36px; }
.modal-list { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.modal-row {
  display: flex; justify-content: space-between; gap: 16px; padding: 11px 14px;
  background: var(--bg-tint); border-radius: 10px; font-size: 0.86rem;
}
.modal-row .k { color: var(--muted); font-weight: 600; }
.modal-row .v { color: var(--ink); text-align: right; word-break: break-word; }

/* Account-creation prompt after booking */
.post-book-card {
  background: white; border-radius: 14px;
  padding: 22px;
  border: 1px solid var(--line);
  margin-top: 16px; text-align: left;
}
.post-book-card h4 { font-family: var(--font-display); font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.post-book-card p { font-size: 0.86rem; color: var(--ink-soft); margin-bottom: 14px; line-height: 1.55; }
.post-book-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.post-book-actions .btn { flex: 1; min-width: 130px; justify-content: center; }

/* Mobile sidebar collapse */
.dash-mobile-toggle {
  display: none;
  position: fixed; top: 16px; left: 16px; z-index: 100;
  width: 44px; height: 44px; border-radius: 11px;
  background: var(--primary); color: white;
  place-items: center; border: none;
  box-shadow: 0 6px 18px rgba(10,37,64,0.25);
}
.dash-mobile-toggle svg { width: 20px; height: 20px; }

@media (max-width: 900px) {
  .dash-shell { grid-template-columns: 1fr; }
  .dash-sidebar {
    position: fixed; top: 0; left: -280px; width: 260px;
    transition: left .3s ease; z-index: 99;
    box-shadow: 8px 0 32px rgba(0,0,0,0.18);
  }
  .dash-sidebar.open { left: 0; }
  .dash-mobile-toggle { display: grid; }
  .dash-main { padding-top: 72px; }
  .dash-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 98; display: none; }
  .dash-overlay.show { display: block; }
}

/* Navbar user menu (added to public pages) */
.nav-user-btn {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.22);
  display: grid; place-items: center; color: white;
  transition: background .2s, transform .2s;
  position: relative;
  cursor: pointer;
}
.nav-user-btn:hover { background: rgba(255,255,255,0.22); }
.nav-user-btn svg { width: 17px; height: 17px; }
.nav-user-btn.has-account { background: var(--accent); border-color: var(--accent); font-weight: 600; font-size: 0.78rem; }

.nav-user-menu {
  position: absolute;
  top: calc(100% + 8px); right: 0;
  min-width: 200px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 18px 48px rgba(10,37,64,0.18);
  padding: 6px;
  opacity: 0; visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .2s, transform .2s, visibility .2s;
  z-index: 200;
}
.nav-user-wrap { position: relative; }
.nav-user-wrap.open .nav-user-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-user-menu a, .nav-user-menu button {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 8px;
  font-size: 0.88rem; color: var(--ink-soft); font-weight: 500;
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
}
.nav-user-menu a:hover, .nav-user-menu button:hover { background: var(--bg-tint); color: var(--primary); }
.nav-user-menu svg { width: 15px; height: 15px; color: var(--muted); }
.nav-user-menu hr { border: none; border-top: 1px solid var(--line); margin: 4px 0; }
.nav-user-menu .nm-head {
  padding: 12px;
  background: var(--bg-tint);
  border-radius: 8px; margin-bottom: 4px;
}
.nav-user-menu .nm-head strong { display: block; font-size: 0.86rem; color: var(--ink); }
.nav-user-menu .nm-head span { font-size: 0.74rem; color: var(--muted); }
.nav-user-menu .danger:hover { background: #fee2e2; color: #b91c1c; }
.nav-user-menu .danger svg { color: #b91c1c; }
