/* ============================================
   Stethiano · App-page styles (directory, profile, booking, dashboards, etc)
   ============================================ */

/* -------- Filter bar -------- */
.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: var(--space-5);
}
.filter-bar .chip-group { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-bar .sort-select {
  margin-left: auto;
  height: 36px;
  padding-left: 12px;
  width: auto;
  font-weight: 500;
  background-color: white;
}

/* -------- Directory grid -------- */
.directory-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: var(--space-6);
  align-items: start;
}
@media (max-width: 1024px) { .directory-layout { grid-template-columns: 1fr; } }
.directory-filters {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  position: sticky;
  top: calc(var(--header-h) + 16px);
}
.directory-filters h4 { font-size: 13px; font-weight: 600; margin-bottom: var(--space-3); }
.filter-section { padding-bottom: var(--space-4); border-bottom: 1px solid var(--color-divider); margin-bottom: var(--space-4); }
.filter-section:last-of-type { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.filter-list { display: flex; flex-direction: column; gap: 8px; }

.range-slider {
  appearance: none; height: 4px; background: var(--color-surface-2);
  border-radius: 999px; outline: none; width: 100%;
}
.range-slider::-webkit-slider-thumb {
  appearance: none; width: 18px; height: 18px; background: var(--color-primary);
  border-radius: 50%; cursor: pointer; border: 3px solid white; box-shadow: var(--shadow-sm);
}

/* -------- Profile page -------- */
.profile-banner {
  height: 280px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, #134E4A 0%, #0F766E 50%, #14B8A6 100%);
  position: relative;
  overflow: hidden;
  margin-bottom: var(--space-9);
}
.profile-banner::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 100%, rgba(245, 158, 11, 0.25), transparent 50%),
    radial-gradient(circle at 100% 0%, rgba(255,255,255,0.15), transparent 50%);
}
.profile-banner-content {
  position: relative; height: 100%;
  display: flex; align-items: flex-end;
  padding: var(--space-6);
}
.profile-id { display: flex; gap: 20px; align-items: flex-end; flex: 1; }
.profile-id .avatar { border: 5px solid white; box-shadow: var(--shadow-lg); }
.profile-id .meta { color: white; padding-bottom: 6px; flex: 1; min-width: 0; }
.profile-id h1 { color: white; font-size: 2rem; letter-spacing: -0.02em; display: inline-flex; align-items: center; gap: 10px; }
.profile-id .trade { color: rgba(255,255,255,0.8); margin-top: 2px; font-size: 15px; }
.profile-id .stats { display: flex; gap: 24px; margin-top: 10px; }
.profile-id .stats span { color: rgba(255,255,255,0.9); font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.profile-id .stats strong { color: white; font-weight: 700; margin-right: 2px; }
.profile-action-row {
  display: flex; gap: 10px; align-items: flex-end; padding-bottom: 6px;
}

.profile-grid {
  display: grid; grid-template-columns: 1fr 360px;
  gap: var(--space-6);
  align-items: start;
}
@media (max-width: 1024px) { .profile-grid { grid-template-columns: 1fr; } }

.gallery {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 160px 160px;
  gap: 8px;
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.gallery-tile {
  background: var(--color-surface-2);
  position: relative;
  overflow: hidden;
}
.gallery-tile.big { grid-row: span 2; }
.gallery-tile .tag {
  position: absolute; bottom: 8px; left: 8px;
  background: rgba(17, 24, 39, 0.6);
  color: white;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px; font-weight: 600;
}
.gallery-tile .more {
  position: absolute; inset: 0;
  background: rgba(17, 24, 39, 0.55);
  color: white;
  display: grid; place-items: center;
  font-weight: 600;
  font-size: 14px;
}

.review-card {
  padding: var(--space-5) 0;
  border-bottom: 1px solid var(--color-divider);
}
.review-head { display: flex; gap: 12px; align-items: center; }
.review-head .who { font-weight: 600; font-size: 14px; }
.review-head .meta { font-size: 12px; color: var(--color-muted); display: flex; align-items: center; gap: 8px; }
.review-body { font-size: 14px; color: var(--color-text-2); margin-top: 10px; line-height: var(--leading-relaxed); }
.review-foot {
  display: flex; align-items: center; gap: 14px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--color-muted);
}
.review-context {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 8px;
  background: var(--color-primary-tint);
  color: var(--color-primary);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

/* -------- Booking page -------- */
.booking-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: var(--space-7);
  align-items: start;
}
@media (max-width: 960px) { .booking-layout { grid-template-columns: 1fr; } }

/* Calendar */
.calendar {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}
.calendar-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.calendar-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px;
}
.cal-day-name {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 6px 0;
}
.cal-day {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 10px;
  font-size: 14px;
  color: var(--color-text);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
  position: relative;
}
.cal-day:hover { background: var(--color-surface-2); }
.cal-day.muted { color: var(--color-muted-2); cursor: default; }
.cal-day.muted:hover { background: transparent; }
.cal-day.unavailable { color: var(--color-muted-2); text-decoration: line-through; cursor: not-allowed; }
.cal-day.unavailable:hover { background: transparent; }
.cal-day.selected { background: var(--color-primary); color: white; font-weight: 600; }
.cal-day.today::after {
  content: ""; position: absolute; bottom: 4px;
  width: 4px; height: 4px; border-radius: 50%; background: var(--color-primary);
}
.cal-day.today.selected::after { background: white; }

