/* shared/styles.css — shared look for hyby-plus/ and hyby/, built on the brand gradient
   (violet → magenta → coral) and the Plus indigo, not the placeholder palette
   auth/index.html's own inline CSS still uses. Scope an accent per app via
   <body data-brand="pro"> (indigo) or <body data-brand="hyby"> (gradient). The real logo
   lives at brand/hyby.png (brand/hyby-plus.png for the Hyby+ app) -- plain <img>, sized by
   `.topbar img` / `.splash-card img` / `.auth-card img.wordmark` below depending on context. */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

:root {
  --ink: #16181f;
  --ink-soft: #666c7a;
  --ink-faint: #9aa0ad;
  --ground: #f4f3f8;
  --surface: #ffffff;
  --border: #e6e4ee;
  --error: #c0392b;
  --error-soft: #fbeae8;
  --success: #1c8a5a;
  --success-soft: #e8f7f0;
  --accent: #6810e0;
  --accent-soft: #efe6fb;
  --accent-2: #c03090;
  --accent-2-soft: #fbe8f3;
  --grad: linear-gradient(120deg, #6810e0 0%, #c03090 55%, #f84850 100%);
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(22, 24, 31, 0.06);
  --shadow-md: 0 10px 28px rgba(40, 20, 70, 0.1);
  --shadow-lift: 0 16px 36px rgba(40, 20, 70, 0.16);
}
body[data-brand="pro"] {
  --accent: #241c84;
  --accent-2: #4b3fc9;
  --accent-soft: #e9e7f8;
  --grad: linear-gradient(120deg, #241c84 0%, #4b3fc9 100%);
}
body[data-brand="hyby"] {
  --accent: #6810e0;
  --accent-soft: #efe6fb;
  --grad: linear-gradient(120deg, #6810e0 0%, #c03090 55%, #f84850 100%);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 420px at 100% -10%, var(--accent-soft), transparent 60%),
    var(--ground);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ---------- topbar ---------- */
.topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -3px;
  height: 3px;
  background: var(--grad);
  opacity: 0.9;
}
.topbar img { height: 26px; display: block; }
.topbar .spacer { flex: 1; }
.topbar a, .topbar button {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease;
}
.topbar a:hover, .topbar button:hover { background: var(--accent-soft); color: var(--accent); }

main { max-width: 640px; margin: 0 auto; padding: 28px 20px 70px; }

/* ---------- cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-md);
  animation: rise 0.35s ease both;
}
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

h1 { font-size: 1.35rem; font-weight: 800; margin: 0 0 4px; letter-spacing: -0.01em; }
h2 { font-size: 1.05rem; font-weight: 700; margin: 0 0 12px; }
p.subtitle { color: var(--ink-soft); font-size: 0.88rem; line-height: 1.5; margin: 0 0 20px; }

/* ---------- forms ---------- */
label { display: block; font-size: 0.78rem; font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; }
input, select, textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 0.95rem;
  margin-bottom: 12px;
  background: var(--ground);
  color: var(--ink);
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
textarea { resize: vertical; min-height: 76px; line-height: 1.45; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
input::placeholder, textarea::placeholder { color: var(--ink-faint); }

.input-mode-row { display: flex; gap: 8px; margin: -4px 0 12px; }
.input-mode-row button {
  flex: 1;
  padding: 9px 10px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.input-mode-row button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.input-mode-row button.active {
  border-color: var(--accent);
  color: #fff;
  background: var(--grad);
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(104, 16, 224, 0.35); }
  50% { box-shadow: 0 0 0 7px rgba(104, 16, 224, 0); }
}
.input-mode-row button:disabled { opacity: 0.4; cursor: not-allowed; }

.phone-row { display: flex; gap: 8px; }
.phone-row select { flex: 0 0 102px; width: 102px; }
.phone-row input { flex: 1; min-width: 0; }

.category-row { display: flex; gap: 8px; margin-bottom: 14px; }
.category-row select { flex: 1; min-width: 0; margin-bottom: 0; }

/* ---------- buttons ---------- */
.primary {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: none;
  border-radius: 10px;
  background: var(--grad);
  color: white;
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(104, 16, 224, 0.22);
  transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
}
.primary:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }
.primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 12px 24px rgba(104, 16, 224, 0.3); }
.primary:active:not(:disabled) { transform: translateY(0); }

/* ---------- status ---------- */
.status {
  font-size: 0.85rem;
  color: var(--ink-soft);
  background: var(--accent-soft);
  border-radius: 10px;
  padding: 11px 14px;
  min-height: 1.1em;
  margin-top: 12px;
  transition: background 0.2s ease, color 0.2s ease;
}
.status.error { color: var(--error); background: var(--error-soft); }
.status::before { content: "● "; font-size: 0.6rem; vertical-align: middle; opacity: 0.6; }
.status.error::before { content: "⚠ "; }

/* ---------- chips ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #fff;
  background: var(--grad);
  border-radius: 999px;
  padding: 4px 11px 4px 9px;
  margin: 2px 6px 6px 0;
  box-shadow: var(--shadow-sm);
  animation: pop 0.25s ease both;
}
.chip::before { content: "✓"; font-size: 0.7rem; }
@keyframes pop { from { opacity: 0; transform: scale(0.7); } to { opacity: 1; transform: scale(1); } }

/* ---------- pick-chip: a clickable option, e.g. the onboarding category picker ---------- */
.pick-chip {
  display: inline-flex; align-items: center; font-size: 0.78rem; font-weight: 600;
  color: var(--accent); background: var(--accent-soft); border: 1.5px solid var(--accent-soft);
  border-radius: 999px; padding: 6px 13px; margin: 2px 6px 2px 0; cursor: pointer;
  font-family: inherit; transition: all 0.14s ease;
}
.pick-chip:hover { border-color: var(--accent); }

/* ---------- chat ---------- */
.chat-thread { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.bubble {
  max-width: 85%;
  padding: 11px 15px;
  border-radius: 16px;
  font-size: 0.92rem;
  line-height: 1.45;
  box-shadow: var(--shadow-sm);
  animation: rise 0.25s ease both;
  white-space: pre-wrap;
}
.bubble.provider { align-self: flex-end; background: var(--grad); color: #fff; border-bottom-right-radius: 4px; }
.bubble.hyby { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 4px; }

/* ---------- provider cards ---------- */
.provider-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}
.provider-card::before {
  content: attr(data-initial);
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.provider-card:hover { border-color: var(--accent); box-shadow: var(--shadow-lift); transform: translateY(-2px); }
.provider-card h3 { margin: 0 0 3px; font-size: 1rem; font-weight: 700; }
.provider-card p { margin: 0; font-size: 0.85rem; color: var(--ink-soft); line-height: 1.4; }

/* ---------- otp ---------- */
.otp-row { display: flex; gap: 8px; justify-content: center; margin-bottom: 22px; }
.otp-digit {
  width: 44px;
  height: 52px;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0;
}

/* ---------- chat-style input row (dashboard "ask", onboarding send) ---------- */
.chat-row { display: flex; gap: 8px; }
.chat-row textarea {
  flex: 1;
  min-width: 0;
  border-radius: 16px;
  min-height: 44px;
  max-height: 44px;
  resize: none;
  margin-bottom: 0;
}
.chat-row .send-btn {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  padding: 11px 20px;
  border: none;
  border-radius: 999px;
  background: var(--grad);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease;
  text-decoration: none;
}
.chat-row .send-btn:hover { transform: translateY(-1px); }
.chat-row .send-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- avatar (top-right, initial letter, or a photo/logo image) ---------- */
.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  flex: 0 0 auto;
  transition: box-shadow 0.15s ease;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  overflow: hidden;
}
.avatar:hover { box-shadow: 0 0 0 3px var(--accent-soft); }
.avatar img, .profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

/* ---------- avatar display-choice menu (Name initial / Company logo / Profile photo) ---------- */
.avatar-menu-wrap { position: relative; flex: 0 0 auto; }
.avatar-menu {
  position: absolute; top: 46px; right: 0; width: 200px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-md);
  padding: 6px; z-index: 20; display: none;
}
.avatar-menu.open { display: block; }
.avatar-menu button {
  display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 9px; border: none;
  background: none; border-radius: 9px; cursor: pointer; font-family: inherit; text-align: left;
  font-size: 0.82rem; font-weight: 600; color: var(--ink);
}
.avatar-menu button:hover { background: var(--ground); }
.avatar-menu button.selected { background: var(--accent-soft); color: var(--accent); }
.avatar-menu .swatch {
  width: 26px; height: 26px; border-radius: 50%; flex: 0 0 auto; overflow: hidden;
  display: flex; align-items: center; justify-content: center; background: var(--grad);
  color: #fff; font-weight: 800; font-size: 0.7rem;
}
.avatar-menu .swatch.logo { background: #fff; border: 1.5px solid var(--border); color: var(--accent); border-radius: 7px; }
.avatar-menu .swatch img { width: 100%; height: 100%; object-fit: cover; }
.avatar-menu-divider { height: 1px; background: var(--border); margin: 5px 4px; }
.avatar-menu-signout { color: var(--error) !important; }
.avatar-menu-signout:hover { background: var(--error-soft) !important; }

/* ---------- small company-logo badge next to a profile name ---------- */
.logo-badge {
  width: 22px; height: 22px; border-radius: 6px; background: var(--surface);
  border: 1.5px solid var(--border); display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto; overflow: hidden;
}
.logo-badge img { width: 100%; height: 100%; object-fit: cover; }
.logo-badge[hidden] { display: none; }

/* ---------- rail nav (left icon sidebar, e.g. Pro dashboard sections) ---------- */
.rail-nav { flex: 0 0 56px; display: flex; flex-direction: column; gap: 10px; }
.rail-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--ink-soft);
  background: var(--surface);
  transition: all 0.15s ease;
}
.rail-btn.active { border-color: var(--accent); color: #fff; background: var(--grad); }

/* ---------- sections (tab-switched panels) ---------- */
.section { display: none; }
.section.active { display: block; }

/* ---------- add-on cards ---------- */
.addon-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 10px;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}
.addon-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.addon-card h3 { margin: 0 0 3px; font-size: 0.92rem; font-weight: 700; }
.addon-card p { margin: 0; font-size: 0.8rem; color: var(--ink-soft); }
.addon-card .badge {
  flex: 0 0 auto;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 5px 12px;
  border-radius: 999px;
}

/* ---------- splash ---------- */
.splash-screen {
  cursor: pointer;
  width: 100%;
  min-height: 100vh;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: var(--grad);
}
.splash-card { background: #fff; border-radius: 20px; padding: 18px 32px; box-shadow: 0 16px 36px rgba(0, 0, 0, 0.18); }
.splash-card img { height: 40px; display: block; }
.splash-tagline { font-size: 0.86rem; font-weight: 500; color: rgba(255, 255, 255, 0.85); text-decoration: none; border: none; }

/* ---------- centered auth card (welcome / login / otp / name) ---------- */
.auth-wrap {
  width: 100%;
  min-height: 100vh;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.auth-card { width: 100%; max-width: 420px; }
.auth-card.boxed { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px 30px; box-shadow: var(--shadow-md); }
.auth-card.centered { text-align: center; }
.auth-card img.wordmark { height: 26px; display: block; margin-bottom: 18px; }
.auth-card.centered img.wordmark { margin-left: auto; margin-right: auto; }
.auth-card.centered:not(.boxed) img.wordmark { height: 46px; margin-bottom: 26px; }

/* ---------- ask panel (dashboard "Need something?": Type/Voice/Photo tabs) ---------- */
.mode-panel { display: none; }
.mode-panel.active { display: block; }

.pulse-wrap {
  position: relative; width: 150px; height: 150px; display: flex; align-items: center;
  justify-content: center; margin: 10px auto 22px; background: none; border: none; padding: 0;
  cursor: pointer; font: inherit;
}
.pulse-wrap[hidden] { display: none; }
.pulse-ring {
  position: absolute; width: 150px; height: 150px; border-radius: 50%;
  border: 2px solid var(--accent-soft); animation: ring-grow 2.2s ease-out infinite;
}
.pulse-ring.r1 { animation-delay: 0s; }
.pulse-ring.r2 { animation-delay: 0.7s; }
.pulse-ring.r3 { animation-delay: 1.4s; }
@keyframes ring-grow {
  0% { transform: scale(0.55); opacity: 0.8; }
  100% { transform: scale(1.35); opacity: 0; }
}
.pulse-core {
  position: relative; width: 92px; height: 92px; border-radius: 50%;
  background: var(--grad); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 26px rgba(104, 16, 224, 0.35); border: none; cursor: pointer; padding: 0;
}
.pulse-core svg { width: 34px; height: 34px; fill: #fff; }

.live-text-box {
  width: 100%; min-height: 70px; background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 14px; padding: 14px 16px; margin-bottom: 20px; font-size: 0.95rem;
  line-height: 1.5; color: var(--ink); text-align: center;
}
.live-text-box .cursor { display: inline-block; width: 2px; height: 1em; background: var(--accent); vertical-align: middle; margin-left: 2px; animation: blink 0.9s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }
.live-text-box .placeholder { color: var(--ink-faint); font-style: italic; }

.voice-controls { width: 100%; display: flex; align-items: center; gap: 12px; background: var(--ground); border-radius: 999px; padding: 8px 10px 8px 16px; }
.vc-btn { background: none; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 4px; color: var(--ink-soft); }
.vc-btn svg { width: 20px; height: 20px; }
.vc-timer { font-size: 0.86rem; font-weight: 700; color: var(--error); display: flex; align-items: center; gap: 5px; font-variant-numeric: tabular-nums; }
.vc-timer .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--error); animation: dot-blink 1s step-end infinite; }
@keyframes dot-blink { 50% { opacity: 0.25; } }
.vc-wave { flex: 1; display: flex; align-items: center; justify-content: center; gap: 3px; height: 22px; }
.vc-wave span { width: 3px; border-radius: 2px; background: var(--accent); opacity: 0.75; animation: wave 1.1s ease-in-out infinite; }
.vc-wave span:nth-child(1) { height: 8px; animation-delay: 0s; }
.vc-wave span:nth-child(2) { height: 16px; animation-delay: 0.1s; }
.vc-wave span:nth-child(3) { height: 22px; animation-delay: 0.2s; }
.vc-wave span:nth-child(4) { height: 12px; animation-delay: 0.3s; }
.vc-wave span:nth-child(5) { height: 18px; animation-delay: 0.4s; }
.vc-wave span:nth-child(6) { height: 9px; animation-delay: 0.5s; }
.vc-wave span:nth-child(7) { height: 15px; animation-delay: 0.6s; }
@keyframes wave { 0%, 100% { transform: scaleY(0.5); } 50% { transform: scaleY(1); } }
.vc-send { width: 40px; height: 40px; border-radius: 50%; background: var(--grad); border: none; display: flex; align-items: center; justify-content: center; cursor: pointer; flex: 0 0 auto; }
.vc-send svg { width: 18px; height: 18px; fill: #fff; margin-left: 2px; }
.vc-send:disabled, .vc-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.photo-panel { display: flex; flex-direction: column; gap: 14px; }
.photo-drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  border: 2px dashed var(--border); border-radius: var(--radius); padding: 30px 20px;
  cursor: pointer; transition: border-color 0.15s ease, background 0.15s ease; text-align: center;
}
.photo-drop[hidden] { display: none; }
.photo-drop:hover { border-color: var(--accent); background: var(--accent-soft); }
.photo-drop svg { width: 34px; height: 34px; fill: var(--accent); }
.photo-drop strong { font-size: 0.92rem; }
.photo-drop-sub { font-size: 0.8rem; color: var(--ink-soft); }
.photo-preview { position: relative; border-radius: var(--radius); overflow: hidden; }
.photo-preview[hidden] { display: none; }
.photo-preview img { display: block; width: 100%; max-height: 260px; object-fit: cover; }
.photo-remove {
  position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 50%;
  border: none; background: rgba(22, 24, 31, 0.65); color: #fff; font-size: 1rem; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.photo-caption { margin-bottom: 0; }

/* ---------- profile page ---------- */
.profile-head { display: flex; align-items: center; gap: 16px; margin-bottom: 26px; }
.profile-avatar {
  width: 58px; height: 58px; border-radius: 50%; background: var(--grad); color: #fff;
  font-weight: 800; font-size: 1.35rem; display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto; box-shadow: 0 8px 18px rgba(104, 16, 224, 0.25);
}
.profile-name { font-size: 1.15rem; font-weight: 800; margin: 0 0 2px; letter-spacing: -0.01em; }
.profile-phone { font-size: 0.85rem; color: var(--ink-soft); margin: 0; }

h2.section-label {
  font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--ink-faint); font-weight: 700; margin: 26px 0 12px;
}
h2.section-label:first-of-type { margin-top: 0; }

.tab-row { display: flex; gap: 8px; margin-bottom: 14px; }
.tab-row button {
  flex: 1; padding: 9px 10px; border: 1.5px solid var(--border); border-radius: 12px;
  background: var(--surface); color: var(--ink-soft); font-size: 0.85rem; font-weight: 600;
  cursor: pointer; font-family: inherit; transition: all 0.15s ease;
}
.tab-row button.active { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

.hist-card {
  display: flex; align-items: center; gap: 13px; background: var(--surface);
  border: 1.5px solid var(--border); border-radius: 14px; padding: 14px 16px;
  margin-bottom: 10px; box-shadow: var(--shadow-sm);
}
.hist-card:last-child { margin-bottom: 0; }
.hist-icon { width: 40px; height: 40px; border-radius: 11px; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; }
.hist-icon.chat { background: var(--accent-soft); color: var(--accent); }
.hist-icon.appt { background: var(--accent-2-soft); color: var(--accent-2); }
.hist-icon svg { width: 20px; height: 20px; fill: currentColor; }
.hist-body { flex: 1; min-width: 0; }
.hist-body h4 { margin: 0 0 3px; font-size: 0.9rem; font-weight: 700; }
.hist-body p { margin: 0; font-size: 0.8rem; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hist-meta { flex: 0 0 auto; text-align: right; }
.hist-date { font-size: 0.72rem; color: var(--ink-faint); display: block; margin-bottom: 6px; }
.status-pill { font-size: 0.68rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; display: inline-block; }
.status-pill.upcoming { background: var(--accent-soft); color: var(--accent); }
.status-pill.done { background: var(--success-soft); color: var(--success); }
.status-pill.cancelled { background: var(--ground); color: var(--ink-faint); }

.settings-card { background: var(--surface); border: 1.5px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-sm); overflow: hidden; }
.settings-row {
  display: flex; align-items: center; justify-content: space-between; padding: 15px 16px;
  border-bottom: 1px solid var(--border); cursor: pointer; background: none; width: 100%;
  font-family: inherit; text-align: left;
}
.settings-row:last-child { border-bottom: none; }
.settings-row .label { font-size: 0.9rem; font-weight: 600; color: var(--ink); }
.settings-row .value { font-size: 0.85rem; color: var(--ink-soft); display: flex; align-items: center; gap: 6px; }
.settings-row .chev { color: var(--ink-faint); }

.signout-btn {
  display: block; width: 100%; padding: 13px 14px; border: 1.5px solid var(--error-soft);
  border-radius: 12px; background: var(--error-soft); color: var(--error); font-size: 0.92rem;
  font-weight: 700; text-align: center; cursor: pointer; font-family: inherit; margin-top: 26px;
}

/* ---------- facts ---------- */
.facts-group { margin-bottom: 16px; }
.facts-group h4 {
  margin: 0 0 8px;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.facts-group ul { margin: 0; padding-left: 0; list-style: none; font-size: 0.9rem; }
.facts-group li {
  padding: 8px 12px;
  background: var(--ground);
  border-radius: 8px;
  margin-bottom: 6px;
  line-height: 1.4;
}
.empty-note { color: var(--ink-faint); font-size: 0.85rem; font-style: italic; }
