/* ── SNL REAL ESTATE — DASHBOARD SHARED ────────────────── */

/* ── LAYOUT SHELL ─────────────────────────────────────── */
.dash-layout {
  min-height: 100vh;
}

/* ── SIDEBAR ──────────────────────────────────────────── */
.sidebar {
  background: var(--black);
  position: fixed; top: 0; left: 0; bottom: 0;
  width: 260px; z-index: 200;
  display: flex; flex-direction: column;
  border-right: 1px solid rgba(255,255,255,0.06);
  overflow-y: auto;
}
.sidebar-logo {
  padding: 2rem 1.5rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.sidebar-logo-row {
  position: relative;
}

.sidebar-brand-copy {
  margin-top: 1rem;
  text-align: center;
}

.sidebar-brand-kicker {
  font-size: 0.54rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  margin-bottom: 0.35rem;
}

.sidebar-brand-title {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 300;
  letter-spacing: 0.02em;
  color: rgba(255,255,255,0.86);
}

.brand-logo {
  display: block;
  width: auto;
  height: auto;
}

.brand-logo-sidebar {
  height: 92px;
  margin: 0 auto;
  filter: brightness(0) invert(1);
}

.sidebar-close,
.sidebar-scrim {
  display: none;
}

.sidebar-scrim[hidden] {
  display: none !important;
}

.sidebar-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  color: var(--white);
  cursor: pointer;
  font-size: 1.3rem;
  font-family: inherit;
  line-height: 1;
  transform: translateZ(0);
}

.sidebar-section {
  font-size: 0.57rem; font-weight: 500; letter-spacing: 0.18em;
  text-transform: uppercase; color: rgba(255,255,255,0.25);
  padding: 1.5rem 1.5rem 0.5rem;
}
.sidebar-nav { display: flex; flex-direction: column; padding: 0.5rem 0.875rem; flex: 1; gap: 2px; }

.nav-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.72rem 0.875rem; border-radius: 8px;
  color: rgba(255,255,255,0.45); font-size: 0.82rem; font-weight: 400;
  text-decoration: none; cursor: pointer; border: none;
  background: none; width: 100%; text-align: left;
  transition: all 0.18s ease; letter-spacing: 0.02em;
}
.nav-item:hover  { color: var(--white); background: rgba(255,255,255,0.06); }
.nav-item.active { color: var(--white); background: rgba(255,255,255,0.1); }
.nav-item.active::before {
  content: ''; display: block; width: 2px; height: 14px;
  background: var(--white); border-radius: 2px; flex-shrink: 0;
}
.nav-icon { width: 16px; text-align: center; opacity: 0.65; flex-shrink: 0; }

.sidebar-footer {
  padding: 1rem 0.875rem;
  border-top: 1px solid rgba(255,255,255,0.07);
}
.sidebar-user {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.75rem 0.875rem; margin-bottom: 0.25rem;
}
.sidebar-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(122,122,122,0.2); border: 1px solid rgba(122,122,122,0.4);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 0.9rem; color: rgba(255,255,255,0.82);
  flex-shrink: 0; font-weight: 400;
}
.sidebar-name { font-size: 0.8rem; color: var(--white); font-weight: 400; }
.sidebar-role { font-size: 0.6rem; color: rgba(255,255,255,0.32); letter-spacing: 0.08em; text-transform: uppercase; margin-top: 2px; }

/* ── MAIN ─────────────────────────────────────────────── */
.dash-main {
  margin-left: 260px; display: flex; flex-direction: column;
  min-height: 100vh; background: #f4f5f7;
}

/* ── TOPBAR ───────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.92); backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0,0,0,0.07);
  padding: 0 2rem; height: 68px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
}
.topbar-title {
  font-family: var(--serif); font-size: 1.5rem; font-weight: 300;
  color: var(--black); letter-spacing: -0.01em; white-space: nowrap;
}
.topbar-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}
.topbar-kicker {
  font-size: 0.54rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(0,0,0,0.42);
}
.topbar-right { display: flex; align-items: center; gap: 0.875rem; flex-shrink: 0; }
.notify-wrap { position: relative; display: flex; align-items: center; }
.notify-btn {
  position: relative; width: 40px; height: 40px;
  border: 1px solid rgba(0,0,0,0.08); border-radius: 12px;
  background: rgba(255,255,255,0.92); color: var(--dark);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.notify-btn:hover {
  border-color: rgba(122,122,122,0.35);
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
  transform: translateY(-1px);
}
.notify-btn.active {
  border-color: rgba(122,122,122,0.4);
  box-shadow: 0 10px 24px rgba(0,0,0,0.1);
}
.notify-icon { font-size: 1rem; line-height: 1; }
.notify-badge {
  position: absolute; top: -5px; right: -5px;
  min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: 999px; background: var(--black); color: var(--white);
  font-size: 0.62rem; font-weight: 500; line-height: 19px; text-align: center;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.92);
}
.notify-panel {
  position: absolute; top: calc(100% + 10px); right: 0;
  width: min(360px, calc(100vw - 2rem));
  background: rgba(255,255,255,0.98); border: 1px solid rgba(0,0,0,0.08);
  border-radius: 16px; box-shadow: 0 24px 60px rgba(0,0,0,0.14);
  overflow: hidden; z-index: 220;
}
.notify-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 1rem 1rem 0.9rem; border-bottom: 1px solid rgba(0,0,0,0.06);
}
.notify-panel-title {
  font-family: var(--serif); font-size: 1rem; color: var(--black);
}
.notify-clear-btn {
  border: none; background: transparent; color: var(--black);
  font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase;
  cursor: pointer;
}
.notify-panel-body {
  max-height: 360px; overflow-y: auto; padding: 0.35rem;
}
.notify-item {
  width: 100%; border: none; background: transparent; cursor: pointer;
  display: flex; gap: 0.85rem; text-align: left;
  padding: 0.9rem; border-radius: 12px; transition: background 0.18s ease;
}
.notify-item:hover { background: #f6f7f8; }
.notify-item-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--black);
  flex: none; margin-top: 0.45rem;
}
.notify-item-title {
  font-size: 0.82rem; font-weight: 500; color: var(--black); margin-bottom: 0.2rem;
}
.notify-item-body {
  font-size: 0.76rem; line-height: 1.55; color: var(--dark);
}
.notify-item-time {
  font-size: 0.66rem; color: var(--muted); margin-top: 0.35rem;
}
.notify-empty {
  padding: 1.25rem 1rem; text-align: center; color: var(--muted); font-size: 0.78rem;
}
.topbar-tag {
  font-size: 0.58rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--black); border: 1px solid rgba(0,0,0,0.18);
  padding: 0.3rem 0.875rem; border-radius: 20px;
  background: rgba(0,0,0,0.04); white-space: nowrap;
}

/* ── CONTENT ──────────────────────────────────────────── */
.content { padding: 2rem 2rem; flex: 1; }
.content-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }

/* ── STAT CARDS ───────────────────────────────────────── */
.stats-row {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1rem; margin-bottom: 1.5rem;
}
.stat-card {
  background: var(--white); border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.06);
  padding: 1.5rem 1.5rem 1.35rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative; overflow: hidden;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.1);
}
.stat-card::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 3px; background: linear-gradient(90deg, var(--black), #BEBEBE);
  border-radius: 14px 14px 0 0;
}
.stat-icon {
  font-size: 1.25rem; margin-bottom: 1rem;
}
.stat-val {
  font-family: var(--serif); font-size: 2.5rem; font-weight: 300;
  color: var(--black); line-height: 1; margin-bottom: 0.4rem;
}
.stat-lbl {
  font-size: 0.65rem; color: var(--muted);
  letter-spacing: 0.1em; text-transform: uppercase; font-weight: 500;
}
.stat-trend { font-size: 0.72rem; color: var(--success); margin-top: 0.4rem; }

