/* =============================================
   CuidarBem — Modern Design System
   ============================================= */

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }

:root {
  --primary: #FF6B35;
  --primary-dark: #e55a26;
  --primary-light: #fff0eb;
  --secondary: #1a1a2e;
  --accent: #00c896;
  --accent2: #7B61FF;
  --danger: #ff4757;
  --warning: #ffa502;
  --bg: #f7f8fc;
  --surface: #ffffff;
  --border: #eaedf3;
  --text: #1a1a2e;
  --text-2: #64748b;
  --text-3: #94a3b8;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow: 0 4px 16px rgba(0,0,0,.1);
  --shadow-lg: 0 20px 60px rgba(0,0,0,.15);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --sidebar-w: 270px;
  --font: 'Plus Jakarta Sans', sans-serif;
  --font-display: 'Fraunces', serif;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── LOADING ─────────────────────────────── */
#loading {
  position: fixed; inset: 0;
  background: linear-gradient(135deg, #FF6B35 0%, #FF8C55 50%, #FFB380 100%);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
  transition: opacity .5s;
}
.loading-inner { text-align: center; }
.loading-logo {
  font-size: 4rem;
  animation: loadBounce 1s ease-in-out infinite alternate;
}
.loading-title {
  font-family: var(--font-display);
  color: white; font-size: 2rem; font-weight: 700;
  margin: 12px 0 24px;
}
.loading-bar {
  width: 200px; height: 4px;
  background: rgba(255,255,255,.3);
  border-radius: 99px; overflow: hidden;
  margin: 0 auto;
}
.loading-fill {
  height: 100%; background: white; border-radius: 99px;
  animation: loadFill 1.5s ease-in-out infinite;
}
@keyframes loadBounce { from { transform: translateY(0); } to { transform: translateY(-12px); } }
@keyframes loadFill { 0% { width:0%; } 100% { width:100%; } }

/* ── AUTH ─────────────────────────────────── */
.auth-screen {
  min-height: 100vh; display: flex;
}
.auth-left {
  flex: 1; position: relative;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  padding: 3rem;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.auth-brand {
  display: flex; align-items: center; gap: .75rem;
  font-family: var(--font-display); font-size: 1.5rem;
  font-weight: 700; color: white; position: relative; z-index: 1;
}
.brand-icon { font-size: 1.8rem; }
.auth-hero {
  flex: 1; display: flex; flex-direction: column;
  justify-content: center; position: relative; z-index: 1;
}
.auth-headline {
  font-family: var(--font-display); font-size: clamp(2.2rem,4vw,3.5rem);
  color: white; line-height: 1.2; font-weight: 700; margin-bottom: 1.5rem;
}
.auth-headline em { color: #FF6B35; font-style: italic; }
.auth-sub { color: rgba(255,255,255,.7); font-size: 1.1rem; line-height: 1.7; max-width: 440px; margin-bottom: 2rem; }
.auth-stats { display: flex; gap: 1rem; flex-wrap: wrap; }
.stat-pill {
  background: rgba(255,255,255,.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.15);
  color: white; padding: .5rem 1.25rem;
  border-radius: 99px; font-size: .9rem;
}
.stat-pill strong { color: #FF6B35; margin-right: .25rem; }
.auth-bg-shapes { position: absolute; inset: 0; pointer-events: none; }
.shape {
  position: absolute; border-radius: 50%;
  background: rgba(255,107,53,.15);
  animation: shapeFloat 8s ease-in-out infinite;
}
.s1 { width: 400px; height: 400px; top: -100px; right: -100px; animation-delay: 0s; }
.s2 { width: 250px; height: 250px; bottom: 100px; left: -50px; animation-delay: 3s; }
.s3 { width: 180px; height: 180px; top: 50%; right: 80px; animation-delay: 5s; }
@keyframes shapeFloat {
  0%,100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-30px) rotate(10deg); }
}

.auth-right {
  width: 480px; display: flex; align-items: center;
  background: var(--surface); padding: 3rem;
}
.auth-box { width: 100%; }
.form-title { font-family: var(--font-display); font-size: 2rem; font-weight: 700; margin-bottom: .5rem; }
.form-sub { color: var(--text-2); margin-bottom: 2rem; }
.fields-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.field-group { margin-bottom: 1.25rem; }
.field-group label { display: block; font-weight: 600; font-size: .85rem; color: var(--text-2); margin-bottom: .4rem; text-transform: uppercase; letter-spacing: .5px; }
.field-group input,
.field-group select,
.field-group textarea {
  width: 100%; padding: .85rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font); font-size: .95rem; color: var(--text);
  background: var(--bg);
  transition: border-color .2s, box-shadow .2s, transform .15s;
  resize: vertical;
}
.field-group input:focus,
.field-group select:focus,
.field-group textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255,107,53,.15);
  background: white;
  transform: translateY(-1px);
}
.field-group small { color: var(--text-3); font-size: .8rem; margin-top: .3rem; display: block; }
.pass-wrap { position: relative; }
.pass-wrap input { padding-right: 3rem; }
.pass-toggle {
  position: absolute; right: 1rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; font-size: 1rem; opacity: .6;
}

