/* ============================================================
   My bookings — page-specific styles
   ============================================================ */

.bookings-main { padding: 32px 0 80px; }

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
}
.page-head h1 {
  font-size: 40px;
  letter-spacing: -0.035em;
  line-height: 1.0;
}
.page-head .lead {
  margin-top: 8px;
  font-size: 14px;
  color: var(--text-muted);
  max-width: 420px;
}

.tabs-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 4px;
  width: fit-content;
}
.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 0;
  background: transparent;
  border-radius: var(--r-pill);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active {
  background: var(--dark);
  color: var(--text-on-dark);
  font-weight: 600;
}
.tab-btn .count {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 6px;
  border-radius: var(--r-pill);
  background: var(--surface-3);
  color: var(--text-2);
  margin-left: 2px;
}
.tab-btn.active .count { background: rgba(255,255,255,0.15); color: var(--text-on-dark); }

.list-section { margin-bottom: 44px; }
.list-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}
.list-section-title h2 {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.list-section-title h2 .mono { color: var(--text); margin-left: 6px; }

/* ============= ACTIVE BOOKING (expanded) ============= */
.booking-expanded {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--sh-3);
}

.be-head {
  display: grid;
  grid-template-columns: 1fr auto;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
  gap: 24px;
  align-items: start;
}
.be-head-left {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.be-head-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.be-head-meta .mono { font-size: 12px; color: var(--text-muted); }
.be-title {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.be-sub {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 14px;
  color: var(--text-2);
  flex-wrap: wrap;
}
.be-sub .item { display: inline-flex; align-items: center; gap: 5px; }
.be-sub .item .ms { color: var(--text-muted); font-size: 16px; }

.be-amount {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.be-amount .l {
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--text-muted);
}
.be-amount .v {
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
}
.be-amount .escrow {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--go);
  margin-top: 4px;
}
.be-amount .escrow .ms { font-size: 14px; }

.be-body {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 0;
}

/* timeline */
.be-timeline {
  padding: 22px 24px;
  border-right: 1px solid var(--line);
}
.be-timeline h3 {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 18px;
}
.timeline { display: flex; flex-direction: column; }
.tl-step {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 14px;
  align-items: start;
  position: relative;
  padding-bottom: 18px;
}
.tl-step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 11px;
  top: 22px;
  bottom: 0;
  width: 2px;
  background: var(--line-strong);
  border-radius: 2px;
}
.tl-step.done::after { background: var(--go); }
.tl-step.current::after {
  background: linear-gradient(180deg, var(--go), var(--line-strong));
}

.tl-dot {
  width: 24px; height: 24px;
  border-radius: var(--r-pill);
  display: grid; place-items: center;
  background: var(--surface-3);
  border: 2px solid var(--bg);
  font-size: 13px;
  color: var(--text-muted);
  z-index: 1;
}
.tl-step.done .tl-dot { background: var(--go); color: white; }
.tl-step.done .tl-dot .ms { font-size: 14px; }
.tl-step.current .tl-dot {
  background: var(--signal);
  color: var(--signal-on);
  box-shadow: 0 0 0 4px rgba(242, 198, 0, 0.18);
}
.tl-step.current .tl-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--signal);
  opacity: 0.4;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.4; }
  50% { transform: scale(1.4); opacity: 0; }
}

.tl-content { padding-top: 1px; }
.tl-step .title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}
.tl-step.done .title { color: var(--text); }
.tl-step.current .title { font-weight: 600; }
.tl-step:not(.done):not(.current) .title { color: var(--text-muted); }
.tl-step .desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.45;
}
.tl-step .when {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  padding-top: 3px;
}
.tl-step.current .when { color: var(--text); font-weight: 500; }

/* right pane — chat preview + actions */
.be-side { padding: 22px 24px; display: flex; flex-direction: column; gap: 20px; }

.chat-preview {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chat-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.chat-head h3 {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.chat-head .unread {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: var(--r-pill);
  background: var(--signal);
  color: var(--signal-on);
  font-weight: 700;
}

.chat-msgs { display: flex; flex-direction: column; gap: 6px; }
.chat-msg {
  background: var(--surface-2);
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-2);
  max-width: 88%;
  border-bottom-left-radius: 4px;
  position: relative;
}
.chat-msg.me {
  background: var(--dark);
  color: var(--text-on-dark);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  border-bottom-left-radius: 14px;
}
.chat-msg .who {
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}
.chat-msg.me .who { color: var(--signal); }
.chat-msg .when {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-faint);
  margin-top: 4px;
}
.chat-msg.me .when { color: rgba(247, 246, 242, 0.4); }

