/* ============================================================
   EquiMatch — Main Stylesheet
   Design: Modern & Clean | Forest Green + White
   ============================================================ */

/* ── CSS Custom Properties ─────────────────────────────────── */
:root {
  --color-primary:        #2D6A4F;
  --color-primary-light:  #52B788;
  --color-primary-dark:   #1B4332;
  --color-primary-pale:   #D8F3DC;
  --color-accent:         #95D5B2;

  --color-bg:             #FFFFFF;
  --color-surface:        #F8FAF9;
  --color-surface-2:      #F0F4F2;
  --color-border:         #DCE8E3;
  --color-border-dark:    #B7CFCA;

  --color-text:           #1A2E26;
  --color-text-secondary: #5A7268;
  --color-text-muted:     #8FA89F;

  --color-success:        #2D6A4F;
  --color-success-bg:     #D8F3DC;
  --color-warning:        #D97706;
  --color-warning-bg:     #FEF3C7;
  --color-error:          #DC2626;
  --color-error-bg:       #FEE2E2;
  --color-info:           #2563EB;
  --color-info-bg:        #DBEAFE;

  --color-rider:          #2563EB;
  --color-rider-bg:       #DBEAFE;
  --color-owner:          #7C3AED;
  --color-owner-bg:       #EDE9FE;
  --color-yard:           #D97706;
  --color-yard-bg:        #FEF3C7;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Inter', -apple-system, sans-serif;

  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   16px;
  --radius-full: 9999px;

  --shadow-sm:  0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:  0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg:  0 8px 24px rgba(0,0,0,0.10);
  --shadow-xl:  0 16px 40px rgba(0,0,0,0.12);

  --nav-height: 64px;
  --container:  1120px;
  --sidebar:    280px;

  --transition: 0.2s ease;
}

/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; font-size: 1rem; }
ul, ol { list-style: none; }
h1,h2,h3,h4,h5,h6 { line-height: 1.3; font-weight: 600; }

/* ── Typography ─────────────────────────────────────────────── */
.text-xs  { font-size: 0.75rem; }
.text-sm  { font-size: 0.875rem; }
.text-md  { font-size: 1rem; }
.text-lg  { font-size: 1.125rem; }
.text-xl  { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }

.font-normal  { font-weight: 400; }
.font-medium  { font-weight: 500; }
.font-semibold{ font-weight: 600; }
.font-bold    { font-weight: 700; }

.text-primary   { color: var(--color-primary); }
.text-secondary { color: var(--color-text-secondary); }
.text-muted     { color: var(--color-text-muted); }
.text-center    { text-align: center; }

/* ── Layout ─────────────────────────────────────────────────── */
.container { max-width: var(--container); margin: 0 auto; padding: 0 1.5rem; }
.container-sm { max-width: 680px; margin: 0 auto; padding: 0 1.5rem; }
.container-md { max-width: 860px; margin: 0 auto; padding: 0 1.5rem; }

.page-body { padding-top: var(--nav-height); min-height: 100vh; }

.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-12 { margin-top: 3rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }
.ml-auto { margin-left: auto; }
.mr-auto { margin-right: auto; }

.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }

.hidden { display: none !important; }
.sr-only { position: absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); }
.relative { position: relative; }
.w-full { width: 100%; }

