/* ============================================================================
   RGoals Design System — global stylesheet
   Dark luxury, purple-accented, restrained. Shared by every public + app +
   internal page. Component-scoped rules live in each page's own <style>
   only when truly one-off; everything reusable belongs here.
   ============================================================================ */

:root {
  /* Tell the browser this page is dark-themed so native form controls
     (select dropdown popups, date/time pickers, scrollbars) render with a
     dark UI instead of falling back to a bright white system default. */
  color-scheme: dark;
  --bg: #050505;
  --bg-top: #080808;
  --panel: rgba(18, 18, 18, 0.98);
  --panel-2: rgba(11, 11, 11, 0.98);
  --text: #f5f5f5;
  --muted: #a1a1aa;
  --muted-2: #71717a;
  --purple: #8f63e6;
  --purple-2: #b492ff;
  --purple-3: #d8c9ff;
  --blue: #7aa8ff;
  --white: #ffffff;
  --line: rgba(255, 255, 255, 0.08);
  --shadow: 0 20px 80px rgba(0, 0, 0, 0.42);
  --success: #6ee7b7;
  --warning: #fbbf6b;
  --danger: #f38ba3;
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(143, 99, 230, 0.18), transparent 26%),
    radial-gradient(circle at top right, rgba(122, 168, 255, 0.08), transparent 22%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg) 100%);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul { list-style: none; margin: 0; padding: 0; }
button { font-family: inherit; }

.container { width: min(calc(100% - 40px), 1240px); margin: 0 auto; }
.container-narrow { width: min(calc(100% - 40px), 860px); margin: 0 auto; }
.page-shell { min-height: 100vh; display: flex; flex-direction: column; }

