@import url('https://fonts.googleapis.com/css2?family=Fraunces:wght@400;600;700&family=Inter:wght@400;500;600&display=swap');

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

:root {
  --blue: #1B3A6B;
  --blue-dark: #142d57;
  --blue-light: #E8EFF8;
  --yellow: #F5C842;
  --yellow-dark: #e8b800;
  --yellow-light: #FEF9E7;
  --green: #4CAF82;
  --green-dark: #3a9e6e;
  --white: #F9F8F4;
  --gray: #6B7280;
  --gray-light: #F3F4F6;
  --border: #E5E7EB;
  --purple-light: #EEF2FF;
  --purple: #4338CA;
  --purple-border: #C7D2FE;
  --radius: 10px;
  --radius-lg: 14px;
}

html, body { height: 100%; font-family: 'Inter', sans-serif; background: var(--white); color: #111; }
#app { min-height: 100vh; }

/* SCREENS */
.screen { display: none; min-height: 100vh; }
.screen.active { display: block; }

/* NAV */
nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 32px; background: #fff;
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100;
}
.logo { font-family: 'Fraunces', serif; font-size: 22px; font-weight: 700; color: var(--blue); cursor: pointer; }
.logo span { color: var(--yellow); }
.nav-links { display: flex; gap: 8px; }