/* ── PANEL / CARD ─────────────────────────────────────── */
.panel {
  background: var(--white); border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  margin-bottom: 1.25rem; overflow: hidden;
}
.panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 1.5rem; border-bottom: 1px solid rgba(0,0,0,0.06);
}
.panel-title {
  font-family: var(--serif); font-size: 1.1rem; font-weight: 300;
  color: var(--black); letter-spacing: -0.01em;
}
.panel-body { padding: 1.5rem; }

/* ── TABLE ────────────────────────────────────────────── */
.table-controls {
  display: flex; align-items: center; gap: 0.875rem;
  padding: 1rem 1.5rem; border-bottom: 1px solid rgba(0,0,0,0.06);
  flex-wrap: wrap;
}
.search-wrap { position: relative; flex: 1; min-width: 200px; }
.search-wrap svg { position: absolute; left: 0.875rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-input {
  width: 100%; background: #f4f5f7; border: 1px solid rgba(0,0,0,0.1);
  border-radius: 8px; padding: 0.6rem 1rem 0.6rem 2.5rem;
  font-family: var(--sans); font-size: 0.82rem; color: var(--dark);
  outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.search-input::placeholder { color: var(--muted); }
.search-input:focus { border-color: var(--black); box-shadow: 0 0 0 3px rgba(8,8,8,0.08); }
.filter-select {
  background: #f4f5f7; border: 1px solid rgba(0,0,0,0.1);
  border-radius: 8px; padding: 0.6rem 1rem;
  font-family: var(--sans); font-size: 0.82rem;
  color: var(--dark); outline: none; cursor: pointer;
  -webkit-appearance: none; transition: border-color 0.2s;
}
.filter-select:focus { border-color: var(--black); }

table { width: 100%; border-collapse: collapse; }
th {
  text-align: left; font-size: 0.6rem; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
  padding: 0.875rem 1.25rem; border-bottom: 1px solid rgba(0,0,0,0.06);
  background: #fafafa;
}
td {
  padding: 1rem 1.25rem; border-bottom: 1px solid rgba(0,0,0,0.05);
  font-size: 0.875rem; color: var(--dark); vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: #fafbfc; }
.td-name { font-weight: 500; color: var(--black); }
.td-sub  { font-size: 0.75rem; color: var(--muted); margin-top: 2px; }

/* ── MODAL ────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(8,8,8,0.45); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem; opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--white); border-radius: 16px;
  border: 1px solid rgba(0,0,0,0.08);
  width: 100%; max-width: 520px; max-height: 88vh; overflow-y: auto;
  box-shadow: 0 32px 80px rgba(0,0,0,0.18);
  transform: translateY(20px) scale(0.98); transition: transform 0.3s ease;
}
.modal-overlay.open .modal { transform: translateY(0) scale(1); }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 1.5rem; border-bottom: 1px solid rgba(0,0,0,0.06);
}
.modal-title { font-family: var(--serif); font-size: 1.1rem; font-weight: 300; color: var(--black); }
.modal-close {
  width: 30px; height: 30px; background: #f4f5f7; border: none;
  border-radius: 50%; color: var(--muted); cursor: pointer; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.modal-close:hover { background: var(--black); color: var(--white); }
.modal-body   { padding: 1.5rem; }
.modal-footer {
  display: flex; gap: 0.75rem; justify-content: flex-end;
  padding: 1rem 1.5rem; border-top: 1px solid rgba(0,0,0,0.06);
  background: #fafafa; border-radius: 0 0 16px 16px;
}

/* ── FORM FIELDS ──────────────────────────────────────── */
.field { margin-bottom: 1.25rem; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field label {
  display: block; font-size: 0.6rem; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 0.4rem;
}
.field input, .field select, .field textarea {
  width: 100%; background: #f4f5f7;
  border: 1px solid rgba(0,0,0,0.1); border-radius: 8px;
  padding: 0.7rem 0.875rem; font-family: var(--sans);
  font-size: 0.875rem; color: var(--dark); outline: none;
  transition: border-color 0.2s, box-shadow 0.2s; -webkit-appearance: none;
}
.field input::placeholder, .field textarea::placeholder { color: var(--muted); }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--black); box-shadow: 0 0 0 3px rgba(8,8,8,0.08);
}
.field select option { background: var(--white); }
.field textarea { resize: vertical; min-height: 90px; }
.field-lbl-sm {
  font-size: 0.58rem; font-weight: 500; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 0.2rem;
}
.field-val {
  font-size: 0.875rem; color: var(--dark); padding: 0.35rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.07);
}

/* ── MESSAGE THREAD ───────────────────────────────────── */
.msg-thread { display: flex; flex-direction: column; gap: 1rem; }
.msg-meta { font-size: 0.65rem; color: var(--muted); letter-spacing: 0.06em; margin-bottom: 0.3rem; }
.msg-bubble {
  display: inline-block; max-width: 72%;
  padding: 0.75rem 1rem; font-size: 0.875rem; line-height: 1.6;
  border-radius: 12px;
}
.msg-in  .msg-bubble { background: #f4f5f7; border: 1px solid rgba(0,0,0,0.07); color: var(--dark); }
.msg-out { text-align: right; }
.msg-out .msg-bubble { background: var(--black); color: rgba(255,255,255,0.88); }

/* ── TOAST ────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 600;
  background: var(--black); color: var(--white);
  padding: 0.875rem 1.25rem; font-size: 0.82rem; letter-spacing: 0.02em;
  border-radius: 10px; box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  transform: translateY(80px); opacity: 0;
  transition: all 0.35s cubic-bezier(0.34,1.56,0.64,1);
  pointer-events: none; max-width: 320px;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast-success { border-left: 3px solid var(--white); }
.toast-error   { border-left: 3px solid var(--hot); }
.toast-info    { border-left: 3px solid var(--black); }

/* ── EMPTY STATE ──────────────────────────────────────── */
.empty { text-align: center; padding: 4rem 2rem; color: var(--muted); }
.empty-icon { font-size: 2.5rem; margin-bottom: 1rem; opacity: 0.4; }
.empty-title { font-family: var(--serif); font-size: 1.1rem; font-weight: 300; color: var(--dark); margin-bottom: 0.5rem; }
.empty p { font-size: 0.82rem; }

/* ── APPOINTMENT CARD (client) ────────────────────────── */
.client-home-header {
  margin-bottom: 2rem;
}

.client-home-title {
  font-family: var(--serif);
  font-size: 1.85rem;
  font-weight: 300;
  color: var(--black);
  letter-spacing: -0.01em;
  margin-bottom: 0.45rem;
}

.client-home-copy {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.7;
}

.client-next-step-panel {
  margin-bottom: 1.5rem;
}

.client-next-step-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(240px, 320px);
  gap: 1.25rem;
  align-items: stretch;
}

.client-next-step-copy,
.client-next-step-status {
  border-radius: 18px;
  padding: 1.3rem;
  border: 1px solid rgba(0,0,0,0.07);
}

.client-next-step-copy {
  background: linear-gradient(180deg, #101010 0%, #181818 100%);
  color: var(--white);
}

.client-next-step-kicker {
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.52);
  margin-bottom: 0.85rem;
}

.client-next-step-title {
  font-family: var(--serif);
  font-size: 2.05rem;
  font-weight: 300;
  line-height: 1;
  margin-bottom: 0.8rem;
}

.client-next-step-text {
  color: rgba(255,255,255,0.72);
  font-size: 0.9rem;
  line-height: 1.8;
  margin-bottom: 1.15rem;
  max-width: 56ch;
}

.client-next-step-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.client-next-step-status {
  background: linear-gradient(180deg, #f8f8f8 0%, #f1f1f1 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.client-next-step-badge {
  align-self: flex-start;
  display: inline-flex;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: var(--black);
  color: var(--white);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.client-next-step-meta {
  display: grid;
  gap: 0.95rem;
}

.client-next-step-meta span,
.client-search-status-label {
  display: block;
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.client-next-step-meta strong {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--black);
}

.client-search-status-panel {
  margin-bottom: 1.5rem;
}

.client-search-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  text-align: center;
}

.client-search-status-card {
  padding: 0.75rem;
  border-radius: 14px;
  background: #fafafa;
  border: 1px solid rgba(0,0,0,0.06);
}

.client-search-status-value {
  font-size: 0.92rem;
  color: var(--dark);
}

.client-home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.client-intent-panel {
  margin-bottom: 1.5rem;
}

.client-intent-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.client-intent-grid .btn {
  width: 100%;
}

.client-action-queue {
  display: grid;
  gap: 0;
}

.appt-card {
  display: flex; align-items: center; gap: 1.5rem;
  padding: 1.25rem 1.5rem; border-bottom: 1px solid rgba(0,0,0,0.05);
  transition: background 0.2s;
}
.appt-card:hover { background: #fafbfc; }
.appt-card:last-child { border-bottom: none; }
.appt-date-box {
  text-align: center; min-width: 52px;
  border-right: 1px solid rgba(0,0,0,0.08); padding-right: 1.5rem;
}
.appt-day  { font-family: var(--serif); font-size: 1.75rem; font-weight: 300; color: var(--black); line-height: 1; }
.appt-mon  { font-size: 0.6rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }
.appt-info { flex: 1; }
.appt-type { font-size: 0.875rem; font-weight: 500; color: var(--black); }
.appt-time { font-size: 0.75rem; color: var(--muted); margin-top: 2px; }
.appt-provider {
  display: inline-flex; align-items: center;
  margin-top: 0.45rem; padding: 0.18rem 0.55rem;
  border-radius: 999px; background: rgba(122,122,122,0.1);
  color: var(--dark); font-size: 0.62rem; letter-spacing: 0.08em;
  text-transform: uppercase;
}

.booking-panel {
  display: grid; grid-template-columns: minmax(240px, 320px) 1fr;
  gap: 1.5rem; align-items: stretch;
}
.booking-copy {
  display: flex; flex-direction: column; justify-content: center;
}
.booking-kicker {
  font-size: 0.6rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--black); margin-bottom: 0.6rem;
}
.booking-title {
  font-family: var(--serif); font-size: 1.7rem; font-weight: 300;
  color: var(--black); line-height: 1.05; margin-bottom: 0.75rem;
}
.booking-text {
  font-size: 0.84rem; color: var(--muted); line-height: 1.75;
  margin-bottom: 1.25rem;
}
.booking-embed-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 180px; border: 1px dashed rgba(0,0,0,0.12); border-radius: 16px;
  background: #fafafa; padding: 2rem; text-align: center;
}
.booking-placeholder-icon { font-size: 2.25rem; margin-bottom: 0.75rem; }
.booking-placeholder-text { color: var(--muted); font-size: 0.84rem; line-height: 1.7; margin: 0; }

/* ── Booking Modal ── */
.booking-splash-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.62);
  display: flex; align-items: center; justify-content: center;
  z-index: 1001; padding: clamp(0.75rem, 2vh, 1.25rem);
  overflow-y: auto;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease;
}
.booking-splash-overlay.open {
  opacity: 1; pointer-events: all;
}
.booking-splash-card {
  width: min(100%, 460px);
  background: linear-gradient(180deg, #f6f1e8 0%, #ffffff 100%);
  border-radius: 24px;
  padding: 1.5rem 1.25rem 1.25rem;
  position: relative;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0,0,0,0.18);
  transform: translateY(24px) scale(0.98);
  transition: transform 0.25s ease;
  text-align: center;
}
.booking-splash-overlay.open .booking-splash-card {
  transform: translateY(0) scale(1);
}
.booking-splash-close {
  position: absolute; top: 1rem; right: 1rem;
  background: none; border: none; font-size: 1.5rem; line-height: 1;
  cursor: pointer; color: var(--muted); padding: 0.25rem 0.5rem;
  border-radius: 6px; transition: background 0.15s;
}
.booking-splash-close:hover { background: rgba(0,0,0,0.06); color: var(--black); }
.booking-splash-kicker {
  font-size: 0.64rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 0.75rem;
}
.booking-splash-title {
  font-family: var(--serif); font-size: 1.75rem; font-weight: 300;
  color: var(--black); margin-bottom: 0.85rem;
}
.booking-splash-copy {
  color: var(--muted); line-height: 1.8; font-size: 0.92rem;
  max-width: 420px; margin: 0 auto 1.4rem;
}
.booking-splash-actions {
  display: flex; justify-content: center; gap: 0.75rem; flex-wrap: wrap;
}
.booking-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 1rem;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease;
}
.booking-modal-overlay.open {
  opacity: 1; pointer-events: all;
}
.booking-modal {
  background: var(--white); border-radius: 20px; overflow: hidden;
  width: 100%; max-width: 780px; max-height: 90vh;
  display: flex; flex-direction: column;
  transform: translateY(24px) scale(0.98);
  transition: transform 0.25s ease;
  box-shadow: 0 24px 64px rgba(0,0,0,0.18);
}
.booking-modal-overlay.open .booking-modal {
  transform: translateY(0) scale(1);
}
.booking-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 1.5rem; border-bottom: 1px solid rgba(0,0,0,0.07);
  flex-shrink: 0;
}
.booking-modal-title {
  font-family: var(--serif); font-size: 1.2rem; font-weight: 300; letter-spacing: -0.01em;
}
.booking-modal-close {
  background: none; border: none; font-size: 1.5rem; line-height: 1;
  cursor: pointer; color: var(--muted); padding: 0.25rem 0.5rem;
  border-radius: 6px; transition: background 0.15s;
}
.booking-modal-close:hover { background: rgba(0,0,0,0.06); color: var(--black); }
.booking-modal-body {
  flex: 1; overflow: hidden; min-height: 0;
}
.booking-modal-body iframe {
  width: 100%; height: 680px; border: none; display: block;
}

