/* ----------- Theme Variables ----------- */
:root{
  --bg: #0b1220;
  --surface: #111a2e;
  --surface-2: #15213b;
  --text: #e8eefc;
  --muted: #a9b6d4;

  --brand: #4f7cff;      /* primary */
  --brand-2: #6be4ff;    /* accent */

  --success: #2ecc71;
  --warning: #f1c40f;
  --danger:  #ff4d4d;

  --border: rgba(255,255,255,0.10);
  --shadow: 0 10px 30px rgba(0,0,0,0.35);

  --radius: 14px;
  --radius-sm: 10px;

  --max: 1120px;
  --gap: 16px;

  --font: system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
}

/* Light mode (optional) */
@media (prefers-color-scheme: light){
  :root{
    --bg: #f6f8ff;
    --surface: #ffffff;
    --surface-2: #f1f5ff;
    --text: #0b1220;
    --muted: #4b5568;
    --border: rgba(11,18,32,0.10);
    --shadow: 0 12px 26px rgba(11,18,32,0.08);
  }
}

/* ----------- Base Reset ----------- */
*,
*::before,
*::after{ box-sizing: border-box; }

html{ scroll-behavior: smooth; }

body{
  margin: 0;
  font-family: var(--font);
  background: radial-gradient(1200px 700px at 10% 10%, rgba(79,124,255,0.28), transparent 60%),
              radial-gradient(900px 600px at 90% 20%, rgba(107,228,255,0.18), transparent 55%),
              var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

img{ max-width: 100%; display: block; }
a{ color: inherit; text-decoration: none; }
button, input, select, textarea{ font: inherit; }
ul{ margin: 0; padding: 0; list-style: none; }

/* Accessible focus */
:focus-visible{
  outline: 3px solid rgba(79,124,255,0.5);
  outline-offset: 2px;
}

/* ----------- Utilities ----------- */
.container{
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.grid{
  display: grid;
  gap: var(--gap);
}

.flex{
  display: flex;
  gap: var(--gap);
  align-items: center;
}

.muted{ color: var(--muted); }
.hidden{ display: none !important; }

.badge{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  font-size: 0.85rem;
}

.badge.success{ border-color: rgba(46,204,113,0.35); }
.badge.warning{ border-color: rgba(241,196,15,0.35); }
.badge.danger{  border-color: rgba(255,77,77,0.35); }

/* ----------- Top Navigation ----------- */
.nav{
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
  background: rgba(17,26,46,0.55);
  border-bottom: 1px solid var(--border);
}

.nav-inner{
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand{
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.brand .logo{
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: var(--shadow);
}

.nav-links{
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-links a{
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--muted);
}

.nav-links a:hover{
  color: var(--text);
  background: rgba(255,255,255,0.06);
}

.nav-actions{
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Mobile nav */
.burger{
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.06);
  color: var(--text);
}

@media (max-width: 860px){
  .nav-links{ display: none; }
  .burger{ display: inline-flex; justify-content:center; align-items:center; }
}

/* ----------- Buttons ----------- */
.btn{
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: transform .06s ease, background .2s ease, border-color .2s ease;
}

.btn:hover{
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.18);
}

.btn:active{ transform: translateY(1px); }

.btn.primary{
  background: linear-gradient(135deg, var(--brand), #2f5dff);
  border-color: rgba(79,124,255,0.55);
}

.btn.primary:hover{
  filter: brightness(1.05);
}

.btn.ghost{
  background: transparent;
}

.btn.danger{
  background: rgba(255,77,77,0.12);
  border-color: rgba(255,77,77,0.25);
  color: #ffd6d6;
}

/* ----------- Hero Section ----------- */
.hero{
  padding: 46px 0 26px;
}

.hero-card{
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 6px);
  box-shadow: var(--shadow);
  padding: 26px;
  overflow: hidden;
  position: relative;
}

.hero-card::after{
  content: "";
  position: absolute;
  inset: -80px -120px auto auto;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle at 30% 30%, rgba(107,228,255,0.35), transparent 60%);
  transform: rotate(15deg);
  pointer-events: none;
}

.hero h1{
  margin: 0 0 8px;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1.2;
}

.hero p{
  margin: 0 0 18px;
  color: var(--muted);
  max-width: 70ch;
}

.hero-actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ----------- Main Layout / Dashboard ----------- */
.main{
  padding: 10px 0 56px;
}

.layout{
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 18px;
  align-items: start;
}

@media (max-width: 980px){
  .layout{
    grid-template-columns: 1fr;
  }
}

/* Sidebar */
.sidebar{
  background: rgba(17,26,46,0.55);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  position: sticky;
  top: 86px;
}

@media (max-width: 980px){
  .sidebar{ position: static; }
}

.side-title{
  font-weight: 700;
  margin: 0 0 10px;
}

.side-menu a{
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--muted);
}

.side-menu a:hover{
  background: rgba(255,255,255,0.06);
  color: var(--text);
}

.side-menu a.active{
  background: rgba(79,124,255,0.16);
  border: 1px solid rgba(79,124,255,0.28);
  color: var(--text);
}

/* Content area */
.content{
  display: grid;
  gap: 18px;
}

.card{
  background: rgba(17,26,46,0.55);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}

.card h2{
  margin: 0 0 10px;
  font-size: 1.15rem;
}

.card .sub{
  margin: -4px 0 12px;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Stat cards */
.stats{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

@media (max-width: 980px){
  .stats{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px){
  .stats{ grid-template-columns: 1fr; }
}

.stat{
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.05);
}

.stat .label{ color: var(--muted); font-size: 0.9rem; }
.stat .value{ font-size: 1.4rem; font-weight: 800; margin-top: 4px; }

/* ----------- Forms ----------- */
.form{
  display: grid;
  gap: 12px;
}

.field{
  display: grid;
  gap: 6px;
}

label{
  font-size: 0.92rem;
  color: var(--muted);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="file"],
select,
textarea{
  width: 100%;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.06);
  color: var(--text);
}

textarea{
  min-height: 120px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder{
  color: rgba(169,182,212,0.65);
}

.helper{
  color: var(--muted);
  font-size: 0.85rem;
}

/* ----------- Tables (e.g., jobs, candidates) ----------- */
.table-wrap{
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

table{
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
  background: rgba(255,255,255,0.03);
}

thead th{
  text-align: left;
  font-size: 0.9rem;
  color: var(--muted);
  padding: 12px;
  border-bottom: 1px solid var(--border);
  background: rgba(17,26,46,0.6);
}

tbody td{
  padding: 12px;
  border-bottom: 1px solid var(--border);
}

tbody tr:hover{
  background: rgba(255,255,255,0.05);
}

/* Fit score pill */
.score{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-weight: 700;
}

.score.high{ border-color: rgba(46,204,113,0.35); color: #c9ffe0; }
.score.mid{  border-color: rgba(241,196,15,0.35); color: #fff2b3; }
.score.low{  border-color: rgba(255,77,77,0.35); color: #ffd6d6; }

/* ----------- Skill Chips ----------- */
.chips{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip{
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.06);
  font-size: 0.85rem;
  color: var(--text);
}

/* ----------- Alerts ----------- */
.alert{
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.06);
}

.alert.success{ border-color: rgba(46,204,113,0.30); background: rgba(46,204,113,0.10); }
.alert.warning{ border-color: rgba(241,196,15,0.30); background: rgba(241,196,15,0.10); }
.alert.danger{  border-color: rgba(255,77,77,0.30);  background: rgba(255,77,77,0.10); }

/* ----------- Footer ----------- */
.footer{
  border-top: 1px solid var(--border);
  padding: 18px 0;
  color: var(--muted);
}

/* ----------- Small Enhancements ----------- */
hr{
  border: none;
  border-top: 1px solid var(--border);
  margin: 14px 0;
}

.kbd{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.85rem;
  padding: 3px 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.06);
  color: var(--text);
}