/* ============================================================
   QUALIFI — Shared Stylesheet
   Used by: index.html, dashboard.html, match.html
   ============================================================ */

/* ── TOKENS ── */
:root {
  --dark-teal: #004058;
  --light-teal: #9BE0EC;
  --mid-teal: #348696;
  --deep-teal: #1E3439;
  --white: #FFFFFF;
  --soft-gray: #ECF0F6;
  --text-dark: #1a2e35;
  --text-muted: #5a7a85;
  --border: rgba(0, 64, 88, 0.1);
  --success: #0a7a4a;
  --success-bg: #e6f7f0;
  --sb-w: 220px;
  --sb-col: 64px;
}

/* ── RESET ── */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* ── BASE ── */
body {
  font-family: 'Poppins', sans-serif;
  background: var(--soft-gray);
  color: var(--text-dark);
  min-height: 100vh;
}

/* ── SIDEBAR ── */
.sidebar {
  width: var(--sb-w);
  flex-shrink: 0;
  background: var(--dark-teal);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  border-right: 1px solid rgba(155, 224, 236, 0.12);
  transition: width 0.25s cubic-bezier(.4, 0, .2, 1);
  overflow: hidden;
}
.sidebar.collapsed { width: var(--sb-col); }

/* Logo area */
.sb-logo {
  height: 64px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  overflow: hidden;
}
.sb-logo-full  { display: block !important; height: 45px; width: auto; }
.sb-logo-icon  { display: none  !important; height: 45px; width: auto; }
.sidebar.collapsed .sb-logo-full { display: none  !important; }
.sidebar.collapsed .sb-logo-icon { display: block !important; }
.sidebar.collapsed .sb-logo { justify-content: center; padding: 0; }

/* Nav links */
.sb-nav {
  flex: 1;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}
.sb-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
  position: relative;
}
.sb-link svg {
  width: 18px; height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.sb-link:hover  { background: rgba(255, 255, 255, 0.08); color: #fff; }
.sb-link.active { background: rgba(155, 224, 236, 0.15); color: var(--light-teal); }
.sb-link.active svg { stroke: var(--light-teal); }

.sb-label { transition: opacity 0.2s; }
.sidebar.collapsed .sb-label { opacity: 0; }

/* Tooltip on collapsed */
.sidebar.collapsed .sb-link::after {
  content: attr(data-label);
  position: absolute;
  left: 56px; top: 50%;
  transform: translateY(-50%);
  background: var(--dark-teal);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 7px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 200;
  border: 1px solid rgba(155, 224, 236, 0.2);
}
.sidebar.collapsed .sb-link:hover::after { opacity: 1; }

.sb-divider { height: 1px; background: rgba(255, 255, 255, 0.07); margin: 6px 10px; }

/* Bottom / collapse toggle */
.sb-bottom {
  padding: 12px 10px 20px;
  flex-shrink: 0;
  display: flex;
  justify-content: flex-start;
}
.sb-toggle {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 0 auto;
  transition: background 0.15s;
}
.sidebar.collapsed .sb-toggle { margin: 0 auto; }
.sb-toggle:hover { background: rgba(255, 255, 255, 0.12); }
.sb-toggle svg {
  width: 16px; height: 16px;
  stroke: rgba(255, 255, 255, 0.6);
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.25s cubic-bezier(.4, 0, .2, 1);
}
.sidebar.collapsed .sb-toggle svg { transform: rotate(180deg); }

/* Avatar */
.sb-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(155, 224, 236, 0.15);
  border: 1.5px solid rgba(155, 224, 236, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--light-teal);
  flex-shrink: 0;
  font-family: 'Poppins', sans-serif;
}

/* ── APP MAIN ── */
body.app-layout { display: flex; }
.app-main {
  margin-left: var(--sb-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left 0.25s cubic-bezier(.4, 0, .2, 1);
}
body.sb-collapsed .app-main { margin-left: var(--sb-col); }

/* ── TOPBAR ── */
.topbar {
  background: var(--white);
  height: 64px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0; z-index: 50;
  flex-shrink: 0;
}
.topbar-title { font-size: 17px; font-weight: 700; color: var(--dark-teal); }
.topbar-sub   { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-notif {
  width: 36px; height: 36px;
  border-radius: 9px;
  background: var(--soft-gray);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
  position: relative;
}
.topbar-notif:hover { background: #dde4ec; }
.topbar-notif svg {
  width: 16px; height: 16px;
  stroke: var(--text-muted);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.notif-dot {
  position: absolute;
  top: 7px; right: 7px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #e24b4a;
  border: 1.5px solid var(--white);
}

/* ── SHARED COMPONENTS ── */
/* Welcome / profile banners */
.welcome-bar {
  background: var(--dark-teal);
  border-radius: 14px;
  padding: 22px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.wb-title { font-size: 17px; font-weight: 700; color: #fff; margin-bottom: 4px; }
.wb-sub   { font-size: 12px; color: rgba(255, 255, 255, 0.5); }
.wb-btn {
  background: var(--light-teal);
  color: var(--dark-teal);
  padding: 10px 22px;
  border-radius: 8px;
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s;
  flex-shrink: 0;
}
.wb-btn:hover { background: #b8eaf4; }

/* Panel / card base */
.panel {
  background: var(--white);
  border-radius: 14px;
  padding: 24px;
  border: 1px solid var(--border);
}
.panel-title { font-size: 14px; font-weight: 600; color: var(--dark-teal); margin-bottom: 20px; }

/* Skill bars */
.skill-row   { margin-bottom: 14px; }
.skill-row:last-child { margin-bottom: 0; }
.skill-meta  { display: flex; justify-content: space-between; margin-bottom: 6px; }
.skill-name  { font-size: 13px; color: var(--text-dark); }
.skill-pct   { font-size: 13px; font-weight: 600; color: var(--dark-teal); }
.skill-track { height: 7px; background: var(--soft-gray); border-radius: 100px; overflow: hidden; }
.skill-fill  { height: 100%; border-radius: 100px; background: var(--mid-teal); }

/* Score pills */
.jc-score-pill  { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 100px; }
.score-excellent{ background: var(--success-bg); color: var(--success); }
.score-strong   { background: #e8f4fd; color: #1565a0; }
.score-good     { background: #fff8e1; color: #b45309; }
.score-low      { background: #fde8e8; color: #cc3333; }
.score-none     { background: var(--soft-gray); color: var(--text-muted); }

/* Tag pills */
.tag-list     { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 4px; }
.tag-strength { font-size: 11px; font-weight: 500; background: var(--success-bg); color: var(--success); border-radius: 100px; padding: 4px 12px; }
.tag-gap      { font-size: 11px; font-weight: 500; background: #fff3e0; color: #b45309; border-radius: 100px; padding: 4px 12px; }

/* Spinner */
.spinner { width: 44px; height: 44px; border-radius: 50%; border: 3px solid var(--soft-gray); border-top-color: var(--dark-teal); animation: spin 0.8s linear infinite; margin-bottom: 16px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── RESPONSIVE ── */
@media(max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .app-main { margin-left: 0 !important; }
}