/* ── Navigation ─────────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-height);
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
  display: flex; align-items: center;
}

.nav-inner {
  max-width: var(--container);
  width: 100%; margin: 0 auto; padding: 0 1.5rem;
  display: flex; align-items: center; gap: 2rem;
}

.nav-logo {
  display: flex; align-items: center; gap: 0.625rem;
  font-weight: 700; font-size: 1.25rem; color: var(--color-primary);
  flex-shrink: 0;
}

.nav-logo-mark {
  width: 32px; height: 32px;
  background: var(--color-primary);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 0.875rem; font-weight: 800;
}

.nav-links {
  display: flex; align-items: center; gap: 0.25rem;
  flex: 1;
}

.nav-link {
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-md);
  font-size: 0.9375rem; font-weight: 500;
  color: var(--color-text-secondary);
  transition: all var(--transition);
}
.nav-link:hover { background: var(--color-surface); color: var(--color-text); }
.nav-link.active { color: var(--color-primary); background: var(--color-primary-pale); }

.nav-actions {
  display: flex; align-items: center; gap: 0.75rem;
  margin-left: auto; flex-shrink: 0;
}

.nav-user {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.375rem 0.75rem; border-radius: var(--radius-full);
  cursor: pointer; transition: all var(--transition);
  position: relative;
}
.nav-user:hover { background: var(--color-surface); }

.nav-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--color-primary); color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8125rem; font-weight: 700;
  flex-shrink: 0;
}

.nav-dropdown {
  position: absolute; top: calc(100% + 0.5rem); right: 0;
  min-width: 200px;
  background: white; border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  overflow: hidden; z-index: 200;
}
.nav-dropdown-item {
  display: flex; align-items: center; gap: 0.625rem;
  padding: 0.75rem 1rem; font-size: 0.9375rem;
  color: var(--color-text); transition: background var(--transition);
  cursor: pointer;
}
.nav-dropdown-item:hover { background: var(--color-surface); }
.nav-dropdown-item.danger { color: var(--color-error); }
.nav-dropdown-divider { height: 1px; background: var(--color-border); margin: 0.25rem 0; }

.notif-badge {
  position: absolute; top: -2px; right: -2px;
  width: 16px; height: 16px;
  background: var(--color-error); color: white;
  border-radius: 50%; font-size: 0.625rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid white;
}

.hamburger {
  display: none; flex-direction: column; gap: 5px;
  padding: 4px; cursor: pointer; background: none; border: none;
}
.hamburger span { display: block; width: 22px; height: 2px; background: var(--color-text); border-radius: 2px; transition: all 0.3s; }

.mobile-menu {
  display: none; position: fixed; top: var(--nav-height); left: 0; right: 0;
  background: white; border-bottom: 1px solid var(--color-border);
  padding: 1rem 1.5rem; flex-direction: column; gap: 0.25rem; z-index: 99;
  box-shadow: var(--shadow-lg);
}
.mobile-menu.open { display: flex; }
.mobile-menu .nav-link { padding: 0.75rem 1rem; font-size: 1rem; }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-md); border: none;
  font-size: 0.9375rem; font-weight: 600; line-height: 1;
  transition: all var(--transition); cursor: pointer;
  white-space: nowrap;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-sm { padding: 0.4375rem 0.875rem; font-size: 0.875rem; }
.btn-lg { padding: 0.875rem 1.75rem; font-size: 1.0625rem; }
.btn-xl { padding: 1rem 2rem; font-size: 1.125rem; }

.btn-primary {
  background: var(--color-primary); color: white;
}
.btn-primary:hover { background: var(--color-primary-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }

.btn-secondary {
  background: var(--color-surface-2); color: var(--color-text);
  border: 1px solid var(--color-border);
}
.btn-secondary:hover { background: var(--color-border); }

.btn-outline {
  background: transparent; color: var(--color-primary);
  border: 1.5px solid var(--color-primary);
}
.btn-outline:hover { background: var(--color-primary-pale); }

.btn-ghost {
  background: transparent; color: var(--color-text-secondary);
  border: 1px solid transparent;
}
.btn-ghost:hover { background: var(--color-surface); color: var(--color-text); }

.btn-danger {
  background: var(--color-error); color: white;
}
.btn-danger:hover { background: #b91c1c; }

.btn-success {
  background: var(--color-primary); color: white;
}

.btn-icon { padding: 0.5rem; border-radius: var(--radius-md); }
.btn-icon.btn-sm { padding: 0.375rem; }

/* ── Cards ───────────────────────────────────────────────────── */
.card {
  background: white; border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); }
