/* ══════════════════════════════════════════
   ARTIZAN — DASHBOARD SHARED CSS
   dashboard.css
   Used by: customer-dashboard, artisan-dashboard
══════════════════════════════════════════ */

/* ── BASE ── */
.dash-body {
  margin: 0;
  background: #F7F8FC;
  font-family: var(--font-body);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── SIDEBAR ── */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: 260px;
  height: 100vh;
  background: #0F0F10;
  display: flex;
  flex-direction: column;
  z-index: 300;
  transition: transform 0.3s var(--ease);
  overflow-y: auto;
}
.sidebar::-webkit-scrollbar { width: 0; }

.sb-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sb-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
}
.sb-logo .logo-text { color: #fff; font-size: 1.15rem; }
.sb-logo .logo-mark { width: 32px; height: 32px; font-size: 1rem; }
.sb-close {
  display: none;
  color: rgba(255,255,255,0.4);
  font-size: 1rem;
  background: none; border: none; cursor: pointer;
  padding: 4px;
}

.sb-user {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sb-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4F46E5, #818CF8);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.95rem; font-weight: 700; color: #fff;
  flex-shrink: 0;
}
.sb-avatar.artisan-av { background: linear-gradient(135deg, #059669, #34D399); }
.sb-user-name  { font-size: 0.88rem; font-weight: 600; color: #F1F5F9; margin-bottom: 2px; }
.sb-user-email { font-size: 0.72rem; color: rgba(255,255,255,0.35); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }

.sb-nav {
  flex: 1;
  padding: 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sb-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  color: rgba(255,255,255,0.5);
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  position: relative;
}
.sb-link i { width: 18px; text-align: center; font-size: 0.9rem; flex-shrink: 0; }
.sb-link span:not(.sb-badge) { flex: 1; }
.sb-link:hover { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.8); }
.sb-link.active { background: rgba(255,255,255,0.08); color: #fff; font-weight: 600; }
.sb-link.active i { color: #A5B4FC; }
.sb-link.active.artisan-active i { color: #6EE7B7; }

.sb-badge {
  background: #DC2626;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 20px;
  min-width: 20px;
  text-align: center;
}

/* Sidebar section label */
.sb-section-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.2);
  padding: 12px 12px 4px;
  margin-top: 8px;
}

.sb-bottom {
  padding: 16px 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sb-find-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px;
  background: var(--brand-purple);
  color: #fff;
  border-radius: 8px;
  font-size: 0.85rem; font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
}
.sb-find-btn:hover { background: var(--brand-purple-dark); }
.sb-find-btn.artisan-btn { background: var(--brand-green); }
.sb-find-btn.artisan-btn:hover { background: var(--brand-green-dark); }
.sb-logout {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px;
  color: rgba(255,255,255,0.35);
  font-size: 0.83rem;
  background: none; border: none; cursor: pointer;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}
.sb-logout:hover { background: rgba(220,38,38,0.1); color: #FCA5A5; }

/* Overlay */
.sb-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 299;
}
.sb-overlay.open { display: block; }

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

/* ── TOPBAR ── */
.dash-topbar {
  position: sticky; top: 0; z-index: 100;
  height: 60px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 28px;
  gap: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.topbar-menu {
  display: none;
  background: none; border: none; cursor: pointer;
  font-size: 1.1rem; color: var(--text-secondary);
  padding: 4px;
}
.topbar-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink-900);
  flex: 1;
}
.topbar-right { display: flex; align-items: center; gap: 8px; }
.topbar-icon-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: none; border: 1px solid var(--border);
  color: var(--text-secondary); font-size: 0.9rem;
  cursor: pointer; position: relative;
  transition: all 0.2s; text-decoration: none;
}
.topbar-icon-btn:hover { border-color: var(--brand-purple); color: var(--brand-purple); }
.topbar-badge {
  position: absolute; top: -4px; right: -4px;
  width: 18px; height: 18px;
  background: #DC2626; color: #fff;
  border-radius: 50%; font-size: 0.62rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #fff;
}

/* Notifications dropdown */
.notif-wrap { position: relative; }
.notif-dropdown {
  position: absolute; top: calc(100% + 10px); right: 0;
  width: 340px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  overflow: hidden;
}
.notif-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem; font-weight: 600;
}
.notif-clear {
  font-size: 0.78rem; color: var(--brand-purple); background: none; border: none; cursor: pointer;
}
.notif-list { max-height: 320px; overflow-y: auto; }
.notif-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--ink-50); }
.notif-item.unread { background: #F5F3FF; }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand-purple); flex-shrink: 0; margin-top: 5px; }
.notif-dot.read { background: transparent; border: 1px solid var(--border); }
.notif-text { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.5; flex: 1; }
.notif-time { font-size: 0.72rem; color: var(--text-muted); white-space: nowrap; }

/* ── CONTENT ── */
.dash-content { flex: 1; padding: 28px; }
.dash-panel { display: none; animation: panelIn 0.3s var(--ease) both; }
.dash-panel.active { display: block; }
@keyframes panelIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Panel hero */
.panel-hero {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 28px; gap: 16px; flex-wrap: wrap;
}
.panel-eyebrow { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 4px; }
.panel-heading {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700; color: var(--ink-900); margin-bottom: 6px;
}
.panel-sub { font-size: 0.88rem; color: var(--text-secondary); }
.panel-toprow { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 24px; gap: 16px; flex-wrap: wrap; }
.panel-cta-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px;
  background: var(--brand-purple); color: #fff;
  border-radius: var(--radius-full);
  font-size: 0.85rem; font-weight: 600;
  text-decoration: none; white-space: nowrap;
  transition: background 0.2s, transform 0.15s;
}
.panel-cta-btn:hover { background: var(--brand-purple-dark); transform: translateY(-1px); }
.panel-cta-btn.green-btn { background: var(--brand-green); }
.panel-cta-btn.green-btn:hover { background: var(--brand-green-dark); }

