/* ============================================================
   RideAlong Design System — ra-system.css
   Shared tokens, reset, and reusable components for all pages.
   Homepage aesthetic: calm, editorial, navy + orange + cream.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&family=Caveat:wght@500;600&display=swap');

/* ---- TOKENS ---- */
:root {
  /* Brand colors */
  --ra-orange:      #E05E1A;
  --ra-orange-soft: #FDEEE4;
  --ra-orange-dim:  rgba(224, 94, 26, 0.12);
  --ra-navy:        #15233A;
  --ra-navy-80:     #15233Acc;
  --ra-navy-60:     #15233A99;
  --ra-navy-40:     #15233A66;
  --ra-navy-20:     #15233A33;
  --ra-navy-12:     #15233A1F;
  --ra-navy-08:     #15233A14;
  --ra-paper:       #FBFAF7;
  --ra-paper-2:     #FBFAF7;
  --ra-paper-3:     #FBFAF7;
  --ra-line:        rgba(21, 35, 58, 0.08);
  --ra-line-strong: rgba(21, 35, 58, 0.16);

  /* Semantic / status colors */
  --ra-success:     #1A9E5A;
  --ra-success-bg:  #EAF7F0;
  --ra-warn:        #C47B00;
  --ra-warn-bg:     #FFF8E6;
  --ra-danger:      #D03030;
  --ra-danger-bg:   #FEECEC;
  --ra-info:        #1A6EC4;
  --ra-info-bg:     #EAF2FD;

  /* Typography */
  --ra-serif: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
  --ra-sans:  'Inter', system-ui, -apple-system, sans-serif;
  --ra-mono:  'JetBrains Mono', ui-monospace, monospace;

  /* Legacy aliases (used by old HTML class names) */
  --primary:   #E05E1A;
  --secondary: #15233A;
  --white:     #FFFFFF;
  --ra-ink:    #15233A;
  --ra-font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --gray-50:   #FBFAF7;
  --gray-100:  #F5F3EE;
  --gray-200:  #E8E4DB;
  --gray-300:  #D4CEC3;
  --gray-400:  #A9A197;
  --gray-500:  #7D7870;
  --gray-600:  #59554F;
  --gray-700:  #3D3A34;
  --gray-800:  #26241F;
  --gray-900:  #15130F;
  --success:   #1A9E5A;
  --danger:    #D03030;
  --warning:   #C47B00;
  --info:      #1A6EC4;

  /* Spacing */
  --ra-gap-xs: 8px;
  --ra-gap-sm: 16px;
  --ra-gap-md: 24px;
  --ra-gap-lg: 40px;
  --ra-gap-xl: 64px;

  /* Radius */
  --ra-radius-sm:  8px;
  --ra-radius-md:  12px;
  --ra-radius-lg:  20px;
  --ra-radius-xl:  24px;
  --ra-radius-pill: 100px;

  /* Shadows */
  --ra-shadow-sm: 0 2px 8px rgba(21, 35, 58, 0.06);
  --ra-shadow-md: 0 8px 24px rgba(21, 35, 58, 0.10);
  --ra-shadow-lg: 0 20px 48px rgba(21, 35, 58, 0.14);
}

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

/* overflow-x is intentionally NOT set here on html — doing so breaks iOS
   Safari's pinch-zoom-out boundary, leaving blank space beside the page.
   body's overflow-x below is sufficient to contain the off-canvas menu. */
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--ra-sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ra-navy);
  background-color: var(--ra-paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden; /* off-canvas mobile menu sits just past the viewport edge */
}