.card-clickable { cursor: pointer; }
.card-clickable:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--color-border);
  display: flex; align-items: center; justify-content: space-between;
}
.card-body { padding: 1.5rem; }
.card-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
}

/* ── Listing Card ────────────────────────────────────────────── */
.listing-card {
  background: white; border: 1px solid var(--color-border);
  border-radius: var(--radius-xl); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: all var(--transition);
  display: flex; flex-direction: column;
}
.listing-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }

.listing-card-img {
  width: 100%; height: 200px; object-fit: cover;
  background: var(--color-surface-2);
  position: relative; overflow: hidden;
}
.listing-card-img-placeholder {
  width: 100%; height: 200px;
  background: linear-gradient(135deg, var(--color-primary-pale), var(--color-accent));
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
}
.listing-card-badge {
  position: absolute; top: 0.75rem; left: 0.75rem;
}
.listing-card-save {
  position: absolute; top: 0.75rem; right: 0.75rem;
  width: 36px; height: 36px; border-radius: 50%;
  background: white; border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: var(--shadow-sm);
  transition: all var(--transition); font-size: 1rem;
}
.listing-card-save:hover { background: var(--color-primary-pale); }
.listing-card-save.saved { color: var(--color-error); }

.listing-card-body { padding: 1.25rem; flex: 1; }
.listing-card-name { font-size: 1.125rem; font-weight: 700; color: var(--color-text); margin-bottom: 0.25rem; }
.listing-card-location { font-size: 0.875rem; color: var(--color-text-secondary); display: flex; align-items: center; gap: 0.25rem; }
.listing-card-meta { display: flex; flex-wrap: wrap; gap: 0.375rem; margin: 0.75rem 0; }
.listing-card-price { font-size: 1rem; font-weight: 700; color: var(--color-primary); }
.listing-card-footer {
  padding: 0.875rem 1.25rem;
  border-top: 1px solid var(--color-border);
  display: flex; align-items: center; justify-content: space-between;
  background: var(--color-surface);
}

/* ── Badges & Tags ───────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 0.25rem;
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem; font-weight: 600; line-height: 1.4;
}
.badge-primary   { background: var(--color-primary-pale); color: var(--color-primary-dark); }
.badge-success   { background: var(--color-success-bg); color: var(--color-success); }
.badge-warning   { background: var(--color-warning-bg); color: var(--color-warning); }
.badge-error     { background: var(--color-error-bg); color: var(--color-error); }
.badge-info      { background: var(--color-info-bg); color: var(--color-info); }
.badge-gray      { background: var(--color-surface-2); color: var(--color-text-secondary); }
.badge-rider     { background: var(--color-rider-bg); color: var(--color-rider); }
.badge-owner     { background: var(--color-owner-bg); color: var(--color-owner); }
.badge-yard      { background: var(--color-yard-bg); color: var(--color-yard); }

/* ── Forms ───────────────────────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }
.form-group:last-child { margin-bottom: 0; }

.form-label {
  display: block; margin-bottom: 0.375rem;
  font-size: 0.9375rem; font-weight: 500; color: var(--color-text);
}
.form-label .required { color: var(--color-error); margin-left: 2px; }

.form-hint {
  display: block; margin-top: 0.25rem;
  font-size: 0.8125rem; color: var(--color-text-muted);
}

.form-control {
  width: 100%; padding: 0.625rem 0.875rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  background: white; color: var(--color-text);
  font-size: 0.9375rem; transition: all var(--transition);
  outline: none; appearance: none;
}
.form-control:focus { border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(45,106,79,0.12); }
.form-control.error { border-color: var(--color-error); }
.form-control::placeholder { color: var(--color-text-muted); }

textarea.form-control { resize: vertical; min-height: 100px; line-height: 1.6; }
select.form-control { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235A7268' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.875rem center; padding-right: 2.5rem; }

.form-error { font-size: 0.8125rem; color: var(--color-error); margin-top: 0.25rem; display: flex; align-items: center; gap: 0.25rem; }

.form-row { display: grid; gap: 1rem; }
.form-row-2 { grid-template-columns: 1fr 1fr; }
.form-row-3 { grid-template-columns: 1fr 1fr 1fr; }

.checkbox-group, .radio-group { display: flex; flex-direction: column; gap: 0.5rem; }
.checkbox-row, .radio-row { display: flex; align-items: center; gap: 0.5rem; }
.checkbox-row input, .radio-row input { width: 1rem; height: 1rem; accent-color: var(--color-primary); }

.toggle { position: relative; width: 44px; height: 24px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0;
  background: var(--color-border-dark); border-radius: 24px;
  cursor: pointer; transition: background var(--transition);
}
.toggle-slider::before {
  content: ''; position: absolute;
  width: 18px; height: 18px; border-radius: 50%; background: white;
  left: 3px; top: 3px; transition: transform var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle input:checked + .toggle-slider { background: var(--color-primary); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }

/* ── Search Bar ──────────────────────────────────────────────── */
.search-bar {
  display: flex; align-items: stretch;
  background: white; border: 2px solid var(--color-border);
  border-radius: var(--radius-full); overflow: hidden;
  box-shadow: var(--shadow-md); transition: border-color var(--transition);
}
.search-bar:focus-within { border-color: var(--color-primary); }