.time-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
}
.time-slot {
  padding: 10px 0;
  text-align: center;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  background: white;
  transition: all var(--dur-fast) var(--ease-out);
}
.time-slot:hover:not(:disabled) { border-color: var(--color-primary); color: var(--color-primary); }
.time-slot.selected { background: var(--color-primary); border-color: var(--color-primary); color: white; }
.time-slot:disabled { opacity: 0.4; cursor: not-allowed; text-decoration: line-through; }

.service-option {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
  background: white;
}
.service-option:hover { border-color: var(--color-border-strong); }
.service-option.selected { border-color: var(--color-primary); background: var(--color-primary-tint); }
.service-option .check-circle {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--color-border-strong);
  display: grid; place-items: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.service-option.selected .check-circle {
  background: var(--color-primary); border-color: var(--color-primary); color: white;
}
.service-option .meta { display: flex; gap: 12px; margin-top: 6px; font-size: 12px; color: var(--color-muted); }
.service-option .price { font-weight: 700; font-size: 16px; }

/* Booking summary */
.summary-card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  position: sticky;
  top: calc(var(--header-h) + 16px);
}
.summary-card .head { padding: var(--space-5); border-bottom: 1px solid var(--color-divider); }
.summary-card .body { padding: var(--space-5); }
.summary-line { display: flex; justify-content: space-between; padding: 8px 0; font-size: 13px; color: var(--color-text-2); }
.summary-line.total { padding-top: 14px; margin-top: 8px; border-top: 1px solid var(--color-divider); font-size: 15px; color: var(--color-text); font-weight: 700; }
.summary-card .foot { padding: 0 var(--space-5) var(--space-5); }
.summary-card .escrow-note {
  background: var(--color-primary-tint);
  border: 1px solid var(--color-primary-soft);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex; gap: 10px;
  font-size: 12px;
  color: var(--color-text-2);
}
.summary-card .escrow-note .icon { color: var(--color-primary); flex-shrink: 0; }

/* Stepper */
.stepper { display: flex; gap: 0; margin-bottom: var(--space-7); }
.stepper-item {
  flex: 1;
  display: flex; align-items: center; gap: 10px;
  padding: 0 12px;
  border-bottom: 2px solid var(--color-border);
  padding-bottom: 12px;
  font-size: 13px;
  color: var(--color-muted);
}
.stepper-item .num {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--color-surface-2);
  display: grid; place-items: center;
  font-size: 11px;
  font-weight: 700;
}
.stepper-item.active { border-bottom-color: var(--color-primary); color: var(--color-text); }
.stepper-item.active .num { background: var(--color-primary); color: white; }
.stepper-item.done { border-bottom-color: var(--color-primary); color: var(--color-success); }
.stepper-item.done .num { background: var(--color-success); color: white; }