img { display: block; max-width: 100%; height: auto; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
a { text-decoration: none; color: inherit; transition: color 0.15s ease; }
ul, ol { list-style: none; }
input, select, textarea { font-family: inherit; }

/* ---- LAYOUT ---- */
.container,
.ra-wrap {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 32px;
}

@media (max-width: 768px) {
  .container, .ra-wrap { padding: 0 20px; }
}

@media (max-width: 480px) {
  .container, .ra-wrap { padding: 0 16px; }
}

/* Page offset for sticky navbar */
.page-body {
  padding-top: 64px;
  min-height: 100vh;
  background: var(--ra-paper);
}

/* ---- TYPOGRAPHY ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--ra-serif);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--ra-navy);
}

h1 { font-size: clamp(32px, 5vw, 64px); }
h2 { font-size: clamp(26px, 4vw, 48px); }
h3 { font-size: clamp(20px, 3vw, 32px); }
h4 { font-size: 20px; letter-spacing: -0.01em; }
h5 { font-size: 16px; font-weight: 600; letter-spacing: 0; }
h6 { font-size: 14px; font-weight: 600; letter-spacing: 0; }

p { line-height: 1.65; color: var(--ra-navy-80); }

/* Mono eyebrow label */
.ra-eyebrow,
.section-eyebrow {
  font-family: var(--ra-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ra-orange);
  display: block;
  margin-bottom: 12px;
}

/* ---- BUTTONS ---- */

/* Base button */
.btn-primary,
.btn-secondary,
.btn-outline,
.btn-danger,
.create-account-btn,
.ra-btn-orange,
.ra-btn-ghost,
.ra-btn-navy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--ra-sans);
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  border-radius: var(--ra-radius-pill);
  padding: 13px 22px;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  min-height: 44px;
  -webkit-tap-highlight-color: transparent;
}

/* Orange / primary */
.btn-primary,
.create-account-btn,
.ra-btn-orange {
  background: var(--ra-orange);
  color: #fff;
  border-color: var(--ra-orange);
}
.btn-primary:hover,
.create-account-btn:hover,
.ra-btn-orange:hover {
  background: #C95218;
  border-color: #C95218;
  color: #fff;
  transform: translateY(-1px);
}
.btn-primary:active,
.create-account-btn:active,
.ra-btn-orange:active { transform: translateY(0); }

/* Ghost */
.btn-secondary,
.ra-btn-ghost {
  background: transparent;
  color: var(--ra-navy);
  border-color: transparent;
}
.btn-secondary:hover,
.ra-btn-ghost:hover {
  background: var(--ra-navy-08);
  color: var(--ra-navy);
}

/* Outline */
.btn-outline,
.ra-btn-navy {
  background: transparent;
  color: var(--ra-navy);
  border-color: var(--ra-line-strong);
}
.btn-outline:hover,
.ra-btn-navy:hover {
  border-color: var(--ra-navy-40);
  background: var(--ra-navy-08);
  color: var(--ra-navy);
}

/* Danger */
.btn-danger {
  background: var(--ra-danger);
  color: #fff;
  border-color: var(--ra-danger);
}
.btn-danger:hover {
  background: #B82828;
  border-color: #B82828;
  color: #fff;
  transform: translateY(-1px);
}

/* Sizes */
.btn-sm,
.btn-small { padding: 8px 16px; font-size: 13px; min-height: 36px; }
.btn-large,
.btn-lg    { padding: 16px 28px; font-size: 16px; }

/* Full width */
.full-width,
.btn-full { width: 100%; }

/* Disabled */
button:disabled,
.btn-primary:disabled,
.btn-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ---- FORM ELEMENTS ---- */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label,
label {
  font-size: 13px;
  font-weight: 500;
  color: var(--ra-navy);
  letter-spacing: 0.01em;
}

/* Input wrapper for icon+input combos */
.input-wrapper {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ra-navy-40);
  font-size: 15px;
  pointer-events: none;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.input-wrapper input,
.input-wrapper select {
  padding-left: 42px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="search"],
input[type="date"],
input[type="time"],
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--ra-sans);
  font-size: 15px;
  color: var(--ra-navy);
  background: #fff;
  border: 1px solid var(--ra-line-strong);
  border-radius: var(--ra-radius-sm);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  appearance: none;
  -webkit-appearance: none;
  min-height: 44px;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
select:focus,
textarea:focus {
  border-color: var(--ra-orange);
  box-shadow: 0 0 0 3px var(--ra-orange-dim);
}

input::placeholder,
textarea::placeholder { color: var(--ra-navy-40); }

textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.6;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2315233A' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

/* Checkbox / radio */
.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--ra-navy-80);
  cursor: pointer;
}

.checkbox-group input[type="checkbox"],
.checkbox-group input[type="radio"] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin-top: 2px;
  accent-color: var(--ra-orange);
  cursor: pointer;
  flex-shrink: 0;
  border: none;
}