/* ── STAT CARDS ── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex; flex-direction: column; gap: 12px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-icon-wrap {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
}
.stat-icon-wrap.purple { background: #EEF2FF; color: var(--brand-purple); }
.stat-icon-wrap.green  { background: #ECFDF5; color: var(--brand-green); }
.stat-icon-wrap.amber  { background: #FFFBEB; color: #D97706; }
.stat-icon-wrap.blue   { background: #EFF6FF; color: #1447E6; }
.stat-icon-wrap.orange { background: #FFF7ED; color: #E85D04; }
.stat-val {
  font-family: var(--font-display);
  font-size: 1.7rem; font-weight: 900;
  color: var(--ink-900); line-height: 1;
}
.stat-lbl { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }
.stat-trend {
  font-size: 0.72rem; font-weight: 500;
  display: flex; align-items: center; gap: 4px;
}
.stat-trend.up { color: #059669; }
.stat-trend.down { color: #DC2626; }
.stat-trend.neutral { color: var(--text-muted); }

/* ── SECTION BLOCK ── */
.section-block { margin-bottom: 28px; }
.section-block-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.section-block-title { font-size: 1rem; font-weight: 600; color: var(--ink-900); }
.section-block-link {
  font-size: 0.82rem; font-weight: 500; color: var(--brand-purple);
  background: none; border: none; cursor: pointer; text-decoration: none;
  transition: color 0.2s;
}
.section-block-link:hover { color: var(--brand-purple-dark); }