@media (max-width: 640px) {
  .client-home-title {
    font-size: 1.55rem;
  }
  .client-next-step-title {
    font-size: 1.6rem;
  }
  .client-intent-grid {
    grid-template-columns: 1fr;
  }
  .booking-splash-card {
    padding: 1.75rem 1.1rem 1.25rem;
  }
  .booking-splash-title {
    font-size: 1.7rem;
  }
  .booking-splash-actions .btn {
    width: 100%;
  }
}

@media (max-height: 820px) {
  .booking-splash-overlay {
    align-items: flex-start;
  }
  .booking-splash-card {
    margin: auto;
    max-height: calc(100vh - 1.5rem);
    border-radius: 20px;
    padding: 1.25rem 1.1rem 1.1rem;
  }
  .booking-splash-title {
    font-size: 1.55rem;
    margin-bottom: 0.7rem;
  }
  .booking-splash-copy {
    line-height: 1.65;
    margin-bottom: 1rem;
  }
}

.integration-card {
  border: 1px solid rgba(0,0,0,0.07); border-radius: 14px; background: #fafafa;
  padding: 1.25rem;
}
.integration-label {
  font-size: 0.58rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 0.55rem;
}
.integration-value {
  font-family: var(--serif); font-size: 1.35rem; font-weight: 300;
  color: var(--black); margin-bottom: 0.35rem;
}
.integration-copy {
  font-size: 0.8rem; color: var(--muted); line-height: 1.7;
}
.event-type-list { display: flex; flex-direction: column; gap: 0.85rem; }
.event-type-item {
  border: 1px solid rgba(0,0,0,0.07); border-radius: 12px; background: #fafafa;
  padding: 1rem 1.1rem;
}
.post-close-client-item {
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.post-close-client-item:hover {
  transform: translateY(-1px);
  border-color: rgba(0,0,0,0.14);
  background: #fff;
  box-shadow: 0 10px 24px rgba(0,0,0,0.06);
}
.post-close-client-item.is-active {
  border-color: rgba(0,0,0,0.2);
  background: linear-gradient(180deg, rgba(0,0,0,0.045), rgba(0,0,0,0.02));
  box-shadow: 0 14px 30px rgba(0,0,0,0.08);
}
.event-type-name {
  font-size: 0.88rem; font-weight: 500; color: var(--black); margin-bottom: 0.25rem;
}
.event-type-meta {
  font-size: 0.74rem; color: var(--muted); line-height: 1.65;
}

/* ── CHART CONTAINERS ─────────────────────────────────── */
.chart-row {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}
.chart-panel { margin-bottom: 0; }
.chart-panel-sm { margin-bottom: 0; }

.lifecycle-panel { margin-bottom: 1.25rem; }

.lifecycle-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 1.25rem;
}

