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

:root {
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --primary-light: #eef2ff;
  --green: #22c55e;
  --red: #ef4444;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-900: #111827;
  --radius: 16px;
  --shadow: 0 4px 24px rgba(0,0,0,.08);
}

body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: var(--gray-50); color: var(--gray-900); min-height: 100vh; }

/* NAV */
nav { background: #fff; border-bottom: 1px solid var(--gray-200); padding: 0 1.5rem; height: 56px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 100; }
nav .logo { font-size: 1.25rem; font-weight: 800; color: var(--primary); text-decoration: none; }
nav .nav-links { display: flex; gap: 1.25rem; align-items: center; }
nav .nav-links a { color: var(--gray-500); text-decoration: none; font-size: .9rem; font-weight: 500; transition: color .15s; }
nav .nav-links a:hover { color: var(--primary); }
nav .nav-links .btn-sm { background: var(--primary); color: #fff !important; padding: .35rem .85rem; border-radius: 8px; font-size: .85rem; }

/* MAIN */
.container { max-width: 900px; margin: 0 auto; padding: 2.5rem 1rem; }
.container-sm { max-width: 480px; margin: 0 auto; padding: 2.5rem 1rem; }

/* CARD */
.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; border: 1px solid var(--gray-200); }

/* FORMS */
.form-group { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1rem; }
label { font-size: .875rem; font-weight: 600; color: var(--gray-700); }
input[type=text], input[type=email], input[type=password], input[type=url], select, textarea {
  border: 1.5px solid var(--gray-200); border-radius: 10px; padding: .6rem .85rem;
  font-size: .9rem; font-family: inherit; transition: border-color .15s; outline: none; width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,.12); }
