/* ── Blackbird IT Solutions — Brand CSS ─────────────────────────────────── */

:root {
  --bb-dark:      #1F3864;
  --bb-mid:       #2E5FA3;
  --bb-light:     #4A90D9;
  --bb-accent:    #3498DB;
  --bb-pass:      #1E8449;
  --bb-pass-bg:   #D5F5E3;
  --bb-fail:      #C0392B;
  --bb-fail-bg:   #FADBD8;
  --bb-partial:   #D68910;
  --bb-partial-bg:#FEF9E7;
  --bb-grey:      #6C757D;
  --bb-light-grey:#F4F6F7;
  --bb-border:    #DEE2E6;
  --bb-white:     #FFFFFF;
  --bb-text:      #212529;
  --bb-text-muted:#6C757D;
  --radius:       8px;
  --radius-lg:    12px;
  --shadow:       0 2px 12px rgba(31,56,100,0.10);
  --shadow-lg:    0 8px 32px rgba(31,56,100,0.16);
  --transition:   0.18s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  color: var(--bb-text);
  background: var(--bb-white);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Typography ─────────────────────────────────────────────────────────── */
h1, h2, h3, h4 { color: var(--bb-dark); font-weight: 700; line-height: 1.25; }
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.25rem); }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.1rem; }
p  { margin-bottom: 1rem; }
a  { color: var(--bb-mid); text-decoration: none; }
a:hover { color: var(--bb-dark); text-decoration: underline; }
.text-muted { color: var(--bb-text-muted); }
.text-center { text-align: center; }

/* ── Layout ─────────────────────────────────────────────────────────────── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 720px; margin: 0 auto; padding: 0 24px; }
.container-xs { max-width: 480px; margin: 0 auto; padding: 0 24px; }
main { flex: 1; }

/* ── Navigation ─────────────────────────────────────────────────────────── */
.navbar {
  background: var(--bb-dark);
  padding: 0 24px;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.20);
}
.navbar-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center;
  justify-content: space-between;
  height: 64px;
}
.navbar-logo img { height: 44px; display: block; filter: brightness(0) invert(1); }
.navbar-links { display: flex; gap: 8px; align-items: center; }
.navbar-links a {
  color: rgba(255,255,255,0.85); padding: 8px 14px;
  border-radius: var(--radius); font-size: 0.9rem;
  transition: var(--transition);
}
.navbar-links a:hover {
  color: white; background: rgba(255,255,255,0.12);
  text-decoration: none;
}
.navbar-links .btn-nav {
  background: var(--bb-accent); color: white;
  padding: 8px 20px; font-weight: 600;
}
.navbar-links .btn-nav:hover { background: #2980B9; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 12px 28px; border-radius: var(--radius);
  font-size: 1rem; font-weight: 600; cursor: pointer;
  border: 2px solid transparent; transition: var(--transition);
  text-decoration: none; white-space: nowrap; line-height: 1;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--bb-dark); color: white; border-color: var(--bb-dark);
}
.btn-primary:hover { background: var(--bb-mid); border-color: var(--bb-mid); color: white; }