.lifecycle-block {
  border: 1px solid rgba(0,0,0,0.07);
  border-radius: 16px;
  padding: 1.2rem;
  background: #fafafa;
}

.lifecycle-block-head {
  margin-bottom: 1rem;
}

.lifecycle-block-title {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--black);
  margin-bottom: 0.25rem;
}

.lifecycle-block-copy {
  font-size: 0.76rem;
  line-height: 1.7;
  color: var(--muted);
}

.lifecycle-stage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 0.8rem;
}

.client-base-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.lifecycle-stage-card,
.client-base-card {
  border-radius: 14px;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(0,0,0,0.07);
  background: #fff;
}

.lifecycle-stage-card.tone-bright {
  border-color: rgba(0,0,0,0.12);
}

.lifecycle-stage-card.tone-quiet {
  opacity: 0.78;
}

.lifecycle-stage-label,
.client-base-label {
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.45rem;
}

.lifecycle-stage-value,
.client-base-value {
  font-family: var(--serif);
  font-size: 1.75rem;
  line-height: 1;
  color: var(--black);
}

.client-base-note {
  margin-top: 0.45rem;
  font-size: 0.72rem;
  line-height: 1.55;
  color: var(--muted);
}

.chart-body {
  height: 260px;
  padding: 1rem 1.25rem 1.25rem;
  position: relative;
}
.chart-body-donut {
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

/* Period tabs */
.period-tabs {
  display: flex;
  gap: 2px;
  background: #f0f1f3;
  border-radius: 8px;
  padding: 3px;
}
.period-tab {
  padding: 0.3rem 0.75rem;
  font-family: var(--sans);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
}
.period-tab:hover { color: var(--dark); }
.period-tab.active {
  background: var(--white);
  color: var(--black);
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

/* ── REPORTS PAGE ─────────────────────────────────────── */
.reports-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 2rem; gap: 1.5rem; flex-wrap: nowrap;
}
.reports-header-left { flex: 1; min-width: 0; }
.reports-tag {
  font-size: 0.58rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--black); margin-bottom: 0.4rem;
}
.reports-title {
  font-family: var(--serif); font-size: 2rem; font-weight: 300;
  color: var(--black); letter-spacing: -0.02em; white-space: nowrap;
}
.reports-ai-badge {
  display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0;
  font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--success); border: 1px solid rgba(32,112,80,0.25);
  padding: 0.5rem 1rem; border-radius: 20px;
  background: rgba(32,112,80,0.06); white-space: nowrap;
}
.reports-ai-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--success); flex-shrink: 0;
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.7); }
}

/* Source / bar charts */
.source-list { display: flex; flex-direction: column; gap: 1.25rem; }
.source-row {
  display: grid; grid-template-columns: 130px 1fr 44px;
  align-items: center; gap: 1rem;
}
.source-label { font-size: 0.8rem; color: var(--dark); font-weight: 400; }
.source-bar-wrap {
  height: 10px; background: #f0f1f3;
  border-radius: 99px; overflow: hidden;
}
.source-bar {
  height: 100%; background: var(--black);
  border-radius: 99px;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}
