@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,600;0,9..144,700;1,9..144,400&display=swap');

:root {
  --primary: #0f766e;
  --primary-dark: #134e4a;
  --accent: #14b8a6;
  --accent-light: #e6faf8;
  --bg: #f5f7f6;
  --bg-card: #ffffff;
  --text: #111918;
  --text-muted: #607370;
  --border: #dce8e6;
  --danger: #dc2626;
  --warning: #d97706;
  --success: #059669;
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.06);
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.12);
  --radius: 10px;
  --radius-sm: 7px;
  --radius-lg: 16px;
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, sans-serif;
  --transition: 0.18s ease;
  --sidebar-width: 240px;
  --content-max: 1080px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 14.5px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* TYPOGRAPHY */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--text);
}
h1 { font-size: clamp(1.9rem, 4vw, 3rem); }
h2 { font-size: clamp(1.4rem, 2.5vw, 2rem); }
h3 { font-size: 1.2rem; }
h4 { font-size: 1rem; font-weight: 600; }
p { color: var(--text-muted); line-height: 1.65; }
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent); }

/* LAYOUT */
.container    { max-width: var(--content-max); margin: 0 auto; padding: 0 28px; }
.container-sm { max-width: 760px; margin: 0 auto; padding: 0 28px; }
.container-xs { max-width: 480px; margin: 0 auto; padding: 0 24px; }

/* NAVBAR */
.navbar {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.navbar-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
}
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-dark);
  letter-spacing: -0.02em;
}
.navbar-brand img { height: 32px; width: auto; border-radius: 6px; }
.navbar-nav { display: flex; align-items: center; gap: 4px; }
.nav-link {
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.875rem;
  transition: all var(--transition);
}
.nav-link:hover, .nav-link.active { color: var(--primary); background: var(--accent-light); }
.navbar-actions { display: flex; align-items: center; gap: 8px; }

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 1px 3px rgba(15,118,110,0.25);
}
.btn-primary:hover { background: #0d6b63; color: white; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(15,118,110,0.3); }
.btn-outline { background: white; border: 1.5px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--accent-light); }
.btn-accent { background: var(--accent); color: white; }
.btn-accent:hover { background: var(--primary); color: white; transform: translateY(-1px); }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #b91c1c; color: white; }
.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-lg { padding: 12px 28px; font-size: 0.95rem; border-radius: var(--radius); }
.btn-icon { width: 36px; height: 36px; padding: 0; border-radius: var(--radius-sm); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; }

/* CARDS */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--transition);
}
.card-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fafcfb;
}
.card-body { padding: 22px; }
.card-footer { padding: 14px 22px; border-top: 1px solid var(--border); background: #fafcfb; }
.card:hover { box-shadow: var(--shadow); }

/* FORMS */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-weight: 600;
  font-size: 0.825rem;
  color: var(--text);
  margin-bottom: 5px;
  letter-spacing: 0.01em;
}
.form-label .required { color: var(--danger); margin-left: 2px; }
.form-control {
  width: 100%;
  padding: 9px 13px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--text);
  background: white;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  line-height: 1.5;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(15,118,110,0.1); }