textarea { resize: vertical; min-height: 100px; }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .65rem 1.4rem; border-radius: 10px; font-size: .9rem; font-weight: 600; cursor: pointer; border: none; text-decoration: none; transition: all .15s; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-outline:hover { background: var(--primary-light); }
.btn-ghost { background: var(--gray-100); color: var(--gray-700); }
.btn-ghost:hover { background: var(--gray-200); }
.btn-block { width: 100%; }
.btn-danger { background: #fee2e2; color: var(--red); }

/* STATS ROW */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 2rem; }
.stat { background: #fff; border-radius: var(--radius); padding: 1.25rem; text-align: center; box-shadow: var(--shadow); border: 1px solid var(--gray-200); }
.stat-num { font-size: 2rem; font-weight: 800; color: var(--primary); }
.stat-num.green { color: var(--green); }
.stat-label { font-size: .8rem; color: var(--gray-500); margin-top: .25rem; }

/* ROLE TOGGLE */
.role-toggle { display: flex; border: 1.5px solid var(--gray-200); border-radius: 10px; overflow: hidden; margin-bottom: 1.5rem; }
.role-toggle button { flex: 1; padding: .6rem; border: none; background: #fff; cursor: pointer; font-size: .875rem; font-weight: 600; color: var(--gray-500); transition: all .15s; }
.role-toggle button.active { background: var(--primary); color: #fff; }

/* JOB LIST */
.job-item { background: #fff; border-radius: var(--radius); padding: 1rem 1.25rem; border: 1px solid var(--gray-200); display: flex; align-items: center; justify-content: space-between; gap: 1rem; box-shadow: var(--shadow); }
.job-item + .job-item { margin-top: .6rem; }
.job-title { font-weight: 700; color: var(--gray-900); }
.job-meta { font-size: .8rem; color: var(--gray-500); margin-top: .25rem; }
.badge { display: inline-block; font-size: .75rem; padding: .2rem .6rem; border-radius: 20px; font-weight: 600; background: var(--primary-light); color: var(--primary); }
.badge.green { background: #dcfce7; color: #16a34a; }
.badge.gray { background: var(--gray-100); color: var(--gray-500); }

/* PAGE HEADER */
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2rem; }
.page-header h1 { font-size: 1.5rem; font-weight: 800; }
.page-header p { font-size: .875rem; color: var(--gray-500); margin-top: .2rem; }

/* AUTH PAGES */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; background: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 100%); }
.auth-card { background: #fff; border-radius: 20px; box-shadow: 0 8px 40px rgba(79,70,229,.12); padding: 2.5rem; width: 100%; max-width: 420px; }
.auth-card h1 { font-size: 1.75rem; font-weight: 800; margin-bottom: .4rem; }
.auth-card .subtitle { color: var(--gray-500); font-size: .9rem; margin-bottom: 1.75rem; }
.auth-footer { text-align: center; margin-top: 1.5rem; font-size: .875rem; color: var(--gray-500); }
.auth-footer a { color: var(--primary); font-weight: 600; text-decoration: none; }
.error-msg { background: #fee2e2; color: var(--red); padding: .75rem 1rem; border-radius: 8px; font-size: .875rem; margin-bottom: 1rem; }

/* LANDING */
.landing { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 2rem; background: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 100%); }
.landing h1 { font-size: 4rem; font-weight: 900; color: var(--primary); margin-bottom: .5rem; }
.landing .tagline { font-size: 1.35rem; color: var(--gray-700); margin-bottom: .5rem; }
.landing .sub { color: var(--gray-400); margin-bottom: 2.5rem; }
.landing-btns { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }

/* SWIPE PAGE */
.swipe-page { min-height: 100vh; background: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 100%); display: flex; flex-direction: column; }
.swipe-arena { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2rem 1rem; }
.card-stack { position: relative; width: 100%; max-width: 380px; height: 480px; }
.swipe-card {
  position: absolute; inset: 0;
  background: #fff; border-radius: 20px;
  box-shadow: 0 8px 40px rgba(0,0,0,.12);
  padding: 1.75rem; overflow: hidden;
  cursor: grab; user-select: none;
  transform-origin: center bottom;
  transition: box-shadow .15s;
  border: 1px solid var(--gray-200);
}
.swipe-card:active { cursor: grabbing; }
.swipe-card.back-1 { transform: scale(.97) translateY(8px); z-index: 1; }
.swipe-card.back-2 { transform: scale(.94) translateY(16px); z-index: 0; }
.swipe-card.top { z-index: 10; }

.swipe-label {
  position: absolute; top: 1.5rem; font-size: 1.5rem; font-weight: 900;
  padding: .35rem .9rem; border-radius: 8px; border-width: 3px; border-style: solid;
  opacity: 0; transition: opacity .1s; pointer-events: none; letter-spacing: .05em;
}
.swipe-label.ja  { left: 1.5rem; color: var(--green); border-color: var(--green); transform: rotate(-12deg); }
.swipe-label.nein { right: 1.5rem; color: var(--red);   border-color: var(--red);   transform: rotate(12deg); }

.card-company { font-size: 1rem; font-weight: 700; color: var(--primary); margin-bottom: .25rem; }
.card-title   { font-size: 1.3rem; font-weight: 800; color: var(--gray-900); margin-bottom: .75rem; }
.card-meta    { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.card-desc    { font-size: .875rem; color: var(--gray-600, #4b5563); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 9; -webkit-box-orient: vertical; overflow: hidden; }
.card-avatar  { width: 60px; height: 60px; border-radius: 50%; background: var(--primary-light); color: var(--primary); font-size: 1.5rem; font-weight: 800; display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; }
.card-name    { font-size: 1.3rem; font-weight: 800; color: var(--gray-900); }
.card-person-title { font-size: .9rem; color: var(--primary); font-weight: 600; margin-bottom: .5rem; }
.card-skills  { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: auto; padding-top: .75rem; }
.skill-chip   { font-size: .75rem; background: var(--primary-light); color: var(--primary); padding: .25rem .65rem; border-radius: 20px; font-weight: 600; }

.swipe-actions { display: flex; gap: 1.5rem; margin-top: 1.75rem; align-items: center; }
.swipe-btn { width: 60px; height: 60px; border-radius: 50%; border: none; cursor: pointer; font-size: 1.5rem; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 16px rgba(0,0,0,.12); transition: transform .15s, box-shadow .15s; }
.swipe-btn:hover { transform: scale(1.08); }
.swipe-btn.nein-btn { background: #fff; border: 2px solid #fecaca; }
.swipe-btn.ja-btn   { background: #fff; border: 2px solid #bbf7d0; }
.swipe-count { font-size: .8rem; color: var(--gray-400); text-align: center; margin-top: .75rem; }

/* MATCH FLASH */
.match-flash {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none; opacity: 0; transition: opacity .3s;
}
.match-flash.show { opacity: 1; }
.match-flash-inner {
  background: var(--green); color: #fff;
  font-size: 2.5rem; font-weight: 900;
  padding: 1.5rem 3rem; border-radius: 24px;
  box-shadow: 0 8px 40px rgba(34,197,94,.4);
  animation: matchBounce .5s ease;
}
@keyframes matchBounce { 0% { transform: scale(.5); } 70% { transform: scale(1.1); } 100% { transform: scale(1); } }

/* EMPTY STATE */
.empty-state { text-align: center; padding: 3rem 1rem; }
.empty-state .icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-state p { color: var(--gray-400); }

/* MATCHES LIST */
.match-item { display: flex; align-items: center; gap: 1rem; background: #fff; border-radius: var(--radius); padding: 1rem 1.25rem; border: 1px solid var(--gray-200); box-shadow: var(--shadow); }
.match-item + .match-item { margin-top: .6rem; }
.match-icon { width: 44px; height: 44px; border-radius: 50%; background: #dcfce7; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; flex-shrink: 0; }
.match-info { flex: 1; }
.match-name { font-weight: 700; color: var(--gray-900); }
.match-sub { font-size: .8rem; color: var(--gray-500); margin-top: .15rem; }
.match-date { font-size: .75rem; color: var(--gray-300, #d1d5db); }

/* PROFILE CARD */
.profile-card { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1.5rem; }
.profile-avatar { width: 72px; height: 72px; border-radius: 50%; background: var(--primary-light); color: var(--primary); font-size: 1.75rem; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.skills-list { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .75rem; }

.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 480px) { .row-2 { grid-template-columns: 1fr; } .stats { grid-template-columns: 1fr; } .swipe-card { padding: 1.25rem; } }
