/* ═══════════════════════════════════════════════════════════
   components.css — Reusable UI components
═══════════════════════════════════════════════════════════ */

/* ─── BUTTONS ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  border: none;
  cursor: pointer;
  transition: all var(--ease);
  white-space: nowrap;
  line-height: 1;
}

.btn-primary { background: var(--gold); color: var(--ink); }
.btn-primary:hover { background: var(--gold-light); }

.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--rule);
}
.btn-outline:hover { background: var(--surface); border-color: var(--muted); }

.btn-ghost {
  background: transparent;
  color: var(--slate);
  border: 1px solid var(--rule);
}
.btn-ghost:hover { background: var(--surface); color: var(--ink); }

.btn-danger {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid transparent;
}
.btn-danger:hover { border-color: var(--red); }

.btn-dark { background: var(--ink); color: var(--gold-light); }
.btn-dark:hover { background: var(--ink-mid); }

.btn-sm  { padding: 5px 12px; font-size: 12px; }
.btn-lg  { padding: 11px 26px; font-size: 15px; }
.btn-icon { padding: 7px; width: 34px; height: 34px; justify-content: center; }

/* ─── STATUS PILLS ───────────────────────────────────────── */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  line-height: 1.4;
}
.pill-green  { background: var(--green-bg);  color: var(--green); }
.pill-amber  { background: var(--amber-bg);  color: var(--amber); }
.pill-red    { background: var(--red-bg);    color: var(--red);   }
.pill-blue   { background: var(--blue-bg);   color: var(--blue);  }
.pill-ink    { background: var(--ink);       color: var(--gold-light); }
.pill-muted  { background: var(--surface);   color: var(--slate); border: 1px solid var(--rule); }

/* ─── CARDS ──────────────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}
.card + .card { margin-top: 1.25rem; }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.card-title {
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}
.card-action {
  font-size: 12px;
  font-weight: 600;
  color: var(--gold);
  cursor: pointer;
  transition: color var(--ease);
}
.card-action:hover { color: var(--gold-light); }

/* ─── STAT CARDS ─────────────────────────────────────────── */
.stat-card {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.3rem;
  position: relative;
  overflow: hidden;
}
.stat-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gold);
}
.stat-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 6px;
}
.stat-value {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
}
.stat-delta      { font-size: 12px; color: var(--green); margin-top: 4px; font-weight: 500; }
.stat-delta.neg  { color: var(--amber); }

/* ─── WELCOME BANNER ─────────────────────────────────────── */
.welcome-banner {
  background: var(--ink);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  border-left: 4px solid var(--gold);
}
.wb-left h2 {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  color: var(--white);
  margin-bottom: 4px;
}
.wb-left p { color: rgba(255,255,255,0.55); font-size: 13px; }
.wb-stats  { display: flex; gap: 2.5rem; }
.wb-stat-val {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--gold-light);
}
.wb-stat-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.4);
  margin-top: 2px;
}

/* ─── PROJECT ROWS ───────────────────────────────────────── */
.proj-list { display: flex; flex-direction: column; gap: 10px; }

.proj-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  background: var(--white);
  cursor: pointer;
  transition: all var(--ease);
}
.proj-row:hover { border-color: var(--gold); background: var(--gold-pale); }

.proj-ico {
  width: 38px; height: 38px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}
.proj-name { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.proj-meta { font-size: 11.5px; color: var(--slate); margin-top: 2px; }

.progress-bar  { height: 4px; background: var(--rule); border-radius: 2px; margin-top: 6px; }
.progress-fill { height: 100%; background: var(--gold); border-radius: 2px; transition: width 0.4s ease; }

/* ─── CONSULTANT CARDS ───────────────────────────────────── */
.consultant-grid { display: flex; flex-direction: column; gap: 12px; }

.consultant-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  background: var(--white);
  cursor: pointer;
  transition: all var(--ease);
}
.consultant-card:hover { border-color: var(--gold); box-shadow: var(--shadow-sm); }
.consultant-card.selected { border-color: var(--gold); background: var(--gold-pale); }

.c-ava {
  width: 46px; height: 46px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 16px; font-weight: 700;
  flex-shrink: 0;
}
.c-name     { font-size: 14px; font-weight: 600; color: var(--ink); }
.c-specialty { font-size: 12px; color: var(--slate); margin-top: 1px; }
.c-rating   { font-size: 13px; font-weight: 700; color: var(--gold); }
.c-rate     { font-size: 13px; font-weight: 700; color: var(--ink); }

/* ─── MESSAGE ROWS ───────────────────────────────────────── */
.msg-list { display: flex; flex-direction: column; }