.search-bar-field {
  flex: 1; display: flex; align-items: center; gap: 0.625rem;
  padding: 0.75rem 1.25rem; border-right: 1px solid var(--color-border);
}
.search-bar-field:last-of-type { border-right: none; }
.search-bar-icon { color: var(--color-text-muted); flex-shrink: 0; }
.search-bar-input {
  border: none; outline: none; background: none;
  font-size: 1rem; color: var(--color-text); width: 100%;
}
.search-bar-input::placeholder { color: var(--color-text-muted); }
.search-bar-btn { border-radius: 0; padding: 0.75rem 1.75rem; border-radius: 0 var(--radius-full) var(--radius-full) 0; }

/* ── Filter Panel ────────────────────────────────────────────── */
.filter-panel {
  background: white; border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.filter-section { margin-bottom: 1.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--color-border); }
.filter-section:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.filter-title { font-size: 0.875rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-text-secondary); margin-bottom: 0.875rem; }

.filter-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.filter-chip {
  padding: 0.375rem 0.75rem; border-radius: var(--radius-full);
  border: 1.5px solid var(--color-border); background: white;
  font-size: 0.875rem; font-weight: 500; cursor: pointer;
  transition: all var(--transition); color: var(--color-text);
}
.filter-chip:hover { border-color: var(--color-primary); color: var(--color-primary); }
.filter-chip.active { background: var(--color-primary-pale); border-color: var(--color-primary); color: var(--color-primary-dark); }

.range-slider { width: 100%; accent-color: var(--color-primary); }

/* ── Hero ────────────────────────────────────────────────────── */
.hero {
  min-height: 580px; display: flex; align-items: center;
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 50%, var(--color-primary-light) 100%);
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content { position: relative; z-index: 1; color: white; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 0.5rem; background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.25); color: white; padding: 0.375rem 0.875rem; border-radius: var(--radius-full); font-size: 0.875rem; font-weight: 500; margin-bottom: 1.5rem; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 800; margin-bottom: 1.25rem; line-height: 1.15; }
.hero h1 span { color: var(--color-accent); }
.hero-subtitle { font-size: 1.125rem; opacity: 0.9; margin-bottom: 2.5rem; max-width: 560px; line-height: 1.7; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 2rem; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid rgba(255,255,255,0.2); }
.hero-stat-value { font-size: 1.75rem; font-weight: 800; }
.hero-stat-label { font-size: 0.875rem; opacity: 0.8; }

