/* ============================================================
   Livasta Host Dashboard — Shared Design System
   ============================================================ */

/* ---------- CSS Variables (Design Tokens) ---------- */
:root {
  --pine: #007A7A;        /* brand teal (matches website) — primary */
  --pine-light: #0E9C95;  /* lighter teal */
  --pine-dark: #00605E;
  --cream: #FFFFFF;       /* light surfaces */
  --canvas: #EEF3F3;      /* soft teal-tinted light background */
  --coral: #EB6F4A;       /* warm secondary accent */
  --coral-dark: #D65A36;
  --gold: #D9A35A;
  --ink: #1E2D34;         /* refined deep slate text */
  --sage: #E1ECEA;        /* cool light borders/tints */
  --muted: #5E727A;       /* balanced muted text */
  --white: #FFFFFF;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --radius-full: 999px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --shadow-xl: 0 12px 40px rgba(0,0,0,0.15);
  --transition-fast: 0.15s ease;
  --transition-base: 0.2s ease;
  --transition-slow: 0.3s ease;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  /* Stop the whole page from scrolling sideways when a child (e.g. the
     horizontal snapshot strip) is wider than the screen. `clip` prevents the
     scroll WITHOUT creating a scroll container, so the sticky header keeps
     working. The strip keeps its own internal overflow-x scroll. */
  overflow-x: clip;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--canvas);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
  max-width: 100%;
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  font-size: inherit;
}

input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* ---------- Typography ---------- */
.font-display {
  font-family: 'Fraunces', serif;
}

.text-xs { font-size: 12px; line-height: 1.5; }
.text-sm { font-size: 14px; line-height: 1.5; }
.text-base { font-size: 16px; line-height: 1.6; }
.text-lg { font-size: 18px; line-height: 1.5; }
.text-xl { font-size: 20px; line-height: 1.4; }
.text-2xl { font-size: 24px; line-height: 1.3; }
.text-3xl { font-size: 30px; line-height: 1.2; }

.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }

/* ---------- Layout Containers ---------- */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 640px) {
  .container { padding: 0 24px; }
}

@media (min-width: 1024px) {
  .container { padding: 0 32px; }
}

@media (min-width: 1440px) {
  .container { max-width: 1400px; padding: 0 40px; }
}

@media (min-width: 1600px) {
  .container { max-width: 1536px; padding: 0 48px; }
}

/* ---------- Header / Navigation ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 40;
  /* Brand-tinted frosted bar: a soft teal bloom on the left and a warm gold
     bloom on the right over near-white, instead of a flat white slab. */
  background:
    radial-gradient(60% 180% at 8% 0%, rgba(0, 122, 122, 0.13), transparent 62%),
    radial-gradient(45% 160% at 92% 100%, rgba(217, 163, 90, 0.10), transparent 64%),
    rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--sage);
  box-shadow: 0 6px 22px -14px rgba(30, 45, 52, 0.45);
}

/* teal→gold brand seam along the bottom edge */
.header::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, var(--pine) 0%, var(--pine-light) 45%, var(--gold) 100%);
  opacity: 0.9;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 12px;
}

@media (min-width: 640px) {
  .header-inner { height: 68px; gap: 16px; }
}

@media (min-width: 768px) {
  .header-inner { height: 72px; }
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.logo-dot {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--pine);
  border-radius: 50%;
}

.logo-dot::after {
  content: '';
  width: 12px;
  height: 12px;
  background: var(--cream);
  border-radius: 50%;
}

.logo-text {
  font-family: 'Fraunces', serif;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--pine);
}

.logo-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  border: 1px solid var(--sage);
  border-radius: var(--radius-full);
  padding: 2px 8px;
}

@media (max-width: 479px) {
  .logo-badge { display: none; }
}

/* ---------- Desktop Navigation ---------- */
.nav-desktop {
  display: none;
  align-items: center;
  gap: 28px;
  height: 48px;
  margin-bottom: -1px;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-desktop::-webkit-scrollbar { display: none; }

@media (min-width: 768px) {
  .nav-desktop { display: flex; }
}

.nav-link {
  position: relative;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 0;
  white-space: nowrap;
  color: var(--muted);
  transition: color var(--transition-fast);
}

.nav-link:hover {
  color: var(--pine);
}

.nav-link.active {
  color: var(--pine);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--pine);
}

.nav-link .badge-count {
  background: var(--coral);
  color: var(--cream);
  font-size: 10px;
  font-weight: 700;
  border-radius: var(--radius-full);
  padding: 2px 6px;
  line-height: 1;
  margin-left: 4px;
}

/* ---------- Search Bar ---------- */
.search-bar {
  display: none;
  align-items: center;
  flex: 1;
  max-width: 360px;
  background: var(--white);
  border: 1px solid var(--sage);
  border-radius: var(--radius-full);
  padding: 8px 16px;
  gap: 8px;
}

@media (min-width: 768px) {
  .search-bar { display: flex; }
}

.search-bar input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 14px;
  color: var(--ink);
}

.search-bar input::placeholder {
  color: var(--muted);
}

/* ---------- Header Actions ---------- */
.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  flex-shrink: 0;
}

@media (min-width: 480px) {
  .header-actions { gap: 8px; }
}

@media (min-width: 640px) {
  .header-actions { gap: 12px; }
}

.btn-icon {
  position: relative;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--sage);
  background: var(--white);
  flex-shrink: 0;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

@media (min-width: 640px) {
  .btn-icon { width: 40px; height: 40px; }
}

.btn-icon:hover {
  border-color: var(--pine);
  box-shadow: var(--shadow-sm);
}

.btn-icon .notification-dot {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 8px;
  height: 8px;
  background: var(--coral);
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.3); }
}

/* ---------- Primary Button ---------- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--pine);
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-full);
  padding: 10px 20px;
  transition: background var(--transition-fast), transform var(--transition-fast);
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background: var(--pine-dark);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--coral);
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-full);
  padding: 10px 20px;
  transition: background var(--transition-fast), transform var(--transition-fast);
  border: none;
  cursor: pointer;
}

.btn-secondary:hover {
  background: var(--pine-light);
  transform: translateY(-1px);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-full);
  padding: 10px 20px;
  border: 1px solid var(--sage);
  transition: border-color var(--transition-fast), background var(--transition-fast);
  cursor: pointer;
}

.btn-outline:hover {
  border-color: var(--pine);
  background: rgba(220, 232, 223, 0.3);
}

/* ---------- Account Popover ---------- */
.account-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--sage);
  border-radius: var(--radius-full);
  padding: 4px;
  background: var(--white);
  transition: box-shadow var(--transition-fast);
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .account-trigger { padding: 6px 12px 6px 6px; }
}