/* -------- Dashboard cards -------- */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-7);
}
@media (max-width: 1024px) { .dash-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .dash-grid { grid-template-columns: 1fr; } }

.dash-grid-2 {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: var(--space-5);
}
@media (max-width: 960px) { .dash-grid-2 { grid-template-columns: 1fr; } }

/* Mini chart bars */
.bar-chart {
  display: flex; align-items: flex-end; gap: 8px;
  height: 180px;
  padding-top: var(--space-3);
}
.bar-chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.bar-chart-bar {
  width: 100%;
  background: var(--color-primary-soft);
  border-radius: 6px 6px 0 0;
  transition: background var(--dur-fast) var(--ease-out);
  position: relative;
}
.bar-chart-col:hover .bar-chart-bar { background: var(--color-primary); }
.bar-chart-col .label { font-size: 11px; color: var(--color-muted); font-weight: 500; }

/* Line chart */
.spark {
  width: 100%; height: 60px;
  background: linear-gradient(180deg, var(--color-primary-tint), transparent);
  position: relative;
  border-radius: 8px;
  overflow: hidden;
}

/* List items */
.list-item {
  display: flex; gap: 14px; align-items: center;
  padding: 14px;
  border-radius: var(--radius-md);
  transition: background var(--dur-fast) var(--ease-out);
}
.list-item:hover { background: var(--color-surface-2); }
.list-item + .list-item { border-top: 1px solid var(--color-divider); }
.list-item .body { flex: 1; min-width: 0; }
.list-item .title { font-size: 14px; font-weight: 600; }
.list-item .sub { font-size: 12px; color: var(--color-muted); margin-top: 2px; }
.list-item .meta { text-align: right; flex-shrink: 0; }

/* -------- Messages -------- */
.messages-shell {
  display: grid;
  grid-template-columns: 320px 1fr;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: calc(100vh - var(--header-h) - 80px);
  min-height: 600px;
}
@media (max-width: 880px) { .messages-shell { grid-template-columns: 1fr; height: auto; } }
.message-list {
  border-right: 1px solid var(--color-border);
  display: flex; flex-direction: column;
  min-height: 0;
}
.message-search { padding: 14px; border-bottom: 1px solid var(--color-divider); }
.message-list-body { overflow-y: auto; flex: 1; padding: 6px; }
.message-list-item {
  display: flex; gap: 12px; align-items: center;
  padding: 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out);
}
.message-list-item:hover { background: var(--color-surface-2); }
.message-list-item.active { background: var(--color-primary-tint); }
.message-list-item .body { flex: 1; min-width: 0; }
.message-list-item .name { font-size: 13px; font-weight: 600; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.message-list-item .name .time { font-size: 11px; color: var(--color-muted); font-weight: 400; }
.message-list-item .last { font-size: 12px; color: var(--color-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }

.chat-area {
  display: flex; flex-direction: column;
  min-height: 0;
}
.chat-head {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--color-border);
}
.chat-head .meta { flex: 1; min-width: 0; }
.chat-head .name { font-size: 14px; font-weight: 600; }
.chat-head .sub { font-size: 12px; color: var(--color-muted); display: inline-flex; align-items: center; gap: 6px; margin-top: 2px; }
.chat-body { flex: 1; padding: 24px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.chat-row { display: flex; gap: 10px; max-width: 70%; }
.chat-row.me { align-self: flex-end; flex-direction: row-reverse; }
.chat-bubble {
  background: var(--color-surface-2);
  padding: 10px 14px;
  border-radius: 16px 16px 16px 4px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-text);
}
.chat-row.me .chat-bubble {
  background: var(--color-primary);
  color: white;
  border-radius: 16px 16px 4px 16px;
}
.chat-time { font-size: 10px; color: var(--color-muted); margin-top: 4px; }
.chat-row.me .chat-time { text-align: right; }
.chat-attach {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.15);
  border-radius: 10px;
  font-size: 12px;
  margin-top: 6px;
}
.chat-input {
  display: flex; align-items: center; gap: 8px;
  padding: 14px;
  border-top: 1px solid var(--color-border);
}
.chat-input .input { border: none; box-shadow: none; }
.chat-input .input:focus { box-shadow: none; }
.typing-dots { display: inline-flex; gap: 3px; padding: 12px 14px; background: var(--color-surface-2); border-radius: 16px; }
.typing-dots span {
  width: 6px; height: 6px; background: var(--color-muted-2);
  border-radius: 50%; animation: typing 1.4s infinite;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing { 0%, 60%, 100% { opacity: 0.3; transform: scale(0.8); } 30% { opacity: 1; transform: scale(1); } }

/* -------- Notifications page -------- */
.notif-row {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 16px;
  border-radius: var(--radius-md);
  background: white;
  border: 1px solid var(--color-border);
  transition: all var(--dur-fast) var(--ease-out);
}
.notif-row.unread { background: var(--color-primary-tint); border-color: var(--color-primary-soft); }
.notif-row + .notif-row { margin-top: 8px; }
.notif-row:hover { transform: translateX(2px); }
.notif-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.notif-body { flex: 1; min-width: 0; }
.notif-title { font-size: 14px; font-weight: 600; }
.notif-desc { font-size: 13px; color: var(--color-muted); margin-top: 2px; line-height: 1.5; }
.notif-time { font-size: 11px; color: var(--color-muted); white-space: nowrap; }

/* Settings */
.settings-layout {
  display: grid; grid-template-columns: 240px 1fr;
  gap: var(--space-7);
}
@media (max-width: 880px) { .settings-layout { grid-template-columns: 1fr; } }
.settings-nav { display: flex; flex-direction: column; gap: 4px; position: sticky; top: calc(var(--header-h) + 16px); }
.settings-nav a {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  color: var(--color-text-2);
  font-weight: 500;
  display: flex; align-items: center; gap: 10px;
}
.settings-nav a:hover { background: var(--color-surface-2); color: var(--color-text); }
.settings-nav a.active { background: var(--color-primary-tint); color: var(--color-primary); }
.settings-card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}
.settings-card + .settings-card { margin-top: var(--space-5); }
.settings-card h3 { font-size: 16px; }
.settings-card .desc { font-size: 13px; color: var(--color-muted); margin-top: 4px; }