/* ---------- Topbar / Nav ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(20px);
  background: rgba(0, 0, 0, 0.74);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.nav { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 800; letter-spacing: -0.04em; white-space: nowrap; font-size: 1.05rem; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 12px; flex-shrink: 0;
  background: linear-gradient(145deg, var(--purple-2), var(--purple) 55%, #5b3aa8);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(143, 99, 230, 0.35);
}
.brand-mark i { color: #fff; font-size: 15px; }
.nav-links { display: flex; gap: 26px; color: var(--muted); font-size: 0.94rem; flex-wrap: wrap; }
.nav-links a { transition: color 0.2s ease; }
.nav-links a:hover, .nav-links a.active, .footer-links a:hover { color: var(--white); }
.nav-toggle { display: none; }

/* ---------- Buttons / rows ---------- */
.cta-row, .button-row, .store-actions, .chip-row, .pill-row, .inline-links {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
}
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 24px; border-radius: 999px; font-weight: 800; font-size: 0.94rem;
  letter-spacing: -0.01em; transition: 0.25s ease; border: 1px solid transparent; cursor: pointer;
}
.button.primary { background: var(--white); color: #000; }
.button.secondary { background: rgba(255, 255, 255, 0.03); border-color: var(--line); color: white; }
.button.ghost { background: transparent; border-color: rgba(180, 146, 255, 0.32); color: var(--purple-3); }
.button.danger { background: rgba(243, 139, 163, 0.12); border-color: rgba(243, 139, 163, 0.4); color: #ffc2d2; }
.button.small { padding: 10px 18px; font-size: 0.86rem; }
.button.block { width: 100%; }
.button:hover { transform: translateY(-2px); }
.button:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.button.icon-only { padding: 12px; border-radius: 50%; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); color: var(--purple-3);
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.24em;
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--purple); box-shadow: 0 0 14px rgba(143, 99, 230, 0.9); flex-shrink: 0; }
.accent {
  background: linear-gradient(135deg, #d7c8ff, #8f63e6, #7d57d0);
  -webkit-background-clip: text; background-clip: text; color: transparent; font-style: italic;
}

/* ---------- Hero ---------- */
.hero { padding: 26px 0 80px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 46px; align-items: center; min-height: calc(100vh - 90px); }
.hero h1, .page-hero h1 { margin: 22px 0 0; font-size: clamp(2.6rem, 6.2vw, 5.6rem); line-height: 0.98; letter-spacing: -0.06em; }
.hero h1 { max-width: 12ch; }
.lead, .page-hero p { margin: 24px 0 0; max-width: 760px; color: var(--muted); font-size: 1.08rem; line-height: 1.8; }
.page-hero { padding: 64px 0 24px; }

/* ---------- Grids ---------- */
.stats, .cards-3, .cards-2, .cards-4, .download-grid, .media-grid, .form-columns, .detail-grid, .link-grid, .gallery-2, .gallery-3 {
  display: grid; gap: 18px;
}
.stats { margin-top: 36px; grid-template-columns: repeat(3, 1fr); }
.cards-3 { margin-top: 56px; grid-template-columns: repeat(3, 1fr); }
.cards-4 { margin-top: 40px; grid-template-columns: repeat(4, 1fr); }
.cards-2, .download-grid, .form-columns, .detail-grid { grid-template-columns: repeat(2, 1fr); }
.media-grid { grid-template-columns: 1.1fr 0.9fr; align-items: start; }
.link-grid { grid-template-columns: repeat(3, 1fr); }
.gallery-2 { grid-template-columns: repeat(2, 1fr); }
.gallery-3 { grid-template-columns: repeat(3, 1fr); }

/* ---------- Cards / panels ---------- */
.card, .panel, .stat, .media-panel, .dashboard-block {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
  border-radius: var(--radius-lg);
  transition: 0.25s ease;
}
.card:hover, .panel:hover, .stat:hover, .media-panel:hover { transform: translateY(-4px); border-color: rgba(143, 99, 230, 0.25); }
.card, .panel, .media-panel, .dashboard-block { padding: 30px; }
.stat { padding: 20px; }
.stat strong { display: block; font-size: 1.1rem; letter-spacing: -0.03em; }
.stat span { display: block; margin-top: 8px; font-size: 0.93rem; line-height: 1.6; color: var(--muted); }
.card .kicker, .section-label, .kicker { color: var(--muted-2); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.22em; }
.card h3, .panel h3, .media-panel h3, .dashboard-block h3 { margin: 18px 0 0; font-size: 1.95rem; line-height: 1.05; letter-spacing: -0.04em; }
.card p, .panel p, .media-panel p, li, .small-copy, .dashboard-block p { color: var(--muted); line-height: 1.72; }
.foot { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--purple-3); font-size: 0.9rem; font-weight: 700; }

section.content { padding: 100px 0; border-top: 1px solid rgba(255, 255, 255, 0.05); }
.section-label { text-align: center; letter-spacing: 0.3em; }
.section-heading { margin: 18px auto 0; max-width: 900px; text-align: center; font-size: clamp(2.2rem, 4.6vw, 4rem); line-height: 1; letter-spacing: -0.05em; }
.section-copy { margin: 16px auto 0; max-width: 760px; text-align: center; color: var(--muted); font-size: 1.04rem; line-height: 1.8; }

/* ---------- Phone showcase / hero art ---------- */
.phone-showcase { position: relative; min-height: 640px; }
.phone { position: absolute; overflow: hidden; border-radius: 34px; background: #000; border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: var(--shadow); }
.phone.one { left: 2%; top: 0; width: 240px; transform: rotate(-9deg); }
.phone.two { right: 2%; top: 78px; width: 240px; transform: rotate(8deg); }
.phone.three { left: 18%; bottom: 0; width: 270px; z-index: 2; }
.phone-frame { position: relative; width: 100%; aspect-ratio: 9/19; padding: 16px; display: flex; flex-direction: column; gap: 10px; }

.floating-card {
  position: absolute; right: 4%; bottom: 20px; z-index: 3; width: 300px; padding: 24px; border-radius: var(--radius-lg);
  border: 1px solid var(--line); background: linear-gradient(180deg, rgba(10, 10, 10, 0.99), rgba(5, 5, 5, 0.99));
  box-shadow: var(--shadow); animation: float 8s ease-in-out infinite;
}
.floating-card h2 { margin: 16px 0 0; font-size: 1.85rem; line-height: 1; letter-spacing: -0.04em; }
.floating-card p { color: var(--muted); line-height: 1.7; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.chip, .pill, .badge { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; font-size: 0.8rem; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); }
.chip { color: #ededed; }
.pill, .badge { color: #d4d4d8; }
.badge.success { color: #d1fae5; border-color: rgba(110, 231, 183, 0.35); background: rgba(110, 231, 183, 0.1); }
.badge.warning { color: #ffe6c2; border-color: rgba(251, 191, 107, 0.35); background: rgba(251, 191, 107, 0.1); }
.badge.verified { color: #d8c9ff; border-color: rgba(143, 99, 230, 0.4); background: rgba(143, 99, 230, 0.14); }

.media-frame, .screenshot-card, .mock-phone { overflow: hidden; border-radius: 24px; border: 1px solid rgba(255, 255, 255, 0.08); background: #000; box-shadow: var(--shadow); }
.media-frame img, .screenshot-card img, .mock-phone img { width: 100%; height: auto; }

/* ---------- Forms ---------- */
.form-grid { display: grid; gap: 16px; margin-top: 24px; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
label { display: grid; gap: 8px; color: #ddd; font-size: 0.94rem; }
input, textarea, select {
  width: 100%; border-radius: 16px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03);
  padding: 14px 16px; color: white; font: inherit; outline: none; transition: border-color 0.2s ease;
}
input:focus, textarea:focus, select:focus { border-color: rgba(143, 99, 230, 0.5); }
textarea { min-height: 120px; resize: vertical; }
/* Base <select> styling — used as a fallback for the brief moment before
   JS upgrades it, and for the very few environments where JS is disabled.
   NOTE: the OPEN dropdown popup of a native <select> is an OS-level widget
   that ignores CSS/color-scheme on some browser+OS combos (confirmed via
   screenshot: popup rendered light/white despite color-scheme:dark). To
   guarantee a dark popup everywhere, every <select> on the site is
   progressively enhanced into a fully custom, CSS-controlled dropdown by
   app.js (see "Custom dropdown widget" below) — the rules below are just
   the plain-select fallback appearance.  */
select {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  padding-right: 44px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9' fill='none'%3E%3Cpath d='M1 1L7 7L13 1' stroke='%23a1a1aa' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center;
}
select:focus { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9' fill='none'%3E%3Cpath d='M1 1L7 7L13 1' stroke='%23b492ff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
select option { background: #121212; color: #f5f5f5; }
select option:checked, select option:hover { background: #1c1030; }

/* ---------- Custom dropdown widget (replaces native <select> popups) ---------- */
/* app.js wraps every <select> in a .custom-select-wrap, visually hides the
   original <select> (kept in the DOM so forms still submit its value) and
   renders this fully custom, always-dark trigger instead.

   PORTAL NOTE: the option panel (.cs-panel) is NOT a CSS child of
   .custom-select-wrap — app.js appends it directly to <body> (a true DOM
   portal) and positions it with inline top/left/width computed from the
   trigger's getBoundingClientRect() on open + on every scroll/resize while
   open. This guarantees the panel can never be clipped by an ancestor's
   `overflow:hidden`/`overflow:auto` or trapped inside a lower stacking
   context (e.g. inside .app-sidebar, a .panel card, or a modal) — the kind
   of nested layout that broke the previous non-portal version. z-index is
   9999 so it always renders above any modal/overlay on the site. */
.custom-select-wrap { position: relative; }
.custom-select-wrap select.cs-native {
  position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none;
}
.cs-trigger {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border-radius: 16px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03);
  padding: 14px 16px; color: white; font: inherit; cursor: pointer; transition: border-color 0.2s ease;
}
.cs-trigger:hover { border-color: rgba(255, 255, 255, 0.18); }
.cs-trigger.cs-open,
.cs-trigger:focus-visible { border-color: rgba(143, 99, 230, 0.5); outline: none; }
.cs-trigger-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-trigger-chevron { flex-shrink: 0; width: 14px; height: 9px; transition: transform 0.15s ease; color: var(--muted-2); }
.cs-trigger.cs-open .cs-trigger-chevron { transform: rotate(180deg); color: var(--purple-2); }

/* Portal panel — lives as a direct child of <body>, positioned via inline
   style set by app.js. Never nested inside .custom-select-wrap in the DOM. */
.cs-panel {
  position: fixed; z-index: 9999; visibility: hidden; pointer-events: none;
  overflow-y: auto; padding: 6px;
  border-radius: 16px; border: 1px solid var(--line);
  background: #121212; /* solid dark background — glassmorphism blur on top */
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  opacity: 0; transform: translateY(-4px); transition: opacity 0.12s ease, transform 0.12s ease;
}
.cs-panel.cs-panel-open { visibility: visible; pointer-events: auto; opacity: 1; transform: translateY(0); }
.cs-option {
  padding: 11px 12px; border-radius: 10px; font-size: 0.94rem; color: #f5f5f5; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.cs-option:hover, .cs-option.highlighted { background: rgba(143, 99, 230, 0.16); }
.cs-option.selected { background: rgba(143, 99, 230, 0.28); color: #fff; font-weight: 600; }
/* Higher specificity than FontAwesome's `.fa-solid{display:inline-block}` (which
   has the same 0-1-0 specificity as a bare `.cs-option-check`) so the checkmark
   is reliably hidden regardless of stylesheet load order. */
.cs-option .cs-option-check { display: none; color: var(--purple-2); }
.cs-option.selected .cs-option-check { display: inline-flex; }

.notice, .api-box, .callout { margin-top: 18px; padding: 16px 18px; border-radius: 16px; border: 1px solid rgba(143, 99, 230, 0.2); background: rgba(143, 99, 230, 0.08); color: #e8dbff; font-size: 0.92rem; }
.code-block { margin-top: 16px; padding: 18px; overflow: auto; border-radius: 18px; border: 1px solid var(--line); background: #0d0d0d; color: #d6d6de; font-size: 0.88rem; white-space: pre-wrap; }
.table-wrap { overflow: auto; margin-top: 22px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); text-align: left; vertical-align: top; }
th { color: var(--muted-2); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.16em; }
ul.clean { margin: 0; padding-left: 18px; list-style: disc; }
ul.clean li { margin-bottom: 8px; }

/* ---------- Dashboard-style layout (app + internal) ---------- */
.metric { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid rgba(255, 255, 255, 0.06); }
.metric:first-child { border-top: none; }
.metric strong { font-size: 1rem; }
.dashboard-grid { display: grid; grid-template-columns: 260px 1fr; gap: 24px; }
.sidebar { position: sticky; top: 100px; align-self: start; }
.side-nav { display: grid; gap: 8px; margin-top: 18px; }
.side-nav a { padding: 12px 14px; border-radius: 16px; border: 1px solid rgba(255, 255, 255, 0.08); background: rgba(255, 255, 255, 0.03); color: #ddd; display: flex; align-items: center; gap: 10px; font-size: 0.92rem; }
.side-nav a:hover, .side-nav a.active { border-color: rgba(143, 99, 230, 0.3); color: #fff; background: rgba(143, 99, 230, 0.08); }
.dashboard-panels { display: grid; gap: 18px; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.mini-card { padding: 18px; border-radius: 20px; border: 1px solid rgba(255, 255, 255, 0.08); background: rgba(255, 255, 255, 0.03); }

/* ---------- App shell (mobile-app-feel container) ---------- */
.app-shell { min-height: 100vh; display: flex; }
.app-sidebar {
  width: 240px; flex-shrink: 0; border-right: 1px solid var(--line); padding: 26px 18px;
  display: flex; flex-direction: column; gap: 26px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: rgba(6, 6, 6, 0.6);
}
.app-main { flex: 1; min-width: 0; }
.app-topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 28px;
  border-bottom: 1px solid var(--line); background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(14px);
  position: sticky; top: 0; z-index: 20;
}
.app-content { padding: 28px; max-width: 1140px; margin: 0 auto; }
.app-content-narrow { padding: 28px; max-width: 640px; margin: 0 auto; }

.app-nav-item {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 14px; color: var(--muted);
  font-size: 0.92rem; font-weight: 600; transition: 0.2s ease;
}
.app-nav-item i { width: 18px; text-align: center; color: var(--muted-2); }
.app-nav-item:hover { background: rgba(255, 255, 255, 0.04); color: #fff; }
.app-nav-item.active { background: rgba(143, 99, 230, 0.14); color: #fff; border: 1px solid rgba(143, 99, 230, 0.3); }
.app-nav-item.active i { color: var(--purple-2); }
.app-nav-section-label { padding: 6px 14px 2px; color: var(--muted-2); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.2em; font-weight: 700; }

/* ---------- Bottom mobile nav (used on app pages under 900px) ---------- */
.mobile-tabbar { display: none; }

/* ---------- Auth screens ---------- */
.auth-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.auth-card { width: min(100%, 460px); padding: 40px; }
.auth-brand { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-bottom: 26px; text-align: center; }
.auth-foot-link { text-align: center; margin-top: 20px; color: var(--muted); font-size: 0.92rem; }

/* ---------- Progress bars ---------- */
.progress-track { height: 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.progress-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--purple), var(--purple-2)); transition: width 0.4s ease; }
.progress-track.slim { height: 6px; }
.progress-label-row { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--muted); margin-bottom: 8px; }
.trait-percent { color: var(--purple-3); font-weight: 700; margin-left: 6px; }

.score-ring { position: relative; width: 96px; height: 96px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.score-ring-value { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.03em; }
.score-ring-label { font-size: 0.6rem; color: var(--muted-2); text-transform: uppercase; letter-spacing: 0.1em; }

/* ---------- Onboarding step indicator ---------- */
.step-indicator { display: flex; gap: 8px; margin-bottom: 28px; }
.step-dot { flex: 1; height: 5px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); }
.step-dot.done { background: var(--purple); }
.step-dot.active { background: var(--purple-2); }

/* ---------- Candidate / discovery card ---------- */
.candidate-card { border-radius: 30px; overflow: hidden; border: 1px solid var(--line); background: var(--panel); box-shadow: var(--shadow); }
.candidate-photo { height: 380px; position: relative; display: flex; align-items: flex-end; padding: 20px; }
.candidate-photo .compat-badge { position: absolute; top: 16px; right: 16px; }
.candidate-photo .verified-badge { position: absolute; top: 16px; left: 16px; }
.candidate-info { padding: 22px; }
.candidate-actions { display: flex; gap: 12px; padding: 0 22px 22px; }
.candidate-actions .button { flex: 1; }
.goal-tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.goal-tag { padding: 6px 12px; border-radius: 999px; font-size: 0.78rem; background: rgba(143, 99, 230, 0.12); border: 1px solid rgba(143, 99, 230, 0.28); color: var(--purple-3); }

/* ---------- Chat ---------- */
.chat-shell { display: flex; flex-direction: column; height: calc(100vh - 82px); }
.chat-header { display: flex; align-items: center; gap: 14px; padding: 16px 24px; border-bottom: 1px solid var(--line); }
.chat-avatar { width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0; }
.chat-messages { flex: 1; overflow-y: auto; padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.chat-bubble { max-width: 70%; padding: 12px 16px; border-radius: 20px; font-size: 0.94rem; line-height: 1.5; }
.chat-bubble.them { background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); align-self: flex-start; border-bottom-left-radius: 6px; }
.chat-bubble.me { background: linear-gradient(135deg, var(--purple), #7248c4); align-self: flex-end; border-bottom-right-radius: 6px; color: #fff; }
.chat-meta { font-size: 0.72rem; color: var(--muted-2); margin-top: 4px; }
.chat-input-row { display: flex; align-items: center; gap: 10px; padding: 16px 24px; border-top: 1px solid var(--line); }
.chat-input-row input { flex: 1; }
.typing-indicator { display: inline-flex; gap: 4px; align-items: center; padding: 10px 14px; }
.typing-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: typingBounce 1.2s infinite ease-in-out; }
.typing-dot:nth-child(2) { animation-delay: 0.15s; }
.typing-dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes typingBounce { 0%, 60%, 100% { transform: translateY(0); opacity: 0.4; } 30% { transform: translateY(-4px); opacity: 1; } }

/* ---------- Avatar gradient placeholders (stand in for real photos) ---------- */
.avatar-gradient { border-radius: 50%; flex-shrink: 0; }
.photo-gradient { width: 100%; height: 100%; }

/* ---------- Footer ---------- */
footer { padding: 30px 0 50px; border-top: 1px solid rgba(255, 255, 255, 0.05); margin-top: auto; }
.footer-row { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.footer-copy, .footer-links { color: var(--muted); font-size: 0.92rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; font-size: 0.9rem; }
.hidden-hint { font-size: 0.86rem; color: var(--muted-2); }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; } .mt-40 { margin-top: 40px; }
.flex { display: flex; } .flex-col { flex-direction: column; } .items-center { align-items: center; } .justify-between { justify-content: space-between; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.muted { color: var(--muted); }
.w-full { width: 100%; }

/* ---------- Internal / admin banner ---------- */
.internal-banner {
  background: repeating-linear-gradient(135deg, rgba(243, 139, 163, 0.14) 0 14px, rgba(243, 139, 163, 0.05) 14px 28px);
  border-bottom: 1px solid rgba(243, 139, 163, 0.35); color: #ffd7e0; padding: 12px 0; font-size: 0.86rem; font-weight: 700;
  letter-spacing: 0.06em; text-align: center; text-transform: uppercase;
}
.internal-shell .topbar { background: rgba(20, 6, 10, 0.8); }
.internal-shell .brand-mark { background: linear-gradient(145deg, #f38ba3, #b3435f 55%, #5b1a2c); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .hero-grid, .cards-2, .download-grid, .media-grid, .detail-grid, .link-grid, .form-columns, .dashboard-grid { grid-template-columns: 1fr; }
  .cards-4 { grid-template-columns: repeat(2, 1fr); }
  .phone-showcase { min-height: 560px; }
  .stat-row { grid-template-columns: 1fr; }
  .app-sidebar { display: none; }
}
@media (max-width: 900px) {
  .nav-links { display: none; }
  .cards-3, .stats, .gallery-3 { grid-template-columns: 1fr; }
  .gallery-2, .cards-4 { grid-template-columns: 1fr; }
  .mobile-tabbar {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
    background: rgba(6, 6, 6, 0.92); backdrop-filter: blur(16px); border-top: 1px solid var(--line);
    padding: 10px 6px calc(10px + env(safe-area-inset-bottom));
  }
  .mobile-tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--muted-2); font-size: 10.5px; padding: 6px 0; }
  .mobile-tabbar a.active { color: var(--purple-2); }
  .mobile-tabbar a i { font-size: 16px; }
  .app-content, .app-content-narrow { padding-bottom: 90px; }
}
@media (max-width: 640px) {
  .container, .container-narrow { width: min(calc(100% - 24px), 1240px); }
  .cta-row .button.secondary { display: none; }
  .hero { padding-bottom: 60px; }
  .hero-grid { min-height: auto; gap: 28px; }
  .phone-showcase { min-height: 440px; }
  .phone.one, .phone.two { width: 42vw; }
  .phone.three { width: 48vw; left: 22%; }
  .floating-card { left: 50%; transform: translateX(-50%); right: auto; bottom: -10px; width: calc(100% - 18px); }
  .footer-row { flex-direction: column; align-items: flex-start; }
  .form-row-2 { grid-template-columns: 1fr; }
  .auth-card { padding: 28px; }
}