.source-bar-hot    { background: linear-gradient(90deg, var(--hot), #e05040); }
.source-bar-warm   { background: linear-gradient(90deg, var(--warm), #e09040); }
.source-bar-nurture{ background: linear-gradient(90deg, var(--nurture), #4080c0); }
.source-pct {
  font-size: 0.75rem; color: var(--muted);
  text-align: right; font-variant-numeric: tabular-nums; font-weight: 500;
}

/* AI Insights */
.ai-insights-panel { border-top: 3px solid var(--black); }
.ai-live-badge {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.58rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); white-space: nowrap;
}
.ai-insight-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem;
  margin-bottom: 1.5rem;
}
.ai-insight-card {
  border: 1px solid rgba(0,0,0,0.07); padding: 1.25rem;
  background: #f8f9fa; border-radius: 12px;
  transition: box-shadow 0.2s;
}
.ai-insight-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.07); }
.ai-insight-label {
  font-size: 0.58rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 0.625rem;
}
.ai-insight-val {
  font-family: var(--serif); font-size: 1rem; font-weight: 300;
  color: var(--black); line-height: 1.45;
}
.ai-coming-note {
  font-size: 0.78rem; color: var(--muted); line-height: 1.8;
  border-top: 1px solid rgba(0,0,0,0.07); padding-top: 1.25rem;
  font-style: italic;
}

/* ── RESPONSIVE ───────────────────────────────────────── */
@media (max-width: 960px) {
  .client-next-step-shell,
  .client-home-grid {
    grid-template-columns: 1fr;
  }
  .client-search-status-grid {
    grid-template-columns: 1fr;
  }
  .lifecycle-shell { grid-template-columns: 1fr; }
  .marketing-feature-grid { grid-template-columns: 1fr; }
  .qr-generator-grid { grid-template-columns: 1fr; }
  .sidebar { transform: translateX(-100%); transition: transform 0.3s ease; width: 260px; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-close,
  .sidebar-scrim { display: flex; }
  .sidebar-scrim {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.36);
    z-index: 180;
  }
  body.sidebar-open { overflow: hidden; }
  .dash-main { margin-left: 0; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .content { padding: 1.25rem; }
  .topbar { padding: 0 1.25rem; }
  .booking-panel { grid-template-columns: 1fr; }
  .ai-insight-grid { grid-template-columns: 1fr 1fr; }
  .source-row { grid-template-columns: 90px 1fr 36px; }
  .reports-header { flex-wrap: wrap; }
  .chart-row { grid-template-columns: 1fr; }
  .chart-body-donut { height: 240px; }
  .sidebar-toggle { display: flex !important; }
}
@media (max-width: 640px) {
  .client-base-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .field-grid { grid-template-columns: 1fr; }
  .content { padding: 1rem; }
  .topbar { padding: 0 1rem; }
  .topbar-right { gap: 0.6rem; }
  .notify-panel { right: -0.25rem; width: min(340px, calc(100vw - 1.25rem)); }
  .ai-insight-grid { grid-template-columns: 1fr; }
  .reports-title { font-size: 1.5rem; white-space: normal; }
  .marketing-feature-intro h3 { font-size: 1.3rem; }
  .marketing-feature-intro,
  .marketing-feature-form { padding: 1rem; }
}

/* Mobile sidebar toggle button */
.sidebar-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 999px;
  cursor: pointer;
  color: var(--dark);
  box-shadow: 0 10px 24px rgba(0,0,0,0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.sidebar-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(0,0,0,0.16);
  box-shadow: 0 14px 26px rgba(0,0,0,0.12);
}

.sidebar-toggle svg {
  display: block;
}

/* ── ADMIN DARK THEME ────────────────────────────────── */
.admin-dashboard .dash-layout {
  background:
    radial-gradient(circle at top, rgba(201, 169, 110, 0.12), transparent 22%),
    linear-gradient(180deg, #050505 0%, #0b0b0b 100%);
}

.admin-dashboard .dash-main {
  background:
    radial-gradient(circle at top right, rgba(201, 169, 110, 0.08), transparent 18%),
    linear-gradient(180deg, #0a0a0a 0%, #111111 100%);
}

.admin-dashboard .topbar {
  background: rgba(8,8,8,0.9);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.admin-dashboard .topbar-title,
.admin-dashboard .panel-title,
.admin-dashboard .reports-title,
.admin-dashboard .modal-title,
.admin-dashboard .integration-value,
.admin-dashboard .empty-title,
.admin-dashboard .stat-val,
.admin-dashboard .notify-panel-title,
.admin-dashboard .sidebar-brand-title {
  color: #f5efe4;
}

.admin-dashboard .topbar-kicker,
.admin-dashboard .sidebar-brand-kicker {
  color: rgba(255,255,255,0.36);
}

.admin-dashboard .sidebar-section {
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  color: rgba(255,255,255,0.5);
  padding-bottom: 0.6rem;
}

.admin-dashboard .sidebar {
  background:
    radial-gradient(circle at top, rgba(255,255,255,0.08), transparent 24%),
    linear-gradient(180deg, #060606 0%, #0d0d0d 100%);
}

.admin-dashboard .sidebar-logo {
  padding: 2.15rem 1.35rem 1.35rem;
}

.admin-dashboard .sidebar-nav {
  padding: 0.8rem 0.9rem;
  gap: 0.35rem;
}

.admin-dashboard .nav-item {
  position: relative;
  min-height: 52px;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  color: rgba(255,255,255,0.82);
  background: rgba(255,255,255,0.03);
  border: 1px solid transparent;
  font-size: 0.96rem;
  letter-spacing: 0.02em;
  font-weight: 400;
}

.admin-dashboard .nav-icon {
  width: 20px;
  opacity: 0.9;
}

.admin-dashboard .nav-item:hover {
  color: #f5efe4;
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.08);
  transform: translateX(2px);
}

.admin-dashboard .nav-item.active {
  color: #0b0b0b;
  background: linear-gradient(135deg, rgba(245,245,245,0.96), rgba(156,156,156,0.96));
  border-color: rgba(255,255,255,0.28);
  box-shadow: 0 14px 28px rgba(0,0,0,0.28);
}

.admin-dashboard .nav-item.active::before {
  display: none;
}

.admin-dashboard .nav-item.active .nav-icon {
  opacity: 1;
}

.admin-dashboard .topbar-tag {
  color: rgba(255,255,255,0.82);
  border-color: rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.05);
}

.admin-dashboard .notify-btn,
.admin-dashboard .sidebar-toggle {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.86);
}

.admin-dashboard .notify-btn:hover,
.admin-dashboard .notify-btn.active,
.admin-dashboard .sidebar-toggle:hover {
  border-color: rgba(255,255,255,0.22);
  box-shadow: 0 12px 24px rgba(0,0,0,0.3);
}

.admin-dashboard .notify-badge {
  background: linear-gradient(135deg, #f2f2f2, #a9a9a9);
  color: #0b0b0b;
  box-shadow: 0 0 0 3px rgba(8,8,8,0.9);
}

.admin-dashboard .notify-panel,
.admin-dashboard .modal,
.admin-dashboard .booking-modal,
.admin-dashboard .booking-splash-card {
  background: linear-gradient(180deg, #111111 0%, #171717 100%);
  border-color: rgba(255,255,255,0.08);
  box-shadow: 0 28px 70px rgba(0,0,0,0.4);
}

.admin-dashboard .notify-panel-header,
.admin-dashboard .modal-header,
.admin-dashboard .modal-footer,
.admin-dashboard .booking-modal-header {
  border-color: rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.02);
}

.admin-dashboard .notify-clear-btn,
.admin-dashboard .notify-item-title,
.admin-dashboard .lifecycle-block-title,
.admin-dashboard .event-type-name,
.admin-dashboard .appt-type,
.admin-dashboard .listing-price,
.admin-dashboard .checklist-title,
.admin-dashboard .j-step.active .j-step-label,
.admin-dashboard .j-step.done .j-step-label {
  color: #f5efe4;
}

.admin-dashboard .notify-item-body,
.admin-dashboard .notify-item-time,
.admin-dashboard .notify-empty,
.admin-dashboard .lifecycle-block-copy,
.admin-dashboard .lifecycle-stage-label,
.admin-dashboard .client-base-label,
.admin-dashboard .client-base-note,
.admin-dashboard .integration-copy,
.admin-dashboard .event-type-meta,
.admin-dashboard .reports-tag,
.admin-dashboard .field label,
.admin-dashboard .field-lbl-sm,
.admin-dashboard .stat-lbl,
.admin-dashboard .source-pct,
.admin-dashboard .source-label,
.admin-dashboard .ai-insight-label,
.admin-dashboard .ai-coming-note,
.admin-dashboard .empty,
.admin-dashboard .empty p,
.admin-dashboard .appt-time,
.admin-dashboard .appt-mon,
.admin-dashboard .listing-address,
.admin-dashboard .listing-specs,
.admin-dashboard .har-notice-body p,
.admin-dashboard .checklist-sub,
.admin-dashboard .j-summary-label,
.admin-dashboard .j-step-label,
.admin-dashboard .sidebar-role {
  color: rgba(255,255,255,0.62);
}

.admin-dashboard .notify-item:hover {
  background: rgba(255,255,255,0.04);
}

.admin-dashboard .post-close-client-item:hover {
  border-color: rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.04);
  box-shadow: 0 14px 30px rgba(0,0,0,0.18);
}

.admin-dashboard .post-close-client-item.is-active {
  border-color: rgba(255,255,255,0.22);
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
  box-shadow: 0 18px 36px rgba(0,0,0,0.22);
}

.admin-dashboard .notify-item-dot,
.admin-dashboard .reports-ai-dot,
.admin-dashboard .source-bar {
  background: linear-gradient(135deg, #f2f2f2, #8f8f8f);
}

.admin-dashboard .content,
.admin-dashboard .panel-body,
.admin-dashboard .modal-body {
  color: rgba(255,255,255,0.84);
}

.admin-dashboard .panel,
.admin-dashboard .stat-card,
.admin-dashboard .lifecycle-block,
.admin-dashboard .lifecycle-stage-card,
.admin-dashboard .client-base-card,
.admin-dashboard .integration-card,
.admin-dashboard .event-type-item,
.admin-dashboard .ai-insight-card,
.admin-dashboard .journey-progress,
.admin-dashboard .listing-card,
.admin-dashboard .har-embed-panel {
  background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 18px 44px rgba(0,0,0,0.22);
}

.admin-dashboard .stat-card::after,
.admin-dashboard .source-bar-hot,
.admin-dashboard .source-bar-warm,
.admin-dashboard .source-bar-nurture {
  background: linear-gradient(90deg, #f2f2f2, #7e7e7e);
}

.admin-dashboard .ai-insights-panel {
  position: relative;
  overflow: hidden;
}

.admin-dashboard .ai-insights-panel::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,0.86), rgba(126,126,126,0.68));
  pointer-events: none;
}

.admin-dashboard .panel-header,
.admin-dashboard .table-controls,
.admin-dashboard th,
.admin-dashboard td,
.admin-dashboard .field-val,
.admin-dashboard .appt-card,
.admin-dashboard .checklist-item,
.admin-dashboard .j-summary-row,
.admin-dashboard .har-notice,
.admin-dashboard .sidebar,
.admin-dashboard .sidebar-logo,
.admin-dashboard .sidebar-footer {
  border-color: rgba(255,255,255,0.08);
}

.admin-dashboard th {
  background: rgba(255,255,255,0.03);
  color: rgba(255,255,255,0.54);
}

.admin-dashboard td,
.admin-dashboard .field-val,
.admin-dashboard .td-name,
.admin-dashboard .td-sub,
.admin-dashboard .field-val a,
.admin-dashboard .appt-provider,
.admin-dashboard .j-summary-val,
.admin-dashboard .har-notice-body strong {
  color: rgba(255,255,255,0.84);
}

.admin-dashboard tr:hover td,
.admin-dashboard .appt-card:hover {
  background: rgba(255,255,255,0.03);
}

.admin-dashboard .search-input,
.admin-dashboard .filter-select,
.admin-dashboard .field input,
.admin-dashboard .field select,
.admin-dashboard .field textarea,
.admin-dashboard .period-tabs,
.admin-dashboard .booking-embed-placeholder,
.admin-dashboard .source-bar-wrap {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.88);
}

.admin-dashboard .search-wrap svg,
.admin-dashboard .search-input::placeholder,
.admin-dashboard .field input::placeholder,
.admin-dashboard .field textarea::placeholder,
.admin-dashboard .period-tab,
.admin-dashboard .booking-placeholder-text {
  color: rgba(255,255,255,0.46);
}

.admin-dashboard .search-input:focus,
.admin-dashboard .filter-select:focus,
.admin-dashboard .field input:focus,
.admin-dashboard .field select:focus,
.admin-dashboard .field textarea:focus {
  border-color: rgba(255,255,255,0.24);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.08);
}

.admin-dashboard .field select option {
  background: #141414;
  color: #f5efe4;
}

.admin-dashboard .period-tab:hover,
.admin-dashboard .period-tab.active {
  color: #f5efe4;
}

.admin-dashboard .period-tab.active {
  background: rgba(255,255,255,0.08);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
}

.admin-dashboard .msg-in .msg-bubble,
.admin-dashboard .booking-embed-placeholder,
.admin-dashboard .har-notice {
  background: rgba(255,255,255,0.035);
  border-color: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.82);
}