.btn-main {
  width: 100%; padding: .9rem 1.5rem;
  background: linear-gradient(135deg, var(--primary), #FF8C55);
  color: white; border: none; border-radius: var(--radius-sm);
  font-family: var(--font); font-size: 1rem; font-weight: 700;
  cursor: pointer; transition: transform .2s, box-shadow .2s;
  display: flex; align-items: center; justify-content: center; gap: .5rem;
}
.btn-main:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(255,107,53,.4); }
.btn-main:active { transform: translateY(0); }
.btn-main.small { width: auto; padding: .7rem 1.25rem; font-size: .9rem; }
.btn-main.danger { background: linear-gradient(135deg, var(--danger), #ff6b6b); }
.btn-main.success { background: linear-gradient(135deg, var(--accent), #00a87a); }

.btn-ghost {
  width: 100%; padding: .85rem; background: transparent;
  border: 2px solid var(--border); border-radius: var(--radius-sm);
  font-family: var(--font); font-size: .95rem; font-weight: 600;
  color: var(--text-2); cursor: pointer;
  transition: border-color .2s, color .2s;
  margin-top: .75rem;
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }

.auth-divider {
  text-align: center; margin: 1.25rem 0; position: relative;
  color: var(--text-3); font-size: .85rem;
}
.auth-divider::before, .auth-divider::after {
  content:''; position: absolute; top: 50%;
  width: calc(50% - 2rem); height: 1px; background: var(--border);
}
.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }

/* ── HAMBURGER ───────────────────────────── */
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  position: fixed; top: 1.25rem; left: 1.25rem; z-index: 1002;
  width: 44px; height: 44px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  cursor: pointer; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm);
}
.hamburger span {
  display: block; width: 20px; height: 2px;
  background: var(--text); border-radius: 99px;
  transition: all .3s;
}

/* ── SIDEBAR ─────────────────────────────── */
#sidebarOverlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.4); z-index: 999;
}
.sidebar {
  position: fixed; left: 0; top: 0;
  width: var(--sidebar-w); height: 100vh;
  background: var(--surface); z-index: 1000;
  display: flex; flex-direction: column;
  border-right: 1px solid var(--border);
  transition: transform .3s;
  overflow-y: auto;
}
.sidebar-top {
  padding: 1.5rem;
  background: linear-gradient(160deg, var(--secondary) 0%, #0f3460 100%);
  color: white;
}
.sb-logo {
  font-family: var(--font-display); font-size: 1.25rem;
  font-weight: 700; margin-bottom: 1.5rem;
}
.sb-user { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.sb-avatar {
  width: 46px; height: 46px; border-radius: 12px;
  background: rgba(255,255,255,.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; flex-shrink: 0;
}
.sb-name { font-weight: 700; font-size: .95rem; }
.sb-type { font-size: .8rem; opacity: .7; margin-top: .15rem; }
.sb-balance {
  background: rgba(255,107,53,.2);
  border: 1px solid rgba(255,107,53,.3);
  border-radius: var(--radius-sm); padding: .75rem 1rem;
}
.sb-bal-label { font-size: .75rem; opacity: .8; margin-bottom: .25rem; }
.sb-bal-amount { font-size: 1.4rem; font-weight: 800; }

.sb-nav { flex: 1; padding: 1rem 0; }
.nav-group { margin-bottom: .5rem; }
.nav-label {
  font-size: .7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--text-3);
  padding: .5rem 1.25rem; margin-top: .5rem;
}
.nav-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .7rem 1.25rem; cursor: pointer;
  border-radius: 0; font-size: .9rem; font-weight: 500;
  color: var(--text-2); transition: all .2s;
  position: relative;
}
.nav-item:hover { background: var(--primary-light); color: var(--primary); }
.nav-item.active {
  background: var(--primary-light); color: var(--primary);
  font-weight: 700;
}
.nav-item.active::after {
  content: ''; position: absolute; right: 0; top: 20%; bottom: 20%;
  width: 3px; background: var(--primary); border-radius: 99px 0 0 99px;
}
.ni { font-size: 1.1rem; }
.nav-badge {
  margin-left: auto; background: var(--danger);
  color: white; font-size: .65rem; font-weight: 800;
  width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.admin-nav { color: #7B61FF; }
.admin-nav:hover { background: rgba(123,97,255,.1); color: #7B61FF; }
.admin-nav.active { background: rgba(123,97,255,.1); color: #7B61FF; }
.logout-item { color: var(--danger); }
.logout-item:hover { background: rgba(255,71,87,.1); color: var(--danger); }

/* ── MAIN ────────────────────────────────── */
.main {
  margin-left: var(--sidebar-w);
  min-height: 100vh; padding: 2rem;
  background: var(--bg);
}

/* ── PAGE / HEADER ───────────────────────── */
.page { animation: fadeUp .4s ease; }
.hidden { display: none !important; }
@keyframes fadeUp { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }

.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.75rem; flex-wrap: wrap; gap: 1rem;
}
.page-title { font-family: var(--font-display); font-size: 1.8rem; font-weight: 700; }
.page-subtitle { color: var(--text-2); font-size: .95rem; margin-top: .25rem; }
.header-actions { display: flex; gap: .75rem; }
.icon-btn {
  width: 42px; height: 42px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface);
  cursor: pointer; font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.icon-btn:hover { background: var(--primary); border-color: var(--primary); transform: translateY(-2px); }

/* ── HOME ────────────────────────────────── */
.stats-row {
  display: grid; grid-template-columns: repeat(4,1fr);
  gap: 1rem; margin-bottom: 2rem;
}
.stat-chip {
  background: var(--surface); border-radius: var(--radius);
  padding: 1.25rem; display: flex; align-items: center; gap: 1rem;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
  transition: transform .2s, box-shadow .2s;
}
.stat-chip:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.sc-icon { font-size: 1.8rem; }
.sc-val { font-size: 1.5rem; font-weight: 800; color: var(--primary); }
.sc-lab { font-size: .8rem; color: var(--text-2); margin-top: .15rem; }

.quick-actions {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr));
  gap: 1rem; margin-bottom: 2rem;
}
.qa-card {
  background: var(--surface); border-radius: var(--radius);
  padding: 1.5rem 1.25rem; text-align: center;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
  cursor: pointer; transition: all .25s;
}
.qa-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--primary); }
.qa-icon { font-size: 2rem; margin-bottom: .75rem; }
.qa-label { font-size: .9rem; font-weight: 600; color: var(--text); }