.form-control::placeholder { color: #b0c4c2; }
textarea.form-control { resize: vertical; min-height: 96px; }
select.form-control { cursor: pointer; }
.form-hint { font-size: 0.775rem; color: var(--text-muted); margin-top: 4px; }
.form-error { font-size: 0.775rem; color: var(--danger); margin-top: 4px; }
.form-row   { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
.form-row-3 { display: grid; gap: 14px; grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 640px) { .form-row, .form-row-3 { grid-template-columns: 1fr; } }

/* ALERTS */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 0.875rem; display: flex; align-items: flex-start; gap: 9px; margin-bottom: 18px; }
.alert-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-error   { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.alert-info    { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

/* BADGES */
.badge {
  display: inline-flex; align-items: center;
  padding: 2px 9px; border-radius: 999px;
  font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.badge-primary { background: var(--accent-light); color: var(--primary-dark); }
.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger  { background: #fee2e2; color: #991b1b; }
.badge-muted   { background: #f0f4f3; color: var(--text-muted); }

/* SIDEBAR LAYOUT */
.app-layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  min-height: 100vh;
}
.sidebar {
  background: #0d2e2c;
  color: white;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 20px 0 24px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.08) transparent;
}
.sidebar-brand { padding: 0 16px 18px; border-bottom: 1px solid rgba(255,255,255,0.08); margin-bottom: 10px; }
.sidebar-brand-name { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; color: white; letter-spacing: -0.02em; }
.sidebar-brand-sub { font-size: 0.65rem; color: rgba(255,255,255,0.38); margin-top: 2px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; }
.sidebar-section { padding: 0 10px; margin-bottom: 4px; }
.sidebar-section-title { font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(255,255,255,0.28); padding: 10px 8px 4px; }
.sidebar-link {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px; border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.6); font-size: 0.84rem; font-weight: 500;
  transition: all var(--transition); text-decoration: none; margin-bottom: 1px;
}
.sidebar-link:hover { background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.9); }
.sidebar-link.active { background: rgba(20,184,166,0.16); color: white; }
.sidebar-link .icon { width: 16px; text-align: center; font-size: 0.9rem; }
.sidebar-link .badge-count { margin-left: auto; background: rgba(20,184,166,0.25); color: var(--accent); font-size: 0.67rem; padding: 1px 7px; border-radius: 999px; font-weight: 700; }

.main-content { padding: 28px 32px; max-width: 100%; overflow-x: hidden; }
.page-header { margin-bottom: 22px; }
.page-title { font-size: 1.55rem; color: var(--text); margin-bottom: 3px; }
.page-subtitle { color: var(--text-muted); font-size: 0.865rem; }

/* STATS GRID */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: 13px; margin-bottom: 22px; }
.stat-card { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 17px; display: flex; align-items: center; gap: 13px; }
.stat-icon { width: 42px; height: 42px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.stat-icon.teal   { background: var(--accent-light); color: var(--primary); }
.stat-icon.blue   { background: #dbeafe; color: #1d4ed8; }
.stat-icon.green  { background: #d1fae5; color: #059669; }
.stat-icon.orange { background: #ffedd5; color: #c2410c; }
.stat-value { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; color: var(--text); line-height: 1; }
.stat-label { font-size: 0.76rem; color: var(--text-muted); margin-top: 2px; font-weight: 500; }

/* TABLE */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; background: white; }
thead th { padding: 10px 15px; background: #f5f8f7; font-size: 0.71rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); border-bottom: 1px solid var(--border); white-space: nowrap; }
tbody td { padding: 12px 15px; border-bottom: 1px solid var(--border); font-size: 0.865rem; color: var(--text); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #f8fdfb; }

/* AVATAR */
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--accent-light); color: var(--primary-dark); display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 700; font-size: 0.82rem; flex-shrink: 0; }
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.avatar-lg { width: 54px; height: 54px; font-size: 1.05rem; }
.avatar-xl { width: 86px; height: 86px; font-size: 1.7rem; }

/* PROGRESS */
.progress-bar { width: 100%; height: 5px; background: var(--border); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--primary)); border-radius: 999px; transition: width 0.5s ease; }

/* MATCH SCORE */
.match-score { display: flex; align-items: center; gap: 7px; font-size: 0.85rem; }
.match-score .score-value { font-family: var(--font-display); font-weight: 700; font-size: 0.95rem; }
.score-high { color: var(--success); }
.score-mid  { color: var(--warning); }
.score-low  { color: var(--danger); }

/* CANDIDATE CARD */
.candidate-card { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 17px; transition: all var(--transition); cursor: pointer; }
.candidate-card:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-1px); }
.candidate-header { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.candidate-info h4 { font-size: 0.95rem; margin-bottom: 2px; }
.candidate-info .role { font-size: 0.79rem; color: var(--text-muted); }
.candidate-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.tag { background: var(--accent-light); color: var(--primary-dark); padding: 3px 10px; border-radius: 999px; font-size: 0.73rem; font-weight: 600; }

/* MODAL */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.3); backdrop-filter: blur(3px); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; opacity: 0; pointer-events: none; transition: opacity var(--transition); }
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal { background: white; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); max-width: 560px; width: 100%; max-height: 90vh; overflow-y: auto; transform: scale(0.97) translateY(8px); transition: transform var(--transition); }
.modal-overlay.open .modal { transform: scale(1) translateY(0); }
.modal-header { padding: 20px 22px 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); }
.modal-body { padding: 22px; }
.modal-footer { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; }

