/* ============================================================
   TALENTFORGE — GLOBAL STYLES
   Design: Editorial-Brutalist with warm amber accents
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;900&family=DM+Sans:wght@300;400;500;600&family=DM+Mono:wght@400;500&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

:root {
  --ink:      #0f0d0b;
  --paper:    #faf8f4;
  --warm:     #f5f0e8;
  --amber:    #e88a14;
  --amber-lt: #fdf3dc;
  --amber-dk: #b56b0a;
  --slate:    #4a4540;
  --muted:    #8c8480;
  --line:     #e2ddd8;
  --white:    #ffffff;
  --red:      #c94040;
  --green:    #2d8a5e;
  --blue:     #2563a8;
  --purple:   #6b47b8;

  --radius:   6px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 3px rgba(15,13,11,.08);
  --shadow:    0 4px 16px rgba(15,13,11,.10);
  --shadow-lg: 0 12px 40px rgba(15,13,11,.14);

  --font-display: 'Inter', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;
  --font-mono:    'Inter', 'Courier New', monospace;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Typography ─────────────────────────────────────────── */
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 900; }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 700; }
h4 { font-size: 1rem; font-weight: 700; font-family: var(--font-body); letter-spacing: .03em; text-transform: uppercase; }
p  { color: var(--slate); }
a  { color: var(--amber-dk); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .6rem 1.4rem;
  font-family: var(--font-body); font-size: .875rem; font-weight: 600;
  border: 2px solid transparent; border-radius: var(--radius);
  cursor: pointer; text-decoration: none; transition: all .15s ease;
  white-space: nowrap;
}
.btn-primary   { background: var(--amber); color: var(--ink); border-color: var(--amber); }
.btn-primary:hover { background: var(--amber-dk); border-color: var(--amber-dk); color: var(--white); text-decoration: none; }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--amber); background: var(--amber-lt); text-decoration: none; }
.btn-danger    { background: transparent; color: var(--red); border-color: #f0c0c0; }
.btn-danger:hover { background: #fdf0f0; text-decoration: none; }
.btn-sm { padding: .35rem .9rem; font-size: .8rem; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); padding: .4rem .7rem; }
.btn-ghost:hover { color: var(--ink); background: var(--warm); text-decoration: none; }

/* ── Badges ──────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  padding: .2rem .7rem;
  font-family: var(--font-mono); font-size: .72rem; font-weight: 500; letter-spacing: .05em;
  border-radius: 100px;
}
.badge-new       { background: #e8f0fd; color: var(--blue); }
.badge-reviewing { background: #fdf3dc; color: var(--amber-dk); }
.badge-interview { background: #f0ebfb; color: var(--purple); }
.badge-offer     { background: #e6f7ef; color: var(--green); }
.badge-hired     { background: #d0f0e0; color: #1a6b44; }
.badge-rejected  { background: #fdf0f0; color: var(--red); }
.badge-active    { background: #e6f7ef; color: var(--green); }
.badge-draft     { background: var(--warm); color: var(--muted); }
.badge-closed    { background: #f5f5f5; color: var(--muted); }
.badge-default   { background: var(--warm); color: var(--slate); }

/* ── Forms ───────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1.25rem; }
.form-label { font-size: .82rem; font-weight: 600; color: var(--slate); letter-spacing: .03em; text-transform: uppercase; }
.form-control {
  padding: .65rem .9rem;
  font-family: var(--font-body); font-size: .95rem; color: var(--ink);
  background: var(--white); border: 2px solid var(--line);
  border-radius: var(--radius); transition: border-color .15s;
  outline: none; width: 100%;
}
.form-control:focus { border-color: var(--amber); box-shadow: 0 0 0 3px rgba(232,138,20,.12); }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238c8480' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .8rem center; padding-right: 2.2rem; }
textarea.form-control { resize: vertical; min-height: 100px; }
.form-hint { font-size: .78rem; color: var(--muted); }
.form-error { font-size: .78rem; color: var(--red); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

/* ── Alerts ──────────────────────────────────────────────── */
.alert {
  padding: .85rem 1.1rem; border-radius: var(--radius); margin-bottom: 1.25rem;
  font-size: .9rem; border-left: 4px solid; display: flex; align-items: flex-start; gap: .6rem;
}
.alert-success { background: #e6f7ef; border-color: var(--green); color: #1a6b44; }
.alert-error   { background: #fdf0f0; border-color: var(--red);   color: #922020; }
.alert-info    { background: #e8f0fd; border-color: var(--blue);  color: #1a3d7a; }
.alert-warning { background: #fdf3dc; border-color: var(--amber); color: var(--amber-dk); }

/* ── Card ────────────────────────────────────────────────── */
.card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.card-header {
  padding: 1.1rem 1.5rem; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: var(--warm);
}
.card-body  { padding: 1.5rem; }
.card-footer { padding: .9rem 1.5rem; border-top: 1px solid var(--line); background: var(--warm); }

/* ── Table ───────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
thead th {
  text-align: left; padding: .75rem 1rem;
  font-family: var(--font-body); font-size: .75rem; font-weight: 600;
  color: var(--muted); letter-spacing: .06em; text-transform: uppercase;
  background: var(--warm); border-bottom: 2px solid var(--line);
}
tbody tr { border-bottom: 1px solid var(--line); transition: background .1s; }
tbody tr:hover { background: var(--warm); }
tbody td { padding: .85rem 1rem; vertical-align: middle; }
tbody tr:last-child { border-bottom: none; }

/* ── Public site nav ─────────────────────────────────────── */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250,248,244,.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-nav-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 2rem;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.logo { display: flex; align-items: center; gap: .5rem; text-decoration: none; }
.logo-mark { width: 36px; height: 36px; background: var(--amber); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; }
.logo-mark svg { width: 20px; height: 20px; fill: var(--ink); }
.logo-text { font-family: var(--font-display); font-size: 1.25rem; font-weight: 900; color: var(--ink); }
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a { font-size: .875rem; font-weight: 500; color: var(--slate); }
.nav-links a:hover { color: var(--ink); text-decoration: none; }

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  max-width: 1100px; margin: 0 auto; padding: 5rem 2rem 4rem;
  display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center;
}
@media (max-width: 768px) { .hero { grid-template-columns: 1fr; padding: 3rem 1.5rem; } }
.hero-eyebrow { font-family: var(--font-mono); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--amber-dk); margin-bottom: .75rem; }
.hero h1 { margin-bottom: 1.25rem; }
.hero-sub { font-size: 1.1rem; color: var(--slate); margin-bottom: 2rem; line-height: 1.7; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 2rem; }
.hero-stat { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.25rem; text-align: center; }
.hero-stat-num { font-family: var(--font-display); font-size: 2rem; font-weight: 900; color: var(--ink); }
.hero-stat-label { font-size: .78rem; color: var(--muted); letter-spacing: .05em; text-transform: uppercase; }

/* ── Job Cards ───────────────────────────────────────────── */
.jobs-section { max-width: 1100px; margin: 0 auto; padding: 3rem 2rem 5rem; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2rem; flex-wrap: wrap; gap: 1rem; }
.filters { display: flex; gap: .5rem; flex-wrap: wrap; }
.filter-btn { padding: .4rem 1rem; font-size: .82rem; font-weight: 500; border: 1.5px solid var(--line); border-radius: 100px; background: var(--white); color: var(--slate); cursor: pointer; transition: all .15s; }
.filter-btn:hover, .filter-btn.active { border-color: var(--amber); background: var(--amber-lt); color: var(--amber-dk); }
.jobs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1.5rem; }

.job-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.5rem; transition: all .2s ease; cursor: pointer;
  text-decoration: none; display: block; color: inherit; position: relative; overflow: hidden;
}
.job-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--amber); transform: scaleX(0); transform-origin: left; transition: transform .2s; }
.job-card:hover { border-color: var(--amber); box-shadow: var(--shadow); transform: translateY(-2px); text-decoration: none; }
.job-card:hover::before { transform: scaleX(1); }
.job-card-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: .75rem; }
.job-dept { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--amber-dk); }
.job-card h3 { margin: .25rem 0 .75rem; font-size: 1.1rem; }
.job-meta { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.job-meta-item { display: flex; align-items: center; gap: .3rem; font-size: .8rem; color: var(--muted); }
.job-meta-item svg { width: 14px; height: 14px; flex-shrink: 0; }
.job-salary { font-family: var(--font-mono); font-size: .82rem; font-weight: 500; color: var(--green); margin-top: auto; }

/* ── Job Detail ──────────────────────────────────────────── */
.job-detail { max-width: 800px; margin: 0 auto; padding: 3rem 2rem 5rem; }
.job-detail-header { margin-bottom: 2rem; }
.job-detail-meta { display: flex; gap: 1.5rem; flex-wrap: wrap; margin: 1rem 0 1.5rem; }
.job-detail-meta span { display: flex; align-items: center; gap: .35rem; font-size: .875rem; color: var(--slate); }
.job-detail-meta svg { width: 16px; height: 16px; color: var(--amber); }
.job-section { margin-bottom: 2rem; }
.job-section h4 { margin-bottom: .75rem; color: var(--ink); }
.job-section ul { list-style: none; padding: 0; }
.job-section ul li { padding: .3rem 0; padding-left: 1.2rem; position: relative; color: var(--slate); font-size: .95rem; }
.job-section ul li::before { content: '→'; position: absolute; left: 0; color: var(--amber); font-size: .8rem; top: .35rem; }

/* ── Application form ────────────────────────────────────── */
.apply-card { max-width: 640px; margin: 2rem auto; padding: 0 2rem 4rem; }

/* ── Admin layout ────────────────────────────────────────── */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 240px; flex-shrink: 0;
  background: var(--ink); color: var(--white);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar-logo {
  padding: 1.5rem;
  display: flex; align-items: center; gap: .6rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-logo-mark { width: 32px; height: 32px; background: var(--amber); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; }
.sidebar-logo-mark svg { width: 16px; height: 16px; fill: var(--ink); }
.sidebar-logo-text { font-family: var(--font-display); font-weight: 900; font-size: 1.1rem; }
.sidebar-nav { padding: 1rem 0; flex: 1; }
.sidebar-section-label { padding: .5rem 1.5rem .25rem; font-size: .65rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.35); }
.sidebar-link {
  display: flex; align-items: center; gap: .75rem;
  padding: .65rem 1.5rem; font-size: .875rem; color: rgba(255,255,255,.65);
  transition: all .15s; text-decoration: none;
}
.sidebar-link:hover { color: var(--white); background: rgba(255,255,255,.06); text-decoration: none; }
.sidebar-link.active { color: var(--white); background: rgba(232,138,20,.18); border-right: 3px solid var(--amber); }
.sidebar-link svg { width: 16px; height: 16px; flex-shrink: 0; }
.sidebar-badge { margin-left: auto; background: var(--amber); color: var(--ink); font-size: .65rem; font-weight: 700; padding: .1rem .5rem; border-radius: 100px; }
.sidebar-footer { padding: 1rem 1.5rem; border-top: 1px solid rgba(255,255,255,.08); }
.sidebar-user { display: flex; align-items: center; gap: .6rem; }
.sidebar-avatar { width: 32px; height: 32px; background: var(--amber); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .82rem; color: var(--ink); }
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name { font-size: .82rem; font-weight: 600; color: var(--white); }
.sidebar-user-role { font-size: .72rem; color: rgba(255,255,255,.45); }

.admin-main { flex: 1; min-width: 0; background: var(--paper); }
.admin-topbar {
  background: var(--white); border-bottom: 1px solid var(--line);
  padding: 0 2rem; height: 60px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 50;
}
.admin-topbar-title { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; }
.admin-content { padding: 2rem; max-width: 1200px; }

/* ── Stats grid ──────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.25rem; margin-bottom: 2rem; }
.stat-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  display: flex; align-items: center; gap: 1rem;
}
.stat-icon { width: 44px; height: 44px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.stat-icon-amber { background: var(--amber-lt); color: var(--amber-dk); }
.stat-icon-green { background: #e6f7ef; color: var(--green); }
.stat-icon-blue  { background: #e8f0fd; color: var(--blue); }
.stat-icon-purple{ background: #f0ebfb; color: var(--purple); }
.stat-icon svg { width: 22px; height: 22px; }
.stat-num { font-family: var(--font-display); font-size: 2rem; font-weight: 900; line-height: 1; }
.stat-label { font-size: .78rem; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; margin-top: .15rem; }

/* ── Pagination ──────────────────────────────────────────── */
.pagination { display: flex; gap: .4rem; align-items: center; margin-top: 1.5rem; }
.page-btn { padding: .4rem .85rem; font-size: .85rem; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--white); color: var(--slate); cursor: pointer; text-decoration: none; }
.page-btn:hover { border-color: var(--amber); color: var(--amber-dk); text-decoration: none; }
.page-btn.active { background: var(--amber); border-color: var(--amber); color: var(--ink); font-weight: 600; }

/* ── Misc ────────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 4rem 2rem; color: var(--muted); }
.empty-state svg { width: 48px; height: 48px; margin-bottom: 1rem; opacity: .4; }
.divider { border: none; border-top: 1px solid var(--line); margin: 2rem 0; }
.text-muted { color: var(--muted); }
.text-mono  { font-family: var(--font-mono); }
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }
.flex { display: flex; } .gap-1 { gap: .5rem; } .gap-2 { gap: 1rem; } .align-center { align-items: center; }
.justify-between { justify-content: space-between; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .admin-sidebar { display: none; }
  .admin-content { padding: 1.25rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .stats-grid { grid-template-columns: 1fr; }
  .jobs-grid  { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: 1fr; }
}