.account-trigger:hover {
  box-shadow: var(--shadow-sm);
}

.account-trigger img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.account-trigger .name {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}

.account-popover {
  position: fixed;
  right: 12px;
  top: auto;
  margin-top: 0;
  width: calc(100vw - 24px);
  max-width: 224px;
  background: var(--white);
  border: 1px solid var(--sage);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: 8px;
  z-index: 200;
  transform: translateY(-6px);
  opacity: 0;
  pointer-events: none;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

@media (min-width: 640px) {
  .account-popover {
    position: absolute;
    right: 0;
    width: 224px;
    max-width: 224px;
  }
}

.account-popover.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.account-popover .pop-header {
  padding: 10px 12px;
  border-bottom: 1px solid var(--sage);
  margin-bottom: 4px;
}

.account-popover .pop-header .name {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.account-popover .pop-header .email {
  font-size: 12px;
  color: var(--muted);
}

.account-popover .pop-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  transition: background var(--transition-fast);
}

.account-popover .pop-link:hover {
  background: rgba(220, 232, 223, 0.4);
}

.account-popover .pop-link.danger {
  color: var(--coral);
}

.account-popover .pop-link.danger:hover {
  background: rgba(235, 111, 74, 0.1);
}

/* ---------- Mobile Menu ---------- */
.mobile-menu-btn {
  display: flex;
}

@media (min-width: 768px) {
  .mobile-menu-btn { display: none; }
}

/* ---- Mobile overlay panel ---- */
.mobile-panel {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 190;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

@media (max-width: 767px) {
  .mobile-panel { display: block; }
}

.mobile-panel.open {
  opacity: 1;
  pointer-events: auto;
}

/* The actual nav drawer slides in from the right */
.mobile-panel__drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(320px, 90vw);
  background: var(--white);
  box-shadow: -8px 0 40px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.33, 1, 0.68, 1);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.mobile-panel.open .mobile-panel__drawer {
  transform: translateX(0);
}

.mobile-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 12px;
  border-bottom: 1px solid var(--sage);
}

.mobile-panel__user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mobile-panel__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--sage);
}

.mobile-panel__name {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}

.mobile-panel__role {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.mobile-panel__close {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--sage);
  background: none;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.mobile-panel__close:hover { background: var(--canvas); }

.mobile-panel__nav {
  flex: 1;
  padding: 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-panel__footer {
  padding: 12px 20px 20px;
  border-top: 1px solid var(--sage);
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  transition: background var(--transition-fast), color var(--transition-fast);
}

.mobile-nav-link:hover {
  background: var(--canvas);
  color: var(--ink);
}

.mobile-nav-link.active {
  background: rgba(0, 122, 122, 0.1);
  color: var(--pine);
}

.mobile-nav-link .mnl-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--canvas);
  color: var(--muted);
  transition: background var(--transition-fast), color var(--transition-fast);
}

.mobile-nav-link.active .mnl-icon {
  background: rgba(0, 122, 122, 0.15);
  color: var(--pine);
}

.mobile-nav-link .mnl-text {
  flex: 1;
  min-width: 0;
}

.mobile-nav-link .mnl-badge {
  font-size: 10px;
  font-weight: 700;
  background: var(--coral);
  color: #fff;
  border-radius: var(--radius-full);
  padding: 2px 6px;
  line-height: 1.4;
}

/* ---- Legacy mobile-nav-grid (kept for backward compat, hidden in new drawer) ---- */
.mobile-nav-grid {
  display: none;
}

/* ---------- Cards ---------- */
.card {
  background: var(--white);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(220, 232, 223, 0.7);
  overflow: hidden;
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-body {
  padding: 20px;
}

@media (min-width: 640px) {
  .card-body { padding: 24px; }
}

/* ---------- Badges ---------- */
.badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.badge-success { background: #E3F1E6; color: #2F7D4F; }
.badge-warning { background: #FBF0DD; color: #B5792A; }
.badge-danger  { background: #FBE7E1; color: #C5502E; }
.badge-info    { background: var(--sage); color: var(--pine); }
.badge-muted   { background: #EFEAE0; color: var(--muted); }

/* ---------- Toggle Switch ---------- */
.switch {
  width: 40px;
  height: 22px;
  border-radius: var(--radius-full);
  background: var(--sage);
  position: relative;
  transition: background var(--transition-base);
  cursor: pointer;
  flex-shrink: 0;
}

.switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--white);
  transition: left var(--transition-base);
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.switch.on {
  background: var(--pine);
}

.switch.on::after {
  left: 20px;
}

/* ---------- Section Header ---------- */
.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.section-label {
  color: var(--coral);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.section-title {
  font-family: 'Fraunces', serif;
  font-size: 24px;
  font-weight: 600;
  color: var(--pine);
}

@media (min-width: 640px) {
  .section-title { font-size: 30px; }
}

.section-subtitle {
  font-size: 14px;
  color: var(--muted);
  margin-top: 4px;
}

/* ---------- Notification / Toast ---------- */
.notification-toast {
  position: fixed;
  top: 84px;
  right: 16px;
  z-index: 100;
  min-width: 320px;
  max-width: 420px;
  background: var(--white);
  border: 1px solid var(--sage);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: 16px 20px;
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

.notification-toast.show {
  transform: translateX(0);
  opacity: 1;
}

.notification-toast .toast-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.notification-toast .toast-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--pine);
  display: flex;
  align-items: center;
  gap: 8px;
}

.notification-toast .toast-title .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--coral);
  animation: pulse-dot 2s infinite;
}

.notification-toast .toast-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast);
}

.notification-toast .toast-close:hover {
  background: rgba(220, 232, 223, 0.5);
}