/* HERO */
.hero {
  background: #0d2e2c;
  color: white;
  padding: 90px 0 72px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 65% 40%, rgba(20,184,166,0.11) 0%, transparent 60%),
              radial-gradient(ellipse at 20% 80%, rgba(15,118,110,0.09) 0%, transparent 50%);
}
.hero-content { position: relative; z-index: 1; }
.hero h1 { color: white; margin-bottom: 18px; }
.hero h1 span { color: var(--accent); font-style: italic; }
.hero p { color: rgba(255,255,255,0.62); font-size: 1.05rem; max-width: 500px; margin-bottom: 30px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.hero-visual { display: flex; flex-direction: column; gap: 10px; }
.hero-card { background: rgba(255,255,255,0.07); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.11); border-radius: var(--radius); padding: 14px 18px; color: white; animation: float 6s ease-in-out infinite; }
.hero-card:nth-child(2) { animation-delay: 2s; margin-left: 20px; }
.hero-card:nth-child(3) { animation-delay: 4s; margin-left: 10px; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.hero-card-title { font-size: 0.68rem; color: rgba(255,255,255,0.42); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 5px; font-weight: 600; }
.hero-card-value { font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; }
.hero-card-sub { font-size: 0.76rem; color: rgba(255,255,255,0.52); margin-top: 3px; }

/* AUTH */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg); padding: 40px 20px; }
.auth-card { background: white; border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 36px; width: 100%; max-width: 460px; }
.auth-logo { text-align: center; margin-bottom: 24px; }
.auth-logo .brand-name { font-family: var(--font-display); font-size: 1.55rem; font-weight: 700; color: var(--primary-dark); letter-spacing: -0.02em; }
.auth-logo .brand-sub { color: var(--text-muted); font-size: 0.82rem; margin-top: 2px; }
.auth-title { font-size: 1.25rem; margin-bottom: 4px; }
.auth-subtitle { color: var(--text-muted); font-size: 0.845rem; margin-bottom: 24px; }
.auth-divider { display: flex; align-items: center; gap: 10px; margin: 18px 0; color: var(--text-muted); font-size: 0.775rem; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.role-select { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px; }
.role-option { border: 2px solid var(--border); border-radius: var(--radius); padding: 14px 12px; text-align: center; cursor: pointer; transition: all var(--transition); }
.role-option:hover { border-color: var(--accent); background: var(--accent-light); }
.role-option.selected { border-color: var(--primary); background: var(--accent-light); }
.role-option .role-icon { font-size: 1.6rem; margin-bottom: 6px; }
.role-option .role-label { font-weight: 700; font-size: 0.875rem; color: var(--text); }
.role-option .role-desc { font-size: 0.71rem; color: var(--text-muted); margin-top: 1px; }

/* UTILITIES */
.flex         { display: flex; }
.flex-center  { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; }
.mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; }
.text-sm { font-size: 0.85rem; } .text-xs { font-size: 0.75rem; }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.font-bold { font-weight: 700; }
.font-display { font-family: var(--font-display); }
.w-full { width: 100%; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .app-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .main-content { padding: 18px; }
}

/* MISC */
.spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,0.3); border-top-color: white; border-radius: 50%; animation: spin 0.7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state { text-align: center; padding: 52px 20px; color: var(--text-muted); }
.empty-state .icon { font-size: 2.5rem; margin-bottom: 14px; opacity: 0.35; }
.empty-state h3 { color: var(--text); margin-bottom: 7px; font-size: 1.05rem; }