.btn-accent {
  background: var(--bb-accent); color: white; border-color: var(--bb-accent);
}
.btn-accent:hover { background: #2980B9; border-color: #2980B9; color: white; }

.btn-outline {
  background: transparent; color: var(--bb-dark); border-color: var(--bb-dark);
}
.btn-outline:hover { background: var(--bb-dark); color: white; }

.btn-outline-white {
  background: transparent; color: white; border-color: white;
}
.btn-outline-white:hover { background: white; color: var(--bb-dark); }

.btn-lg { padding: 16px 40px; font-size: 1.1rem; border-radius: 10px; }
.btn-sm { padding: 8px 18px; font-size: 0.875rem; }
.btn-full { width: 100%; }

/* ── Cards ───────────────────────────────────────────────────────────────── */
.card {
  background: white; border-radius: var(--radius-lg);
  box-shadow: var(--shadow); border: 1px solid var(--bb-border);
  padding: 32px; margin-bottom: 24px;
}
.card-sm { padding: 20px; }

/* ── Forms ───────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block; margin-bottom: 6px;
  font-weight: 600; font-size: 0.9rem; color: var(--bb-dark);
}
.form-label .required { color: var(--bb-fail); margin-left: 2px; }
.form-control {
  width: 100%; padding: 11px 14px;
  border: 2px solid var(--bb-border); border-radius: var(--radius);
  font-size: 1rem; color: var(--bb-text);
  background: white; transition: var(--transition);
  font-family: inherit;
}
.form-control:focus {
  outline: none; border-color: var(--bb-accent);
  box-shadow: 0 0 0 3px rgba(52,152,219,0.15);
}
.form-control::placeholder { color: #adb5bd; }
.form-hint { font-size: 0.8rem; color: var(--bb-text-muted); margin-top: 4px; }
.form-error { font-size: 0.85rem; color: var(--bb-fail); margin-top: 4px; }
textarea.form-control { resize: vertical; min-height: 120px; }

/* ── Alerts ──────────────────────────────────────────────────────────────── */
.alert {
  padding: 14px 18px; border-radius: var(--radius);
  margin-bottom: 20px; font-size: 0.9rem; border-left: 4px solid;
}
.alert-error   { background: var(--bb-fail-bg); border-color: var(--bb-fail); color: #922B21; }
.alert-success { background: var(--bb-pass-bg); border-color: var(--bb-pass); color: #1a6b35; }
.alert-info    { background: #EBF5FB; border-color: var(--bb-accent); color: #1a5276; }
.alert-warning { background: var(--bb-partial-bg); border-color: var(--bb-partial); color: #7D6608; }

/* ── Badge ───────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 100px;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.02em;
}
.badge-pass    { background: var(--bb-pass-bg); color: var(--bb-pass); }
.badge-fail    { background: var(--bb-fail-bg); color: var(--bb-fail); }
.badge-partial { background: var(--bb-partial-bg); color: var(--bb-partial); }
.badge-pending { background: #EBF5FB; color: var(--bb-mid); }
.badge-running { background: #EBF5FB; color: var(--bb-mid); }
.badge-complete { background: var(--bb-pass-bg); color: var(--bb-pass); }
.badge-failed  { background: var(--bb-fail-bg); color: var(--bb-fail); }
.badge-queued  { background: #F4ECF7; color: #7D3C98; }

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--bb-dark) 0%, #2c4a8a 60%, #1a3070 100%);
  color: white; padding: 90px 24px 80px;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: url('/assessment/static/img/hero-pattern.svg') center/cover no-repeat;
  opacity: 0.04;
}
.hero-inner { max-width: 900px; margin: 0 auto; position: relative; z-index: 1; }
.hero h1 { color: white; margin-bottom: 20px; }
.hero p { font-size: 1.2rem; color: rgba(255,255,255,0.85); margin-bottom: 36px; max-width: 620px; }
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-trust {
  margin-top: 48px; display: flex; align-items: center;
  gap: 24px; flex-wrap: wrap;
}
.hero-trust-item {
  display: flex; align-items: center; gap: 8px;
  color: rgba(255,255,255,0.75); font-size: 0.9rem;
}
.hero-trust-item svg { opacity: 0.8; }

/* ── Section ─────────────────────────────────────────────────────────────── */
.section { padding: 72px 24px; }
.section-alt { background: var(--bb-light-grey); }
.section-dark { background: var(--bb-dark); color: white; }
.section-dark h2, .section-dark h3 { color: white; }
.section-head { text-align: center; margin-bottom: 48px; }
.section-head p { color: var(--bb-text-muted); font-size: 1.1rem; max-width: 600px; margin: 12px auto 0; }

/* ── Pricing cards ───────────────────────────────────────────────────────── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px; max-width: 1000px; margin: 0 auto;
}
.pricing-card {
  background: white; border-radius: var(--radius-lg);
  border: 2px solid var(--bb-border);
  padding: 36px 28px;
  display: flex; flex-direction: column;
  transition: var(--transition);
  position: relative;
}
.pricing-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.pricing-card.featured {
  border-color: var(--bb-dark);
  box-shadow: 0 0 0 4px rgba(31,56,100,0.10), var(--shadow-lg);
}
.pricing-badge {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--bb-dark); color: white;
  padding: 4px 18px; border-radius: 100px;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.05em;
  white-space: nowrap;
}
.pricing-tier { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--bb-mid); margin-bottom: 8px; }
.pricing-name { font-size: 1.4rem; font-weight: 700; color: var(--bb-dark); margin-bottom: 4px; }
.pricing-price { margin: 16px 0; }
.pricing-price .amount { font-size: 3rem; font-weight: 800; color: var(--bb-dark); line-height: 1; }
.pricing-price .currency { font-size: 1.4rem; font-weight: 600; color: var(--bb-mid); vertical-align: top; margin-top: 8px; display: inline-block; }
.pricing-price .per { color: var(--bb-text-muted); font-size: 0.875rem; }
.pricing-desc { color: var(--bb-text-muted); font-size: 0.9rem; margin-bottom: 20px; }
.pricing-features { list-style: none; margin: 0 0 24px; flex: 1; }
.pricing-features li {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid var(--bb-border);
  font-size: 0.9rem;
}
.pricing-features li:last-child { border-bottom: none; }
.pricing-features .check { color: var(--bb-pass); font-size: 1rem; flex-shrink: 0; margin-top: 1px; }

/* ── Steps (wizard progress) ─────────────────────────────────────────────── */
.steps {
  display: flex; align-items: center; gap: 0;
  margin-bottom: 40px; overflow: hidden;
}
.step {
  flex: 1; display: flex; align-items: center;
  flex-direction: column; gap: 6px;
  position: relative; text-align: center;
}
.step::after {
  content: ''; position: absolute;
  top: 20px; left: calc(50% + 20px);
  right: calc(-50% + 20px);
  height: 2px; background: var(--bb-border);
}
.step:last-child::after { display: none; }
.step.active::after   { background: var(--bb-accent); }
.step.complete::after { background: var(--bb-pass); }
.step-num {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem; position: relative; z-index: 1;
  border: 2px solid var(--bb-border); background: white; color: var(--bb-text-muted);
}
.step.active .step-num  { border-color: var(--bb-accent); color: var(--bb-accent); background: #EBF5FB; }
.step.complete .step-num { border-color: var(--bb-pass); color: white; background: var(--bb-pass); }
.step-label { font-size: 0.75rem; color: var(--bb-text-muted); font-weight: 600; }
.step.active .step-label  { color: var(--bb-accent); }
.step.complete .step-label { color: var(--bb-pass); }

/* ── Code blocks (for copy-paste instructions) ───────────────────────────── */
.code-block {
  background: #1e2736; color: #e8f0fe;
  border-radius: var(--radius); padding: 16px 20px;
  font-family: "SF Mono", "Fira Code", "Consolas", monospace;
  font-size: 0.875rem; line-height: 1.6;
  position: relative; margin: 12px 0;
  overflow-x: auto;
}
.copy-btn {
  position: absolute; top: 10px; right: 10px;
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.7); padding: 4px 10px;
  border-radius: 4px; cursor: pointer; font-size: 0.75rem;
  transition: var(--transition);
}
.copy-btn:hover { background: rgba(255,255,255,0.2); color: white; }
.copy-btn.copied { color: #7dcea0; border-color: #7dcea0; }

/* ── Status indicator ────────────────────────────────────────────────────── */
.status-icon {
  width: 80px; height: 80px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 24px; font-size: 2rem;
}
.status-icon.running  { background: #EBF5FB; color: var(--bb-accent); animation: pulse 2s infinite; }
.status-icon.complete { background: var(--bb-pass-bg); color: var(--bb-pass); }
.status-icon.failed   { background: var(--bb-fail-bg); color: var(--bb-fail); }
.status-icon.pending  { background: #F4ECF7; color: #7D3C98; }

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.06); opacity: 0.85; }
}

/* ── Progress bar ────────────────────────────────────────────────────────── */
.progress-bar {
  height: 6px; background: var(--bb-border); border-radius: 100px;
  overflow: hidden; margin: 20px 0;
}
.progress-bar-fill {
  height: 100%; background: var(--bb-accent);
  border-radius: 100px; transition: width 0.5s ease;
  animation: progress-pulse 2s ease-in-out infinite;
}
@keyframes progress-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.7; }
}

/* ── Table (admin) ───────────────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
thead th {
  background: var(--bb-dark); color: white;
  padding: 12px 16px; text-align: left; font-weight: 600;
  font-size: 0.8rem; letter-spacing: 0.04em; text-transform: uppercase;
  white-space: nowrap;
}
tbody tr { border-bottom: 1px solid var(--bb-border); }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--bb-light-grey); }
tbody td { padding: 12px 16px; vertical-align: middle; }
tbody td a { color: var(--bb-mid); }

/* ── Stat cards (admin) ──────────────────────────────────────────────────── */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; margin-bottom: 32px; }
.stat-card { background: white; border-radius: var(--radius); border: 1px solid var(--bb-border); padding: 20px; text-align: center; }
.stat-card .stat-num { font-size: 2.2rem; font-weight: 800; color: var(--bb-dark); line-height: 1; }
.stat-card .stat-label { font-size: 0.75rem; color: var(--bb-text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin-top: 4px; }

/* ── Admin sidebar layout ────────────────────────────────────────────────── */
.admin-layout { display: flex; min-height: calc(100vh - 64px); }
.admin-sidebar {
  width: 220px; flex-shrink: 0;
  background: var(--bb-dark); padding: 24px 0;
  position: sticky; top: 64px; height: calc(100vh - 64px);
  overflow-y: auto;
}
.sidebar-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px; color: rgba(255,255,255,0.75);
  font-size: 0.9rem; transition: var(--transition);
}
.sidebar-link:hover, .sidebar-link.active {
  background: rgba(255,255,255,0.10); color: white; text-decoration: none;
}
.admin-content { flex: 1; padding: 32px; overflow-x: auto; }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.footer {
  background: var(--bb-dark); color: rgba(255,255,255,0.65);
  padding: 48px 24px 24px; margin-top: auto;
}
.footer-grid {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 36px; margin-bottom: 36px;
}
.footer-brand img { height: 32px; margin-bottom: 12px; }
.footer-brand p { font-size: 0.85rem; color: rgba(255,255,255,0.55); }
.footer-col h4 { color: white; font-size: 0.875rem; margin-bottom: 12px; letter-spacing: 0.04em; text-transform: uppercase; }
.footer-col a { display: block; color: rgba(255,255,255,0.6); font-size: 0.875rem; margin-bottom: 6px; }
.footer-col a:hover { color: white; text-decoration: none; }
.footer-bottom {
  max-width: 1100px; margin: 0 auto;
  padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.10);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px; font-size: 0.8rem;
}
.footer-bottom a { color: rgba(255,255,255,0.5); }
.footer-bottom a:hover { color: white; }

/* ── Utility ─────────────────────────────────────────────────────────────── */
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mt-5 { margin-top: 48px; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.mb-5 { margin-bottom: 48px; }
.gap-2 { gap: 16px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.fw-bold { font-weight: 700; }
.divider { border: none; border-top: 1px solid var(--bb-border); margin: 32px 0; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero { padding: 60px 20px 50px; }
  .hero-cta { flex-direction: column; }
  .btn-lg { width: 100%; }
  .admin-sidebar { display: none; }
  .admin-layout { flex-direction: column; }
  .admin-content { padding: 20px; }
  .steps { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
}