.checkbox-group label { cursor: pointer; font-size: 14px; }

/* Input hints / errors */
.input-hint {
  font-size: 12px;
  color: var(--ra-navy-60);
  margin-top: 2px;
}

.error-message {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--ra-danger-bg);
  border-left: 3px solid var(--ra-danger);
  border-radius: var(--ra-radius-sm);
  color: var(--ra-danger);
  font-size: 14px;
  margin-top: 4px;
}

.password-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
}

.forgot-password { font-size: 13px; color: var(--ra-orange); }
.forgot-password:hover { text-decoration: underline; }

.login-link,
.signup-link {
  text-align: center;
  font-size: 14px;
  color: var(--ra-navy-60);
  margin-top: 8px;
}

.login-link a, .signup-link a,
.link, .text-orange { color: var(--ra-orange); font-weight: 500; }

/* ---- AUTOCOMPLETE ---- */
.autocomplete-list {
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  background: #fff;
  border: 1px solid var(--ra-line-strong);
  border-top: none;
  border-radius: 0 0 var(--ra-radius-sm) var(--ra-radius-sm);
  z-index: 200;
  max-height: 200px;
  overflow-y: auto;
  box-shadow: var(--ra-shadow-md);
  list-style: none;
  padding: 4px 0;
  margin: 0;
}

.autocomplete-list li {
  padding: 10px 14px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.12s;
}

.autocomplete-list li:hover { background: var(--ra-paper-2); }

/* ---- CARDS ---- */
.card,
.ra-card {
  background: #fff;
  border: 1px solid var(--ra-line);
  border-radius: var(--ra-radius-lg);
  padding: 24px;
  box-shadow: var(--ra-shadow-sm);
}

/* ---- BADGES ---- */
.badge,
.status-badge,
.ra-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--ra-radius-pill);
  font-size: 12px;
  font-weight: 500;
  font-family: var(--ra-mono);
  letter-spacing: 0.02em;
}

.badge-success,  .status-confirmed, .status-active,   .ra-badge-success { background: var(--ra-success-bg); color: var(--ra-success); }
.badge-warn,     .status-pending,                     .ra-badge-warn    { background: var(--ra-warn-bg);    color: var(--ra-warn); }
.badge-danger,   .status-cancelled, .status-rejected, .ra-badge-danger  { background: var(--ra-danger-bg);  color: var(--ra-danger); }
.badge-info,     .status-info,                        .ra-badge-info    { background: var(--ra-info-bg);    color: var(--ra-info); }
.badge-neutral,                                        .ra-badge-neutral { background: var(--ra-paper-2);   color: var(--ra-navy-60); }

/* ---- ALERTS / BANNERS ---- */
.alert,
.verification-banner,
.ra-alert {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-radius: var(--ra-radius-md);
  font-size: 14px;
  line-height: 1.5;
}

.alert-success,
.ra-alert-success { background: var(--ra-success-bg); color: var(--ra-success); border: 1px solid rgba(26,158,90,0.2); }
.alert-warn,
.ra-alert-warn    { background: var(--ra-warn-bg);    color: var(--ra-warn);    border: 1px solid rgba(196,123,0,0.2); }
.alert-danger,
.ra-alert-danger  { background: var(--ra-danger-bg);  color: var(--ra-danger);  border: 1px solid rgba(208,48,48,0.2); }
.alert-info,
.ra-alert-info    { background: var(--ra-info-bg);    color: var(--ra-info);    border: 1px solid rgba(26,110,196,0.2); }

/* Verification banner specific */
.verification-banner {
  background: var(--ra-warn-bg);
  border: 1px solid rgba(196,123,0,0.2);
  color: var(--ra-warn);
  border-radius: var(--ra-radius-md);
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.verification-banner .banner-copy h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--ra-warn);
}

.verification-banner .banner-copy p {
  font-size: 13px;
  color: var(--ra-warn);
  opacity: 0.85;
}

.verification-banner .banner-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.btn-verify {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  border-radius: var(--ra-radius-pill);
  background: var(--ra-warn);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: opacity 0.15s;
}
.btn-verify:hover { opacity: 0.88; color: #fff; }

/* ---- MODALS ---- */
.modal,
.ra-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(21, 35, 58, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.active,
.modal[style*="flex"],
.ra-overlay.active { display: flex; }

.modal-content,
.ra-modal {
  background: #fff;
  border-radius: var(--ra-radius-xl);
  padding: 32px;
  max-width: 520px;
  width: 100%;
  position: relative;
  box-shadow: var(--ra-shadow-lg);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-content h3,
.ra-modal h3 {
  font-family: var(--ra-serif);
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--ra-navy);
}

.close {
  position: absolute;
  top: 16px; right: 20px;
  font-size: 22px;
  color: var(--ra-navy-40);
  cursor: pointer;
  background: none;
  border: none;
  line-height: 1;
  transition: color 0.15s;
}
.close:hover { color: var(--ra-navy); }

/* ---- TABS ---- */
.tabs,
.ra-tabs {
  display: flex;
  gap: 4px;
  background: var(--ra-paper-2);
  padding: 4px;
  border-radius: var(--ra-radius-md);
  margin-bottom: 24px;
  overflow-x: auto;
}

.tab-btn,
.ra-tab,
.tabs button {
  padding: 9px 18px;
  border-radius: var(--ra-radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--ra-navy-60);
  background: transparent;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.tab-btn.active,
.ra-tab.active,
.tabs button.active {
  background: #fff;
  color: var(--ra-navy);
  box-shadow: var(--ra-shadow-sm);
}

/* ---- TABLES ---- */
.table-wrap,
.ra-table-wrap {
  overflow-x: auto;
  border-radius: var(--ra-radius-md);
  border: 1px solid var(--ra-line);
}

table,
.ra-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: #fff;
}

table th,
.ra-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ra-navy-60);
  background: var(--ra-paper-2);
  border-bottom: 1px solid var(--ra-line);
  font-family: var(--ra-mono);
  white-space: nowrap;
}

table td,
.ra-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--ra-line);
  color: var(--ra-navy);
  vertical-align: middle;
}

table tr:last-child td,
.ra-table tr:last-child td { border-bottom: none; }

table tr:hover td,
.ra-table tr:hover td { background: var(--ra-paper); }

/* ---- DIVIDERS ---- */
.divider,
.section-divider {
  height: 1px;
  background: var(--ra-line);
  margin: 24px 0;
}

/* ---- SPINNER / LOADING ---- */
.spinner,
.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--ra-line);
  border-top-color: var(--ra-orange);
  border-radius: 50%;
  animation: ra-spin 0.7s linear infinite;
}

@keyframes ra-spin { to { transform: rotate(360deg); } }

.loading-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  gap: 16px;
  color: var(--ra-navy-60);
  font-size: 14px;
}

/* ---- AVATAR ---- */
.avatar,
.user-avatar,
.author-avatar,
.profile-avatar,
.ra-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--ra-orange-soft);
  color: var(--ra-orange);
  font-weight: 600;
  font-size: 14px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  object-fit: cover;
}

/* ---- SECTION HEADER ---- */
.section-header {
  margin-bottom: 24px;
}

.section-header h2 {
  font-size: 22px;
  letter-spacing: -0.02em;
}

.section-header p {
  font-size: 14px;
  color: var(--ra-navy-60);
  margin-top: 4px;
}

/* ---- STATS ROW ---- */
.stats-row,
.stats-grid {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.stat-card,
.stat-item {
  background: #fff;
  border: 1px solid var(--ra-line);
  border-radius: var(--ra-radius-lg);
  padding: 20px 24px;
  min-width: 160px;
  flex: 1;
}

.stat-number,
.stat-value {
  font-family: var(--ra-serif);
  font-size: 36px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ra-navy);
}

.stat-label {
  font-size: 13px;
  color: var(--ra-navy-60);
  margin-top: 4px;
}

/* ---- RIDE CARDS ---- */
.ride-card {
  background: #fff;
  border: 1px solid var(--ra-line);
  border-radius: var(--ra-radius-lg);
  padding: 20px 24px;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.ride-card:hover {
  box-shadow: var(--ra-shadow-md);
  transform: translateY(-2px);
}

/* ---- AUTH SPLIT LAYOUT ---- */
.auth-page-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ra-paper);
  padding: 80px 20px 40px;
}

.login-container,
.content-wrapper,
.auth-card {
  display: flex;
  width: 100%;
  max-width: 900px;
  background: #fff;
  border-radius: var(--ra-radius-xl);
  overflow: hidden;
  box-shadow: var(--ra-shadow-lg);
  border: 1px solid var(--ra-line);
}

.login-form-container,
.signup-container,
.auth-form-side {
  flex: 1;
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.form-title {
  font-family: var(--ra-serif);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ra-navy);
  margin-bottom: 6px;
}

.form-subtitle {
  font-size: 14px;
  color: var(--ra-navy-60);
  margin-bottom: 28px;
}

#loginForm, #signupForm, .auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Auth brand panel */
.benefits-panel {
  width: 42%;
  background: var(--ra-navy);
  color: #fff;
  padding: 48px 36px;
  display: none;
  flex-direction: column;
  justify-content: center;
}

@media (min-width: 900px) {
  .benefits-panel { display: flex; }
}

.benefits-panel h2 {
  font-family: var(--ra-serif);
  font-size: 28px;
  color: #fff;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.benefits-tagline {
  font-size: 15px;
  color: rgba(255,255,255,0.7);
  line-height: 1.55;
  margin-bottom: 32px;
}

.benefits-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.benefit-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.benefit-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255,255,255,0.1);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--ra-orange);
}

.benefit-icon svg { width: 18px; height: 18px; stroke: currentColor; }

.benefit-content h3 {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 2px;
}

.benefit-content p {
  font-size: 13px;
  color: rgba(255,255,255,0.65);
}

/* Auth panel testimonial */
.testimonial {
  margin-top: 36px;
  padding: 20px;
  background: rgba(255,255,255,0.08);
  border-radius: var(--ra-radius-md);
  border: 1px solid rgba(255,255,255,0.12);
}

.testimonial p {
  font-size: 14px;
  font-style: italic;
  color: rgba(255,255,255,0.85);
  line-height: 1.6;
  margin-bottom: 14px;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--ra-orange);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.author-name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

.author-title {
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  margin-top: 1px;
}

/* Responsive auth */
@media (max-width: 640px) {
  .login-container,
  .content-wrapper { border-radius: var(--ra-radius-lg); }

  .login-form-container,
  .signup-container { padding: 28px 20px; }
}

/* ---- DASHBOARD LAYOUT ---- */
.dashboard-layout,
.app-layout {
  display: flex;
  min-height: 100vh;
  padding-top: 64px;
  background: var(--ra-paper-2);
}

/* ---- SETTINGS / PROFILE LAYOUT ---- */
.settings-page {
  padding: 40px 0 80px;
  min-height: calc(100vh - 64px);
  background: var(--ra-paper-2);
}

.settings-content {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.settings-section {
  background: #fff;
  border: 1px solid var(--ra-line);
  border-radius: var(--ra-radius-lg);
  overflow: hidden;
}

.settings-section .section-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--ra-line);
  margin-bottom: 0;
}

.settings-section .section-header h2 {
  font-size: 17px;
  letter-spacing: -0.01em;
}

.settings-section .section-header p {
  font-size: 13px;
  color: var(--ra-navy-60);
  margin-top: 2px;
}

.setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--ra-line);
  gap: 16px;
  flex-wrap: wrap;
}

.setting-item:last-child { border-bottom: none; }

.setting-info h4 {
  font-size: 15px;
  font-weight: 500;
  color: var(--ra-navy);
  margin-bottom: 2px;
}

.setting-info p {
  font-size: 13px;
  color: var(--ra-navy-60);
}

.danger-zone .section-header h2 { color: var(--ra-danger); }

/* ---- NOTIFICATION DROPDOWN ---- */
.notification-dropdown {
  background: #fff;
  border: 1px solid var(--ra-line);
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(21, 35, 58, 0.14), 0 4px 12px rgba(21, 35, 58, 0.06);
  width: min(380px, calc(100vw - 16px));
  max-height: 520px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

@media (max-width: 640px) {
  .notification-dropdown {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
    border-radius: 14px;
  }
}

.notification-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--ra-line);
  flex-shrink: 0;
}

.notification-header h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--ra-navy);
  margin: 0;
}

.mark-all-read-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  color: var(--ra-orange);
  padding: 0;
  font-family: inherit;
  transition: opacity 0.15s;
}
.mark-all-read-btn:hover { opacity: 0.75; }

.notifications-list {
  overflow-y: auto;
  flex: 1;
}

/* ---- NOTIFICATION / MESSAGE ITEMS ---- */
.notification-item,
.message-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--ra-line);
  background: #fff;
  transition: background 0.12s;
  cursor: pointer;
  position: relative;
}

.notification-item:last-child,
.message-item:last-child { border-bottom: none; }

.notification-item:hover,
.message-item:hover { background: var(--ra-paper); }

.notification-item.unread { background: rgba(224, 94, 26, 0.04); }
.notification-item.unread::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--ra-orange);
  border-radius: 0 2px 2px 0;
}

.notification-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--ra-orange-soft);
  color: var(--ra-orange);
  display: grid;
  place-items: center;
  font-size: 14px;
  flex-shrink: 0;
}

.notification-content { flex: 1; min-width: 0; }

.notification-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ra-navy);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notification-message {
  font-size: 12px;
  color: var(--ra-navy-60);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notification-time {
  font-size: 11px;
  color: var(--ra-navy-40);
  font-family: var(--ra-mono);
  margin-top: 4px;
}

.notification-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ra-navy-40);
  font-size: 11px;
  padding: 4px;
  border-radius: 6px;
  flex-shrink: 0;
  transition: background 0.12s, color 0.12s;
  align-self: flex-start;
  margin-top: 2px;
}
.notification-close:hover {
  background: rgba(21, 35, 58, 0.07);
  color: var(--ra-navy);
}

.notification-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--ra-line);
  text-align: center;
  flex-shrink: 0;
}

.view-all-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--ra-orange);
  text-decoration: none;
  transition: opacity 0.15s;
}
.view-all-link:hover { opacity: 0.75; }

.no-notifications {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  color: var(--ra-navy-60);
  gap: 10px;
}
.no-notifications i { font-size: 32px; color: var(--ra-navy-20); }
.no-notifications p { font-size: 14px; margin: 0; }

/* ---- EMPTY STATE ---- */
.empty-state {
  text-align: center;
  padding: 64px 24px;
  color: var(--ra-navy-60);
}

.empty-state i {
  font-size: 48px;
  color: var(--ra-navy-20);
  margin-bottom: 16px;
}

.empty-state h3 {
  font-size: 20px;
  color: var(--ra-navy);
  margin-bottom: 8px;
}

.empty-state p { font-size: 15px; max-width: 40ch; margin: 0 auto 24px; }

/* ---- PROMO / BANNER CARDS ---- */
.promo-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--ra-radius-lg);
  padding: 24px 28px;
  min-height: 120px;
  background: var(--promo-bg-color, var(--ra-orange));
  color: var(--promo-text-color, #fff);
  display: flex;
  align-items: center;
  isolation: isolate;
}

.promo-card .promo-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
}

.promo-card .promo-icon {
  width: 52px; height: 52px;
  border-radius: var(--ra-radius-sm);
  display: grid; place-items: center;
  background: rgba(255,255,255,0.15);
  flex-shrink: 0;
}