/* ── Section Headers ─────────────────────────────────────────── */
.section-header { text-align: center; margin-bottom: 3rem; }
.section-eyebrow { font-size: 0.875rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-primary); margin-bottom: 0.75rem; }
.section-title { font-size: clamp(1.75rem, 3vw, 2.25rem); font-weight: 800; color: var(--color-text); margin-bottom: 1rem; }
.section-subtitle { font-size: 1.0625rem; color: var(--color-text-secondary); max-width: 560px; margin: 0 auto; line-height: 1.7; }

/* ── How It Works ────────────────────────────────────────────── */
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2rem; }
.step-card { text-align: center; padding: 2rem 1.5rem; }
.step-number {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--color-primary-pale); color: var(--color-primary);
  font-size: 1.25rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.25rem;
}
.step-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.step-title { font-size: 1.125rem; font-weight: 700; margin-bottom: 0.5rem; }
.step-desc { font-size: 0.9375rem; color: var(--color-text-secondary); line-height: 1.7; }

/* ── Persona Cards ───────────────────────────────────────────── */
.persona-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.persona-card {
  background: white; border: 2px solid var(--color-border);
  border-radius: var(--radius-xl); padding: 2rem 1.75rem;
  text-align: center; cursor: pointer; transition: all var(--transition);
}
.persona-card:hover, .persona-card.selected {
  border-color: var(--color-primary);
  background: var(--color-primary-pale);
  transform: translateY(-3px); box-shadow: var(--shadow-lg);
}
.persona-icon { font-size: 3rem; margin-bottom: 1rem; }
.persona-name { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.5rem; }
.persona-desc { font-size: 0.9375rem; color: var(--color-text-secondary); line-height: 1.6; }

/* ── Dashboard Layout ────────────────────────────────────────── */
.dashboard-layout {
  display: grid; grid-template-columns: var(--sidebar) 1fr;
  gap: 0; min-height: calc(100vh - var(--nav-height));
}

.dashboard-sidebar {
  border-right: 1px solid var(--color-border);
  padding: 2rem 0; background: var(--color-surface);
  position: sticky; top: var(--nav-height); height: calc(100vh - var(--nav-height));
  overflow-y: auto;
}

.sidebar-section { margin-bottom: 0.25rem; padding: 0 1rem; }
.sidebar-section-label { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-text-muted); padding: 0.75rem 0.75rem 0.5rem; }

.sidebar-link {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.625rem 0.875rem; border-radius: var(--radius-md);
  font-size: 0.9375rem; font-weight: 500; color: var(--color-text-secondary);
  transition: all var(--transition); cursor: pointer;
}
.sidebar-link:hover { background: var(--color-surface-2); color: var(--color-text); }
.sidebar-link.active { background: var(--color-primary-pale); color: var(--color-primary-dark); font-weight: 600; }
.sidebar-link-icon { font-size: 1.125rem; flex-shrink: 0; }
.sidebar-badge { margin-left: auto; }

.dashboard-main { padding: 2rem 2.5rem; overflow-y: auto; }
.dashboard-header { margin-bottom: 2rem; }
.dashboard-title { font-size: 1.625rem; font-weight: 800; color: var(--color-text); }
.dashboard-subtitle { font-size: 0.9375rem; color: var(--color-text-secondary); margin-top: 0.25rem; }

