/* ParaLaunch Design System */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --ink: #1a1a2e;
  --cream: #faf8f5;
  --warm: #e8e0d4;
  --accent: #8b5e3c;
  --accent-light: #c4956a;
  --slate: #4a4a5a;
  --soft-gold: #d4a574;
  --success: #2d6a4f;
  --success-light: #d4edda;
  --error: #c0392b;
  --error-light: #f8d7da;
  --white: #ffffff;
  --border: rgba(0,0,0,0.08);
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--cream);
  color: var(--ink);
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* TYPOGRAPHY */
h1, h2, h3 { font-family: 'DM Serif Display', serif; letter-spacing: -0.5px; }
h1 { font-size: 48px; line-height: 1.1; }
h2 { font-size: 36px; line-height: 1.2; }
h3 { font-size: 22px; line-height: 1.3; }
p { line-height: 1.7; color: var(--slate); }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-light); }

/* NAV */
.app-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 48px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}
.app-nav .logo {
  font-family: 'DM Serif Display', serif;
  font-size: 28px;
  color: var(--ink);
  letter-spacing: -0.5px;
  text-decoration: none;
}
.app-nav .logo span { color: var(--accent); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--slate);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--accent); }
.nav-links .btn-sm {
  padding: 8px 20px;
  background: var(--accent);
  color: white;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  transition: background 0.2s;
}
.nav-links .btn-sm:hover { background: var(--accent-light); color: white; }

/* Hamburger */
.hamburger { display: none; background: none; border: none; font-size: 28px; cursor: pointer; color: var(--ink); }
.mobile-nav { display: none; }

/* CONTAINER */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 48px;
  flex: 1;
}
.container-sm {
  max-width: 680px;
  margin: 0 auto;
  padding: 40px 48px;
  flex: 1;
}

/* CARDS */
.card {
  background: var(--white);
  border-radius: 16px;
  padding: 32px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 20px rgba(0,0,0,0.04);
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

/* STAT CARDS */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}
.stat-card {
  background: var(--white);
  border-radius: 16px;
  padding: 24px 28px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 20px rgba(0,0,0,0.04);
}
.stat-card .stat-number {
  font-family: 'DM Serif Display', serif;
  font-size: 36px;
  color: var(--accent);
  margin-bottom: 4px;
}
.stat-card .stat-label {
  font-size: 13px;
  color: var(--slate);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* FORMS */
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}
.form-group .hint {
  font-size: 12px;
  color: var(--slate);
  margin-top: 4px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
input, select, textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--warm);
  border-radius: 10px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 15px;
  color: var(--ink);
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(139,94,60,0.1);
}
textarea { resize: vertical; min-height: 100px; }
select { cursor: pointer; }