.notification-toast .toast-body {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.notification-toast .toast-body strong {
  color: var(--ink);
  font-weight: 600;
}

.notification-toast .toast-time {
  font-size: 11px;
  color: var(--muted);
  margin-top: 8px;
}

/* ---------- Modal Overlay ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(22, 51, 44, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--white);
  border-radius: var(--radius-2xl);
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px) scale(0.95);
  transition: transform var(--transition-slow);
}

.modal-overlay.open .modal-content {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--sage);
}

.modal-body {
  padding: 20px 24px;
}

.modal-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--sage);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

/* ---------- Form Inputs ---------- */
.form-input {
  width: 100%;
  border: 1px solid var(--sage);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  font-size: 14px;
  background: var(--white);
  color: var(--ink);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus {
  border-color: var(--pine);
  box-shadow: 0 0 0 3px rgba(22, 51, 44, 0.1);
}

.form-input::placeholder {
  color: var(--muted);
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 6px;
}

.form-select {
  width: 100%;
  border: 1px solid var(--sage);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  font-size: 14px;
  background: var(--white);
  color: var(--ink);
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238C968F' stroke-width='2.5' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  transition: border-color var(--transition-fast);
  cursor: pointer;
}

.form-select:focus {
  border-color: var(--pine);
}

/* ---------- Stat Card ---------- */
.stat-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(220, 232, 223, 0.7);
  padding: 20px;
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.stat-card .stat-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--sage);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pine);
}

.stat-card .stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-card .stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
  margin-top: 16px;
}

.stat-card .stat-label {
  font-size: 14px;
  color: var(--muted);
  margin-top: 4px;
}

/* ---------- Filter Chips ---------- */
.filter-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--sage);
  border-radius: var(--radius-full);
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-chip:hover {
  border-color: var(--pine);
}

.filter-chip.active {
  background: var(--pine);
  color: var(--cream);
  border-color: var(--pine);
}

/* Count badge inside a filter chip. */
.filter-chip .chip-count {
  margin-left: 7px;
  min-width: 20px;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  background: var(--sage);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.filter-chip.active .chip-count {
  background: rgba(255, 255, 255, .22);
  color: var(--cream);
}

/* Nothing in this state — dimmed, but still selectable. */
.filter-chip.is-empty { opacity: .5; }
.filter-chip.is-empty:hover { opacity: 1; }

html[data-theme="dark"] .filter-chip .chip-count { background: rgba(255, 255, 255, .1); color: var(--muted); }
html[data-theme="dark"] .filter-chip.active .chip-count { background: rgba(255, 255, 255, .22); color: #fff; }

/* ---------- Tables ---------- */
.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--sage) transparent;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

.table-scroll::-webkit-scrollbar { height: 4px; }
.table-scroll::-webkit-scrollbar-thumb { background: var(--sage); border-radius: 4px; }

.data-table {
  width: 100%;
  min-width: 600px;
  font-size: 14px;
  border-collapse: collapse;
}

.data-table thead th {
  font-weight: 600;
  color: var(--muted);
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--sage);
  white-space: nowrap;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.data-table thead th:first-child {
  padding-left: 16px;
}

.data-table thead th:last-child {
  padding-right: 16px;
  text-align: right;
}

@media (min-width: 640px) {
  .data-table thead th { padding: 14px 12px; font-size: 13px; text-transform: none; letter-spacing: 0; }
  .data-table thead th:first-child { padding-left: 20px; }
  .data-table thead th:last-child { padding-right: 20px; }
}

.data-table tbody td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(220, 232, 223, 0.5);
  white-space: nowrap;
}

.data-table tbody td:first-child {
  padding-left: 16px;
  font-weight: 600;
}

.data-table tbody td:last-child {
  padding-right: 16px;
  text-align: right;
  font-weight: 600;
}

@media (min-width: 640px) {
  .data-table tbody td { padding: 14px 12px; }
  .data-table tbody td:first-child { padding-left: 20px; }
  .data-table tbody td:last-child { padding-right: 20px; }
}

.data-table tbody tr {
  transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
  background: rgba(220, 232, 223, 0.2);
}

.data-table .text-muted {
  color: var(--muted);
}

/* ---------- Scrollbar Utility ---------- */
.no-scrollbar {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}

/* ---------- Main Content Area ---------- */
.main-content {
  padding: 20px 0 96px; /* bottom padding accounts for mobile bottom nav */
}

@media (min-width: 640px) {
  .main-content { padding: 28px 0 64px; }
}

@media (min-width: 768px) {
  .main-content { padding: 32px 0 56px; }
}

/* ---------- Grid Utilities ---------- */
.grid-1 { display: grid; grid-template-columns: 1fr; gap: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr; gap: 20px; }
.grid-4 { display: grid; grid-template-columns: 1fr; gap: 16px; }

@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1440px) {
  .grid-3 { grid-template-columns: repeat(4, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1600px) {
  .grid-3 { grid-template-columns: repeat(4, 1fr); }
  .grid-4 { grid-template-columns: repeat(5, 1fr); }
}

/* ---- Universal mobile safety ----
   Any table wrapped in .table-responsive scrolls sideways on its own instead
   of stretching the page, and long unbroken strings (URLs, emails, IDs) wrap
   instead of forcing horizontal overflow. */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}
.card, .settings-section, .dash-card { overflow-wrap: break-word; }

/* ---------- Mobile Bottom Tab Navigation ---------- */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--sage);
  box-shadow: 0 -4px 20px -8px rgba(0, 0, 0, 0.12);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

@media (max-width: 767px) {
  .mobile-bottom-nav { display: flex; }
  /* The bottom nav is position:fixed, so reserve space at the end of the page
     or the last content scrolls underneath it and looks cut off. */
  body { padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px)); }
}

.mob-nav-items {
  display: flex;
  align-items: stretch;
  width: 100%;
}

.mob-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 10px 6px 12px;
  text-decoration: none;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: color var(--transition-fast);
  position: relative;
  border: none;
  background: none;
  cursor: pointer;
}

.mob-nav-item:hover { color: var(--pine); }
.mob-nav-item.active { color: var(--pine); }

.mob-nav-item .mnav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  transition: background var(--transition-fast);
  position: relative;
}

.mob-nav-item.active .mnav-icon {
  background: rgba(0, 122, 122, 0.12);
}

