/* ═══════════════════════════════════════════════════════════════
   TestSuite Pro — Portal CSS (Metronic 8 Demo22 palette)
   ═══════════════════════════════════════════════════════════════ */

/* CSS Variables (Metronic Demo22 palette) */
:root {
  --tsp-sidebar-width:     260px;
  --tsp-sidebar-bg:        #ffffff;
  --tsp-sidebar-border:    #f1f1f4;
  --tsp-nav-hover-bg:      #f9f9f9;
  --tsp-nav-active-bg:     #f1f7ff;
  --tsp-nav-active-color:  #3e97ff;
  --tsp-hero-start:        #1a2035;
  --tsp-hero-end:          #16213e;
  --tsp-accent:            #3e97ff;
  --tsp-font:              'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --tsp-radius:            0.625rem;
  --tsp-shadow:            0 0 0 1px rgba(0,0,0,.04), 0 2px 8px rgba(0,0,0,.06);
}

/* ── Base reset for portal ────────────────────────────────────── */
#tsp-portal, #tsp-portal * {
  box-sizing: border-box;
  font-family: var(--tsp-font);
}

/* ── Layout ───────────────────────────────────────────────────── */
#tsp-portal {
  display: flex;
  min-height: 100vh;
  background: #f9f9f9;
}

/* Sidebar */
.tsp-sidebar {
  width: var(--tsp-sidebar-width);
  min-height: 100vh;
  flex-shrink: 0;
  background: var(--tsp-sidebar-bg);
  border-right: 1px solid var(--tsp-sidebar-border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
}

/* Content area */
.tsp-content {
  flex: 1;
  min-width: 0;
  padding: 0;
}
.tsp-content-with-nav {
  padding: 0;
}
.tsp-view-wrap {
  padding: 2rem;
  max-width: 1200px;
}

/* ── Sidebar logo ─────────────────────────────────────────────── */
.tsp-sidebar-logo {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--tsp-sidebar-border);
}
.tsp-sidebar-logo a {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: .75rem;
}

/* ── Sidebar nav items ────────────────────────────────────────── */
.tsp-nav-item {
  text-decoration: none;
  color: #5e6278;
  border-radius: var(--tsp-radius);
  transition: background .15s, color .15s;
  padding: .75rem 1rem;
  margin-bottom: .25rem;
}
.tsp-nav-item:hover {
  background: var(--tsp-nav-hover-bg);
  color: var(--tsp-accent);
  text-decoration: none;
}
.tsp-nav-item.active {
  background: var(--tsp-nav-active-bg);
  color: var(--tsp-nav-active-color);
  font-weight: 600;
}
.tsp-nav-item i {
  width: 20px;
  flex-shrink: 0;
}

/* ── Mobile header ────────────────────────────────────────────── */
.tsp-mobile-header {
  display: none;
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}

@media (max-width: 1199px) {
  #tsp-portal {
    flex-direction: column;
  }
  .tsp-sidebar {
    position: fixed;
    left: -280px;
    transition: left .3s ease;
    top: 52px;
    height: calc(100vh - 52px);
    z-index: 1050;
    box-shadow: 4px 0 20px rgba(0,0,0,.12);
  }
  .tsp-sidebar.open {
    left: 0;
  }
  .tsp-mobile-header {
    display: flex !important;
  }
  .tsp-content-with-nav {
    padding-top: 52px;
  }
  .tsp-view-wrap {
    padding: 1.25rem;
  }
}

/* ── Hero card on dashboard ───────────────────────────────────── */
.tsp-hero-card {
  background: linear-gradient(135deg, var(--tsp-hero-start), #203060) !important;
  border: none !important;
}
.tsp-hero-card .card-body { padding: 2rem 2.5rem; }

/* ── Results hero ─────────────────────────────────────────────── */
.tsp-result-hero {
  background: linear-gradient(135deg, #1a2035 0%, #0d47a1 100%) !important;
  border: none !important;
}

/* ── Score ring ───────────────────────────────────────────────── */
.tsp-score-ring { width: 140px; height: 140px; }
.tsp-score-svg  { width: 100%; height: 100%; }

/* ── Auth card ────────────────────────────────────────────────── */
.tsp-auth-wrapper {
  background: linear-gradient(135deg, #f5f8ff 0%, #eef2ff 100%);
  padding: 2rem 1rem;
}
.tsp-auth-card {
  background: #fff;
  border-radius: 1rem;
  padding: 2.5rem;
  box-shadow: 0 8px 40px rgba(0,0,0,.12);
}

/* ── Test catalogue ───────────────────────────────────────────── */
.tsp-catalogue-card {
  transition: transform .2s, box-shadow .2s;
  border: 1px solid var(--tsp-sidebar-border) !important;
}
.tsp-catalogue-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0,0,0,.1) !important;
}
.tsp-card-lock-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  background: rgba(0,0,0,.45);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.tsp-locked { opacity: .85; }

/* ── Dashboard test cards ─────────────────────────────────────── */
.tsp-test-card {
  border: 1px solid var(--tsp-sidebar-border) !important;
  transition: box-shadow .2s;
}
.tsp-test-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,.09) !important; }

/* ── Wizard ───────────────────────────────────────────────────── */
.tsp-likert { user-select: none; }
.tsp-likert-option {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.tsp-likert-btn {
  cursor: pointer;
  transition: background .15s, color .15s;
  border-radius: 50% !important;
}
.tsp-likert-btn.active,
.tsp-likert-option input:checked + .tsp-likert-btn {
  background: var(--tsp-accent) !important;
  color: #fff !important;
  border-color: var(--tsp-accent) !important;
}
.tsp-mc-option {
  cursor: pointer;
  transition: border-color .15s, background .15s;
  border: 1px solid #e4e6ef;
}
.tsp-mc-option:hover { border-color: var(--tsp-accent); background: #f1f7ff; }
.tsp-bool-btn {
  cursor: pointer;
  transition: background .15s, color .15s;
  border-radius: var(--tsp-radius);
}
.tsp-bool-option input:checked + .tsp-bool-btn {
  background: var(--tsp-accent) !important;
  color: #fff !important;
  border-color: var(--tsp-accent) !important;
}

/* ── General card polish ──────────────────────────────────────── */
#tsp-portal .card {
  border: 1px solid var(--tsp-sidebar-border);
  border-radius: var(--tsp-radius);
  box-shadow: var(--tsp-shadow);
}
#tsp-portal .card-header {
  background: transparent;
  border-bottom: 1px solid var(--tsp-sidebar-border);
  padding: .85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
}
#tsp-portal .card-body { padding: 1.5rem; }

/* ── Separator ────────────────────────────────────────────────── */
.separator.separator-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.separator.separator-content::before,
.separator.separator-content::after {
  flex: 1;
  content: '';
  border-top: 1px dashed #e4e6ef;
}

/* ── Progress bar glow ────────────────────────────────────────── */
#tsp-progress-bar { transition: width .4s ease; }

/* ── Responsive table ─────────────────────────────────────────── */
#tsp-portal .table-responsive { overflow-x: auto; }
#tsp-portal .table td, #tsp-portal .table th {
  vertical-align: middle;
  padding: .75rem 1rem;
}