.promo-card .promo-icon i { color: #fff; font-size: 1.5rem; }

.promo-card h3 {
  font-size: 18px; font-weight: 700;
  color: #fff; margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.promo-card p { font-size: 14px; color: rgba(255,255,255,0.85); line-height: 1.4; }

.promo-cta {
  padding: 9px 20px;
  border-radius: var(--ra-radius-pill);
  background: rgba(255,255,255,0.2);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  font-weight: 600;
  font-size: 13px;
  transition: background 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
}
.promo-cta:hover { background: rgba(255,255,255,0.3); }

.promo-bg-shape {
  position: absolute;
  inset: -30%;
  transform: rotate(12deg);
  background: radial-gradient(100% 100% at 0% 0%, rgba(255,255,255,0.2), transparent 60%);
  z-index: 1;
}

/* ---- ANIMATIONS ---- */
.animate-item {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
  /* Fallback: become visible after 1.5s even if JS doesn't fire */
  animation: animate-fallback 0s 1.5s forwards;
}

@keyframes animate-fallback {
  to { opacity: 1; transform: translateY(0); }
}

.animate-item.animated {
  opacity: 1;
  transform: translateY(0);
  animation: none;
}

/* ---- UTILITIES ---- */
.text-orange { color: var(--ra-orange); }
.text-navy   { color: var(--ra-navy); }
.text-muted  { color: var(--ra-navy-60); }
.text-sm     { font-size: 13px; }
.text-xs     { font-size: 12px; }
.font-mono   { font-family: var(--ra-mono); }
.font-serif  { font-family: var(--ra-serif); }

.section-spacer { height: 40px; }
@media (min-width: 768px) { .section-spacer { height: 80px; } }

/* ---- SCROLLBAR (optional elegance) ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--ra-paper-2); }
::-webkit-scrollbar-thumb { background: var(--ra-navy-20); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--ra-navy-40); }

/* ---- MAIN LAYOUT HELPERS ---- */
main { min-height: calc(100vh - 64px); }

main.padded {
  padding-top: 64px;
  padding-bottom: 80px;
}

/* ---- HERO SECTION (shared marketing pages) ---- */
.hero-section {
  padding: 80px 0 64px;
  background: var(--ra-paper);
  overflow: hidden;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.hero-text h1 {
  font-family: var(--ra-serif);
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  font-weight: 600;
  color: var(--ra-navy);
  margin-bottom: 20px;
}

.hero-text p {
  font-size: 18px;
  color: var(--ra-navy-80);
  line-height: 1.6;
  max-width: 42ch;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 32px;
}

.hero-stats {
  display: flex;
  gap: 24px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.hero-stats .stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero-stats .stat-number {
  font-family: var(--ra-serif);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ra-orange);
  line-height: 1;
}

.hero-stats .stat-label {
  font-size: 12px;
  font-family: var(--ra-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ra-navy-60);
}

.hero-image {
  border-radius: var(--ra-radius-xl);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--ra-paper-2);
}

.hero-image img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 768px) {
  .hero-content { grid-template-columns: 1fr; gap: 40px; }
  .hero-section  { padding: 48px 0 48px; }
  .hero-image    { aspect-ratio: 16 / 9; }
}

/* ---- SECTION SHARED STYLES ---- */
.section-intro {
  max-width: 640px;
  margin: 0 auto 56px;
  text-align: center;
}

.section-intro h2 {
  font-size: clamp(28px, 4vw, 44px);
  margin-bottom: 16px;
  letter-spacing: -0.03em;
}

.section-intro p { font-size: 17px; color: var(--ra-navy-80); }

/* ---- STEPS / HOW-IT-WORKS ---- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.step-card {
  background: #fff;
  border: 1px solid var(--ra-line);
  border-radius: var(--ra-radius-lg);
  padding: 28px 24px;
}

.step-number {
  font-family: var(--ra-serif);
  font-size: 52px;
  font-weight: 500;
  color: var(--ra-orange);
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 20px;
}

.step-card h3 {
  font-size: 18px;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.step-card p { font-size: 14px; color: var(--ra-navy-80); }

@media (max-width: 768px) {
  .steps-grid { grid-template-columns: 1fr; }
}

/* ---- PRICING CARDS ---- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.pricing-card {
  background: #fff;
  border: 1px solid var(--ra-line);
  border-radius: var(--ra-radius-xl);
  padding: 32px;
}

.pricing-card.featured {
  background: var(--ra-navy);
  border-color: var(--ra-navy);
  color: #fff;
}

.pricing-card.featured h3,
.pricing-card.featured .price,
.pricing-card.featured p { color: #fff; }

.pricing-card.featured .price-sub { color: rgba(255,255,255,0.65); }

.price {
  font-family: var(--ra-serif);
  font-size: 48px;
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--ra-navy);
  line-height: 1;
  margin: 16px 0 4px;
}

.price-sub {
  font-size: 13px;
  color: var(--ra-navy-60);
  margin-bottom: 24px;
}

.pricing-features { display: flex; flex-direction: column; gap: 12px; margin: 20px 0 28px; }

.pricing-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.pricing-features li::before {
  content: "✓";
  color: var(--ra-orange);
  font-weight: 700;
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .pricing-grid { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
}

/* ---- PROFILE PAGE ---- */
.profile-header-card {
  background: #fff;
  border: 1px solid var(--ra-line);
  border-radius: var(--ra-radius-xl);
  padding: 32px;
  display: flex;
  gap: 24px;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.profile-avatar-large {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--ra-orange-soft);
  color: var(--ra-orange);
  font-family: var(--ra-serif);
  font-size: 28px;
  font-weight: 600;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.profile-info h2 {
  font-size: 22px;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.profile-info p { font-size: 14px; color: var(--ra-navy-60); }

/* ---- HELP / LEGAL PAGES ---- */
.legal-page {
  padding: 64px 0 100px;
  background: var(--ra-paper);
}

.legal-content {
  max-width: 760px;
  margin: 0 auto;
}

.legal-content h1 {
  font-size: clamp(32px, 4vw, 52px);
  letter-spacing: -0.04em;
  margin-bottom: 12px;
}

.legal-content .legal-meta {
  font-family: var(--ra-mono);
  font-size: 12px;
  color: var(--ra-navy-60);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 48px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--ra-line);
}

.legal-content h2 {
  font-size: 22px;
  letter-spacing: -0.02em;
  margin: 40px 0 16px;
}

.legal-content h3 { font-size: 17px; margin: 28px 0 12px; }

.legal-content p {
  font-size: 16px;
  color: var(--ra-navy-80);
  line-height: 1.7;
  margin-bottom: 16px;
}

.legal-content ul, .legal-content ol {
  padding-left: 24px;
  margin-bottom: 16px;
  display: block;
}

.legal-content ul { list-style: disc; }
.legal-content ol { list-style: decimal; }

.legal-content li {
  font-size: 16px;
  color: var(--ra-navy-80);
  line-height: 1.7;
  margin-bottom: 8px;
}

/* ---- HELP PAGE ---- */
.help-categories {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 40px;
}

.help-card {
  background: #fff;
  border: 1px solid var(--ra-line);
  border-radius: var(--ra-radius-lg);
  padding: 24px;
  cursor: pointer;
  transition: box-shadow 0.15s, transform 0.15s;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.help-card:hover {
  box-shadow: var(--ra-shadow-md);
  transform: translateY(-2px);
  color: inherit;
}

.help-card-icon {
  width: 44px; height: 44px;
  border-radius: var(--ra-radius-md);
  background: var(--ra-orange-soft);
  color: var(--ra-orange);
  display: grid; place-items: center;
  font-size: 20px;
}

.help-card h3 { font-size: 16px; letter-spacing: -0.01em; }
.help-card p  { font-size: 13px; color: var(--ra-navy-60); }

/* ---- SEARCH BAR ---- */
.search-bar {
  display: flex;
  align-items: center;
  gap: 0;
  background: #fff;
  border: 1px solid var(--ra-line-strong);
  border-radius: var(--ra-radius-pill);
  overflow: hidden;
  padding: 4px 4px 4px 20px;
  box-shadow: var(--ra-shadow-sm);
  max-width: 560px;
}

.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 15px;
  background: transparent;
  padding: 10px 0;
  min-height: auto;
}

.search-bar input:focus { box-shadow: none; }

.search-bar button {
  padding: 10px 22px;
  background: var(--ra-orange);
  color: #fff;
  border-radius: var(--ra-radius-pill);
  font-size: 14px;
  font-weight: 500;
  transition: background 0.15s;
}

.search-bar button:hover { background: #C95218; }

/* ---- FILTERS BAR ---- */
.filters-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--ra-radius-pill);
  border: 1px solid var(--ra-line-strong);
  background: #fff;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
  color: var(--ra-navy-80);
}

.filter-chip:hover, .filter-chip.active {
  background: var(--ra-navy);
  border-color: var(--ra-navy);
  color: #fff;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 480px) {
  .form-title { font-size: 24px; }
  .steps-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .hero-actions a, .hero-actions button { text-align: center; }
}