/* ── Stats Cards ─────────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.25rem; margin-bottom: 2rem; }
.stat-card {
  background: white; border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.stat-label { font-size: 0.875rem; font-weight: 500; color: var(--color-text-secondary); margin-bottom: 0.5rem; }
.stat-value { font-size: 2rem; font-weight: 800; color: var(--color-text); }
.stat-change { font-size: 0.8125rem; margin-top: 0.25rem; }
.stat-up { color: var(--color-success); }
.stat-icon { font-size: 1.5rem; margin-bottom: 0.75rem; }

/* ── Tables ──────────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--color-border); }
table { width: 100%; border-collapse: collapse; background: white; }
thead th { padding: 0.875rem 1rem; text-align: left; font-size: 0.8125rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-text-secondary); background: var(--color-surface); border-bottom: 1px solid var(--color-border); white-space: nowrap; }
tbody tr { border-bottom: 1px solid var(--color-border); transition: background var(--transition); }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--color-surface); }
tbody td { padding: 1rem; font-size: 0.9375rem; vertical-align: middle; }

/* ── Application Status ──────────────────────────────────────── */
.status-dot {
  display: inline-flex; align-items: center; gap: 0.375rem;
  font-size: 0.875rem; font-weight: 500;
}
.status-dot::before {
  content: ''; display: block;
  width: 8px; height: 8px; border-radius: 50%;
}
.status-new::before         { background: var(--color-info); }
.status-under_review::before{ background: var(--color-warning); }
.status-shortlisted::before { background: var(--color-primary-light); }
.status-accepted::before    { background: var(--color-success); }
.status-rejected::before    { background: var(--color-error); }
.status-withdrawn::before   { background: var(--color-text-muted); }
.status-archived::before    { background: var(--color-text-muted); }
.status-draft::before       { background: var(--color-text-muted); }
.status-published::before   { background: var(--color-success); }
.status-paused::before      { background: var(--color-warning); }
.status-matched::before     { background: var(--color-primary); }

/* ── Image Gallery ───────────────────────────────────────────── */
.gallery { position: relative; }
.gallery-main { width: 100%; height: 420px; object-fit: cover; border-radius: var(--radius-xl); background: var(--color-surface-2); overflow: hidden; }
.gallery-main-placeholder { width: 100%; height: 420px; border-radius: var(--radius-xl); background: linear-gradient(135deg, var(--color-primary-pale), var(--color-accent)); display: flex; align-items: center; justify-content: center; font-size: 5rem; }
.gallery-thumbs { display: flex; gap: 0.5rem; margin-top: 0.75rem; overflow-x: auto; }
.gallery-thumb { width: 80px; height: 60px; border-radius: var(--radius-md); object-fit: cover; cursor: pointer; opacity: 0.7; transition: opacity var(--transition); flex-shrink: 0; }
.gallery-thumb.active, .gallery-thumb:hover { opacity: 1; }

/* ── Detail Page Layout ──────────────────────────────────────── */
.detail-layout { display: grid; grid-template-columns: 1fr 360px; gap: 2.5rem; align-items: start; }
.detail-sidebar { position: sticky; top: calc(var(--nav-height) + 1.5rem); }

.detail-section { margin-bottom: 2rem; padding-bottom: 2rem; border-bottom: 1px solid var(--color-border); }
.detail-section:last-child { margin-bottom: 0; border-bottom: none; }
.detail-section-title { font-size: 1.0625rem; font-weight: 700; margin-bottom: 1rem; }

.fact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 1rem; }
.fact-item { background: var(--color-surface); border-radius: var(--radius-md); padding: 0.875rem; }
.fact-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-text-muted); margin-bottom: 0.25rem; }
.fact-value { font-size: 1rem; font-weight: 600; color: var(--color-text); }

/* ── Application Form ────────────────────────────────────────── */
.apply-card {
  background: white; border: 1px solid var(--color-border);
  border-radius: var(--radius-xl); overflow: hidden; box-shadow: var(--shadow-md);
}
.apply-card-header { background: var(--color-primary); color: white; padding: 1.5rem; }
.apply-card-body { padding: 1.5rem; }

/* ── Stepper ─────────────────────────────────────────────────── */
.stepper { display: flex; align-items: center; gap: 0; margin-bottom: 2.5rem; }
.step-item {
  flex: 1; display: flex; align-items: center; position: relative;
}
.step-item:last-child { flex: 0; }
.step-bubble {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.875rem; font-weight: 700;
  border: 2px solid var(--color-border); background: white; color: var(--color-text-muted);
  position: relative;
}
.step-item.active .step-bubble   { background: var(--color-primary); border-color: var(--color-primary); color: white; }
.step-item.done .step-bubble     { background: var(--color-primary-pale); border-color: var(--color-primary); color: var(--color-primary); }
.step-line { flex: 1; height: 2px; background: var(--color-border); margin: 0 0.5rem; }
.step-item.done .step-line + .step-line,
.step-item.done ~ .step-item .step-line { background: var(--color-primary); }
.step-label { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 0.75rem; font-weight: 500; color: var(--color-text-muted); margin-top: 0.375rem; }
.step-item.active .step-label   { color: var(--color-primary); font-weight: 600; }
.step-item.done .step-label     { color: var(--color-text-secondary); }