/* active indicator pill */
.mob-nav-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 32px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, var(--pine), var(--pine-light));
  transition: transform var(--transition-fast);
}

.mob-nav-item.active::before { transform: translateX(-50%) scaleX(1); }

.mob-nav-badge {
  position: absolute;
  top: -1px;
  right: -1px;
  min-width: 14px;
  height: 14px;
  border-radius: var(--radius-full);
  background: var(--coral);
  color: #fff;
  font-size: 8px;
  font-weight: 800;
  line-height: 14px;
  text-align: center;
  padding: 0 3px;
}

/* Dark mode for mobile bottom nav */
html[data-theme="dark"] .mobile-bottom-nav {
  background: rgba(30, 33, 50, 0.97);
  border-top-color: var(--sage);
  box-shadow: 0 -4px 20px -8px rgba(0, 0, 0, 0.5);
}
html[data-theme="dark"] .mob-nav-item { color: var(--muted); }
html[data-theme="dark"] .mob-nav-item:hover { color: var(--pine-light); }
html[data-theme="dark"] .mob-nav-item.active { color: var(--pine-light); }
html[data-theme="dark"] .mob-nav-item.active .mnav-icon { background: rgba(61, 214, 198, 0.12); }
html[data-theme="dark"] .mob-nav-item.active::before { background: linear-gradient(90deg, var(--pine-light), #8B7CF0); }

/* Dark mode for mobile panel drawer */
html[data-theme="dark"] .mobile-panel__drawer {
  background: #2A2D40;
  border-color: var(--sage);
}
html[data-theme="dark"] .mobile-panel__head { border-bottom-color: var(--sage); }
html[data-theme="dark"] .mobile-panel__footer { border-top-color: var(--sage); }
html[data-theme="dark"] .mobile-panel__name { color: var(--ink); }
html[data-theme="dark"] .mobile-nav-link { color: var(--muted); }
html[data-theme="dark"] .mobile-nav-link:hover { background: rgba(255,255,255,0.05); color: var(--ink); }
html[data-theme="dark"] .mobile-nav-link.active { background: rgba(61,214,198,0.1); color: var(--pine-light); }
html[data-theme="dark"] .mobile-nav-link .mnl-icon { background: rgba(255,255,255,0.05); }
html[data-theme="dark"] .mobile-nav-link.active .mnl-icon { background: rgba(61,214,198,0.15); color: var(--pine-light); }



/* ---------- Spacing Utilities ---------- */
.space-y-4 > * + * { margin-top: 16px; }
.space-y-5 > * + * { margin-top: 20px; }
.space-y-6 > * + * { margin-top: 24px; }

.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 20px; }
.mb-6 { margin-bottom: 24px; }

.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }

/* ---------- Utility ---------- */
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

.hidden { display: none !important; }

/* ---------- Highlight / Glow Animation ---------- */
@keyframes highlight-glow {
  0% { box-shadow: 0 0 0 0 rgba(235, 111, 74, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(235, 111, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(235, 111, 74, 0); }
}

.highlight-new {
  animation: highlight-glow 2s ease-out;
  border-color: var(--coral) !important;
}

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

.animate-in {
  animation: fadeInUp 0.4s ease-out both;
}

/* Staggered animation delays */
.delay-1 { animation-delay: 0.05s; }
.delay-2 { animation-delay: 0.1s; }
.delay-3 { animation-delay: 0.15s; }
.delay-4 { animation-delay: 0.2s; }

/* ---------- Responsive: hide/show ---------- */
.hide-mobile { display: none; }
.hide-desktop { display: flex; }

@media (min-width: 768px) {
  .hide-mobile { display: flex; }
  .hide-desktop { display: none; }
}

@media (min-width: 640px) {
  .sm-show { display: flex !important; }
}

@media (min-width: 1024px) {
  .lg-show { display: inline !important; }
}

/* ---------- Dashboard logo ---------- */
.logo-link { display:flex; align-items:center; gap:10px; text-decoration:none; }
.logo-img { height:36px; width:auto; display:block; object-fit:contain; }
.logo-link .logo-word { font-family:'Fraunces', serif; font-size:22px; font-weight:700; color:var(--pine); letter-spacing:-0.02em; display:inline-block !important; }
.logo-link .logo-badge {
  font-size:11px; font-weight:700; letter-spacing:.04em; text-transform:uppercase;
  color:var(--pine-light); background:var(--sage); padding:3px 9px; border-radius:var(--radius-full);
}

/* ---------- KYC banner ---------- */
.kyc-banner { width:100%; }
.kyc-banner-inner {
  max-width:1240px; margin:0 auto; display:flex; align-items:center; gap:14px;
  padding:12px clamp(16px,3vw,28px);
}
.kyc-banner.warn { background:#FFF6EC; border-bottom:1px solid #F6DFBE; }
.kyc-banner.pending { background:#EEF6F2; border-bottom:1px solid #CFE6DA; }
.kyc-banner-icon { font-size:18px; }
.kyc-banner-text { display:flex; flex-direction:column; line-height:1.3; }
.kyc-banner-text strong { color:var(--ink); font-size:14px; }
.kyc-banner-text span { color:var(--muted); font-size:12.5px; }
.kyc-banner-btn {
  margin-left:auto; flex-shrink:0; background:var(--pine); color:#fff; text-decoration:none;
  font-weight:700; font-size:13px; padding:9px 16px; border-radius:var(--radius-full);
}
.kyc-banner-btn:hover { background:var(--pine-light); }

/* ---------- Data states ---------- */
.dash-loading, .dash-empty {
  grid-column:1/-1; text-align:center; color:var(--muted); padding:40px 16px; font-size:14px;
}
.dash-empty p { margin:0 0 14px; }

/* ---------- Notification Panel (Slide-in sidebar) ---------- */
.notification-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 420px;
  background: var(--white);
  border-left: 1px solid var(--sage);
  box-shadow: var(--shadow-xl);
  /* Above the mobile bottom nav (z-index 100) so the panel covers it when open,
     instead of the nav sitting on top of the notifications. */
  z-index: 200;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.33, 1, 0.68, 1);
  display: flex;
  flex-direction: column;
}

.notification-panel.open {
  transform: translateX(0);
}

.notification-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(22, 51, 44, 0.35);
  z-index: 199;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.notification-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.notification-panel .panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--sage);
}