.setting-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 0;
  border-top: 1px solid var(--color-divider);
}
.setting-row:first-of-type { border-top: 0; }
.setting-row .label-block { flex: 1; padding-right: 16px; }
.setting-row .label-block .ttl { font-size: 14px; font-weight: 500; }
.setting-row .label-block .sub { font-size: 12px; color: var(--color-muted); margin-top: 2px; }

/* Dispute */
.dispute-card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}
.dispute-status-bar {
  display: flex; align-items: center; gap: 16px;
  padding: var(--space-4);
  background: var(--color-warning-soft);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-5);
}
.dispute-status-bar .icon { color: var(--color-warning); }

.evidence-tile {
  width: 100px; height: 100px;
  border: 1.5px dashed var(--color-border-strong);
  border-radius: var(--radius-md);
  display: grid; place-items: center;
  color: var(--color-muted);
  cursor: pointer;
}
.evidence-tile:hover { border-color: var(--color-primary); color: var(--color-primary); }
.evidence-thumb {
  width: 100px; height: 100px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--color-surface-2), var(--color-surface-3));
  position: relative; overflow: hidden;
}
.evidence-thumb .x {
  position: absolute; top: 4px; right: 4px;
  width: 20px; height: 20px;
  background: rgba(17,24,39,0.7);
  border-radius: 50%;
  color: white;
  display: grid; place-items: center;
}

/* Pricing / checkout */
.checkout-method {
  display: flex; gap: 12px; align-items: center;
  padding: 14px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
  background: white;
}
.checkout-method.selected { border-color: var(--color-primary); background: var(--color-primary-tint); }
.method-logo {
  width: 44px; height: 30px;
  border-radius: 6px;
  background: var(--color-text);
  color: white;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.05em;
}

/* Tag / pill */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px;
  background: var(--color-surface-2);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text-2);
}
