:root {
  --cos-ink: #14122b;
  --cos-primary: #5b3df0;
  --cos-primary-dark: #4229c9;
  --cos-accent: #ff7a59;
  --cos-mint: #17b897;
  --cos-bg: #f6f5fb;
  --cos-card: #ffffff;
  --cos-border: #e7e4f5;
  --cos-muted: #6b6885;
}

* { box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--cos-bg);
  color: var(--cos-ink);
}

h1, h2, h3, h4, .cos-display {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--cos-ink);
}

a { color: var(--cos-primary); text-decoration: none; }

/* ---------- Navbar ---------- */
.cos-navbar {
  background: #ffffff;
  border-bottom: 1px solid var(--cos-border);
  padding: 0.9rem 0;
}
.navbar-brand {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--cos-ink) !important;
  display: flex;
  align-items: center;
}
.cos-logo-dot {
  width: 10px; height: 10px;
  background: linear-gradient(135deg, var(--cos-primary), var(--cos-accent));
  border-radius: 50%;
  display: inline-block;
  margin-right: 8px;
}
.nav-link { color: var(--cos-ink) !important; font-weight: 500; }
.nav-link:hover { color: var(--cos-primary) !important; }

.cos-badge-premium {
  background: linear-gradient(135deg, #ffb347, var(--cos-accent));
  color: #fff !important;
  border: none;
  font-weight: 600;
}
.btn-cos-primary {
  background: var(--cos-primary);
  border: none;
  color: #fff !important;
  font-weight: 600;
  border-radius: 10px;
  padding: 0.5rem 1.2rem;
}
.btn-cos-primary:hover { background: var(--cos-primary-dark); color: #fff; }
.btn-cos-outline {
  border: 1.5px solid var(--cos-primary);
  color: var(--cos-primary) !important;
  font-weight: 600;
  border-radius: 10px;
}

/* ---------- Cards ---------- */
.cos-card {
  background: var(--cos-card);
  border: 1px solid var(--cos-border);
  border-radius: 16px;
  padding: 1.75rem;
  box-shadow: 0 6px 24px rgba(20, 18, 43, 0.05);
}

.cos-alert { border-radius: 12px; border: none; }

/* ---------- Hero ---------- */
.cos-hero {
  background: linear-gradient(135deg, #211a5c 0%, var(--cos-primary) 60%, #7c5cff 100%);
  color: #fff;
  border-radius: 20px;
  padding: 3.5rem 2.5rem;
  position: relative;
  overflow: hidden;
}
.cos-hero h1 { color: #fff; font-size: 2.4rem; }
.cos-hero p { color: rgba(255,255,255,0.85); font-size: 1.1rem; }

/* ---------- Dashboard score cards ---------- */
.cos-metric-card {
  background: var(--cos-card);
  border: 1px solid var(--cos-border);
  border-radius: 16px;
  padding: 1.5rem;
  height: 100%;
  transition: transform .15s ease;
}
.cos-metric-card:hover { transform: translateY(-3px); }
.cos-metric-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--cos-muted);
  font-weight: 600;
}
.cos-metric-value {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  margin: 0.25rem 0;
}
.cos-metric-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
}

/* ---------- Progress ring / bar ---------- */
.cos-progress {
  height: 10px;
  border-radius: 6px;
  background: var(--cos-border);
  overflow: hidden;
}
.cos-progress-bar { height: 100%; background: linear-gradient(90deg, var(--cos-primary), var(--cos-mint)); }

/* ---------- Score gauge ---------- */
.cos-score-circle {
  width: 160px; height: 160px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column;
  background: conic-gradient(var(--cos-primary) calc(var(--pct, 0) * 1%), var(--cos-border) 0);
  margin: 0 auto;
}
.cos-score-circle-inner {
  width: 128px; height: 128px;
  border-radius: 50%;
  background: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.cos-score-circle-inner .num { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; font-weight: 800; font-size: 2rem; line-height: 1; }
.cos-score-circle-inner .denom { color: var(--cos-muted); font-size: 0.85rem; }

/* ---------- Roadmap ---------- */
.cos-week {
  border-left: 3px solid var(--cos-border);
  padding: 0.25rem 0 1.5rem 1.5rem;
  position: relative;
}
.cos-week::before {
  content: '';
  position: absolute; left: -7px; top: 4px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--cos-primary);
}
.cos-week.done::before { background: var(--cos-mint); }
.cos-week.done { border-left-color: var(--cos-mint); }

/* ---------- Chat / interview bubble ---------- */
.cos-bubble-ai {
  background: #efecff; border-radius: 14px 14px 14px 2px;
  padding: 0.9rem 1.1rem; max-width: 85%;
}
.cos-bubble-user {
  background: var(--cos-primary); color: #fff;
  border-radius: 14px 14px 2px 14px;
  padding: 0.9rem 1.1rem; max-width: 85%; margin-left: auto;
}

/* ---------- Auth pages ---------- */
.cos-auth-wrap { max-width: 440px; margin: 2rem auto; }

/* ---------- Pricing ---------- */
.cos-plan {
  border: 2px solid var(--cos-border);
  border-radius: 16px;
  padding: 2rem;
  height: 100%;
}
.cos-plan.featured { border-color: var(--cos-primary); position: relative; }
.cos-plan-price { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; font-size: 2.5rem; font-weight: 800; }

/* ---------- Footer ---------- */
.cos-footer { color: var(--cos-muted); border-top: 1px solid var(--cos-border); }

/* ---------- Shareable resume page ---------- */
.cos-resume-doc {
  background: #fff;
  border-radius: 14px;
  padding: 2.5rem;
  box-shadow: 0 10px 40px rgba(20,18,43,.08);
  max-width: 780px;
  margin: 0 auto;
}

@media (max-width: 576px) {
  .cos-hero { padding: 2.25rem 1.5rem; }
  .cos-hero h1 { font-size: 1.8rem; }
}
