/* ============================================================
   CareerGuru Web Portal — shared theme
   Matches the marketing home theme (navy corporate, Inter + Bricolage)
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --navy:   #0a1628;
  --navy2:  #005580;
  --blue:   #0076a8;
  --blue-l: #0099cc;
  --white:  #ffffff;
  --gray:   #64748b;
  --gray-d: #475569;
  --gray-l: #f8fafc;
  --gray-m: #e2e8f0;
  --text:   #0a1628;
  --border: #e2e8f0;
  --accent:  #005580;
  --surface: #ffffff;
  --muted:   #64748b;
  --green:  #16a34a;
  --green-l:#dcfce7;
  --amber:  #d97706;
  --amber-l:#fef3c7;
  --red:    #dc2626;
  --red-l:  #fee2e2;
  --blue-bg:#eff6ff;
  --shadow-sm: 0 1px 3px rgba(10,22,40,.06);
  --shadow:    0 4px 16px rgba(10,22,40,.08);
  --shadow-lg: 0 12px 40px rgba(10,22,40,.14);
  --radius: 12px;
}
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--gray-l); color: var(--text); line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
h1,h2,h3,h4 { font-family: 'Bricolage Grotesque', 'Inter', sans-serif; letter-spacing: -.02em; color: var(--navy); }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 8px; font-size: .875rem; font-weight: 700;
  font-family: inherit; cursor: pointer; border: 1px solid transparent;
  transition: all .18s; white-space: nowrap; letter-spacing: .01em;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 2px 8px rgba(0,118,168,.3), inset 0 1px 0 rgba(255,255,255,.12); }
.btn-primary:hover:not(:disabled) { background: #005f87; transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0,118,168,.42); }
.btn-dark { background: var(--navy); color: #fff; }
.btn-dark:hover:not(:disabled) { background: var(--navy2); transform: translateY(-1px); }
.btn-outline { background: #fff; color: var(--navy); border-color: var(--border); }
.btn-outline:hover:not(:disabled) { border-color: var(--navy); background: var(--gray-l); }
.btn-ghost { background: transparent; color: var(--gray); }
.btn-ghost:hover:not(:disabled) { background: var(--gray-l); color: var(--navy); }
.btn-danger { background: #fff; color: var(--red); border-color: #fecaca; }
.btn-danger:hover:not(:disabled) { background: var(--red-l); }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 14px; font-size: .8rem; }
.btn-lg { padding: 14px 28px; font-size: .95rem; }

/* ── Cards ── */
.card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-pad { padding: 24px; }
.card-head { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-head h3 { font-size: 1.05rem; }

/* ── Forms ── */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: .82rem; font-weight: 600; color: var(--navy); margin-bottom: 7px; }
.input, .select, textarea.input {
  width: 100%; padding: 12px 14px; font-size: .92rem; font-family: inherit;
  color: var(--text); background: var(--gray-l);
  border: 1px solid var(--border); border-radius: 9px; transition: all .15s; outline: none;
}
.input:focus, .select:focus, textarea.input:focus { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px rgba(0,118,168,.12); }
.input::placeholder { color: #94a3b8; }
.input-group { position: relative; }
.input-group .toggle-eye { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); cursor: pointer; color: var(--gray); font-size: .9rem; background: none; border: none; }

/* ── Badges ── */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: .72rem; font-weight: 700; letter-spacing: .02em; }
.badge-green { background: var(--green-l); color: var(--green); }
.badge-amber { background: var(--amber-l); color: var(--amber); }
.badge-red   { background: var(--red-l); color: var(--red); }
.badge-blue  { background: var(--blue-bg); color: var(--blue); }
.badge-gray  { background: var(--gray-m); color: var(--gray-d); }

/* ── Auth (login/signup) ── */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-aside {
  background: var(--navy); color: #fff; padding: 56px 56px; position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-start;
}
/* Keep brand + marketing copy flowing naturally near the top, with the
   copyright pinned to the bottom. Avoids the large centered gaps that the
   taller signup view produced. */
.auth-aside .auth-aside-inner { margin-top: 52px; margin-bottom: 0; }
.auth-aside > :last-child { margin-top: auto; }
.auth-aside::before { content:''; position:absolute; width:520px; height:520px; border-radius:50%;
  background: radial-gradient(circle, rgba(0,153,204,.28), transparent 70%); top:-160px; right:-160px; }
.auth-aside::after { content:''; position:absolute; width:420px; height:420px; border-radius:50%;
  background: radial-gradient(circle, rgba(0,118,168,.22), transparent 70%); bottom:-140px; left:-120px; }