.section-title {
  font-family: var(--font-display); font-size: 1.3rem;
  font-weight: 700; margin-bottom: 1.25rem; color: var(--text);
}
.featured-grid {
  display: grid; grid-template-columns: repeat(auto-fill,minmax(280px,1fr));
  gap: 1.25rem;
}

/* ── CARE CARDS ─────────────────────────── */
.care-grid {
  display: grid; grid-template-columns: repeat(auto-fill,minmax(280px,1fr));
  gap: 1.25rem;
}
.care-card {
  background: var(--surface); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-sm);
  border: 1px solid var(--border); transition: all .3s;
  display: flex; flex-direction: column;
}
.care-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.care-cover {
  height: 140px;
  background: linear-gradient(135deg, #FF6B35, #FF8C55);
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.care-cover.pet { background: linear-gradient(135deg, #00c896, #00a87a); }
.care-cover.elderly { background: linear-gradient(135deg, #7B61FF, #9B7FFF); }
.care-avatar {
  width: 80px; height: 80px; border-radius: 50%;
  background: rgba(255,255,255,.2);
  border: 4px solid rgba(255,255,255,.4);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem;
}
.verified-check {
  position: absolute; top: .75rem; right: .75rem;
  background: white; border-radius: 50%;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem; box-shadow: var(--shadow-sm);
}
.care-body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }
.care-name { font-weight: 800; font-size: 1.05rem; margin-bottom: .3rem; }
.care-rating {
  display: flex; align-items: center; gap: .4rem;
  font-size: .85rem; color: var(--text-2); margin-bottom: .75rem;
}
.stars { color: #fbbf24; }
.care-meta {
  display: flex; gap: 1rem; font-size: .82rem;
  color: var(--text-2); margin-bottom: .75rem;
}
.care-price {
  font-size: 1.3rem; font-weight: 800; color: var(--primary);
  margin-bottom: .75rem;
}
.care-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.tag {
  background: var(--primary-light); color: var(--primary);
  padding: .25rem .7rem; border-radius: 99px; font-size: .75rem; font-weight: 600;
}
.tag.pet { background: rgba(0,200,150,.1); color: #00a87a; }
.tag.elderly { background: rgba(123,97,255,.1); color: #7B61FF; }
.care-bio { font-size: .85rem; color: var(--text-2); margin-bottom: 1rem; line-height: 1.6; }
.care-actions { display: flex; gap: .5rem; margin-top: auto; }
.care-actions .btn-main { flex: 1; }
.chat-btn {
  width: 42px; height: 42px; border-radius: var(--radius-sm);
  border: 2px solid var(--border); background: var(--bg);
  cursor: pointer; font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s; flex-shrink: 0;
}
.chat-btn:hover { border-color: var(--accent); background: rgba(0,200,150,.1); }
.unavailable { opacity: .6; pointer-events: none; }

/* ── SEARCH BAR ──────────────────────────── */
.search-bar {
  display: flex; gap: .75rem; margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.search-bar input {
  flex: 1; min-width: 200px; padding: .85rem 1rem;
  border: 2px solid var(--border); border-radius: var(--radius-sm);
  font-family: var(--font); font-size: .95rem;
  background: var(--surface); transition: border-color .2s;
}
.search-bar input:focus { outline: none; border-color: var(--primary); }

/* ── FILTER TABS ─────────────────────────── */
.filter-tabs { display: flex; gap: .5rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.filter-tab {
  padding: .55rem 1.25rem; border-radius: 99px;
  border: 2px solid var(--border); background: var(--surface);
  font-family: var(--font); font-size: .875rem; font-weight: 600;
  cursor: pointer; color: var(--text-2); transition: all .2s;
}
.filter-tab:hover, .filter-tab.active {
  background: var(--primary); border-color: var(--primary); color: white;
}

/* ── BOOKING CARD ────────────────────────── */
.booking-card {
  background: var(--surface); border-radius: var(--radius);
  padding: 1.25rem 1.5rem; margin-bottom: 1rem;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.bk-icon {
  width: 52px; height: 52px; border-radius: 12px;
  background: var(--primary-light); display: flex;
  align-items: center; justify-content: center; font-size: 1.5rem; flex-shrink: 0;
}
.bk-info { flex: 1; }
.bk-name { font-weight: 700; margin-bottom: .2rem; }
.bk-meta { font-size: .85rem; color: var(--text-2); }
.bk-status { flex-shrink: 0; }
.status-badge {
  padding: .35rem 1rem; border-radius: 99px;
  font-size: .78rem; font-weight: 700; text-transform: uppercase;
}
.status-pending { background: rgba(255,165,2,.15); color: var(--warning); }
.status-confirmed { background: rgba(0,200,150,.15); color: var(--accent); }
.status-completed { background: rgba(123,97,255,.15); color: var(--accent2); }
.status-cancelled { background: rgba(255,71,87,.15); color: var(--danger); }

/* ── WALLET ──────────────────────────────── */
.wallet-hero {
  background: linear-gradient(135deg, var(--secondary), #0f3460);
  border-radius: var(--radius-lg); padding: 2.5rem;
  color: white; text-align: center; margin-bottom: 2rem;
}
.wh-label { font-size: .9rem; opacity: .75; margin-bottom: .5rem; }
.wh-amount { font-size: 3rem; font-weight: 800; font-family: var(--font-display); margin-bottom: 1.5rem; }
.wh-actions { display: flex; gap: 1rem; justify-content: center; }
.wh-btn {
  padding: .85rem 2rem; border-radius: var(--radius-sm);
  border: none; font-family: var(--font); font-size: .95rem;
  font-weight: 700; cursor: pointer; transition: all .2s;
}
.wh-btn.deposit { background: var(--accent); color: white; }
.wh-btn.withdraw { background: var(--danger); color: white; }
.wh-btn:hover { transform: translateY(-2px); opacity: .9; }

.transaction-list { display: flex; flex-direction: column; gap: .5rem; }
.tx-item {
  background: var(--surface); border-radius: var(--radius);
  padding: 1rem 1.25rem; display: flex; align-items: center;
  gap: 1rem; box-shadow: var(--shadow-sm); border: 1px solid var(--border);
}
.tx-icon {
  width: 44px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; flex-shrink: 0;
}
.tx-icon.income { background: rgba(0,200,150,.15); }
.tx-icon.expense { background: rgba(255,71,87,.15); }
.tx-icon.fee { background: rgba(255,165,2,.15); }
.tx-info { flex: 1; }
.tx-desc { font-weight: 600; font-size: .95rem; }
.tx-date { font-size: .8rem; color: var(--text-2); margin-top: .15rem; }
.tx-amount { font-weight: 800; font-size: 1.05rem; }
.tx-amount.positive { color: var(--accent); }
.tx-amount.negative { color: var(--danger); }

/* ── CHAT LAYOUT ─────────────────────────── */
.chat-layout {
  display: grid; grid-template-columns: 320px 1fr;
  gap: 1rem; height: calc(100vh - 200px);
}
.chat-sidebar {
  background: var(--surface); border-radius: var(--radius-lg);
  border: 1px solid var(--border); display: flex; flex-direction: column;
  overflow: hidden;
}
.chat-search { padding: 1rem; border-bottom: 1px solid var(--border); }
.chat-search input {
  width: 100%; padding: .7rem 1rem; border: 2px solid var(--border);
  border-radius: var(--radius-sm); font-family: var(--font); font-size: .9rem;
}
.chat-search input:focus { outline: none; border-color: var(--primary); }
.chat-list { flex: 1; overflow-y: auto; }
.chat-item {
  display: flex; align-items: center; gap: .75rem;
  padding: 1rem 1.25rem; cursor: pointer; border-bottom: 1px solid var(--border);
  transition: background .2s;
}
.chat-item:hover { background: var(--bg); }
.chat-item.active { background: var(--primary-light); }
.ci-avatar {
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--primary-light); display: flex;
  align-items: center; justify-content: center; font-size: 1.3rem; flex-shrink: 0;
}
.ci-name { font-weight: 600; font-size: .9rem; }
.ci-preview { font-size: .8rem; color: var(--text-2); margin-top: .15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ci-time { font-size: .75rem; color: var(--text-3); flex-shrink: 0; }

.chat-window {
  background: var(--surface); border-radius: var(--radius-lg);
  border: 1px solid var(--border); display: flex; flex-direction: column;
  overflow: hidden;
}
.chat-win-header {
  padding: 1rem 1.5rem; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: .75rem;
}
.cw-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--primary-light);
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
}
.cw-name { font-weight: 700; }
.cw-status { font-size: .8rem; color: var(--accent); }
.chat-msgs {
  flex: 1; overflow-y: auto; padding: 1.5rem;
  display: flex; flex-direction: column; gap: .75rem;
  background: var(--bg);
}
.chat-empty { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--text-2); }
.ce-icon { font-size: 3rem; margin-bottom: 1rem; }
.chat-empty h3 { font-size: 1.1rem; margin-bottom: .5rem; }
.msg {
  max-width: 70%; padding: .75rem 1rem;
  border-radius: 18px; font-size: .9rem; line-height: 1.6;
  animation: fadeUp .2s;
}
.msg.received { background: var(--surface); align-self: flex-start; border-radius: 4px 18px 18px 18px; box-shadow: var(--shadow-sm); }
.msg.sent { background: linear-gradient(135deg, var(--primary), #FF8C55); color: white; align-self: flex-end; border-radius: 18px 18px 4px 18px; }
.msg-time { font-size: .72rem; opacity: .7; margin-top: .3rem; }
.chat-input-bar {
  padding: 1rem 1.5rem; border-top: 1px solid var(--border);
  display: flex; gap: .75rem; align-items: center;
}
.chat-input-bar input {
  flex: 1; padding: .75rem 1.25rem; border: 2px solid var(--border);
  border-radius: 99px; font-family: var(--font); font-size: .95rem;
  transition: border-color .2s;
}
.chat-input-bar input:focus { outline: none; border-color: var(--primary); }
.chat-send-btn {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #FF8C55);
  border: none; color: white; font-size: 1rem;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: transform .2s;
}
.chat-send-btn:hover { transform: scale(1.1); }

/* ── PROFILE ─────────────────────────────── */
.profile-card {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 2rem; margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
  display: flex; align-items: center; gap: 1.5rem;
}
.profile-avatar {
  width: 80px; height: 80px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #FF8C55);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem; flex-shrink: 0;
}
.profile-name { font-size: 1.4rem; font-weight: 800; margin-bottom: .25rem; }
.profile-type { color: var(--text-2); margin-bottom: .5rem; }
.verified-badge {
  display: inline-flex; align-items: center; gap: .4rem;
  background: rgba(0,200,150,.1); color: var(--accent);
  padding: .3rem .85rem; border-radius: 99px;
  font-size: .82rem; font-weight: 700;
}
.profile-form { background: var(--surface); border-radius: var(--radius-lg); padding: 1.75rem; box-shadow: var(--shadow-sm); border: 1px solid var(--border); }

/* ── VERIFICATION ────────────────────────── */
.verif-card {
  background: var(--surface); border-radius: var(--radius);
  padding: 1.5rem; margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
}
.verif-progress-wrap { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.verif-progress-bar {
  flex: 1; height: 10px; background: var(--border);
  border-radius: 99px; overflow: hidden;
}
.verif-progress-fill {
  height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 99px; transition: width .5s ease;
}
.verif-pct { font-weight: 700; color: var(--primary); white-space: nowrap; font-size: .9rem; }
.verif-info {
  background: rgba(255,165,2,.1); border: 1px solid rgba(255,165,2,.3);
  padding: .75rem 1rem; border-radius: var(--radius-sm);
  font-size: .85rem; color: #92600a;
}
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(220px,1fr)); gap: 1rem; }
.doc-card {
  background: var(--surface); border-radius: var(--radius);
  padding: 1.5rem; text-align: center;
  box-shadow: var(--shadow-sm); border: 2px solid var(--border);
  transition: all .2s;
}
.doc-card:hover { border-color: var(--primary); }
.doc-icon { font-size: 2.5rem; margin-bottom: .75rem; }
.doc-name { font-weight: 700; font-size: .9rem; margin-bottom: .5rem; }
.doc-status {
  font-size: .8rem; color: var(--text-2);
  margin-bottom: 1rem; font-weight: 500;
}
.doc-status.approved { color: var(--accent); }
.doc-status.rejected { color: var(--danger); }
.doc-status.pending { color: var(--warning); }
.doc-btn {
  width: 100%; padding: .65rem; background: var(--primary-light);
  color: var(--primary); border: 2px solid var(--primary);
  border-radius: var(--radius-sm); font-family: var(--font);
  font-weight: 700; cursor: pointer; transition: all .2s; font-size: .85rem;
}
.doc-btn:hover { background: var(--primary); color: white; }
.doc-btn:disabled { opacity: .5; cursor: not-allowed; }

/* ── GUIDE ───────────────────────────────── */
.guide-card {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 2rem; box-shadow: var(--shadow-sm); border: 1px solid var(--border);
}
.guide-card h3 { font-size: 1.25rem; font-weight: 800; margin-bottom: 1.5rem; }
.guide-steps { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1.5rem; }
.guide-step {
  display: flex; gap: 1rem; align-items: flex-start;
  padding: 1rem; border-radius: var(--radius-sm); background: var(--bg);
}
.gs-num {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--primary); color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .9rem; flex-shrink: 0;
}
.guide-step strong { display: block; font-weight: 700; margin-bottom: .25rem; }
.guide-step p { font-size: .875rem; color: var(--text-2); }

/* ── ADMIN ───────────────────────────────── */
.admin-badge {
  background: rgba(123,97,255,.15); color: var(--accent2);
  padding: .4rem 1rem; border-radius: 99px;
  font-size: .8rem; font-weight: 700;
}
.admin-tabs { display: flex; gap: .5rem; margin-bottom: 1.5rem; }
.admin-tab {
  padding: .6rem 1.25rem; border-radius: var(--radius-sm);
  border: 2px solid var(--border); background: var(--surface);
  font-family: var(--font); font-size: .875rem; font-weight: 600;
  cursor: pointer; color: var(--text-2); transition: all .2s;
}
.admin-tab:hover, .admin-tab.active {
  background: var(--accent2); border-color: var(--accent2); color: white;
}
.admin-doc-card {
  background: var(--surface); border-radius: var(--radius);
  padding: 1.25rem 1.5rem; margin-bottom: 1rem;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
}
.admin-doc-header {
  display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem;
}
.admin-user-av {
  width: 46px; height: 46px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent2), #9B7FFF);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
}
.admin-user-name { font-weight: 700; font-size: 1rem; }
.admin-user-id { font-size: .78rem; color: var(--text-3); }
.doc-item {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 1rem; margin-top: .75rem;
}
.doc-item-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: .5rem;
}
.doc-item-name { font-weight: 700; font-size: .9rem; }
.doc-item-meta { font-size: .78rem; color: var(--text-2); margin-bottom: .75rem; }
.doc-preview img, .doc-preview video {
  max-width: 100%; max-height: 200px;
  border-radius: var(--radius-sm); display: block;
  margin-bottom: .75rem;
}
.doc-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.doc-actions a, .doc-actions button {
  padding: .4rem .9rem; border-radius: var(--radius-sm);
  font-size: .8rem; font-weight: 700; cursor: pointer;
  border: none; text-decoration: none; display: inline-block;
  transition: opacity .2s;
}
.doc-actions a:hover, .doc-actions button:hover { opacity: .85; }
.btn-approve { background: var(--accent); color: white; }
.btn-reject { background: var(--danger); color: white; }
.btn-download { background: var(--bg); border: 1px solid var(--border) !important; color: var(--text); }

/* ── MODAL ───────────────────────────────── */
.modal {
  display: none; position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,.5); backdrop-filter: blur(4px);
  align-items: center; justify-content: center; padding: 1rem;
}
.modal.active { display: flex; }
.modal-box {
  background: var(--surface); border-radius: var(--radius-lg);
  width: 100%; max-width: 560px; max-height: 90vh;
  overflow-y: auto; animation: modalIn .3s ease;
  box-shadow: var(--shadow-lg);
}
.modal-box.small { max-width: 400px; }
.modal-box.chat-modal-box {
  max-width: 500px; max-height: 80vh;
  display: flex; flex-direction: column;
}
.modal-box.chat-modal-box .modal-body { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
@keyframes modalIn { from { opacity:0; transform:scale(.95) translateY(20px); } to { opacity:1; transform:scale(1) translateY(0); } }
.modal-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.5rem; border-bottom: 1px solid var(--border);
}
.modal-head h2 { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; }
.modal-close {
  width: 36px; height: 36px; border-radius: 50%;
  border: none; background: var(--bg); cursor: pointer;
  font-size: 1rem; color: var(--text-2); display: flex;
  align-items: center; justify-content: center; transition: all .2s;
}
.modal-close:hover { background: var(--danger); color: white; }
.modal-body { padding: 1.5rem; }
.modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }

/* ── BOOKING INFO ────────────────────────── */
.selected-care-info {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem; background: var(--bg); border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
}
.sci-av {
  width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #FF8C55);
  display: flex; align-items: center; justify-content: center; font-size: 1.6rem;
}
.sci-name { font-weight: 700; font-size: 1rem; }
.sci-meta { font-size: .85rem; color: var(--text-2); margin-top: .2rem; }

.time-slots { display: flex; flex-wrap: wrap; gap: .5rem; }
.time-slot {
  padding: .4rem .85rem; border-radius: var(--radius-sm);
  border: 2px solid var(--border); background: var(--bg);
  cursor: pointer; font-size: .85rem; font-weight: 600;
  transition: all .2s;
}
.time-slot:hover, .time-slot.selected {
  border-color: var(--primary); background: var(--primary-light); color: var(--primary);
}
.time-slot.disabled { opacity: .4; cursor: not-allowed; }

.price-box {
  background: var(--bg); border-radius: var(--radius-sm);
  padding: 1rem 1.25rem; margin: 1rem 0;
}
.pb-row {
  display: flex; justify-content: space-between;
  font-size: .9rem; color: var(--text-2); padding: .3rem 0;
}
.pb-row.total {
  font-weight: 800; font-size: 1.1rem; color: var(--text);
  border-top: 2px solid var(--border); margin-top: .5rem; padding-top: .75rem;
}

.payment-opts { display: flex; gap: .75rem; margin: 1rem 0; }
.pay-opt {
  flex: 1; padding: .75rem; border: 2px solid var(--border);
  border-radius: var(--radius-sm); text-align: center; cursor: pointer;
  font-size: .875rem; font-weight: 600; color: var(--text-2);
  transition: all .2s;
}
.pay-opt:hover, .pay-opt.selected {
  border-color: var(--primary); background: var(--primary-light); color: var(--primary);
}

/* ── TOAST ───────────────────────────────── */
.toast {
  position: fixed; bottom: 2rem; right: 2rem;
  background: var(--secondary); color: white;
  padding: .9rem 1.5rem; border-radius: var(--radius);
  box-shadow: var(--shadow-lg); display: none;
  align-items: center; gap: .75rem; z-index: 3000;
  animation: toastIn .3s ease; max-width: 340px;
  font-size: .9rem; font-weight: 500;
}
.toast.show { display: flex; }
.toast.success { background: var(--accent); }
.toast.error { background: var(--danger); }
.toast.warning { background: var(--warning); color: var(--text); }
@keyframes toastIn { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }

/* ── RESPONSIVE ──────────────────────────── */
@media (max-width: 1024px) {
  .stats-row { grid-template-columns: repeat(2,1fr); }
  .chat-layout { grid-template-columns: 1fr; height: auto; }
  .chat-window { min-height: 400px; }
}
@media (max-width: 768px) {
  .auth-left { display: none; }
  .auth-right { width: 100%; }
  .auth-box { padding: 2rem 1.5rem; }
  .hamburger { display: flex; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  #sidebarOverlay.show { display: block; }
  .main { margin-left: 0; padding: 1rem; padding-top: 5rem; }
  .stats-row { grid-template-columns: repeat(2,1fr); }
  .page-title { font-size: 1.4rem; }
  .payment-opts { flex-wrap: wrap; }
  .fields-grid { grid-template-columns: 1fr; }
  .modal-grid { grid-template-columns: 1fr; }
}