.chat-input {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 4px 4px 4px 14px;
  align-items: center;
}
.chat-input input {
  flex: 1; border: 0; outline: 0; background: transparent;
  font-family: inherit; font-size: 13px;
  padding: 8px 0;
}
.chat-input button {
  border: 0;
  background: var(--dark);
  color: var(--text-on-dark);
  width: 32px; height: 32px;
  border-radius: var(--r-pill);
  display: grid; place-items: center;
  cursor: pointer;
}

/* center mini card */
.center-mini {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 12px;
}
.center-mini .ph {
  width: 46px; height: 46px;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, #2a2c32 0%, #1c1e23 100%);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.center-mini .ph .ms { color: var(--signal); font-size: 22px; }
.center-mini .meta { flex: 1; min-width: 0; }
.center-mini .n { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.center-mini .s {
  font-size: 12px; color: var(--text-muted);
  margin-top: 2px;
  display: flex; gap: 8px;
}
.center-mini .s .star { color: var(--signal); font-weight: 600; }

/* footer actions */
.be-foot {
  padding: 16px 24px;
  background: var(--surface-2);
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.be-foot .left-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.be-foot .right-actions {
  display: flex;
  gap: 8px;
}
.be-foot .danger {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--busy);
  padding: 8px 14px;
  border-radius: var(--r-pill);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.be-foot .danger:hover { background: var(--busy-soft); border-color: var(--busy); }

/* ============= UPCOMING BOOKING CARDS ============= */
.upcoming-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.upcoming-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 20px;
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 16px;
  align-items: start;
  transition: border-color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}
.upcoming-card:hover {
  border-color: var(--text);
  transform: translateY(-1px);
  box-shadow: var(--sh-2);
}
.upcoming-icon {
  width: 56px; height: 56px;
  border-radius: var(--r-md);
  background: var(--surface-3);
  display: grid; place-items: center;
}
.upcoming-icon .ms { color: var(--text); font-size: 26px; }

.upcoming-meta { min-width: 0; }
.upcoming-meta .status-pill { margin-bottom: 8px; }
.upcoming-meta .n {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.upcoming-meta .s {
  font-size: 13px;
  color: var(--text-2);
  margin-top: 6px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.upcoming-meta .s .item { display: inline-flex; align-items: center; gap: 4px; }
.upcoming-meta .s .ms { color: var(--text-muted); font-size: 14px; }

.upcoming-foot {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  grid-column: 1 / -1;
}
.upcoming-foot .price {
  display: flex;
  align-items: baseline;
  gap: 5px;
}
.upcoming-foot .price .v {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.upcoming-foot .actions {
  display: flex;
  gap: 6px;
}
.upcoming-foot .actions button {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  color: var(--text-2);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.upcoming-foot .actions button:hover { background: var(--surface-3); color: var(--text); }

/* ============= PAST BOOKINGS TABLE ============= */
.past-table {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.past-row {
  display: grid;
  grid-template-columns: 110px 1fr 1fr 120px 90px 60px;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  transition: background 120ms ease;
}
.past-row:last-child { border-bottom: 0; }
.past-row:hover { background: var(--surface-2); cursor: pointer; }
.past-row.head {
  background: var(--surface-2);
  cursor: default;
  padding: 10px 20px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--text-muted);
}
.past-row.head:hover { background: var(--surface-2); }

.past-row .when { font-family: var(--font-mono); font-size: 13px; color: var(--text-2); }
.past-row .what {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.past-row .what .n { font-size: 14px; font-weight: 500; }
.past-row .what .d { font-size: 12px; color: var(--text-muted); }
.past-row .where { font-size: 13px; color: var(--text-2); }
.past-row .amount {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  text-align: right;
}
.past-row .rating-cell {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 500;
}
.past-row .rating-cell .ms { color: var(--signal); font-size: 14px; font-variation-settings: 'opsz' 20, 'wght' 600, 'FILL' 1, 'GRAD' 0; }
.past-row .rating-cell.empty { color: var(--text-muted); font-weight: 400; }
.past-row .rating-cell.empty .ms { color: var(--text-faint); font-variation-settings: 'opsz' 20, 'wght' 400, 'FILL' 0, 'GRAD' 0; }

.past-row .nav-arrow {
  display: grid;
  place-items: center;
  color: var(--text-muted);
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-xl);
  color: var(--text-muted);
}
