@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
  --primary: #0a66c2;
  --primary-dark: #084fa0;
  --primary-light: #e8f0fe;
  --accent: #f5a623;
  --bg: #f3f2ef;
  --surface: #ffffff;
  --surface2: #f8f8f8;
  --text: #1a1a1a;
  --text-muted: #6b7280;
  --text-light: #9ca3af;
  --border: #e5e7eb;
  --border-focus: #0a66c2;
  --success: #16a34a;
  --danger: #dc2626;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow: 0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.13);
  --radius: 10px;
  --radius-lg: 16px;
  --nav-h: 62px;
}

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

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.6;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

/* ─── NAVBAR ─── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  max-width: 1140px;
  margin: 0 auto;
  width: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-brand {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.5px;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-brand:hover { text-decoration: none; }

.nav-search {
  flex: 1;
  max-width: 320px;
  position: relative;
}
.nav-search input {
  width: 100%;
  padding: 8px 16px 8px 38px;
  border: 1.5px solid var(--border);
  border-radius: 24px;
  background: var(--bg);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}
.nav-search input:focus { border-color: var(--primary); background: #fff; }
.nav-search .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 15px;
}

.nav-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s;
  cursor: pointer;
  border: none;
  background: none;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-link:hover { background: var(--bg); color: var(--text); text-decoration: none; }
.nav-link.active { color: var(--primary); }

.nav-btn {
  padding: 7px 18px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  border: 1.5px solid var(--primary);
  color: var(--primary);
  background: none;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  display: inline-block;
}
.nav-btn:hover { background: var(--primary); color: #fff; text-decoration: none; }
.nav-btn.filled { background: var(--primary); color: #fff; }
.nav-btn.filled:hover { background: var(--primary-dark); }

.nav-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}

.notif-badge {
  position: relative;
  display: inline-flex;
}
.notif-badge .badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ─── LAYOUT ─── */
.page-wrap {
  max-width: 1140px;
  margin: 0 auto;
  padding: 28px 24px;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: start;
}

.three-col {
  display: grid;
  grid-template-columns: 260px 1fr 280px;
  gap: 24px;
  align-items: start;
}

/* ─── CARD ─── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card-header {
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  font-family: 'Playfair Display', serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}

.card-body { padding: 20px; }

/* ─── JOB CARD ─── */
.job-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
  position: relative;
}
.job-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }

.job-card.pinned {
  border-left: 3px solid var(--accent);
}

.pinned-badge {
  position: absolute;
  top: 14px;
  right: 16px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 20px;
  letter-spacing: 0.3px;
}

.job-card-top { display: flex; align-items: flex-start; gap: 14px; }

.job-logo {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  color: var(--primary);
  font-weight: 700;
}

.job-info { flex: 1; min-width: 0; }

.job-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.job-company {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
}

.job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
}

.job-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--text-muted);
}

.job-desc {
  margin-top: 12px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.job-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.job-time {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-light);
}

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  font-family: inherit;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }

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

.btn-ghost { background: none; color: var(--text-muted); }
.btn-ghost:hover { background: var(--bg); color: var(--text); }

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

.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #15803d; color: #fff; }

.btn-sm { padding: 5px 12px; font-size: 13px; }
.btn-lg { padding: 12px 28px; font-size: 16px; }
.btn-full { width: 100%; justify-content: center; }

/* ─── FORMS ─── */
.form-group { margin-bottom: 18px; }

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(10,102,194,0.12);
}
.form-control::placeholder { color: var(--text-light); }

textarea.form-control { resize: vertical; min-height: 100px; }
select.form-control { cursor: pointer; }

.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ─── AUTH PAGES ─── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 24px;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
}

.auth-logo {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--primary);
  text-align: center;
  margin-bottom: 6px;
}

.auth-tagline {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 28px;
}

.auth-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 20px;
}

.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: var(--text-muted);
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--text-light);
  font-size: 12px;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ─── ALERT ─── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.alert-success { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.alert-error { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-info { background: var(--primary-light); color: var(--primary-dark); border: 1px solid #bfdbfe; }

/* ─── PROFILE ─── */
.profile-cover {
  height: 140px;
  background: linear-gradient(135deg, var(--primary) 0%, #1e40af 100%);
  border-radius: var(--radius) var(--radius) 0 0;
}

.profile-avatar-wrap {
  padding: 0 20px;
  margin-top: -40px;
  margin-bottom: 12px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 4px solid #fff;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.profile-name {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.profile-role {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ─── ADMIN ─── */
.admin-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: calc(100vh - var(--nav-h));
}

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

.sidebar-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 6px 20px 4px;
  margin-top: 12px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s;
  cursor: pointer;
  text-decoration: none;
}
.sidebar-link:hover { background: var(--bg); color: var(--text); text-decoration: none; }
.sidebar-link.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }

.admin-content { padding: 28px; overflow-x: auto; }

/* ─── STATS CARDS ─── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.stat-icon.blue { background: var(--primary-light); }
.stat-icon.green { background: #dcfce7; }
.stat-icon.orange { background: #fff7ed; }
.stat-icon.purple { background: #f3e8ff; }

.stat-value {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 3px;
}

/* ─── TABLE ─── */
.table-wrap { overflow-x: auto; border-radius: var(--radius); }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

thead { background: var(--bg); }

th {
  padding: 12px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}

tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--bg); }

/* ─── BADGE ─── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.badge-blue { background: var(--primary-light); color: var(--primary); }
.badge-green { background: #dcfce7; color: var(--success); }
.badge-red { background: #fee2e2; color: var(--danger); }
.badge-orange { background: #fff7ed; color: #ea580c; }

/* ─── COMMENT ─── */
.comment-block {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.comment-block:last-child { border-bottom: none; }

.comment-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--text-muted);
}

.comment-text { font-size: 14px; color: var(--text); }

.reply-block {
  margin-left: 28px;
  padding-left: 14px;
  border-left: 2px solid var(--border);
}

/* ─── EMPTY STATE ─── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}
.empty-state .empty-icon { font-size: 48px; margin-bottom: 14px; }
.empty-state h3 { font-size: 18px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.empty-state p { font-size: 14px; color: var(--text-muted); }

/* ─── PAGE HEADER ─── */
.page-header {
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.page-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}
.page-header p { font-size: 14px; color: var(--text-muted); margin-top: 2px; }

/* ─── SIDEBAR WIDGETS ─── */
.widget { margin-bottom: 16px; }
.widget-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
}

.segment-list { list-style: none; }
.segment-list li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 0;
  font-size: 14px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: color 0.15s;
}
.segment-list li:last-child a { border-bottom: none; }
.segment-list li a:hover { color: var(--primary); }

/* ─── PAGINATION ─── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 24px;
}
.pagination a, .pagination span {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid var(--border);
  background: var(--surface);
  text-decoration: none;
  transition: all 0.15s;
}
.pagination a:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .two-col, .three-col { grid-template-columns: 1fr; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .nav-search { display: none; }
  .auth-card { padding: 28px 20px; }
  .page-wrap { padding: 16px; }
  .stats-grid { grid-template-columns: 1fr; }
}