.msg-row {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 12px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--ease);
}
.msg-row:hover { background: var(--surface); }
.msg-row.unread { background: var(--blue-bg); }

.msg-ava {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  flex-shrink: 0;
}
.msg-name    { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.msg-preview { font-size: 12px; color: var(--slate); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
.msg-time    { margin-left: auto; font-size: 11px; color: var(--muted); flex-shrink: 0; }
.unread-dot  { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); flex-shrink: 0; }

/* ─── CHAT BUBBLES ───────────────────────────────────────── */
.chat-window {
  display: flex; flex-direction: column; gap: 12px;
  height: 230px; overflow-y: auto;
  margin-bottom: 1rem;
  padding-right: 4px;
}
.bubble-wrap       { display: flex; }
.bubble-wrap.right { justify-content: flex-end; }

.bubble {
  padding: 10px 14px;
  max-width: 80%;
  font-size: 13px;
  line-height: 1.5;
}
.bubble.in {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 12px 12px 12px 2px;
  color: var(--ink);
}
.bubble.out {
  background: var(--ink);
  color: var(--white);
  border-radius: 12px 12px 2px 12px;
}

.chat-input-row { display: flex; gap: 8px; }

/* ─── FORM ELEMENTS ──────────────────────────────────────── */
.form-group  { margin-bottom: 1rem; }
.form-label  {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--slate);
  margin-bottom: 5px;
}
.form-control {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  font-size: 13.5px;
  font-family: 'DM Sans', sans-serif;
  color: var(--ink);
  background: var(--surface);
  outline: none;
  transition: border-color var(--ease), background var(--ease);
}
.form-control:focus { border-color: var(--gold); background: var(--white); }
textarea.form-control { resize: vertical; line-height: 1.6; }

/* ─── SEARCH BAR ─────────────────────────────────────────── */
.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--white);
}
.search-bar input {
  flex: 1; padding: 10px 0;
  border: none; outline: none;
  font-size: 13.5px;
  font-family: 'DM Sans', sans-serif;
  background: transparent;
  color: var(--ink);
}
.search-bar input::placeholder { color: var(--muted); }
.search-icon { color: var(--muted); font-size: 16px; }

/* ─── FILTER TABS ────────────────────────────────────────── */
.filter-tabs { display: flex; gap: 6px; margin-bottom: 1.25rem; flex-wrap: wrap; }
.filter-tab {
  padding: 6px 14px;
  border-radius: var(--radius);
  font-size: 12.5px;
  font-weight: 600;
  border: 1px solid var(--rule);
  background: var(--white);
  color: var(--slate);
  cursor: pointer;
  transition: all var(--ease);
}
.filter-tab.active { background: var(--ink); color: var(--gold-light); border-color: var(--ink); }
.filter-tab:hover:not(.active) { border-color: var(--muted); color: var(--ink); }

/* ─── DOCUMENT ROWS ──────────────────────────────────────── */
.doc-list { display: flex; flex-direction: column; gap: 8px; }
.doc-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  background: var(--white);
  cursor: pointer;
  transition: all var(--ease);
}
.doc-row:hover { border-color: var(--gold); background: var(--gold-pale); }
.doc-ico {
  width: 34px; height: 34px;
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; flex-shrink: 0;
}
.doc-name { font-size: 13px; font-weight: 600; color: var(--ink); }
.doc-sub  { font-size: 11.5px; color: var(--slate); }
.doc-size { margin-left: auto; font-size: 11px; color: var(--muted); flex-shrink: 0; }

/* ─── UPLOAD ZONE ────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--rule);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 1.25rem;
}
.upload-zone:hover { border-color: var(--gold); background: var(--gold-pale); }
.upload-zone h3 { font-size: 15px; font-weight: 600; color: var(--ink); margin: 10px 0 4px; }
.upload-zone p  { font-size: 13px; color: var(--slate); }

/* ─── BOOKING SLOTS ──────────────────────────────────────── */
.book-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 1.25rem;
}
.book-slot {
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--ease);
  background: var(--white);
}
.book-slot:hover { border-color: var(--gold); background: var(--gold-pale); }
.slot-day  { font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.slot-date {
  font-family: 'Playfair Display', serif;
  font-size: 24px; font-weight: 700;
  color: var(--ink); margin: 3px 0 8px;
}
.slot-times { display: flex; flex-direction: column; gap: 5px; }
.time-chip {
  padding: 4px 0;
  border: 1px solid var(--rule);
  border-radius: 5px;
  font-size: 12px;
  color: var(--slate);
  background: var(--surface);
  cursor: pointer;
  transition: all var(--ease);
}
.time-chip:hover { background: var(--gold); color: var(--ink); border-color: var(--gold); font-weight: 600; }
.time-chip.booked { background: var(--green-bg); color: var(--green); font-weight: 600; cursor: default; }

/* ─── REQUEST CARDS ──────────────────────────────────────── */
.req-list { display: flex; flex-direction: column; gap: 14px; }
.req-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  background: var(--white);
  transition: all var(--ease);
}
.req-card:hover { border-color: var(--gold); }
.req-ava {
  width: 46px; height: 46px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 16px; font-weight: 700;
  color: white; flex-shrink: 0;
}
.req-title   { font-size: 15px; font-weight: 600; color: var(--ink); }
.req-role    { font-size: 12px; color: var(--slate); margin-bottom: 6px; }
.req-desc    { font-size: 13px; color: var(--ink-soft); line-height: 1.55; margin-bottom: 10px; }
.req-tags    { display: flex; gap: 6px; flex-wrap: wrap; }
.req-tag     { padding: 2px 9px; background: var(--ink); color: var(--gold-light); font-size: 11px; font-weight: 600; border-radius: 12px; }
.req-actions { display: flex; flex-direction: column; gap: 8px; margin-left: auto; flex-shrink: 0; }