.notification-panel .panel-title {
  font-family: 'Fraunces', serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--pine);
}

.notification-panel .notif-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

.notif-item {
  display: flex;
  gap: 12px;
  padding: 16px 24px;
  border-bottom: 1px solid rgba(220, 232, 223, 0.5);
  transition: background var(--transition-fast);
  cursor: pointer;
}

.notif-item:hover {
  background: rgba(220, 232, 223, 0.25);
}

.notif-item.unread {
  background: rgba(235, 111, 74, 0.04);
  border-left: 3px solid var(--coral);
}

.notif-item .notif-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notif-icon.booking { background: #E3F1E6; color: #2F7D4F; }
.notif-icon.message { background: #E8EFF9; color: #3B6EC2; }
.notif-icon.review { background: #FBF0DD; color: #B5792A; }
.notif-icon.alert { background: #FBE7E1; color: #C5502E; }
.notif-icon.payout { background: var(--sage); color: var(--pine); }

.notif-item .notif-content {
  flex: 1;
  min-width: 0;
}

.notif-item .notif-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 2px;
}

.notif-item .notif-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

.notif-item .notif-time {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}

/* ============================================================
   Header upgrade — logo wordmark, 3D stage, unique active nav
   + extended theme accents
   ============================================================ */
:root {
  --violet: #6D5AE6;        /* new accent — active nav / highlights */
  --violet-soft: #ECE9FB;
  --sky: #2FA8E0;
  --plum: #B15BD1;
}

/* logo + wordmark */
.logo-link { perspective: 700px; gap: 10px; }
.logo-img { transform-style: preserve-3d; backface-visibility: hidden; will-change: transform; }
.logo-word {
  font-family: 'Fraunces', serif;
  font-size: 21px; font-weight: 700; letter-spacing: -0.02em; line-height: 1;
  background: linear-gradient(120deg, var(--pine) 0%, var(--violet) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
@media (max-width: 480px) { .logo-word { display: none; } }

/* active nav — unique teal→violet highlight */
.nav-link { position: relative; }
.nav-link.active { color: var(--violet); }
.nav-link.active::after {
  background: linear-gradient(90deg, var(--pine), var(--violet)) !important;
  height: 3px; border-radius: 3px 3px 0 0;
  box-shadow: 0 3px 10px rgba(109, 90, 230, 0.35);
}
.nav-link.active::before {
  content: ''; position: absolute; inset: 4px -11px 8px; z-index: -1; border-radius: 10px;
  background: linear-gradient(90deg, rgba(0,122,122,.09), rgba(109,90,230,.10));
}
.nav-link:hover { color: var(--violet); }

/* mobile nav active */
.mobile-nav-link.active { color: var(--violet); background: var(--violet-soft); border-radius: 10px; }

/* notification badge on nav -> violet accent */
.nav-link .badge-count { background: var(--violet); }

/* ============================================================
   Dark mode — Soft twilight theme (easy on eyes, NOT pitch black)
   Applied when <html data-theme="dark">
   Uses warm neutral grays for a comfortable reading experience
   ============================================================ */
html[data-theme="dark"] {
  /* ---- Core surface palette (soft gray, NOT black) ---- */
  --canvas: #1A1D2E;          /* page background — deep indigo-gray */
  --white: #242738;           /* card / surface background */
  --cream: #242738;
  --ink: #E4E6F0;             /* primary text — warm off-white */
  --muted: #9298B0;           /* secondary text — soft lavender-gray */
  --sage: #32364A;            /* borders — subtle dividers */
  --pine-light: #3DD6C6;      /* brighter teal for dark bg contrast */
  --violet-soft: #2D2A45;     /* violet tint background */

  /* ---- Shadows (softer on dark bg) ---- */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.25);
  --shadow-md: 0 4px 14px rgba(0,0,0,0.30);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.35);
  --shadow-xl: 0 14px 40px rgba(0,0,0,0.40);
}

/* ---- Body & global ---- */
html[data-theme="dark"] body { background: var(--canvas); color: var(--ink); }

/* ---- Header ---- */
html[data-theme="dark"] .header {
  /* same brand bloom, tuned for the dark surface */
  background:
    radial-gradient(60% 180% at 8% 0%, rgba(14, 156, 149, 0.20), transparent 62%),
    radial-gradient(45% 160% at 92% 100%, rgba(217, 163, 90, 0.12), transparent 64%),
    rgba(30, 33, 50, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--sage);
  box-shadow: 0 6px 24px -14px rgba(0, 0, 0, 0.7);
}

/* ---- Search bar, icon buttons, chips ---- */
html[data-theme="dark"] .search-bar,
html[data-theme="dark"] .btn-icon,
html[data-theme="dark"] .listings-chip {
  background: #2A2D40;
  border-color: var(--sage);
}
html[data-theme="dark"] .search-bar input {
  color: var(--ink);
}
html[data-theme="dark"] .search-bar input::placeholder {
  color: var(--muted);
}
html[data-theme="dark"] .btn-icon:hover {
  background: #32364A;
}
html[data-theme="dark"] .btn-icon svg { stroke: var(--pine-light); }

/* ---- Dropdowns & panels ---- */
html[data-theme="dark"] .account-popover,
html[data-theme="dark"] .notification-panel,
html[data-theme="dark"] .mobile-panel {
  background: #2A2D40;
  border-color: var(--sage);
  box-shadow: var(--shadow-lg);
}
html[data-theme="dark"] .pop-link { color: var(--ink); }
html[data-theme="dark"] .pop-link:hover { background: rgba(255,255,255,0.06); }
html[data-theme="dark"] .pop-header .email { color: var(--muted); }

/* ---- Logo & nav ---- */
html[data-theme="dark"] .logo-badge { border-color: var(--sage); color: var(--muted); }
html[data-theme="dark"] .logo-word {
  background: linear-gradient(120deg, var(--pine-light) 0%, #8B7CF0 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
html[data-theme="dark"] .nav-link { color: var(--muted); }
html[data-theme="dark"] .nav-link:hover { color: #8B7CF0; }
html[data-theme="dark"] .nav-link.active { color: #8B7CF0; }
html[data-theme="dark"] .nav-link.active::before {
  background: linear-gradient(90deg, rgba(61,214,198,.08), rgba(139,124,240,.10));
}
html[data-theme="dark"] .mobile-nav-link { color: var(--muted); }
html[data-theme="dark"] .mobile-nav-link:hover { color: var(--ink); background: rgba(255,255,255,0.04); }
html[data-theme="dark"] .mobile-nav-link.active { color: #8B7CF0; background: var(--violet-soft); }

/* ---- Cards ---- */
html[data-theme="dark"] .card {
  background: var(--white);
  border-color: var(--sage);
}
html[data-theme="dark"] .card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.28);
  border-color: #3E425A;
}

/* ---- Badges (maintain readability on dark) ---- */
html[data-theme="dark"] .badge-success { background: rgba(47,125,79,0.18); color: #5EC584; }
html[data-theme="dark"] .badge-warning { background: rgba(217,163,90,0.18); color: #E5B86A; }
html[data-theme="dark"] .badge-danger  { background: rgba(197,80,46,0.18); color: #F08060; }
html[data-theme="dark"] .badge-muted   { background: rgba(146,152,176,0.15); color: var(--muted); }

/* ---- Section headers ---- */
html[data-theme="dark"] .section-title { color: var(--pine-light); }
html[data-theme="dark"] .section-label { color: var(--coral); }

/* ---- Buttons ---- */
html[data-theme="dark"] .btn-primary {
  background: var(--pine);
  color: #fff;
}
html[data-theme="dark"] .btn-primary:hover { background: var(--pine-light); }
html[data-theme="dark"] .btn-outline {
  border-color: var(--sage);
  color: var(--ink);
}
html[data-theme="dark"] .btn-outline:hover {
  border-color: var(--pine-light);
  color: var(--pine-light);
  background: rgba(61,214,198,0.06);
}

/* ---- Snapshot tiles ---- */
html[data-theme="dark"] .snapshot-item {
  background: var(--white);
  border-color: var(--sage);
}
html[data-theme="dark"] .snap-icon { filter: brightness(0.88) saturate(1.1); }
html[data-theme="dark"] .snap-value { color: var(--ink); }

/* ---- Quick actions ---- */
html[data-theme="dark"] .qa-item {
  background: var(--white);
  border-color: var(--sage);
  color: var(--ink);
}
html[data-theme="dark"] .qa-item:hover {
  border-color: var(--pine-light);
  box-shadow: 0 4px 16px rgba(61,214,198,0.12);
}
html[data-theme="dark"] .qa-icon { filter: brightness(0.88) saturate(1.1); }

/* ---- Performance / stats cards ---- */
html[data-theme="dark"] .perf-card { background: var(--white); border-color: var(--sage); }
html[data-theme="dark"] .perf-value { color: var(--ink); }
html[data-theme="dark"] .perf-title { color: var(--muted); }
html[data-theme="dark"] .status-bar { background: var(--sage); }
html[data-theme="dark"] .status-legend b { color: var(--ink); }
html[data-theme="dark"] .sparkline .spark-bar { opacity: 0.9; }

/* ---- Reservations ---- */
html[data-theme="dark"] .reservations-card { background: var(--white); border-color: var(--sage); }
html[data-theme="dark"] .res-tab {
  background: var(--white);
  border-color: var(--sage);
  color: var(--muted);
}
html[data-theme="dark"] .res-tab:hover { border-color: var(--pine-light); color: var(--pine-light); }
html[data-theme="dark"] .res-tab.active { background: var(--pine); border-color: var(--pine); color: #fff; }
html[data-theme="dark"] .res-tab .tab-count { background: var(--sage); color: var(--pine-light); }
html[data-theme="dark"] .res-tab.active .tab-count { background: rgba(255,255,255,.2); color: #fff; }
html[data-theme="dark"] .res-item { border-bottom-color: var(--sage); }
html[data-theme="dark"] .res-guest { color: var(--ink); }
html[data-theme="dark"] .res-amount { color: var(--pine-light); }

/* ---- Today's schedule ---- */
html[data-theme="dark"] .sched-item {
  background: #2A2D40;
  border-color: var(--sage);
}
html[data-theme="dark"] .sched-item:hover { border-color: var(--pine-light); }
html[data-theme="dark"] .sched-in  { background: rgba(0,122,122,0.18); color: var(--pine-light); }
html[data-theme="dark"] .sched-out { background: rgba(217,163,90,0.18); color: #E5B86A; }
html[data-theme="dark"] .sched-text strong { color: var(--ink); }

/* ---- Activity feed ---- */
html[data-theme="dark"] .activity-item { border-bottom-color: var(--sage); }
html[data-theme="dark"] .activity-item::before { background: var(--sage); }
html[data-theme="dark"] .activity-dot { box-shadow: 0 0 0 4px var(--white); }
html[data-theme="dark"] .activity-title { color: var(--ink); }
html[data-theme="dark"] .activity-title span { color: var(--pine-light); }

/* ---- Notification items ---- */
html[data-theme="dark"] .notif-item { border-bottom-color: var(--sage); }
html[data-theme="dark"] .notif-item:hover { background: rgba(255,255,255,0.03); }
html[data-theme="dark"] .notif-item.unread { background: rgba(61,214,198,0.04); }
html[data-theme="dark"] .notif-title { color: var(--ink); }

/* ---- Toast notifications ---- */
html[data-theme="dark"] .notification-toast {
  background: #2A2D40;
  border-color: var(--sage);
  box-shadow: var(--shadow-xl);
}

/* ---- Modals ---- */
html[data-theme="dark"] .modal-overlay { background: rgba(10,10,20,0.65); }
html[data-theme="dark"] .modal-content {
  background: #2A2D40;
  border: 1px solid var(--sage);
}
html[data-theme="dark"] .modal-header { border-bottom-color: var(--sage); }
html[data-theme="dark"] .modal-footer { border-top-color: var(--sage); }
html[data-theme="dark"] .detail-label { color: var(--muted); }
html[data-theme="dark"] .detail-value { color: var(--ink); }

/* ---- Inputs & selects ---- */
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  background: #2A2D40;
  border-color: var(--sage);
  color: var(--ink);
}
html[data-theme="dark"] input:focus,
html[data-theme="dark"] select:focus,
html[data-theme="dark"] textarea:focus {
  border-color: var(--pine-light);
  box-shadow: 0 0 0 3px rgba(61,214,198,0.12);
}

/* ---- Filter chips ---- */
html[data-theme="dark"] .filter-chip {
  background: var(--white);
  border-color: var(--sage);
  color: var(--muted);
}
html[data-theme="dark"] .filter-chip:hover { border-color: var(--pine-light); color: var(--pine-light); }
html[data-theme="dark"] .filter-chip.active { background: var(--pine); border-color: var(--pine); color: #fff; }

/* ---- Dash empty state ---- */
html[data-theme="dark"] .dash-empty { color: var(--muted); }
html[data-theme="dark"] .dash-loading { color: var(--muted); }

/* ---- KYC banner ---- */
html[data-theme="dark"] .kyc-banner { background: #2A2D40; border-color: var(--sage); }

/* ---- Scrollbar styling ---- */
html[data-theme="dark"] ::-webkit-scrollbar { width: 8px; height: 8px; }
html[data-theme="dark"] ::-webkit-scrollbar-track { background: transparent; }
html[data-theme="dark"] ::-webkit-scrollbar-thumb { background: var(--sage); border-radius: 4px; }
html[data-theme="dark"] ::-webkit-scrollbar-thumb:hover { background: #444866; }

/* ---- Logo image invert for dark bg ---- */
html[data-theme="dark"] .logo-img { filter: brightness(1.1) contrast(1.05); }

/* ============================================================
   Host dashboard utility bar (partials/footer.html)
   A quiet legal/help strip — NOT a nav footer. The header already
   carries the full navigation, so repeating it here would just be
   duplication on every page.
   ============================================================ */
.dash-footer {
  margin-top: auto;
  border-top: 1px solid var(--sage);
  background: var(--cream);
}
.dash-footer__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 16px;
  padding-bottom: 16px;
}
.dash-footer__copy {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}
.dash-footer__links { display: flex; flex-wrap: wrap; gap: 18px; }
.dash-footer__links a {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  transition: color var(--transition-fast);
}
.dash-footer__links a:hover { color: var(--pine); }

@media (max-width: 480px) {
  .dash-footer__bar { flex-direction: column; align-items: flex-start; gap: 8px; }
  .dash-footer__links { gap: 14px; }
}

html[data-theme="dark"] .dash-footer { background: transparent; }

@media (prefers-reduced-motion: reduce) {
  .dash-footer__links a { transition: none !important; }
}

/* ============================================================
   Live notification alerts (static/js/host/dash/notify-alert.js)
   Bottom-anchored stack, above the footer.
   ============================================================ */
.liv-notify-stack {
  position: fixed;
  right: 16px;                      /* bottom-RIGHT, not centred over the page */
  bottom: 16px;
  z-index: 120;
  display: flex;
  flex-direction: column-reverse;   /* newest nearest the bottom edge */
  gap: 10px;
  width: min(400px, calc(100vw - 32px));
  pointer-events: none;             /* only the cards catch clicks */
}

.liv-alert {
  position: relative;
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 14px 15px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(120% 160% at 0% 0%, rgba(14, 156, 149, 0.55), transparent 62%),
    radial-gradient(120% 160% at 100% 100%, rgba(217, 163, 90, 0.28), transparent 62%),
    rgba(30, 45, 52, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 44px -16px rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateY(14px) scale(0.98);
  transition: opacity 0.28s ease, transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.liv-alert.is-in { opacity: 1; transform: none; }
.liv-alert.is-out { opacity: 0; transform: translateY(10px) scale(0.98); }

.liv-alert__ic {
  flex-shrink: 0;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--pine-light);
  background: rgba(14, 156, 149, 0.18);
  border: 1px solid rgba(14, 156, 149, 0.35);
}
.liv-alert__body { min-width: 0; flex: 1; }
.liv-alert__title { margin: 0; font-size: 13.5px; font-weight: 800; line-height: 1.35; }
.liv-alert__msg {
  margin: 2px 0 0;
  font-size: 12.5px; line-height: 1.45;
  color: rgba(255, 255, 255, 0.72);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.liv-alert__time {
  display: inline-block; margin-top: 5px;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.04em;
  color: var(--gold);
}
.liv-alert__x {
  flex-shrink: 0;
  width: 22px; height: 22px; line-height: 1;
  border: 0; border-radius: 50%;
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
  font-size: 17px; cursor: pointer;
  transition: color var(--transition-fast), background var(--transition-fast);
}
.liv-alert__x:hover { color: #fff; background: rgba(255, 255, 255, 0.12); }

/* countdown bar — visually ties the alert to its auto-dismiss */
.liv-alert__bar {
  position: absolute; left: 0; bottom: 0; height: 2px;
  width: 100%;
  transform-origin: left;
  background: linear-gradient(90deg, var(--pine-light), var(--gold));
  animation: livAlertBar 8s linear forwards;
}
.liv-alert.is-held .liv-alert__bar { animation-play-state: paused; }
@keyframes livAlertBar { from { transform: scaleX(1); } to { transform: scaleX(0); } }

@media (max-width: 560px) {
  .liv-notify-stack { left: 16px; right: 16px; width: auto; bottom: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .liv-alert { transition: opacity 0.2s ease !important; transform: none !important; }
  .liv-alert__bar { animation: none; }
}

/* Toast stack — bottom-anchored, sitting just above the live notification
   alerts. It used to be pinned inline at top:84px/right:16px on every page,
   which is why alerts appeared at the top instead of near the footer. */
.toast-stack-bottom {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 110;                 /* under .liv-notify-stack (120) */
  display: flex;
  flex-direction: column-reverse;
  gap: 12px;
  max-width: min(380px, calc(100vw - 32px));
  pointer-events: none;
}
.toast-stack-bottom > * { pointer-events: auto; }

/* When live alerts are centred at the bottom, lift the toasts clear of them. */
/* Live alerts own the bottom-right corner; push form toasts above them so the
   two stacks never overlap. */
@media (min-width: 561px) {
  .toast-stack-bottom { bottom: 16px; }
  body:has(.liv-alert) .toast-stack-bottom { bottom: 190px; }
}
@media (max-width: 560px) {
  .toast-stack-bottom { left: 16px; right: 16px; max-width: none; bottom: 96px; }
}

/* ============================================================
   Suspended account banner (static/js/host/dash/dash-auth.js)
   Shown when an admin suspends the host — replaces the misleading
   "Complete your KYC" prompt these accounts used to get.
   ============================================================ */
.acct-suspended {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px clamp(16px, 4vw, 32px);
  color: #fff;
  background:
    radial-gradient(70% 180% at 0% 0%, rgba(235, 111, 74, 0.55), transparent 60%),
    linear-gradient(90deg, #8E2F14, #B8431F);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 8px 22px -14px rgba(0, 0, 0, 0.6);
}
.acct-suspended__ic {
  flex-shrink: 0;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
}
.acct-suspended__body { flex: 1; min-width: 220px; }
.acct-suspended__title { margin: 0; font-size: 14.5px; font-weight: 800; }
.acct-suspended__msg {
  margin: 2px 0 0;
  font-size: 13px; line-height: 1.5;
  color: rgba(255, 255, 255, 0.85);
}
.acct-suspended__actions { flex-shrink: 0; }
.acct-suspended__btn {
  display: inline-flex; align-items: center;
  padding: 9px 18px;
  border-radius: var(--radius-full);
  background: #fff; color: #8E2F14;
  font-size: 13px; font-weight: 800;
  text-decoration: none;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.acct-suspended__btn:hover { transform: translateY(-1px); box-shadow: 0 8px 18px -8px rgba(0, 0, 0, 0.5); }

@media (max-width: 560px) {
  .acct-suspended { flex-direction: column; align-items: flex-start; gap: 10px; }
  .acct-suspended__actions { width: 100%; }
  .acct-suspended__btn { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) { .acct-suspended__btn { transition: none !important; } }

/* ============================================================
   Listing wizard exit guard (static/js/host/listing-exit-guard.js)
   ============================================================ */
.exit-guard {
  position: fixed; inset: 0; z-index: 300;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.6);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.exit-guard__box {
  width: 100%; max-width: 430px;
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 26px;
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.5);
  animation: exitGuardIn .24s cubic-bezier(.2,.8,.2,1);
}
@keyframes exitGuardIn { from { opacity:0; transform: translateY(12px) scale(.98); } to { opacity:1; transform:none; } }
.exit-guard__box h2 { margin: 0 0 8px; font-size: 19px; font-weight: 800; color: var(--ink); }
.exit-guard__box p { margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--muted); }
.exit-guard__actions { display: flex; gap: 10px; margin-top: 22px; }
.exit-guard__stay, .exit-guard__leave {
  flex: 1; padding: 11px 16px;
  border-radius: var(--radius-full);
  font-size: 13.5px; font-weight: 800; cursor: pointer;
  transition: filter var(--transition-base), background var(--transition-base);
}
.exit-guard__stay { border: 1px solid var(--sage); background: var(--white); color: var(--ink); }
.exit-guard__stay:hover { background: var(--canvas); }
.exit-guard__leave { border: 0; background: var(--coral); color: #fff; }
.exit-guard__leave:hover { filter: brightness(1.06); }

@media (prefers-reduced-motion: reduce) { .exit-guard__box { animation: none; } }

/* ============================================================
   Verification reminder popup (dashboard)
   ============================================================ */
.vr-pop {
  position: fixed; right: 20px; bottom: 20px; z-index: 130;
  width: calc(100% - 40px); max-width: 380px;
  background: #fff; border: 1px solid var(--sage); border-radius: 18px;
  box-shadow: 0 24px 60px -18px rgba(0, 0, 0, .35);
  padding: 16px 16px 14px;
  transform: translateY(20px) scale(.98); opacity: 0;
  transition: transform .3s cubic-bezier(.2,.8,.2,1), opacity .3s;
}
.vr-pop.is-open { transform: none; opacity: 1; }
.vr-pop__head { display: flex; align-items: flex-start; gap: 11px; }
.vr-pop__badge {
  flex: 0 0 auto; width: 38px; height: 38px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(140deg, var(--pine), var(--pine-light)); color: #fff; font-size: 17px;
}
.vr-pop__title { flex: 1; min-width: 0; }
.vr-pop__title strong { display: block; font-size: 14.5px; color: var(--ink); }
.vr-pop__title span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.vr-pop__close {
  flex: 0 0 auto; border: 0; background: none; cursor: pointer;
  font-size: 22px; line-height: 1; color: var(--muted); padding: 0 2px;
}
.vr-pop__close:hover { color: var(--ink); }

.vr-pop__items { margin: 12px 0 8px; display: flex; flex-direction: column; gap: 8px; }
.vr-item {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px;
  border: 1px solid var(--sage); border-radius: var(--radius-md); background: var(--canvas);
}
.vr-item__icon {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(217, 163, 90, .16); color: #B5792A; font-size: 13px;
}
.vr-item__body { flex: 1; min-width: 0; }
.vr-item__body strong { display: block; font-size: 13px; color: var(--ink); font-weight: 700; }
.vr-item__body span { display: block; font-size: 11.5px; color: var(--muted); margin-top: 1px; line-height: 1.4; }
.vr-item__go {
  flex: 0 0 auto; padding: 6px 14px; border-radius: var(--radius-full);
  border: 1.5px solid var(--pine); color: var(--pine); background: #fff;
  font-size: 12px; font-weight: 700; text-decoration: none; transition: all .15s;
}
.vr-item__go:hover { background: var(--pine); color: #fff; }

.vr-pop__later {
  width: 100%; border: 0; background: none; cursor: pointer;
  color: var(--muted); font-size: 12.5px; font-weight: 600; padding: 6px 0 2px;
}
.vr-pop__later:hover { color: var(--ink); }

@media (max-width: 480px) { .vr-pop { right: 12px; left: 12px; bottom: 12px; width: auto; } }
html[data-theme="dark"] .vr-pop { background: #16211F; }
html[data-theme="dark"] .vr-item { background: rgba(255,255,255,.03); }