/* BUTTONS */
.btn {
  border: none; cursor: pointer; font-family: 'Inter', sans-serif;
  font-size: 14px; font-weight: 500; border-radius: var(--radius);
  padding: 9px 18px; transition: all .15s; display: inline-flex;
  align-items: center; gap: 6px;
}
.btn-ghost { background: transparent; color: var(--gray); }
.btn-ghost:hover { background: var(--gray-light); color: var(--blue); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-yellow { background: var(--yellow); color: var(--blue); font-weight: 600; }
.btn-yellow:hover { background: var(--yellow-dark); }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: var(--green-dark); }
.btn-outline { background: transparent; color: var(--blue); border: 1.5px solid var(--blue); }
.btn-outline:hover { background: var(--blue-light); }
.btn-lg { padding: 14px 30px; font-size: 16px; border-radius: 12px; }
.btn-full { width: 100%; justify-content: center; }
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 7px; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* HERO */
.hero { display: grid; grid-template-columns: 1fr 1fr; min-height: 440px; }
.hero-side {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 52px 44px; cursor: pointer;
  transition: all .2s; position: relative;
}
.hero-side:hover { filter: brightness(1.03); }
.hero-left { background: var(--blue); }
.hero-right { background: var(--yellow); }
.hero-icon { font-size: 56px; margin-bottom: 20px; }
.hero-title { font-family: 'Fraunces', serif; font-size: 32px; font-weight: 700; margin-bottom: 12px; text-align: center; }
.hero-left .hero-title { color: #fff; }
.hero-right .hero-title { color: var(--blue); }
.hero-sub { font-size: 15px; text-align: center; line-height: 1.6; max-width: 280px; }
.hero-left .hero-sub { color: rgba(255,255,255,0.75); }
.hero-right .hero-sub { color: rgba(27,58,107,0.7); }
.hero-cta { margin-top: 28px; pointer-events: none; }
.hero-badge {
  position: absolute; top: 18px; right: 18px;
  font-size: 11px; padding: 5px 12px; border-radius: 20px; font-weight: 500;
}
.hero-left .hero-badge { background: rgba(255,255,255,0.15); color: #fff; }
.hero-right .hero-badge { background: rgba(27,58,107,0.12); color: var(--blue); }

/* AI SECTION */
.ai-section {
  background: var(--purple-light); border: 1px solid var(--purple-border);
  border-radius: 12px; padding: 18px 20px; margin: 20px 32px;
}
.ai-header { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.ai-dot { width: 8px; height: 8px; background: var(--purple); border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.35} }
.ai-header span { font-size: 13px; font-weight: 600; color: var(--purple); }
.ai-message { font-size: 14px; color: #3730A3; line-height: 1.6; }
.ai-message strong { font-weight: 600; }
.ai-suggestions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.ai-suggestion {
  background: #fff; border: 1px solid var(--purple-border); border-radius: 8px;
  padding: 7px 14px; font-size: 13px; color: var(--purple); cursor: pointer;
  font-family: 'Inter', sans-serif; transition: all .15s;
}
.ai-suggestion:hover { background: var(--purple-light); }

/* SEARCH */
.search-section { padding: 28px 32px; background: #fff; border-bottom: 1px solid var(--border); }
.search-bar { display: flex; gap: 10px; }
.search-input-wrap { flex: 1; position: relative; }
.search-input {
  width: 100%; padding: 13px 16px 13px 44px; border: 1.5px solid var(--border);
  border-radius: var(--radius); font-size: 15px; font-family: 'Inter', sans-serif;
  outline: none; transition: border .15s; background: #fff;
}
.search-input:focus { border-color: var(--blue); }
.search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--gray); font-size: 18px; }
.filters { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; align-items: center; }
.filter-chip {
  background: var(--gray-light); border: none; border-radius: 20px;
  padding: 7px 16px; font-size: 13px; color: var(--gray); cursor: pointer;
  font-family: 'Inter', sans-serif; transition: all .15s;
}
.filter-chip:hover, .filter-chip.active { background: var(--blue-light); color: var(--blue); font-weight: 500; }
.ai-badge {
  display: inline-flex; align-items: center; gap: 5px; background: var(--purple-light);
  color: var(--purple); font-size: 12px; padding: 5px 12px; border-radius: 20px; font-weight: 500;
}

/* JOBS */
.jobs-section { padding: 24px 32px; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.section-title { font-family: 'Fraunces', serif; font-size: 20px; color: var(--blue); font-weight: 600; }
.section-label { font-size: 13px; color: var(--gray); }

.job-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 20px 22px; margin-bottom: 12px; cursor: pointer; transition: all .15s;
  display: grid; grid-template-columns: 52px 1fr auto; gap: 16px; align-items: start;
}
.job-card:hover { border-color: var(--blue); box-shadow: 0 4px 16px rgba(27,58,107,0.08); transform: translateY(-1px); }
.job-logo {
  width: 52px; height: 52px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; font-size: 26px; flex-shrink: 0;
}
.job-info h3 { font-size: 15px; font-weight: 600; color: #111; margin-bottom: 3px; }
.job-school { font-size: 13px; color: var(--gray); margin-bottom: 10px; }
.job-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font-size: 11px; padding: 4px 10px; border-radius: 20px; font-weight: 500; }
.tag-blue { background: var(--blue-light); color: var(--blue); }
.tag-green { background: #DCFCE7; color: #166534; }
.tag-yellow { background: var(--yellow-light); color: #92400E; }
.tag-gray { background: var(--gray-light); color: var(--gray); }
.match-score {
  display: inline-flex; align-items: center; gap: 4px;
  background: #F0FDF4; color: #166534; font-size: 11px;
  padding: 4px 9px; border-radius: 20px; margin-top: 8px; font-weight: 600;
}
.job-right { text-align: right; }
.job-salary { font-size: 14px; font-weight: 600; color: var(--blue); }
.job-date { font-size: 12px; color: var(--gray); margin-top: 4px; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--gray); }
.empty-state p { font-size: 16px; margin-bottom: 8px; }
.empty-state span { font-size: 13px; }

/* JOB DETAIL */
.job-detail-wrap { padding: 28px 32px; max-width: 760px; }
.back-btn {
  display: inline-flex; align-items: center; gap: 6px; color: var(--gray);
  background: none; border: none; cursor: pointer; font-size: 14px;
  margin-bottom: 24px; font-family: 'Inter', sans-serif; transition: color .15s;
}
.back-btn:hover { color: var(--blue); }
.job-detail-header { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 24px; }
.job-detail-logo { width: 64px; height: 64px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 32px; flex-shrink: 0; }
.job-detail-title h2 { font-family: 'Fraunces', serif; font-size: 24px; color: var(--blue); margin-bottom: 4px; }
.job-detail-title p { font-size: 14px; color: var(--gray); margin-bottom: 10px; }
.detail-section { margin-bottom: 24px; }
.detail-section h3 { font-size: 11px; font-weight: 600; color: var(--gray); text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 10px; }
.detail-section p { font-size: 15px; color: #374151; line-height: 1.7; }
.apply-bar {
  background: #fff; border-top: 1px solid var(--border);
  padding: 16px 32px; display: flex; align-items: center;
  justify-content: space-between; position: sticky; bottom: 0;
}
.apply-info { font-size: 13px; color: var(--gray); }
.apply-info strong { color: var(--blue); }

/* FORMS */
.form-screen { max-width: 560px; margin: 0 auto; padding: 36px 28px; }
.form-header { margin-bottom: 28px; }
.form-header h2 { font-family: 'Fraunces', serif; font-size: 28px; color: var(--blue); font-weight: 700; margin-bottom: 6px; }
.form-header p { font-size: 14px; color: var(--gray); }
.progress-bar { display: flex; gap: 6px; margin-bottom: 32px; }
.progress-step { height: 4px; flex: 1; border-radius: 2px; background: var(--border); }
.progress-step.done { background: var(--blue); }
.progress-step.active { background: var(--yellow); }
.social-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 12px; border: 1.5px solid var(--border); border-radius: var(--radius);
  background: #fff; cursor: pointer; font-family: 'Inter', sans-serif;
  font-size: 14px; font-weight: 500; color: #374151; margin-bottom: 10px; transition: all .15s;
}
.social-btn:hover { border-color: var(--blue); background: var(--blue-light); }
.divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; text-align: center; position: relative; }
.divider::after { content: 'o'; position: absolute; top: -10px; left: 50%; transform: translateX(-50%); background: #fff; padding: 0 10px; font-size: 13px; color: var(--gray); }
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 13px; font-weight: 500; color: #374151; margin-bottom: 6px; }
.form-label span { font-weight: 400; color: var(--gray); }
.form-input {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--border);
  border-radius: var(--radius); font-size: 14px; font-family: 'Inter', sans-serif;
  outline: none; transition: border .15s; background: #fff; color: #111;
}
.form-input:focus { border-color: var(--blue); }
textarea.form-input { resize: vertical; min-height: 90px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.skill-tag {
  background: var(--blue-light); color: var(--blue); border: none;
  border-radius: 20px; padding: 5px 12px; font-size: 13px; cursor: default;
  font-family: 'Inter', sans-serif; display: inline-flex; align-items: center; gap: 5px;
}
.skill-tag .remove { cursor: pointer; color: rgba(27,58,107,0.5); font-size: 16px; line-height: 1; }
.skill-tag .remove:hover { color: var(--blue); }
.ai-generate {
  display: flex; align-items: center; gap: 8px; background: var(--purple-light);
  border: 1px solid var(--purple-border); border-radius: 8px; padding: 10px 14px;
  cursor: pointer; transition: all .15s; width: 100%; margin-top: 8px;
  font-family: 'Inter', sans-serif;
}
.ai-generate:hover { background: #E0E7FF; }
.ai-generate span { font-size: 13px; color: var(--purple); font-weight: 500; }
.loading-dots span { display: inline-block; animation: blink 1.2s infinite; font-size: 18px; color: var(--purple); }
.loading-dots span:nth-child(2) { animation-delay: .2s; }
.loading-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%,80%,100%{opacity:0} 40%{opacity:1} }

/* DASHBOARD */
.dash-header { background: var(--blue); padding: 24px 32px; color: #fff; }
.dash-header h2 { font-family: 'Fraunces', serif; font-size: 24px; font-weight: 700; margin-bottom: 4px; }
.dash-header p { font-size: 14px; opacity: 0.7; }
.dash-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding: 24px 32px; }
.stat-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px; text-align: center; }
.stat-num { font-family: 'Fraunces', serif; font-size: 32px; font-weight: 700; color: var(--blue); }
.stat-num.green { color: var(--green); }
.stat-label { font-size: 12px; color: var(--gray); margin-top: 4px; }
.candidates-section { padding: 0 32px 32px; }
.candidate-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 16px 18px; margin-bottom: 10px; display: flex; align-items: center;
  gap: 14px; cursor: pointer; transition: all .15s;
}
.candidate-card:hover { border-color: var(--green); box-shadow: 0 2px 10px rgba(76,175,130,0.1); }
.avatar {
  width: 44px; height: 44px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; font-weight: 700;
  font-size: 15px; flex-shrink: 0; color: #fff;
}
.candidate-info { flex: 1; }
.candidate-info h4 { font-size: 14px; font-weight: 600; color: #111; margin-bottom: 2px; }
.candidate-info p { font-size: 12px; color: var(--gray); }
.candidate-right { text-align: right; }
.ai-match { font-size: 12px; font-weight: 700; color: var(--green); margin-bottom: 6px; }
.action-btns { display: flex; gap: 6px; justify-content: flex-end; }

/* OFERTA FORM */
.ai-desc-box {
  background: #F8FAFF; border: 1px solid var(--purple-border);
  border-radius: 8px; padding: 14px; font-size: 14px;
  color: #374151; line-height: 1.7; min-height: 90px; margin-top: 8px;
}

/* MODAL */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 200; }
.modal-overlay.open { display: block; }
.modal { display: none; position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%); background: #fff; border-radius: var(--radius-lg); padding: 28px; width: 90%; max-width: 460px; z-index: 201; }
.modal.open { display: block; }
.modal-content h3 { font-family: 'Fraunces', serif; font-size: 22px; color: var(--blue); margin-bottom: 8px; }
.modal-content p { font-size: 14px; color: var(--gray); margin-bottom: 20px; line-height: 1.6; }

/* TOAST */
.toast {
  position: fixed; bottom: 24px; right: 24px; background: var(--blue); color: #fff;
  padding: 13px 22px; border-radius: var(--radius-lg); font-size: 14px; font-weight: 500;
  z-index: 999; transform: translateY(60px); opacity: 0; transition: all .3s; pointer-events: none;
}
.toast.show { transform: translateY(0); opacity: 1; }

/* RESPONSIVE */
@media (max-width: 640px) {
  .hero { grid-template-columns: 1fr; }
  nav { padding: 12px 16px; }
  .jobs-section, .search-section, .candidates-section, .dash-stats { padding-left: 16px; padding-right: 16px; }
  .ai-section { margin-left: 16px; margin-right: 16px; }
  .form-screen { padding: 24px 16px; }
  .form-row { grid-template-columns: 1fr; }
  .job-card { grid-template-columns: 44px 1fr; }
  .job-right { display: none; }
  .dash-stats { grid-template-columns: repeat(3, 1fr); }
  .apply-bar { flex-direction: column; gap: 10px; }
}