.admin-dashboard .msg-out .msg-bubble,
.admin-dashboard .j-step.active .j-step-circle,
.admin-dashboard .checklist-item.current .checklist-icon,
.admin-dashboard .j-agent-avatar {
  background: linear-gradient(135deg, #f3f3f3, #9d9d9d);
  color: #0b0b0b;
  border-color: rgba(255,255,255,0.24);
}

.admin-dashboard .j-step-circle,
.admin-dashboard .checklist-icon,
.admin-dashboard .appt-provider,
.admin-dashboard .listing-badge,
.admin-dashboard .reports-ai-badge {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.72);
}

.admin-dashboard .listing-badge.pending {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.82);
}

.admin-dashboard .reports-ai-badge {
  color: rgba(255,255,255,0.82);
}

.admin-dashboard .booking-modal-title,
.admin-dashboard .booking-splash-title,
.admin-dashboard .booking-title,
.admin-dashboard .listing-price,
.admin-dashboard .appt-day,
.admin-dashboard .lifecycle-stage-value,
.admin-dashboard .client-base-value {
  color: #f5efe4;
}

.admin-dashboard .booking-text,
.admin-dashboard .booking-splash-copy,
.admin-dashboard .booking-kicker,
.admin-dashboard .booking-splash-kicker {
  color: rgba(255,255,255,0.66);
}

.admin-dashboard .modal-close,
.admin-dashboard .booking-modal-close,
.admin-dashboard .booking-splash-close {
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.7);
}

.admin-dashboard .modal-close:hover,
.admin-dashboard .booking-modal-close:hover,
.admin-dashboard .booking-splash-close:hover {
  background: rgba(255,255,255,0.08);
  color: #f5efe4;
}

.admin-dashboard .btn-outline {
  border-color: rgba(255,255,255,0.16);
  color: #f5efe4;
  background: rgba(255,255,255,0.03);
}

.admin-dashboard .btn-outline:hover {
  background: rgba(255,255,255,0.08);
}

.admin-dashboard .sidebar-toggle {
  border-color: rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.04);
}

.admin-dashboard .sidebar-user {
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
}

.admin-dashboard .sidebar-avatar {
  background: linear-gradient(135deg, rgba(255,255,255,0.14), rgba(255,255,255,0.06));
  border-color: rgba(255,255,255,0.16);
  color: rgba(255,255,255,0.88);
}

.admin-dashboard .sidebar-name {
  color: #f5efe4;
}

.har-embed-panel {
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  background: #fff;
  position: relative;
  -webkit-overflow-scrolling: touch;
  touch-action: auto;
}

.har-embed-frame {
  display: block;
  width: 100%;
  height: min(76vh, 720px);
  min-height: 500px;
  border: none;
  -webkit-overflow-scrolling: touch;
  touch-action: auto;
}

.har-mobile-tip,
.har-scroll-guard {
  display: none;
}

.har-client-mobile-tip {
  margin: 0.85rem 0;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 12px;
  background: #fff;
  color: var(--dark);
  font-size: 0.82rem;
  line-height: 1.55;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

.har-mobile-toggle {
  appearance: none;
  border: 1px solid rgba(0,0,0,0.12);
  background: var(--black);
  color: var(--white);
  border-radius: 999px;
  padding: 0.68rem 1rem;
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  line-height: 1;
  text-transform: uppercase;
  cursor: pointer;
  flex-shrink: 0;
}

.har-scroll-guard {
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  padding: 1.1rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.58), rgba(244,245,247,0.92));
  backdrop-filter: blur(12px);
  z-index: 2;
}

.har-scroll-guard-panel {
  width: min(100%, 420px);
  padding: 1.2rem;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 14px;
  background: rgba(255,255,255,0.94);
  box-shadow: 0 18px 48px rgba(0,0,0,0.12);
  text-align: center;
}

.har-scroll-guard-kicker {
  margin-bottom: 0.65rem;
  color: var(--muted);
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.har-scroll-guard-panel h3 {
  margin: 0 0 0.55rem;
  color: var(--black);
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 300;
  line-height: 1.05;
}

.har-scroll-guard-panel p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.6;
}

