:root {
  --ink-950: #0c1526;
  --ink-900: #12213d;
  --ink-800: #1b2e52;
  --ink-100: #eaeef6;
  --brass-700: #96660f;
  --brass-600: #b07d16;
  --brass-500: #c08a2e;
  --brass-100: #f4e7cd;
  --success-600: #2f7a4d;
  --success-100: #e3f3e8;
  --warning-600: #b17a0a;
  --warning-100: #fbedd0;
  --danger-600: #b3261e;
  --danger-100: #fbe3e1;
  --info-600: #2563a6;
  --info-100: #e2eefb;
  --surface: #ffffff;
  --surface-muted: #f6f7f9;
  --border: #e2e5eb;
  --text: #1a2332;
  --text-muted: #5b6472;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--surface-muted);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
a.link { color: var(--ink-900); font-weight: 500; }
a.link:hover { text-decoration: underline; }

h1 { font-size: 20px; font-weight: 600; margin: 0; }
h2 { font-size: 14px; font-weight: 600; margin: 0; }

/* Layout */
.app-shell { display: flex; height: 100vh; overflow: hidden; }

.sidebar {
  width: 224px;
  flex-shrink: 0;
  background: var(--ink-900);
  color: rgba(234,238,246,0.85);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.sidebar-header {
  height: 56px; display: flex; align-items: center; gap: 8px; padding: 0 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.sidebar-logo {
  width: 28px; height: 28px; border-radius: 6px; background: var(--brass-500);
  color: var(--ink-950); font-weight: 700; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
}
.sidebar-title { color: #fff; font-weight: 600; font-size: 14px; }
.sidebar-nav { padding: 8px; flex: 1; }
.sidebar-link {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 6px; margin-bottom: 2px;
  font-size: 13px; font-weight: 500; color: rgba(234,238,246,0.7);
}
.sidebar-link:hover { background: rgba(255,255,255,0.05); color: #fff; }
.sidebar-link.active { background: rgba(255,255,255,0.1); color: #fff; }
.sidebar-link .icon { width: 16px; text-align: center; opacity: 0.9; }

.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: 56px; flex-shrink: 0; background: var(--surface); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; padding: 0 20px;
}
.topbar-welcome { font-size: 14px; color: var(--text-muted); }
.topbar-welcome strong { color: var(--text); font-weight: 500; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.completion-track { width: 96px; height: 6px; border-radius: 3px; background: var(--ink-100); overflow: hidden; }
.completion-fill { height: 100%; background: var(--brass-500); }
.completion-label { font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 8px; }

.content { flex: 1; overflow-y: auto; padding: 24px; }
.content-narrow { max-width: 720px; margin: 0 auto; }
.content-medium { max-width: 900px; margin: 0 auto; }
.content-wide { max-width: 1080px; margin: 0 auto; }

.page-header { margin-bottom: 20px; }
.page-header p { margin: 4px 0 0; color: var(--text-muted); font-size: 13px; }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
}
.card-body { padding: 16px; }
.card-body.tight { padding: 0; }
.card-list > div { padding: 14px 16px; border-bottom: 1px solid var(--border); }
.card-list > div:last-child { border-bottom: none; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.stat-card { padding: 16px; }
.stat-value { font-size: 24px; font-weight: 600; }
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.stat-card:hover { border-color: var(--brass-500); }

/* Forms */
label { display: block; font-size: 12px; font-weight: 500; color: var(--text-muted); margin-bottom: 4px; }
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=file], input[type=date], textarea, select {
  width: 100%; padding: 8px 12px; border: 1px solid var(--border); border-radius: 6px;
  font-size: 13px; font-family: inherit; background: #fff; color: var(--text);
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--brass-500); outline-offset: 1px; border-color: var(--brass-500); }
textarea { resize: vertical; }
.field { margin-bottom: 14px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-error { color: var(--danger-600); font-size: 12px; margin-top: 4px; }
.checkbox-row { display: flex; align-items: center; gap: 8px; font-size: 13px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; border-radius: 6px; font-weight: 500; font-size: 13px;
  padding: 8px 14px; cursor: pointer; font-family: inherit;
}
.btn-primary { background: var(--ink-900); color: #fff; }
.btn-primary:hover { background: var(--ink-800); }
.btn-secondary { background: #fff; color: var(--ink-900); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--ink-100); }
.btn-danger { background: var(--danger-600); color: #fff; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Chips */
.chip {
  display: inline-flex; align-items: center; border-radius: 999px;
  padding: 2px 10px; font-size: 12px; font-weight: 500;
}
.chip-neutral { background: var(--ink-100); color: var(--ink-800); }
.chip-info { background: var(--info-100); color: var(--info-600); }
.chip-success { background: var(--success-100); color: var(--success-600); }
.chip-warning { background: var(--warning-100); color: var(--warning-600); }
.chip-danger { background: var(--danger-100); color: var(--danger-600); }
.chip-brass { background: var(--brass-100); color: var(--brass-700); }

/* Alerts / flash */
.alert { padding: 10px 14px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; }
.alert-success { background: var(--success-100); color: var(--success-600); }
.alert-danger { background: var(--danger-100); color: var(--danger-600); }
.alert-warning { background: var(--warning-100); color: var(--warning-600); }

/* Job cards / lists */
.job-card { padding: 16px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.job-title { font-size: 14px; font-weight: 600; }
.job-company { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.job-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 8px; font-size: 12px; color: var(--text-muted); }
.job-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; }

.empty-state {
  border: 1px dashed var(--border); background: #fff; border-radius: 8px;
  padding: 32px; text-align: center; color: var(--text-muted); font-size: 13px;
}

.filters-bar { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr auto; gap: 10px; margin-bottom: 16px; }

/* Auth pages */
.auth-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--surface-muted); padding: 16px; }
.auth-box { width: 100%; max-width: 360px; }
.auth-logo { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; }
.auth-card { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 24px; }
.auth-footer { text-align: center; margin-top: 16px; font-size: 13px; color: var(--text-muted); }

/* Landing */
.landing { min-height: 100vh; background: var(--ink-900); color: #fff; display: flex; flex-direction: column; }
.landing-inner { max-width: 720px; margin: 0 auto; flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 24px; }
.landing-badge {
  display: inline-flex; width: fit-content; background: rgba(255,255,255,0.1);
  color: var(--brass-100); border-radius: 999px; padding: 4px 12px; font-size: 12px; margin-bottom: 12px;
}
.landing h1 { font-size: 36px; line-height: 1.2; max-width: 480px; }
.landing p { color: rgba(234,238,246,0.8); max-width: 480px; margin-top: 12px; }
.landing-actions { display: flex; gap: 10px; margin-top: 24px; }
.landing-footer { border-top: 1px solid rgba(255,255,255,0.1); text-align: center; padding: 14px; font-size: 12px; color: rgba(234,238,246,0.5); }

.skill-tag {
  display: inline-flex; align-items: center; gap: 6px; background: var(--ink-100);
  color: var(--ink-800); border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 500;
}
.skill-tag button { border: none; background: none; cursor: pointer; color: rgba(27,46,82,0.6); font-size: 14px; line-height: 1; }
.skill-tag button:hover { color: var(--danger-600); }

@media (max-width: 720px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .field-row { grid-template-columns: 1fr; }
  .filters-bar { grid-template-columns: 1fr 1fr; }
}