/* ── Notifications ───────────────────────────────────────────── */
.notif-panel {
  position: fixed; top: var(--nav-height); right: 1rem;
  width: 380px; max-height: 480px;
  background: white; border: 1px solid var(--color-border);
  border-radius: var(--radius-xl); box-shadow: var(--shadow-xl);
  overflow: hidden; z-index: 150; display: none; flex-direction: column;
}
.notif-panel.open { display: flex; }
.notif-panel-header { padding: 1rem 1.25rem; border-bottom: 1px solid var(--color-border); display: flex; align-items: center; justify-content: space-between; }
.notif-list { overflow-y: auto; flex: 1; }
.notif-item { padding: 1rem 1.25rem; border-bottom: 1px solid var(--color-border); cursor: pointer; transition: background var(--transition); display: flex; gap: 0.875rem; }
.notif-item:hover { background: var(--color-surface); }
.notif-item.unread { background: var(--color-primary-pale); }
.notif-item:last-child { border-bottom: none; }
.notif-icon { width: 36px; height: 36px; border-radius: 50%; background: var(--color-primary-pale); display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; }
.notif-body { flex: 1; }
.notif-title { font-size: 0.9375rem; font-weight: 600; margin-bottom: 0.125rem; }
.notif-text { font-size: 0.875rem; color: var(--color-text-secondary); }
.notif-time { font-size: 0.75rem; color: var(--color-text-muted); margin-top: 0.25rem; }

/* ── Toast ───────────────────────────────────────────────────── */
.toast-container { position: fixed; bottom: 1.5rem; right: 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; z-index: 999; }
.toast {
  display: flex; align-items: center; gap: 0.75rem;
  background: var(--color-text); color: white;
  padding: 0.875rem 1.25rem; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl); min-width: 280px; max-width: 400px;
  animation: slideInToast 0.3s ease; font-size: 0.9375rem;
}
.toast.success { background: var(--color-primary); }
.toast.error   { background: var(--color-error); }
.toast.warning { background: var(--color-warning); }
@keyframes slideInToast { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ── Modal ───────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 500; padding: 1rem;
}
.modal {
  background: white; border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl); width: 100%; max-width: 520px;
  max-height: 90vh; overflow-y: auto;
  animation: modalIn 0.25s ease;
}
.modal-sm { max-width: 380px; }
.modal-lg { max-width: 720px; }
@keyframes modalIn { from { transform: scale(0.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-header { padding: 1.5rem; border-bottom: 1px solid var(--color-border); display: flex; align-items: center; justify-content: space-between; }
.modal-body { padding: 1.5rem; }
.modal-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--color-border); display: flex; justify-content: flex-end; gap: 0.75rem; }

/* ── Tabs ────────────────────────────────────────────────────── */
.tabs { border-bottom: 2px solid var(--color-border); display: flex; gap: 0; margin-bottom: 1.5rem; overflow-x: auto; }
.tab-btn {
  padding: 0.75rem 1.25rem; border: none; background: none;
  font-size: 0.9375rem; font-weight: 500; color: var(--color-text-secondary);
  cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px;
  white-space: nowrap; transition: all var(--transition); display: flex; align-items: center; gap: 0.5rem;
}
.tab-btn:hover { color: var(--color-text); }
.tab-btn.active { color: var(--color-primary); border-bottom-color: var(--color-primary); font-weight: 600; }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── Empty States ────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 4rem 2rem; }
.empty-icon { font-size: 3.5rem; margin-bottom: 1rem; opacity: 0.5; }
.empty-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.5rem; }
.empty-desc { font-size: 0.9375rem; color: var(--color-text-secondary); max-width: 400px; margin: 0 auto 1.5rem; line-height: 1.7; }