.har-scroll-guard-actions {
  display: flex;
  justify-content: center;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.har-scroll-guard-link {
  color: var(--black);
  border-color: rgba(0,0,0,0.12);
}

@media (max-width: 640px) {
  .har-client-mobile-tip:not([hidden]) {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    flex-wrap: wrap;
  }

  .har-embed-frame {
    height: 78svh;
    min-height: 560px;
  }

  .har-client-search-wrap.har-mobile-locked .har-embed-frame {
    pointer-events: none;
  }

  .har-client-search-wrap.har-mobile-active .har-embed-frame {
    pointer-events: auto;
    touch-action: auto;
  }

  .har-client-search-wrap.har-mobile-locked .har-scroll-guard:not([hidden]) {
    display: flex;
  }
}

/* ── MY JOURNEY ──────────────────────────────────────── */
.journey-progress {
  display: flex; align-items: center;
  background: white; border-radius: 14px;
  padding: 1.25rem 1.75rem; margin-bottom: 1.75rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}
.j-step {
  display: flex; flex-direction: column;
  align-items: center; gap: 0.45rem; flex: none;
}
.j-step-circle {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 500;
  background: var(--light); color: var(--muted);
  border: 2px solid var(--border);
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.j-step-label {
  font-size: 0.68rem; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--muted);
  transition: color 0.25s;
}
.j-step.active .j-step-circle { background: var(--black); color: white; border-color: var(--black); }
.j-step.active .j-step-label  { color: var(--black); font-weight: 500; }
.j-step.done  .j-step-circle  { background: #5F5F5F; color: white; border-color: #5F5F5F; }
.j-step.done  .j-step-label   { color: var(--black); }
.j-connector {
  flex: 1; height: 2px;
  background: var(--border); margin: 0 0.75rem;
  margin-bottom: 1.1rem;
}

.j-pane { animation: fadeInUp 0.2s ease; }

/* ── HAR NOTICE ───────────────────────────────────────── */
.har-notice {
  display: flex; gap: 1rem; align-items: flex-start;
  background: linear-gradient(135deg, #f5f5f5 0%, #ededed 100%);
  border: 1px solid rgba(122,122,122,0.22);
  border-radius: 12px; padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}
.har-notice-icon {
  font-size: 1.3rem; color: var(--black); flex: none; margin-top: 0.05rem;
}
.har-notice-body strong {
  display: block; font-size: 0.85rem; font-weight: 500;
  color: var(--black); margin-bottom: 0.3rem;
}
.har-notice-body p {
  font-size: 0.8rem; color: var(--muted); margin: 0; line-height: 1.5;
}

/* ── LISTINGS ─────────────────────────────────────────── */
.j-listings-header {
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 1rem;
  margin-bottom: 1rem;
}
.j-listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1.25rem;
}
.listing-card {
  background: white; border-radius: 14px; overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}
.listing-card:hover { transform: translateY(-3px); box-shadow: 0 8px 28px rgba(0,0,0,0.1); }
.listing-photo { width: 100%; height: 175px; object-fit: cover; display: block; }
.listing-body  { padding: 1.1rem 1.25rem; }
.listing-badge {
  display: inline-block; padding: 0.18rem 0.55rem;
  border-radius: 4px; font-size: 0.62rem;
  letter-spacing: 0.08em; text-transform: uppercase; font-weight: 500;
  background: #e8f5e9; color: #2e7d32; margin-bottom: 0.6rem;
}
.listing-badge.pending { background: #fff8e1; color: #f57f17; }
.listing-price {
  font-family: var(--serif); font-size: 1.3rem;
  font-weight: 400; color: var(--black); margin-bottom: 0.2rem;
}
.listing-address { font-size: 0.82rem; color: var(--dark); margin-bottom: 0.75rem; line-height: 1.4; }
.listing-specs {
  display: flex; gap: 1rem; flex-wrap: wrap;
  font-size: 0.75rem; color: var(--muted);
  padding-top: 0.7rem; border-top: 1px solid var(--border);
}

/* ── NEXT STEPS ───────────────────────────────────────── */
.j-nextsteps-grid {
  display: grid; grid-template-columns: 1fr 320px;
  gap: 1.5rem; align-items: start;
}
.buyer-checklist { list-style: none; padding: 0; margin: 0; }
.checklist-item {
  display: flex; gap: 1rem; align-items: flex-start;
  padding: 1rem 1.5rem; border-bottom: 1px solid var(--border);
}
.checklist-item:last-child { border-bottom: none; }
.checklist-icon {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem; background: var(--light);
  color: var(--muted); border: 1.5px solid var(--border);
}
.checklist-item.done    .checklist-icon { background: #e8f5e9; color: #2e7d32; border-color: #a5d6a7; }
.checklist-item.current .checklist-icon { background: var(--black); color: white; border-color: var(--black); }
.checklist-content { flex: 1; }
.checklist-title { font-size: 0.875rem; font-weight: 500; color: var(--black); margin-bottom: 0.2rem; }
.checklist-item:not(.done):not(.current) .checklist-title { color: var(--muted); font-weight: 400; }
.checklist-sub { font-size: 0.78rem; color: var(--muted); }

.j-agent-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--black); color: white;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 1.4rem; font-weight: 300;
  margin: 0 auto; letter-spacing: 0.05em;
}
.j-summary-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 0.5rem 0; border-bottom: 1px solid var(--border); gap: 0.75rem;
}
.j-summary-label { font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.j-summary-val   { font-size: 0.85rem; color: var(--dark); text-align: right; }

@media (max-width: 960px) {
  .j-nextsteps-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .j-listings-grid { grid-template-columns: 1fr; }
  .j-listings-header { flex-direction: column; }
}

/* ── MARKETING SECTION ────────────────────────────────── */
.mkt-platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.7rem;
  border-radius: 20px;
}

.mkt-google-badge {
  background: rgba(0,0,0,0.04);
  color: var(--black);
  border: 1px solid rgba(0,0,0,0.12);
}

.mkt-instagram-badge {
  background: rgba(0,0,0,0.04);
  color: var(--black);
  border: 1px solid rgba(0,0,0,0.12);
}

.mkt-facebook-badge {
  background: rgba(0,0,0,0.04);
  color: var(--black);
  border: 1px solid rgba(0,0,0,0.12);
}

.admin-dashboard .mkt-google-badge {
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.86);
  border-color: rgba(255,255,255,0.12);
}

.admin-dashboard .mkt-instagram-badge {
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.86);
  border-color: rgba(255,255,255,0.12);
}

.admin-dashboard .mkt-facebook-badge {
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.86);
  border-color: rgba(255,255,255,0.12);
}

.mkt-summary-block {
  margin-top: 1.5rem;
  padding: 1.25rem 1.5rem;
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
}

.mkt-summary-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: 0.75rem;
}

.mkt-summary-body {
  font-size: 0.88rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.55);
}

.mkt-social-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.mkt-social-stat {
  text-align: center;
  padding: 1rem 0.5rem;
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
}

.mkt-social-stat-val {
  font-size: 1.5rem;
  font-weight: 500;
  color: #f5efe4;
  font-family: var(--serif);
  line-height: 1.2;
  margin-bottom: 0.25rem;
}

.mkt-social-stat-lbl {
  font-size: 0.68rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.42);
}

.mkt-connect-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.9rem 1rem;
  border-radius: 8px;
  font-size: 0.82rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.48);
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.07);
}

.mkt-connect-notice svg {
  flex-shrink: 0;
  margin-top: 2px;
}

.mkt-input-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.9rem;
}

.qr-generator-panel {
  margin-bottom: 1.25rem;
}

.qr-generator-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 1.25rem;
  align-items: stretch;
}

.qr-generator-form {
  display: grid;
  align-content: start;
}

.qr-action-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.qr-preview-card {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
}

.qr-preview-surface {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 320px;
  background: #ffffff;
  border: 1px solid rgba(255,255,255,0.12);
}

.qr-preview-surface canvas {
  width: 280px;
  height: 280px;
}

.qr-empty-state {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 2rem;
  text-align: center;
  color: rgba(8,8,8,0.54);
  font-size: 0.84rem;
  background: #ffffff;
}

.qr-empty-state[hidden] {
  display: none;
}

.qr-preview-meta {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}

.qr-preview-meta strong {
  color: rgba(255,255,255,0.9);
  font-size: 0.9rem;
}

.qr-preview-meta span {
  color: rgba(255,255,255,0.56);
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.marketing-feature-panel .panel-body {
  padding-top: 1.15rem;
}

.marketing-feature-grid {
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.marketing-feature-intro,
.marketing-feature-form {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.02));
  padding: 1.1rem;
}