.auth-aside-inner { position: relative; z-index: 1; }
.auth-aside h2 { color: #fff; font-size: clamp(1.8rem, 2.6vw, 2.6rem); line-height: 1.1; margin-bottom: 18px; }
.auth-aside h2 span { color: var(--blue-l); }
.auth-aside p { color: rgba(255,255,255,.62); font-size: 1rem; max-width: 420px; }
.auth-points { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 16px; margin-top: 36px; }
.auth-point { display: flex; gap: 12px; align-items: flex-start; color: rgba(255,255,255,.85); font-size: .92rem; }
.auth-point .tick { color: var(--blue-l); font-weight: 800; }
.auth-brand { display: flex; align-items: center; gap: 10px; position: relative; z-index: 1; }
.auth-brand img { height: 40px; width: auto; }

.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: #fff; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h1 { font-size: 1.9rem; margin-bottom: 6px; }
.auth-sub { color: var(--gray); font-size: .95rem; margin-bottom: 28px; }
.oauth-row { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.oauth-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 11px 16px; border: 1px solid var(--border); border-radius: 9px; background: #fff;
  font-size: .88rem; font-weight: 600; color: var(--navy); cursor: pointer; transition: all .15s; width: 100%;
}
.oauth-btn:hover { background: var(--gray-l); border-color: #cbd5e1; }
.oauth-btn img, .oauth-btn svg { width: 18px; height: 18px; }
.auth-divider { display: flex; align-items: center; gap: 14px; color: #94a3b8; font-size: .78rem; margin: 4px 0 22px; }
.auth-divider::before, .auth-divider::after { content:''; flex:1; height:1px; background: var(--border); }
.auth-foot { text-align: center; margin-top: 22px; font-size: .88rem; color: var(--gray); }
.auth-foot a { color: var(--blue); font-weight: 700; }
.form-error { background: var(--red-l); color: var(--red); padding: 10px 14px; border-radius: 8px; font-size: .82rem; margin-bottom: 16px; display: none; }
.form-error.show { display: block; }
@media (max-width: 880px){ .auth-wrap { grid-template-columns: 1fr; } .auth-aside { display: none; } }

/* ── App shell ── */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--navy); color: rgba(255,255,255,.8); display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.sb-brand { padding: 20px 22px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid rgba(255,255,255,.08); }
.sb-brand img { height: 38px; width: auto; }
.sb-brand b { color: #fff; font-family: 'Bricolage Grotesque', sans-serif; font-size: 1.1rem; }
.sb-nav { padding: 14px 12px; display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; scrollbar-width: none; -ms-overflow-style: none; }
.sb-nav::-webkit-scrollbar { width: 0; height: 0; display: none; }
.sb-link {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 9px;
  font-size: .9rem; font-weight: 500; color: rgba(255,255,255,.72); transition: all .15s; cursor: pointer;
}
.sb-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.sb-link.active { background: var(--blue); color: #fff; box-shadow: 0 2px 10px rgba(0,118,168,.4); }
.sb-link .ic { width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; opacity: .9; }
.sb-link .ic svg { width: 18px; height: 18px; display: block; }
.sb-link.active .ic { opacity: 1; }
.sb-foot { padding: 14px 12px; border-top: 1px solid rgba(255,255,255,.08); }
.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  background: #fff; border-bottom: 1px solid var(--border); padding: 0 28px; height: 64px;
  display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 50;
}
.topbar h1 { font-size: 1.25rem; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.user-chip { display: flex; align-items: center; gap: 10px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--blue); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.content { padding: 28px; max-width: 1180px; width: 100%; }
.ham-btn { display: none; background: none; border: none; font-size: 1.4rem; color: var(--navy); cursor: pointer; }

@media (max-width: 900px){
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; width: 248px; z-index: 200; transform: translateX(-100%); transition: transform .25s; }
  .sidebar.open { transform: none; }
  .ham-btn { display: block; }
  .sb-backdrop { display:none; position: fixed; inset: 0; background: rgba(10,22,40,.5); z-index: 150; }
  .sb-backdrop.show { display: block; }
}

/* ── Layout helpers ── */
.page-head { margin-bottom: 22px; }
.page-head h2 { font-size: 1.5rem; margin-bottom: 4px; }
.page-head p { color: var(--gray); font-size: .92rem; }
.grid { display: grid; gap: 18px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 1000px){ .grid-4 { grid-template-columns: repeat(2,1fr); } .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 640px){ .grid-4, .grid-2 { grid-template-columns: 1fr; } }

/* Stat card */
.stat { background:#fff; border:1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow-sm); }
.stat .stat-ic { width: 40px; height: 40px; border-radius: 10px; display:flex; align-items:center; justify-content:center; font-size: 1.1rem; margin-bottom: 14px; background: var(--blue-bg); }
.stat .stat-n { font-family:'Bricolage Grotesque',sans-serif; font-size: 1.9rem; font-weight: 800; color: var(--navy); line-height: 1; }
.stat .stat-l { font-size: .8rem; color: var(--gray); margin-top: 6px; }

/* Tables / lists */
.list-row { display: flex; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.list-row:last-child { border-bottom: none; }
.list-row .lr-main { flex: 1; min-width: 0; }
.lr-title { font-weight: 700; color: var(--navy); font-size: .95rem; }
.lr-sub { font-size: .82rem; color: var(--gray); margin-top: 2px; }

/* Empty / loading */
.empty { text-align: center; padding: 56px 24px; color: var(--gray); }
.empty .em-ic { font-size: 2.4rem; margin-bottom: 12px; }
.spinner { width: 30px; height: 30px; border: 3px solid var(--gray-m); border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Toast */
.toast-wrap { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast { background: var(--navy); color: #fff; padding: 13px 18px; border-radius: 10px; box-shadow: var(--shadow-lg); font-size: .88rem; font-weight: 500; opacity: 0; transform: translateY(10px); transition: all .25s; max-width: 340px; }
.toast.show { opacity: 1; transform: none; }
.toast.success { background: var(--green); }
.toast.error { background: var(--red); }

/* Progress bar */
.progress { height: 8px; background: var(--gray-m); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--blue); border-radius: 999px; transition: width .4s; }

/* Misc */
.muted { color: var(--gray); }
.row { display: flex; align-items: center; gap: 12px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.mt-2 { margin-top: 8px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; }

/* -- Nav badge (for "Needs Review" count) ------------------------------------ */
.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  background: #ef4444;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  margin-left: auto;
  line-height: 1;
}