/* CHECKBOX GROUP */
.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--cream);
  border: 1px solid var(--warm);
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s;
}
.checkbox-group label:hover { border-color: var(--accent-light); }
.checkbox-group input[type="checkbox"] { width: auto; margin: 0; accent-color: var(--accent); }
.checkbox-group input[type="checkbox"]:checked + span { color: var(--accent); }
.checkbox-group label:has(input:checked) {
  background: rgba(139,94,60,0.08);
  border-color: var(--accent);
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border: none;
  border-radius: 10px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: white;
}
.btn-primary:hover { background: var(--accent-light); }
.btn-secondary {
  background: var(--warm);
  color: var(--ink);
}
.btn-secondary:hover { background: #d8cfc2; }
.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}
.btn-outline:hover { background: var(--accent); color: white; }
.btn-success {
  background: var(--success);
  color: white;
}
.btn-success:hover { background: #245a42; }
.btn-danger {
  background: var(--error);
  color: white;
}
.btn-danger:hover { background: #a93226; }
.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}
.btn-block { width: 100%; }
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* BADGES */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-accent { background: rgba(139,94,60,0.1); color: var(--accent); }
.badge-success { background: var(--success-light); color: var(--success); }
.badge-warning { background: #fff3cd; color: #856404; }
.badge-error { background: var(--error-light); color: var(--error); }
.badge-slate { background: var(--warm); color: var(--slate); }

/* SECTION */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.section-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 8px;
}
.section-divider {
  border: none;
  height: 1px;
  background: var(--warm);
  margin: 40px 0;
}

/* FILTER BAR */
.filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
  flex-wrap: wrap;
  align-items: center;
}
.filter-bar input, .filter-bar select {
  max-width: 260px;
}
.filter-pill {
  padding: 8px 16px;
  border: 1px solid var(--warm);
  border-radius: 20px;
  background: var(--white);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--slate);
}
.filter-pill:hover, .filter-pill.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* PROFILE CARD */
.profile-card {
  background: var(--white);
  border-radius: 16px;
  padding: 28px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 20px rgba(0,0,0,0.04);
  transition: transform 0.2s, box-shadow 0.2s;
}
.profile-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}
.profile-card .profile-name {
  font-family: 'DM Serif Display', serif;
  font-size: 22px;
  margin-bottom: 4px;
}
.profile-card .profile-meta {
  font-size: 14px;
  color: var(--slate);
  margin-bottom: 12px;
}
.profile-card .profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
.profile-card .profile-bio {
  font-size: 14px;
  color: var(--slate);
  line-height: 1.6;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.profile-card .profile-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.profile-card .rate {
  font-family: 'DM Serif Display', serif;
  font-size: 20px;
  color: var(--accent);
}
.profile-card .rate small {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 12px;
  color: var(--slate);
}

/* NEED CARD */
.need-card {
  background: var(--white);
  border-radius: 16px;
  padding: 28px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 20px rgba(0,0,0,0.04);
  transition: transform 0.2s, box-shadow 0.2s;
}
.need-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}
.need-card .need-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}
.need-card .need-title {
  font-family: 'DM Serif Display', serif;
  font-size: 20px;
}
.need-card .need-meta {
  font-size: 14px;
  color: var(--slate);
  margin-bottom: 10px;
}
.need-card .need-description {
  font-size: 14px;
  color: var(--slate);
  line-height: 1.6;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.need-card .need-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.need-card .budget {
  font-family: 'DM Serif Display', serif;
  font-size: 18px;
  color: var(--accent);
}
.need-card .budget small {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 12px;
  color: var(--slate);
}

/* MATCH CARD */
.match-card {
  background: var(--white);
  border-radius: 12px;
  padding: 20px 24px;
  border: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}
.match-card .match-info { flex: 1; }
.match-card .match-name {
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 2px;
}
.match-card .match-detail {
  font-size: 13px;
  color: var(--slate);
}
.match-card .match-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

/* TABS */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--warm);
  margin-bottom: 28px;
}
.tab {
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  color: var(--slate);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: inherit;
}
.tab:hover { color: var(--accent); }
.tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.tab-content { display: none; }
.tab-content.active { display: block; }

/* EMPTY STATE */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--slate);
}
.empty-state .empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.4;
}
.empty-state h3 {
  font-size: 20px;
  color: var(--ink);
  margin-bottom: 8px;
}
.empty-state p {
  max-width: 400px;
  margin: 0 auto 20px;
  font-size: 15px;
}

/* TOAST */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 14px 24px;
  border-radius: 10px;
  color: white;
  font-weight: 600;
  font-size: 14px;
  z-index: 9999;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s;
  max-width: 400px;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast-success { background: var(--success); }
.toast-error { background: var(--error); }

/* FOOTER */
.app-footer {
  padding: 40px 48px;
  text-align: center;
  border-top: 1px solid var(--warm);
  margin-top: auto;
}
.app-footer .logo-sm {
  font-family: 'DM Serif Display', serif;
  font-size: 20px;
  color: var(--ink);
  margin-bottom: 8px;
}
.app-footer .logo-sm span { color: var(--accent); }
.app-footer p {
  font-size: 13px;
  color: var(--slate);
}

/* LOADING */
.loading {
  display: flex;
  justify-content: center;
  padding: 60px;
}
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--warm);
  border-top: 3px solid var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* PAGE HEADER */
.page-header {
  margin-bottom: 32px;
}
.page-header h1 {
  margin-bottom: 8px;
}
.page-header p {
  font-size: 17px;
  max-width: 600px;
}

/* MODAL */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}
.modal-overlay.show { opacity: 1; visibility: visible; }
.modal {
  background: var(--white);
  border-radius: 16px;
  padding: 36px;
  max-width: 520px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}
.modal h2 { margin-bottom: 20px; }
.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .app-nav { padding: 16px 24px; }
  .app-nav .logo { font-size: 24px; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0;
    background: var(--cream);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    gap: 20px;
  }
  .nav-links.open a { font-size: 18px; }
  .hamburger { display: block; z-index: 10000; }
  .container, .container-sm { padding: 24px; }
  h1 { font-size: 36px; }
  h2 { font-size: 28px; }
  .form-row { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: 1fr; }
  .filter-bar { flex-direction: column; }
  .filter-bar input, .filter-bar select { max-width: 100%; }
  .match-card { flex-direction: column; align-items: flex-start; }
  .match-card .match-actions { width: 100%; }
  .tabs { overflow-x: auto; }
  .app-footer { padding: 32px 24px; }
  .section-header { flex-direction: column; gap: 12px; align-items: flex-start; }
}

@media (max-width: 480px) {
  .card { padding: 20px; }
  .profile-card { padding: 20px; }
  .need-card { padding: 20px; }
}