.marketing-feature-kicker {
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.52);
  margin-bottom: 0.75rem;
}

.marketing-feature-intro h3 {
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 300;
  line-height: 1.02;
  color: #f5efe4;
  margin-bottom: 0.8rem;
}

.marketing-feature-intro p {
  color: rgba(255,255,255,0.68);
  font-size: 0.84rem;
  line-height: 1.78;
  margin-bottom: 1.1rem;
}

.marketing-feature-points {
  display: grid;
  gap: 0.8rem;
}

.marketing-feature-point {
  padding-top: 0.8rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.marketing-feature-point-label {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.84);
  margin-bottom: 0.35rem;
}

.marketing-feature-point-copy {
  display: block;
  color: rgba(255,255,255,0.56);
  font-size: 0.78rem;
  line-height: 1.6;
}

.marketing-action-row {
  display: flex;
  justify-content: flex-start;
  margin-top: 0.35rem;
}

.admin-dashboard .marketing-feature-form .field {
  margin-bottom: 0;
}

.admin-dashboard .marketing-feature-form .field label {
  color: rgba(255,255,255,0.54);
}

.admin-dashboard .mkt-summary-block {
  background: rgba(255,255,255,0.035);
  border-color: rgba(255,255,255,0.08);
}

.admin-dashboard .mkt-summary-header {
  color: rgba(255,255,255,0.56);
}

.admin-dashboard .mkt-summary-body {
  color: rgba(255,255,255,0.78);
}

.admin-dashboard .mkt-social-stat {
  background: rgba(255,255,255,0.03);
  border-color: rgba(255,255,255,0.08);
}

.admin-dashboard .mkt-social-stat-val {
  color: #f5efe4;
}

.admin-dashboard .mkt-social-stat-lbl,
.admin-dashboard .mkt-connect-notice {
  color: rgba(255,255,255,0.56);
}

.admin-dashboard .mkt-connect-notice {
  background: rgba(255,255,255,0.025);
  border-color: rgba(255,255,255,0.08);
}

/* ── SAVED HOMES ──────────────────────────────────────── */
.saved-home-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.saved-home-card:last-child { border-bottom: none; }

.saved-home-main { flex: 1; min-width: 0; }

.saved-home-address {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--dark);
  margin-bottom: 0.25rem;
}

.saved-home-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.saved-home-meta span::after {
  content: '·';
  margin-left: 0.5rem;
}

.saved-home-meta span:last-child::after { content: ''; }

.saved-home-notes {
  font-size: 0.78rem;
  color: var(--mid);
  font-style: italic;
}

.saved-home-actions {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex-shrink: 0;
}

/* Admin modal saved homes */
.modal-saved-home {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
}

.modal-saved-home:last-child { border-bottom: none; }

.modal-saved-home-addr {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--dark);
  margin-bottom: 0.2rem;
}

.modal-saved-home-meta {
  font-size: 0.76rem;
  color: var(--muted);
  margin-bottom: 0.15rem;
}

.modal-saved-home-notes {
  font-size: 0.76rem;
  color: var(--mid);
  font-style: italic;
}

/* ── AI CHAT BUBBLE ───────────────────────────────────── */
.ai-chat-wrap {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
}

.ai-chat-panel[hidden] { display: none !important; }

.ai-chat-bubble {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 28px rgba(0,0,0,0.45), 0 2px 8px rgba(0,0,0,0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  color: rgba(255,255,255,0.9);
  position: relative;
  flex-shrink: 0;
  backdrop-filter: blur(12px);
}

.ai-chat-bubble:hover {
  transform: scale(1.06);
  background: rgba(255,255,255,0.18);
  box-shadow: 0 12px 36px rgba(0,0,0,0.5);
}

.ai-chat-bubble:active {
  transform: scale(0.96);
}

.ai-chat-bubble-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-chat-bubble-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #e05050;
  border: 2px solid #0b0b0b;
  animation: chatDotPulse 1.8s ease-in-out infinite;
}

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

.ai-chat-panel {
  width: 340px;
  max-height: 520px;
  border-radius: 18px;
  background: linear-gradient(180deg, #111111 0%, #0d0d0d 100%);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 24px 64px rgba(0,0,0,0.6), 0 4px 16px rgba(0,0,0,0.4);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: chatPanelIn 0.22s cubic-bezier(0.22,1,0.36,1) both;
  transform-origin: bottom right;
}

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

.ai-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1rem 0.9rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.02);
  flex-shrink: 0;
}

.ai-chat-header-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.ai-chat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.7);
  flex-shrink: 0;
}

.ai-chat-title {
  font-size: 0.84rem;
  font-weight: 500;
  color: #f5efe4;
  line-height: 1.2;
}

.ai-chat-subtitle {
  font-size: 0.62rem;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.04em;
  margin-top: 1px;
}

.ai-chat-close,
.ai-chat-clear {
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,0.38);
  padding: 0.3rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, background 0.15s;
  line-height: 1;
}

.ai-chat-close:hover,
.ai-chat-clear:hover {
  color: rgba(255,255,255,0.75);
  background: rgba(255,255,255,0.06);
}

.ai-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.ai-chat-msg {
  max-width: 88%;
  padding: 0.65rem 0.9rem;
  border-radius: 14px;
  font-size: 0.83rem;
  line-height: 1.55;
  word-break: break-word;
  animation: chatMsgIn 0.18s ease both;
}

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

.ai-chat-msg-user {
  align-self: flex-end;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

.ai-chat-msg-ai {
  align-self: flex-start;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.82);
  border-bottom-left-radius: 4px;
}

/* ── THINKING ANIMATION ───────────────────────── */
.ai-chat-thinking {
  display: flex;
  align-items: baseline;
  gap: 0;
  font-size: 0.83rem;
  font-style: italic;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.01em;
  padding: 0.7rem 0.9rem;
}

.ai-chat-thinking span {
  display: inline-block;
  animation: thinkWave 1.4s ease-in-out infinite;
}

.ai-chat-ellipsis {
  animation: thinkBlink 1.4s ease-in-out infinite !important;
  margin-left: 1px;
}

@keyframes thinkWave {
  0%, 60%, 100% { transform: translateY(0);    color: rgba(255,255,255,0.45); }
  30%            { transform: translateY(-5px); color: rgba(255,255,255,0.95); }
}

@keyframes thinkBlink {
  0%, 60%, 100% { opacity: 0.4; }
  30%            { opacity: 1;   }
}

.ai-chat-input-row {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  padding: 0.75rem 0.875rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.02);
  flex-shrink: 0;
}

.ai-chat-input {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: #f5efe4;
  font-family: var(--sans);
  font-size: 0.83rem;
  line-height: 1.5;
  padding: 0.55rem 0.75rem;
  resize: none;
  outline: none;
  transition: border-color 0.15s;
  max-height: 120px;
  overflow-y: auto;
}

.ai-chat-input::placeholder {
  color: rgba(255,255,255,0.28);
}

.ai-chat-input:focus {
  border-color: rgba(255,255,255,0.3);
}

.ai-chat-send {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.22);
  cursor: pointer;
  color: rgba(255,255,255,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, transform 0.15s;
}

.ai-chat-send:hover  { background: rgba(255,255,255,0.22); transform: scale(1.05); }
.ai-chat-send:active { transform: scale(0.95); }
.ai-chat-send:disabled { opacity: 0.35; cursor: default; transform: none; }

@media (max-width: 480px) {
  .ai-chat-panel {
    width: calc(100vw - 2rem);
    max-height: 65vh;
  }
  .ai-chat-wrap {
    bottom: 1rem;
    right: 1rem;
  }
}