/* ─── CALENDAR ───────────────────────────────────────────── */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal-day-lbl {
  text-align: center; font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); padding-bottom: 6px;
}
.cal-cell {
  aspect-ratio: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: flex-start;
  padding: 5px 2px 2px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--ease);
  font-size: 13px; font-weight: 500; color: var(--ink);
}
.cal-cell:hover     { background: var(--gold-pale); border-color: var(--gold); }
.cal-cell.today     { background: var(--ink); color: var(--gold-light); font-weight: 700; }
.cal-cell.has-event { background: var(--gold-pale); border-color: var(--rule); }
.cal-cell.empty     { pointer-events: none; }
.cal-dot            { width: 4px; height: 4px; border-radius: 50%; background: var(--gold); margin-top: 2px; }
.cal-cell.today .cal-dot { background: rgba(255,255,255,0.5); }

/* ─── AVAILABILITY TOGGLES ───────────────────────────────── */
.avail-row {
  display: flex; align-items: center; gap: 14px;
  padding: 11px 0; border-bottom: 1px solid var(--rule);
}
.avail-row:last-child { border-bottom: none; }
.avail-day   { font-size: 13px; font-weight: 600; color: var(--ink); width: 100px; }
.avail-hours { font-size: 12px; color: var(--slate); }

.toggle        { position: relative; width: 38px; height: 20px; flex-shrink: 0; }
.toggle input  { display: none; }
.toggle-track  {
  position: absolute; inset: 0;
  background: var(--rule); border-radius: 20px;
  cursor: pointer; transition: 0.2s;
}
.toggle input:checked ~ .toggle-track { background: var(--gold); }
.toggle-track::before {
  content: '';
  position: absolute;
  width: 14px; height: 14px; border-radius: 50%;
  background: white; left: 3px; top: 3px; transition: 0.2s;
}
.toggle input:checked ~ .toggle-track::before { transform: translateX(18px); }

/* ─── EARNINGS ───────────────────────────────────────────── */
.earnings-total {
  font-family: 'Playfair Display', serif;
  font-size: 42px; font-weight: 700;
  color: var(--ink); line-height: 1;
}
.earnings-sub { font-size: 13px; color: var(--slate); margin-top: 4px; }
.earn-row     { margin-bottom: 12px; }
.earn-lbl     { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--slate); margin-bottom: 4px; }
.earn-lbl strong { color: var(--ink); font-weight: 600; }
.earn-bar     { height: 7px; background: var(--rule); border-radius: 4px; }
.earn-fill    { height: 100%; border-radius: 4px; background: var(--gold); }

/* ─── INVOICE TABLE ──────────────────────────────────────── */
.inv-table { width: 100%; border-collapse: collapse; }
.inv-table th {
  text-align: left; padding: 8px 12px;
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.09em;
  color: var(--muted); border-bottom: 1px solid var(--rule); font-weight: 600;
}
.inv-table td {
  padding: 11px 12px; border-bottom: 1px solid var(--rule);
  font-size: 13px; color: var(--ink);
}
.inv-table tr:last-child td { border-bottom: none; }
.inv-table tbody tr:hover td { background: var(--surface); }

/* ─── RADIO OPTION ───────────────────────────────────────── */
.radio-option {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--ease);
}
.radio-option:hover { border-color: var(--muted); }
.radio-option.selected { border-color: var(--gold); background: var(--gold-pale); }
.radio-circle {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--rule); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: border-color var(--ease);
}
.radio-option.selected .radio-circle { border-color: var(--gold); }
.radio-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