/* ── Breadcrumb ──────────────────────────────────────────────── */
.breadcrumb { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; color: var(--color-text-muted); margin-bottom: 1.5rem; }
.breadcrumb a { color: var(--color-text-secondary); transition: color var(--transition); }
.breadcrumb a:hover { color: var(--color-primary); }
.breadcrumb-sep { color: var(--color-text-muted); }

/* ── Info Alert ──────────────────────────────────────────────── */
.alert {
  padding: 1rem 1.25rem; border-radius: var(--radius-md);
  display: flex; gap: 0.75rem; align-items: flex-start;
  font-size: 0.9375rem; border: 1px solid;
}
.alert-info    { background: var(--color-info-bg);    border-color: #BFDBFE; color: #1e40af; }
.alert-success { background: var(--color-success-bg); border-color: #A7F3D0; color: var(--color-primary-dark); }
.alert-warning { background: var(--color-warning-bg); border-color: #FDE68A; color: #92400e; }
.alert-error   { background: var(--color-error-bg);   border-color: #FECACA; color: #991b1b; }
.alert-icon { font-size: 1.125rem; flex-shrink: 0; }

/* ── Progress Bar ────────────────────────────────────────────── */
.progress { height: 8px; background: var(--color-surface-2); border-radius: var(--radius-full); overflow: hidden; }
.progress-bar { height: 100%; background: var(--color-primary); border-radius: var(--radius-full); transition: width 0.4s ease; }
.progress-label { display: flex; justify-content: space-between; font-size: 0.8125rem; color: var(--color-text-secondary); margin-bottom: 0.375rem; }

/* ── Utility ─────────────────────────────────────────────────── */
.divider { border: none; border-top: 1px solid var(--color-border); margin: 1.5rem 0; }
.bg-surface { background: var(--color-surface); }
.bg-primary-pale { background: var(--color-primary-pale); }
.rounded { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.shadow { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.overflow-hidden { overflow: hidden; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ── Footer ──────────────────────────────────────────────────── */
.footer { background: var(--color-primary-dark); color: white; padding: 4rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; margin-bottom: 3rem; }
.footer-brand p { font-size: 0.9375rem; opacity: 0.75; line-height: 1.7; margin-top: 0.875rem; }
.footer-col h4 { font-size: 0.875rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 1rem; opacity: 0.9; }
.footer-col a { display: block; font-size: 0.9375rem; opacity: 0.7; margin-bottom: 0.5rem; transition: opacity var(--transition); }
.footer-col a:hover { opacity: 1; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 1.5rem; display: flex; align-items: center; justify-content: space-between; font-size: 0.875rem; opacity: 0.6; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .detail-layout { grid-template-columns: 1fr; }
  .detail-sidebar { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .dashboard-layout { grid-template-columns: 1fr; }
  .dashboard-sidebar { display: none; }
  .dashboard-main { padding: 1.5rem; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .persona-cards { grid-template-columns: 1fr; }
  .form-row-2, .form-row-3 { grid-template-columns: 1fr; }
  .hero { min-height: 480px; }
  .hero h1 { font-size: 1.875rem; }
  .hero-stats { gap: 1.5rem; flex-wrap: wrap; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
  .search-bar { flex-direction: column; border-radius: var(--radius-xl); }
  .search-bar-field { border-right: none; border-bottom: 1px solid var(--color-border); }
  .search-bar-btn { border-radius: 0 0 var(--radius-xl) var(--radius-xl); width: 100%; }
  .notif-panel { width: calc(100vw - 2rem); right: 0.5rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .tabs { gap: 0; }
}

@media (max-width: 480px) {
  :root { --container: 100%; }
  .container, .container-sm, .container-md { padding: 0 1rem; }
  .stats-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .modal { border-radius: var(--radius-lg); }
}