/* ── BOOKING CARDS ── */
.booking-list, .booking-list-full { display: flex; flex-direction: column; gap: 10px; }
.booking-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex; align-items: center; gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s;
}
.booking-card:hover { box-shadow: var(--shadow-md); }
.bc-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: 700; color: #fff; flex-shrink: 0;
}
.bc-body { flex: 1; min-width: 0; }
.bc-title { font-size: 0.92rem; font-weight: 600; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bc-meta { display: flex; gap: 12px; font-size: 0.78rem; color: var(--text-muted); flex-wrap: wrap; }
.bc-meta i { margin-right: 3px; color: var(--brand-purple); }
.bc-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; }
.bc-status {
  font-size: 0.72rem; font-weight: 600; padding: 3px 10px;
  border-radius: var(--radius-full);
}
.status-pending     { background: #FEF3C7; color: #92400E; }
.status-confirmed   { background: #EFF6FF; color: #1447E6; }
.status-in_progress { background: #F5F3FF; color: #5B21B6; }
.status-completed   { background: #ECFDF5; color: #065F46; }
.status-cancelled   { background: #FFF1F2; color: #9F1239; }
.status-disputed    { background: #FFF7ED; color: #9A3412; }
.bc-amount { font-size: 0.88rem; font-weight: 700; color: var(--ink-900); }
.bc-actions { display: flex; gap: 6px; margin-top: 4px; }
.bc-btn {
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.72rem; font-weight: 600;
  cursor: pointer; border: none; transition: all 0.2s;
}
.bc-btn-primary { background: var(--brand-purple); color: #fff; }
.bc-btn-primary:hover { background: var(--brand-purple-dark); }
.bc-btn-secondary { background: var(--ink-100); color: var(--text-secondary); }
.bc-btn-secondary:hover { background: var(--ink-200); }
.bc-btn-danger { background: #FFF1F2; color: #9F1239; }
.bc-btn-danger:hover { background: #FFE4E6; }

/* Filter chips */
.booking-filters {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: 20px;
}
.bf-chip {
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.8rem; font-weight: 500;
  border: 1.5px solid var(--border);
  background: #fff; color: var(--text-secondary);
  cursor: pointer; transition: all 0.2s;
}
.bf-chip:hover { border-color: var(--brand-purple); color: var(--brand-purple); }
.bf-chip.active { background: var(--brand-purple); border-color: var(--brand-purple); color: #fff; }
.bf-chip.active.green-active { background: var(--brand-green); border-color: var(--brand-green); }

/* ── CHAT ── */
.chat-shell {
  display: grid;
  grid-template-columns: 300px 1fr;
  height: calc(100vh - 200px);
  min-height: 400px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.chat-list {
  border-right: 1px solid var(--border);
  overflow-y: auto;
  scrollbar-width: thin;
}
.chat-list-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background 0.15s;
}
.chat-list-item:hover { background: var(--ink-50); }
.chat-list-item.active { background: #F5F3FF; border-left: 3px solid var(--brand-purple); }
.cli-avatar { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.9rem; font-weight: 700; color: #fff; flex-shrink: 0; }
.cli-body { flex: 1; min-width: 0; }
.cli-name { font-size: 0.88rem; font-weight: 600; margin-bottom: 2px; }
.cli-preview { font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cli-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.cli-time { font-size: 0.7rem; color: var(--text-muted); }
.cli-unread { width: 18px; height: 18px; background: var(--brand-purple); color: #fff; border-radius: 50%; font-size: 0.62rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }

.chat-window { display: flex; flex-direction: column; }
.chat-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--text-muted); font-size: 0.9rem; }
.chat-empty i { font-size: 2.5rem; opacity: 0.3; }
.chat-active { display: flex; flex-direction: column; height: 100%; }
.chat-header { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); background: #fff; flex-shrink: 0; }
.ch-avatar { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.9rem; font-weight: 700; color: #fff; }
.ch-name { font-size: 0.92rem; font-weight: 600; }
.ch-skill { font-size: 0.75rem; color: var(--text-muted); }
.chat-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; scrollbar-width: thin; }
.msg { max-width: 70%; padding: 10px 14px; border-radius: 16px; font-size: 0.88rem; line-height: 1.5; animation: msgIn 0.2s var(--ease) both; }
.msg-in  { background: var(--ink-100); color: var(--text-primary); border-bottom-left-radius: 4px; align-self: flex-start; }
.msg-out { background: var(--brand-purple); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; }
.msg-time { font-size: 0.65rem; opacity: 0.6; margin-top: 4px; text-align: right; }
@keyframes msgIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.chat-input-wrap { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); background: #fff; flex-shrink: 0; }
.chat-input { flex: 1; padding: 10px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-full); font-family: var(--font-body); font-size: 0.88rem; outline: none; transition: border-color 0.2s; }
.chat-input:focus { border-color: var(--brand-purple); }
.chat-send { width: 38px; height: 38px; border-radius: 50%; background: var(--brand-purple); color: #fff; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 0.88rem; transition: background 0.2s; flex-shrink: 0; }
.chat-send:hover { background: var(--brand-purple-dark); }

/* ── SAVED ARTISANS GRID ── */
.saved-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.saved-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
}
.saved-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.sc-top { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.sc-avatar { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1rem; font-weight: 700; color: #fff; flex-shrink: 0; }
.sc-name { font-size: 0.9rem; font-weight: 600; margin-bottom: 2px; }
.sc-skill { font-size: 0.75rem; color: var(--text-secondary); }
.sc-rating { font-size: 0.78rem; color: var(--text-secondary); margin-bottom: 12px; }
.sc-rating i { color: #F59E0B; margin-right: 3px; }
.sc-actions { display: flex; gap: 8px; }
.sc-book { flex: 1; padding: 8px; background: var(--brand-purple-light); color: var(--brand-purple); border-radius: var(--radius-sm); font-size: 0.78rem; font-weight: 600; text-align: center; text-decoration: none; transition: all 0.2s; border: none; cursor: pointer; }
.sc-book:hover { background: var(--brand-purple); color: #fff; }
.sc-remove { padding: 8px; background: var(--ink-100); color: var(--text-muted); border-radius: var(--radius-sm); border: none; cursor: pointer; font-size: 0.8rem; transition: all 0.2s; }
.sc-remove:hover { background: #FFE4E6; color: #9F1239; }

/* ── RECOMMENDED ARTISANS ROW ── */
.rec-artisan-row { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.rec-artisan-row::-webkit-scrollbar { display: none; }
.ra-card {
  flex: 0 0 200px;
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
  text-decoration: none; color: inherit;
  display: block;
}
.ra-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.ra-avatar { width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; font-weight: 700; color: #fff; margin-bottom: 10px; }
.ra-name { font-size: 0.88rem; font-weight: 600; margin-bottom: 2px; }
.ra-skill { font-size: 0.75rem; color: var(--text-secondary); margin-bottom: 6px; }
.ra-rating { font-size: 0.75rem; color: var(--text-muted); }
.ra-rating i { color: #F59E0B; margin-right: 3px; }

/* ── PROFILE FORM ── */
.profile-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 28px; box-shadow: var(--shadow-sm); max-width: 680px; }
.profile-avatar-row { display: flex; align-items: center; gap: 20px; margin-bottom: 28px; }
.profile-dash-avatar { width: 68px; height: 68px; border-radius: 50%; background: linear-gradient(135deg, #4F46E5, #818CF8); display: flex; align-items: center; justify-content: center; font-size: 1.6rem; font-weight: 700; color: #fff; flex-shrink: 0; }
.profile-dash-avatar.artisan-av { background: linear-gradient(135deg, #059669, #34D399); }
.profile-dash-name { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; margin-bottom: 2px; }
.profile-dash-email { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 6px; }
.profile-badge { font-size: 0.72rem; font-weight: 600; padding: 3px 10px; border-radius: var(--radius-full); background: var(--brand-purple-light); color: var(--brand-purple); }
.profile-badge.artisan-badge { background: var(--brand-green-light); color: var(--brand-green); }
.pf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pf-field { margin-bottom: 18px; }
.pf-label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--ink-700); margin-bottom: 6px; }
.pf-input { width: 100%; padding: 11px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-md); font-family: var(--font-body); font-size: 0.9rem; color: var(--text-primary); background: var(--ink-50); transition: border-color 0.2s, box-shadow 0.2s, background 0.2s; outline: none; }
.pf-input:focus { border-color: var(--brand-purple); background: #fff; box-shadow: 0 0 0 3px rgba(79,70,229,0.1); }
.pf-divider { font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); padding: 16px 0 8px; border-top: 1px solid var(--border); margin: 8px 0 4px; }
.pf-error { font-size: 0.82rem; color: #DC2626; min-height: 18px; margin-bottom: 10px; }
.pf-success { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: #059669; background: #ECFDF5; border: 1px solid #6EE7B7; border-radius: var(--radius-sm); padding: 10px 14px; margin-bottom: 16px; }
.pf-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.pf-save-btn { padding: 11px 28px; background: var(--brand-purple); color: #fff; border: none; border-radius: var(--radius-md); font-family: var(--font-body); font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: background 0.2s; }
.pf-save-btn:hover { background: var(--brand-purple-dark); }
.pf-delete-btn { padding: 11px 20px; background: none; border: 1.5px solid #FECDD3; color: #9F1239; border-radius: var(--radius-md); font-family: var(--font-body); font-size: 0.88rem; font-weight: 500; cursor: pointer; transition: all 0.2s; }
.pf-delete-btn:hover { background: #FFF1F2; }

/* ── MODALS ── */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 500; display: flex; align-items: center; justify-content: center; padding: 24px; animation: fadeIn 0.2s ease; }
.modal-box { background: #fff; border-radius: var(--radius-xl); padding: 36px 32px; max-width: 420px; width: 100%; text-align: center; position: relative; animation: modalIn 0.3s var(--ease-spring) both; }
@keyframes modalIn { from { opacity: 0; transform: scale(0.94) translateY(10px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.modal-close-btn { position: absolute; top: 16px; right: 16px; width: 32px; height: 32px; border-radius: 50%; background: var(--ink-100); border: none; cursor: pointer; font-size: 0.85rem; color: var(--text-secondary); display: flex; align-items: center; justify-content: center; }
.modal-icon { width: 60px; height: 60px; border-radius: 50%; background: #FEF9C3; color: #CA8A04; font-size: 1.6rem; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.modal-icon.danger { background: #FFF1F2; color: #DC2626; }
.modal-title { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; margin-bottom: 8px; }
.modal-sub { font-size: 0.88rem; color: var(--text-secondary); margin-bottom: 20px; }

/* Star selector */
.star-selector { display: flex; justify-content: center; gap: 8px; margin-bottom: 8px; }
.star-btn { font-size: 1.8rem; color: #E5E7EB; background: none; border: none; cursor: pointer; transition: color 0.15s, transform 0.15s; }
.star-btn:hover, .star-btn.lit { color: #F59E0B; transform: scale(1.15); }
.star-label { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 16px; }
.review-textarea { width: 100%; padding: 10px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-md); font-family: var(--font-body); font-size: 0.88rem; resize: vertical; outline: none; margin-bottom: 16px; }
.review-textarea:focus { border-color: var(--brand-purple); }
.review-submit-btn { width: 100%; padding: 12px; background: var(--brand-purple); color: #fff; border: none; border-radius: var(--radius-md); font-family: var(--font-body); font-size: 0.92rem; font-weight: 600; cursor: pointer; transition: background 0.2s; }
.review-submit-btn:hover { background: var(--brand-purple-dark); }

/* Confirm modal */
.modal-actions { display: flex; gap: 10px; }
.confirm-yes-btn { flex: 1; padding: 12px; background: #DC2626; color: #fff; border: none; border-radius: var(--radius-md); font-family: var(--font-body); font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: background 0.2s; }
.confirm-yes-btn:hover { background: #B91C1C; }
.confirm-no-btn { flex: 1; padding: 12px; background: var(--ink-100); color: var(--text-secondary); border: none; border-radius: var(--radius-md); font-family: var(--font-body); font-size: 0.9rem; font-weight: 500; cursor: pointer; transition: background 0.2s; }
.confirm-no-btn:hover { background: var(--ink-200); }

/* ── TOAST ── */
.toast-wrap { position: fixed; bottom: 24px; right: 24px; display: flex; flex-direction: column; gap: 8px; z-index: 1000; }
.toast-item {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px;
  background: var(--ink-900);
  color: #F1F5F9;
  border-radius: var(--radius-md);
  font-size: 0.85rem; font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s var(--ease) both;
  min-width: 260px; max-width: 360px;
}
@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
.toast-item i { flex-shrink: 0; }

/* ── EMPTY STATE ── */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 52px 24px; text-align: center; color: var(--text-muted);
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
}
.empty-state i { font-size: 2.5rem; opacity: 0.3; margin-bottom: 14px; }
.empty-state h4 { font-size: 1rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.empty-state p { font-size: 0.85rem; margin-bottom: 20px; }
.empty-state a, .empty-state button { display: inline-flex; align-items: center; gap: 8px; padding: 10px 22px; background: var(--brand-purple); color: #fff; border-radius: var(--radius-full); font-size: 0.85rem; font-weight: 600; text-decoration: none; border: none; cursor: pointer; transition: background 0.2s; }
.empty-state a:hover, .empty-state button:hover { background: var(--brand-purple-dark); }

/* ── ARTISAN DASHBOARD EXTRAS ── */
.avail-toggle-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 28px; box-shadow: var(--shadow-sm); }
.atc-left h4 { font-size: 0.95rem; font-weight: 600; margin-bottom: 4px; }
.atc-left p  { font-size: 0.82rem; color: var(--text-secondary); }
.avail-toggle { position: relative; cursor: pointer; }
.avail-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.avail-track { width: 52px; height: 28px; background: var(--ink-200); border-radius: 14px; position: relative; transition: background 0.25s; }
.avail-toggle input:checked + .avail-track { background: var(--brand-green); }
.avail-thumb { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; background: #fff; border-radius: 50%; box-shadow: 0 1px 4px rgba(0,0,0,0.2); transition: transform 0.25s var(--ease-spring); }
.avail-toggle input:checked + .avail-track .avail-thumb { transform: translateX(24px); }

.trust-score-widget { background: linear-gradient(135deg, #EEF2FF, #F5F3FF); border: 1px solid #C7D2FE; border-radius: var(--radius-lg); padding: 18px 20px; margin-bottom: 28px; display: flex; align-items: center; gap: 20px; }
.ts-num { font-family: var(--font-display); font-size: 2.2rem; font-weight: 900; color: var(--brand-purple); line-height: 1; }
.ts-label { font-size: 0.75rem; color: var(--text-muted); }
.ts-band { font-size: 0.78rem; font-weight: 600; padding: 3px 10px; border-radius: var(--radius-full); background: var(--trust-high-bg); color: var(--trust-high-color); margin-top: 6px; display: inline-block; }
.ts-bars { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.ts-bar-row { display: grid; grid-template-columns: 100px 1fr 40px; align-items: center; gap: 8px; font-size: 0.72rem; color: var(--text-secondary); }
.ts-track { height: 4px; background: #E0E7FF; border-radius: 2px; overflow: hidden; }
.ts-fill { height: 100%; border-radius: 2px; }

/* ── SCHEDULE ── */
.schedule-week { display: grid; grid-template-columns: repeat(7,1fr); gap: 8px; margin-bottom: 20px; }
.sched-day { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 10px 6px; text-align: center; }
.sched-day.today { border-color: var(--brand-purple); background: var(--brand-purple-light); }
.sched-day .day-label { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 4px; }
.sched-day .day-num { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; color: var(--ink-900); }
.sched-day .day-bookings { font-size: 0.65rem; color: var(--brand-green); margin-top: 4px; }

/* ── EARNINGS ── */
.earnings-summary { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin-bottom: 24px; }
.earnings-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px 20px; box-shadow: var(--shadow-sm); }
.ec-period { font-size: 0.72rem; color: var(--text-muted); margin-bottom: 4px; }
.ec-amount { font-family: var(--font-display); font-size: 1.6rem; font-weight: 900; color: var(--brand-green); }
.ec-jobs { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; }
.withdraw-form { background: var(--brand-green-light); border: 1px solid #6EE7B7; border-radius: var(--radius-lg); padding: 18px 20px; display: flex; align-items: center; gap: 14px; margin-bottom: 24px; flex-wrap: wrap; }
.withdraw-form h4 { font-size: 0.92rem; font-weight: 600; flex: 1; min-width: 120px; }
.withdraw-input { padding: 9px 14px; border: 1.5px solid #6EE7B7; border-radius: var(--radius-md); font-family: var(--font-body); font-size: 0.88rem; background: #fff; outline: none; width: 160px; }
.withdraw-btn { padding: 9px 20px; background: var(--brand-green); color: #fff; border: none; border-radius: var(--radius-md); font-family: var(--font-body); font-size: 0.88rem; font-weight: 600; cursor: pointer; transition: background 0.2s; white-space: nowrap; }
.withdraw-btn:hover { background: var(--brand-green-dark); }

/* ── PORTFOLIO MANAGER ── */
.portfolio-manager-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px,1fr)); gap: 12px; }
.pm-item { aspect-ratio: 1; border-radius: var(--radius-md); background: var(--ink-100); position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; color: var(--ink-400); font-size: 1.5rem; }
.pm-item.add-btn { border: 2px dashed var(--border); cursor: pointer; transition: border-color 0.2s, background 0.2s; }
.pm-item.add-btn:hover { border-color: var(--brand-green); background: var(--brand-green-light); color: var(--brand-green); }
.pm-delete { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; background: rgba(220,38,38,0.85); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; border: none; cursor: pointer; opacity: 0; transition: opacity 0.2s; }
.pm-item:hover .pm-delete { opacity: 1; }
.pm-caption { position: absolute; bottom: 0; left: 0; right: 0; padding: 6px 8px; background: linear-gradient(to top, rgba(0,0,0,0.6), transparent); color: #fff; font-size: 0.65rem; }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .stat-grid { grid-template-columns: repeat(2,1fr); }
  .earnings-summary { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sb-close { display: flex; }
  .dash-main { margin-left: 0; }
  .topbar-menu { display: block; }
  .chat-shell { grid-template-columns: 1fr; height: auto; }
  .chat-list { max-height: 240px; border-right: none; border-bottom: 1px solid var(--border); }
  .chat-window { height: 380px; }
}
@media (max-width: 640px) {
  .stat-grid { grid-template-columns: repeat(2,1fr); }
  .dash-content { padding: 16px; }
  .pf-row { grid-template-columns: 1fr; }
  .modal-box { padding: 28px 20px; }
  .earnings-summary { grid-template-columns: 1fr; }
  .schedule-week { grid-template-columns: repeat(4,1fr); }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }