:root {
  --primary: #007bff;
  --primary-dark: #0069d9;
  --sidebar: #343a40;
  --sidebar-dark: #2b3035;
  --sidebar-link: #c2c7d0;
  --sidebar-link-hover: #fff;
  --bg: #f4f6f9;
  --card: #fff;
  --text: #212529;
  --muted: #6c757d;
  --border: #dee2e6;
  --green: #28a745;
  --orange: #ffc107;
  --red: #dc3545;
  --cyan: #17a2b8;
  --purple: #6f42c1;
  --shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 1px 2px rgba(0, 0, 0, .08);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

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

a:hover {
  color: var(--primary-dark);
}

.muted {
  color: var(--muted);
}

.app-wrapper {
  min-height: 100vh;
}

.main-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 1040;
  width: 250px;
  background: var(--sidebar);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .05), 0 10px 25px rgba(0, 0, 0, .22);
  color: var(--sidebar-link);
  transition: transform .2s ease;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 57px;
  padding: 0 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  color: #fff;
  white-space: nowrap;
}

.brand-link:hover {
  color: #fff;
}

.brand-mark {
  display: inline-grid;
  flex: 0 0 34px;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 4px;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.brand-mark i {
  font-size: 16px;
}

.brand-text {
  overflow: hidden;
  font-size: 16px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar {
  height: calc(100vh - 57px);
  overflow-y: auto;
  padding: 12px 8px 18px;
}

.user-panel {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 10px 8px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.user-avatar {
  display: grid;
  flex: 0 0 40px;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #6c757d;
  color: #fff;
  font-weight: 700;
}

.user-info {
  min-width: 0;
}

.user-info strong,
.user-info span {
  display: block;
  overflow: hidden;
  max-width: 166px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-info strong {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

.user-info span {
  color: #c2c7d0;
  font-size: 12px;
}

.user-info i {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 5px;
  border-radius: 50%;
  background: var(--green);
}

.sidebar-menu {
  padding-top: 12px;
}

.nav-header {
  padding: 8px 12px;
  color: #8f99a6;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.nav-sidebar {
  display: grid;
  gap: 2px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.nav-item {
  margin: 0;
}

.nav-treeview {
  display: grid;
  gap: 1px;
  padding: 3px 0 6px 28px;
  margin: 0;
  list-style: none;
}

.nav-treeview a {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  padding: 7px 10px;
  border-radius: 4px;
  color: #aeb6c2;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-treeview i {
  width: 12px;
  font-size: 7px;
  text-align: center;
}

.nav-treeview a:hover {
  background: rgba(255, 255, 255, .08);
  color: #fff;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 4px;
  color: var(--sidebar-link);
  line-height: 1.2;
  transition: background-color .15s ease, color .15s ease;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(255, 255, 255, .1);
  color: var(--sidebar-link-hover);
}

.nav-link.active {
  background: var(--primary);
  color: #fff;
  box-shadow: inset 3px 0 0 rgba(255, 255, 255, .45);
}

.nav-link-danger:hover {
  background: rgba(220, 53, 69, .18);
  color: #fff;
}

.nav-icon {
  flex: 0 0 22px;
  width: 22px;
  font-size: 15px;
  line-height: 1;
  text-align: center;
  opacity: .9;
}

.nav-link.active .nav-icon {
  opacity: 1;
}

.nav-link p {
  flex: 1;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.content-wrapper {
  min-height: 100vh;
  margin-left: 250px;
  transition: margin-left .2s ease;
  display: flex;
  flex-direction: column;
}

.main-header {
  position: sticky;
  top: 0;
  z-index: 1020;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 57px;
  padding: 0 18px;
  border-bottom: 1px solid var(--border);
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
}

.nav-toggle {
  display: inline-grid;
  gap: 4px;
  width: 38px;
  height: 38px;
  place-content: center;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #495057;
  cursor: pointer;
}

.nav-toggle:hover {
  background: #f1f3f5;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.header-title {
  overflow: hidden;
  flex: 1;
  color: #495057;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-user {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-actions .btn i {
  font-size: 12px;
}

.admin-profile {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
}

.admin-avatar {
  display: grid;
  flex: 0 0 28px;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #6c757d;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.admin-name {
  overflow: hidden;
  max-width: 140px;
  color: #495057;
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.content {
  padding: 20px;
  flex: 1;
}

.main-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  background: #fff;
  color: var(--muted);
  font-size: 13px;
}

.sidebar-backdrop {
  display: none;
}

.page-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.page-title h1 {
  margin: 0;
  color: #343a40;
  font-size: 26px;
  font-weight: 500;
}

.page-title p {
  margin: 4px 0 0;
}

.grid {
  display: grid;
  gap: 18px;
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid-2 {
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
}

.form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
  border: 0;
  border-radius: 4px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, .125);
  color: #343a40;
  font-size: 15px;
  font-weight: 600;
}

.card-body {
  padding: 16px;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  background: #fff;
}

.table th,
.table td {
  padding: 12px;
  border-top: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

.table thead th {
  border-top: 0;
  border-bottom: 2px solid var(--border);
  color: #495057;
  font-weight: 700;
}

.table tbody tr:hover {
  background: rgba(0, 123, 255, .04);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
}

.btn-sm {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 13px;
}

.btn-primary {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  border-color: var(--primary-dark);
  background: var(--primary-dark);
  color: #fff;
}

.btn-secondary {
  border-color: #6c757d;
  background: #6c757d;
  color: #fff;
}

.btn-secondary:hover {
  background: #5a6268;
  color: #fff;
}

.btn-danger {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}

.btn-block {
  width: 100%;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  color: #495057;
  font-weight: 600;
}

.form-control {
  display: block;
  width: 100%;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  background: #fff;
  color: #495057;
  font-size: 14px;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.form-control:focus {
  border-color: #80bdff;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, .18);
}

textarea.form-control {
  min-height: 96px;
  resize: vertical;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.table-actions form {
  margin: 0;
}

.checkbox-row {
  display: flex;
  align-items: center;
  min-height: 38px;
}

.checkbox-row label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #495057;
}

.alert {
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 4px;
  margin-bottom: 16px;
}

.alert-danger {
  border-color: #f5c6cb;
  background: #f8d7da;
  color: #721c24;
}

.alert-success {
  border-color: #c3e6cb;
  background: #d4edda;
  color: #155724;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
}

.badge-low {
  background: var(--green);
  color: #fff;
}

.badge-mid {
  background: var(--orange);
  color: #1f2d3d;
}

.badge-high {
  background: var(--red);
  color: #fff;
}

.stat {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 104px;
  overflow: hidden;
  color: var(--text);
}

.stat.card {
  border-radius: 4px;
}

.stat.card-body {
  padding: 0;
}

.stat-icon {
  display: grid;
  flex: 0 0 86px;
  place-items: center;
  align-self: stretch;
  width: 86px;
  color: rgba(255, 255, 255, .9);
  font-size: 28px;
  font-weight: 800;
}

.stat-icon i {
  font-size: 30px;
}

.stat div:last-child {
  min-width: 0;
  padding: 14px 16px;
}

.stat .muted {
  margin: 0 0 4px;
  color: var(--muted);
}

.stat h3 {
  margin: 0;
  color: #343a40;
  font-size: 30px;
  line-height: 1.1;
}

.risk-low,
.risk-mid,
.risk-high {
  font-weight: 800;
}

.risk-low {
  color: var(--green);
}

.risk-mid {
  color: #b7791f;
}

.risk-high {
  color: var(--red);
}

.score-summary {
  position: sticky;
  top: 78px;
}

.score-summary h1 {
  margin: 0 0 10px;
  font-size: 42px;
  line-height: 1;
}

.score-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-grid {
  grid-template-columns: minmax(0, 1fr) minmax(360px, .9fr);
}

.chart-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px;
  gap: 18px;
  align-items: center;
}

.chart-panel canvas {
  width: 100%;
  max-width: 420px;
  min-height: 220px;
}

.chart-legend {
  display: grid;
  gap: 10px;
}

.chart-legend div {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #495057;
  font-weight: 600;
}

.chart-legend span {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.bar-chart {
  display: grid;
  gap: 15px;
}

.bar-row {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) 44px;
  gap: 10px;
  align-items: center;
}

.bar-row span {
  color: #495057;
  font-weight: 700;
}

.bar-row div {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9ecef;
}

.bar-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
}

.bar-row strong {
  color: #343a40;
  text-align: right;
}

.recommendation-list {
  display: grid;
  gap: 12px;
}

.recommendation-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-left-width: 4px;
  border-radius: 4px;
  background: #fff;
}

.recommendation-item > i {
  display: grid;
  flex: 0 0 34px;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #e9ecef;
}

.recommendation-item strong {
  display: block;
  color: #343a40;
}

.recommendation-item p {
  margin: 3px 0 0;
  color: var(--muted);
}

.recommendation-danger {
  border-left-color: var(--red);
}

.recommendation-danger > i {
  background: #f8d7da;
  color: var(--red);
}

.recommendation-warning {
  border-left-color: var(--orange);
}

.recommendation-warning > i {
  background: #fff3cd;
  color: #856404;
}

.recommendation-success {
  border-left-color: var(--green);
}

.recommendation-success > i {
  background: #d4edda;
  color: var(--green);
}

.recommendation-info {
  border-left-color: var(--cyan);
}

.recommendation-info > i {
  background: #d1ecf1;
  color: #0c5460;
}

.followup-list {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.followup-list h3 {
  margin: 0 0 4px;
  color: #343a40;
  font-size: 15px;
}

.followup-list a {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 4px;
  background: #f8f9fa;
  color: #495057;
}

.followup-list strong {
  color: var(--red);
}

.support-card-list {
  display: grid;
  gap: 10px;
}

.support-card-list h3 {
  margin: 0;
  color: #343a40;
  font-size: 15px;
}

.support-card-item {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #f8f9fa;
}

.support-card-item strong,
.support-card-item span {
  display: block;
}

.support-card-item span {
  margin-top: 2px;
  color: var(--primary);
  font-weight: 700;
}

.support-card-item p {
  margin: 6px 0 0;
  color: var(--muted);
}

.method-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.method-card,
.admin-card {
  min-height: 180px;
}

.method-card .card-body,
.admin-card .card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
}

.method-code {
  display: inline-flex;
  align-self: flex-start;
  padding: 6px 9px;
  border-radius: 4px;
  background: rgba(0, 123, 255, .1);
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
}

.method-card h3 {
  margin: 0;
  color: #343a40;
  font-size: 18px;
}

.method-card p,
.admin-card p {
  margin: 0;
  color: var(--muted);
}

.method-range {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  color: #495057;
  font-size: 13px;
  font-weight: 700;
}

.settings-list {
  display: grid;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.settings-list > div {
  display: grid;
  grid-template-columns: minmax(160px, 240px) minmax(0, 1fr);
  gap: 16px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.settings-list > div:nth-child(even) {
  background: #f8f9fa;
}

.settings-list > div:last-child {
  border-bottom: 0;
}

.settings-list strong {
  color: #343a40;
}

.settings-list span {
  color: #495057;
}

.article-list {
  display: grid;
  gap: 12px;
}

.article-item {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
}

.article-item h3 {
  margin: 0 0 6px;
  color: #343a40;
  font-size: 16px;
}

.article-item p {
  margin: 0;
  color: var(--muted);
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.public-page {
  background: linear-gradient(180deg, #eef4fb 0%, #f8fafc 100%);
}

.public-shell {
  min-height: 100vh;
  padding: 28px 18px 40px;
}

.public-header,
.public-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1180px;
  margin: 0 auto;
}

.public-header h1 {
  margin: 0;
  color: #16355c;
  font-size: 28px;
}

.public-header p,
.public-footer span {
  margin: 4px 0 0;
  color: var(--muted);
}

.public-hero {
  max-width: 1180px;
  margin: 18px auto 22px;
  padding: 24px 26px;
  border-radius: 8px;
  background: linear-gradient(135deg, #0f5fa8, #1aa5c8);
  color: #fff;
  box-shadow: var(--shadow);
}

.public-hero h2 {
  margin: 0 0 8px;
  font-size: 30px;
}

.public-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, .92);
}

.public-content {
  max-width: 1180px;
  margin: 0 auto;
}

.public-article {
  overflow: hidden;
}

.public-article h2 {
  margin: 0 0 10px;
  color: #16355c;
  font-size: 24px;
}

.public-article-summary {
  margin-bottom: 14px !important;
  color: #4f647d !important;
  font-size: 15px;
  font-weight: 600;
}

.public-article-body {
  color: #34495e;
  line-height: 1.8;
  white-space: normal;
}

.public-sidebar .btn {
  margin-top: 12px;
}

.public-footer {
  padding-top: 18px;
  margin-top: 24px;
  border-top: 1px solid var(--border);
}

.instrument-card {
  margin: 20px 0;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
}

.instrument-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: #f8f9fa;
}

.instrument-head h2,
.trace-head h2 {
  margin: 0;
  color: #343a40;
  font-size: 18px;
}

.instrument-head p,
.trace-head p {
  margin: 3px 0 0;
  color: var(--muted);
}

.instrument-score {
  flex: 0 0 auto;
  min-width: 72px;
  padding: 8px 10px;
  border-radius: 4px;
  background: var(--primary);
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  text-align: center;
}

.question-list {
  display: grid;
}

.question-item {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(360px, 1.25fr);
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.question-item:last-child {
  border-bottom: 0;
}

.question-text {
  display: flex;
  gap: 10px;
  min-width: 0;
}

.question-text span {
  display: grid;
  flex: 0 0 26px;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #e9ecef;
  color: #495057;
  font-size: 12px;
  font-weight: 800;
}

.question-text p {
  margin: 2px 0 0;
  color: #343a40;
}

.answer-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.answer-options label {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  color: #495057;
  font-size: 13px;
  cursor: pointer;
}

.answer-options label:hover {
  border-color: #80bdff;
  background: rgba(0, 123, 255, .04);
}

.answer-options input {
  flex: 0 0 auto;
}

.method-mini-score {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.method-mini-score:last-of-type {
  border-bottom: 0;
}

.method-mini-score span {
  color: #495057;
}

.answer-trace {
  padding: 0 0 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.answer-trace:last-child {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: 0;
}

.trace-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.score-box {
  min-height: 110px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #f8f9fa;
}

.score-box h2 {
  margin: 0 0 6px;
  color: #343a40;
}

.score-box p {
  margin: 0;
  color: var(--muted);
}

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 460px;
  background: var(--bg);
}

.login-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px;
  background: #0f3b82;
  color: #fff;
}

.login-left .brand,
.brand {
  margin-bottom: 42px;
  font-size: 26px;
  font-weight: 700;
}

.login-left h1 {
  max-width: 620px;
  margin: 0 0 18px;
  font-size: 38px;
  line-height: 1.15;
}

.login-left p {
  max-width: 560px;
  color: rgba(255, 255, 255, .84);
  font-size: 17px;
}

.feature {
  display: grid;
  gap: 10px;
  max-width: 560px;
  margin-top: 28px;
}

.feature div {
  padding: 11px 13px;
  border-left: 3px solid rgba(255, 255, 255, .45);
  background: rgba(255, 255, 255, .1);
}

.login-right {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 34px;
}

.login-card {
  width: 100%;
  max-width: 390px;
  padding: 28px;
  border-top: 3px solid var(--primary);
  border-radius: 4px;
  background: #fff;
  box-shadow: var(--shadow);
}

.login-card h2 {
  margin: 0 0 6px;
  text-align: center;
  font-weight: 500;
}

.login-card p {
  margin: 0 0 22px;
  color: var(--muted);
  text-align: center;
}

@media (min-width: 992px) {
  .nav-toggle {
    display: none;
  }
}

@media (max-width: 1199.98px) {
  .grid-4,
  .method-grid,
  .score-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .question-item {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 991.98px) {
  .main-sidebar {
    transform: translateX(-250px);
  }

  .content-wrapper {
    margin-left: 0;
  }

  body.sidebar-open .main-sidebar {
    transform: translateX(0);
  }

  body.sidebar-open .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1030;
    display: block;
    background: rgba(0, 0, 0, .35);
  }

  .grid-2,
  .form-grid,
  .score-grid,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .score-summary {
    position: static;
  }

  .answer-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chart-panel {
    grid-template-columns: 1fr;
  }

  .chart-legend {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .content {
    padding: 16px 12px;
  }

  .page-title {
    align-items: stretch;
    flex-direction: column;
  }

  .page-title h1 {
    font-size: 23px;
  }

  .instrument-head,
  .trace-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .answer-options {
    grid-template-columns: 1fr;
  }

  .chart-legend,
  .bar-row {
    grid-template-columns: 1fr;
  }

  .bar-row strong {
    text-align: left;
  }

  .grid-4,
  .method-grid {
    grid-template-columns: 1fr;
  }

  .main-footer,
  .settings-list > div {
    align-items: flex-start;
    flex-direction: column;
  }

  .settings-list > div {
    display: flex;
    gap: 5px;
  }

  .admin-name {
    display: none;
  }

  .login-page {
    grid-template-columns: 1fr;
  }

  .login-left {
    display: none;
  }

  .login-right {
    min-height: 100vh;
    padding: 20px;
  }

  .public-header,
  .public-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .public-hero {
    padding: 20px 18px;
  }

  .public-hero h2 {
    font-size: 24px;
  }
}

@media print {
  .main-sidebar,
  .main-header,
  .main-footer,
  .no-print,
  .sidebar-backdrop {
    display: none !important;
  }

  .content-wrapper {
    margin: 0;
  }

  .content {
    padding: 0;
  }

  .card {
    box-shadow: none;
  }
}

/* =============================================
   LOGIN PAGE — PREMIUM REDESIGN
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

.mental-login-page {
    margin: 0;
    min-height: 100vh;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    background: #0b1a3a;
    overflow: hidden;
}

.mental-login-wrapper {
    display: grid;
    grid-template-columns: 58% 42%;
    min-height: calc(100vh - 46px);
}

/* ---- LEFT PANEL ---- */
.mental-login-left {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 52px 64px 60px;
    color: #fff;
    overflow: hidden;
    background: url('../images/login-illustration.png') center/cover no-repeat;
}

/* Dark overlay on top of the illustration */
.mental-login-left::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(8, 20, 60, 0.88) 0%,
        rgba(10, 50, 110, 0.78) 40%,
        rgba(10, 100, 160, 0.65) 70%,
        rgba(15, 160, 190, 0.55) 100%
    );
    z-index: 0;
}

/* Subtle animated radial glow */
.mental-login-left::after {
    content: '';
    position: absolute;
    bottom: -120px;
    right: -100px;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(80,213,223,0.18) 0%, transparent 70%);
    animation: pulseGlow 6s ease-in-out infinite;
    z-index: 0;
}

@keyframes pulseGlow {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50%       { transform: scale(1.15); opacity: 1; }
}

/* Floating orbs decoration */
.mental-login-left .orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    z-index: 0;
    pointer-events: none;
    animation: floatOrb 8s ease-in-out infinite;
}
.mental-login-left .orb-1 {
    width: 280px; height: 280px;
    top: -80px; left: -80px;
    background: rgba(26, 165, 200, 0.25);
    animation-delay: 0s;
}
.mental-login-left .orb-2 {
    width: 200px; height: 200px;
    top: 45%; right: 5%;
    background: rgba(80, 213, 223, 0.2);
    animation-delay: 2.5s;
}
.mental-login-left .orb-3 {
    width: 160px; height: 160px;
    bottom: 100px; left: 20%;
    background: rgba(111, 66, 193, 0.22);
    animation-delay: 5s;
}

@keyframes floatOrb {
    0%, 100% { transform: translateY(0) scale(1); }
    50%       { transform: translateY(-28px) scale(1.05); }
}

.brand-area {
    display: flex;
    align-items: center;
    gap: 18px;
    position: relative;
    z-index: 2;
}

.brand-icon,
.login-logo-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.brand-icon {
    width: 62px;
    height: 62px;
    border: 2px solid rgba(255,255,255,0.6);
    font-size: 26px;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(8px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.brand-icon:hover {
    transform: rotate(8deg) scale(1.08);
    box-shadow: 0 12px 32px rgba(80,213,223,0.4);
}

.brand-area h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.3px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.brand-area p {
    margin: 4px 0 0;
    font-size: 13px;
    opacity: 0.8;
    letter-spacing: 0.2px;
}

.hero-content {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 60px;
    max-width: 520px;
}

.hero-content h1 {
    font-size: 38px;
    line-height: 1.2;
    font-weight: 900;
    margin-bottom: 20px;
    text-shadow: 0 4px 20px rgba(0,0,0,0.3);
    letter-spacing: -0.5px;
}

.hero-line {
    width: 72px;
    height: 4px;
    border-radius: 99px;
    background: linear-gradient(90deg, #50d5df, #a78bfa);
    margin-bottom: 24px;
    box-shadow: 0 0 16px rgba(80, 213, 223, 0.6);
}

.hero-content > p {
    font-size: 15px;
    line-height: 1.85;
    max-width: 440px;
    opacity: 0.9;
    text-shadow: 0 1px 6px rgba(0,0,0,0.2);
}

.feature-list {
    margin-top: 36px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 22px;
    padding: 16px 18px;
    border-radius: 14px;
    background: rgba(255,255,255,0.07);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.12);
    transition: background 0.3s ease, transform 0.3s ease;
}

.feature-item:hover {
    background: rgba(255,255,255,0.13);
    transform: translateX(6px);
}

.feature-item span {
    width: 46px;
    height: 46px;
    min-width: 46px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(80,213,223,0.8), rgba(111,66,193,0.7));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.2);
    flex-shrink: 0;
}

.feature-item strong {
    display: block;
    font-size: 15px;
    margin-bottom: 3px;
    font-weight: 700;
}

.feature-item p {
    margin: 0;
    font-size: 13px;
    opacity: 0.85;
    line-height: 1.5;
}

/* Remove old illustration circle and wave */
.mental-illustration { display: none; }
.wave-shape { display: none; }

/* Bottom badge on left panel */
.login-left-badge {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    border-radius: 999px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.18);
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    margin-top: 32px;
    width: fit-content;
}

.login-left-badge i {
    color: #50d5df;
    font-size: 15px;
}

/* ---- RIGHT PANEL ---- */
.mental-login-right {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 44px;
    background: #f7f9fc;
}

/* Subtle dot grid */
.mental-login-right::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(21,101,192,.09) 1px, transparent 1px);
    background-size: 24px 24px;
    z-index: 0;
    pointer-events: none;
}

.language-box {
    position: absolute;
    top: 22px;
    right: 28px;
    padding: 10px 16px;
    border-radius: 8px;
    background: #fff;
    color: #334155;
    border: 1px solid #dde4ee;
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
    font-size: 13px;
    font-weight: 500;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: box-shadow 0.2s ease;
}

.language-box:hover {
    box-shadow: 0 10px 28px rgba(0,0,0,0.1);
}

.login-card {
    width: 100%;
    max-width: 480px;
    padding: 44px 42px;
    background: #fff;
    border-radius: 20px;
    box-shadow:
        0 2px 4px rgba(15,23,42,0.04),
        0 12px 40px rgba(15,23,42,0.10),
        0 0 0 1px rgba(15,23,42,0.04);
    position: relative;
    z-index: 2;
    animation: slideInRight 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateY(28px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.login-logo-circle {
    width: 80px;
    height: 80px;
    margin: 0 auto 18px;
    background: linear-gradient(135deg, #1d4ed8, #3b82f6);
    color: #fff;
    border: none;
    font-size: 34px;
    border-radius: 20px;
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.3);
}

.login-card h2 {
    text-align: center;
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}

.login-subtitle {
    text-align: center;
    color: #64748b;
    margin-bottom: 28px;
    font-size: 14px;
}

.login-card label {
    font-weight: 600;
    color: #334155;
    font-size: 13px;
}

.login-card .form-control,
.login-card .input-group-text {
    height: 48px;
    border-color: #e2e8f0;
    background: #fff;
}

.login-card .form-control:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
}

.login-card .input-group-text {
    color: #667085;
}

/* Accordion Styles */
details.accordion {
    margin-bottom: 24px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -2px rgba(0,0,0,0.025);
    border: 1px solid #f1f5f9;
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

details.accordion:hover {
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
    transform: translateY(-2px);
}

details.accordion > summary {
    list-style: none;
    cursor: pointer;
    padding: 20px 24px;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    background: #ffffff;
    border-bottom: 1px solid transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease, color 0.3s ease;
    user-select: none;
}

details.accordion > summary::-webkit-details-marker {
    display: none;
}

details.accordion > summary:hover {
    background: #f8fafc;
    color: #3b82f6;
}

details.accordion[open] > summary {
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #3b82f6;
}

details.accordion > summary::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: #94a3b8;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
}

details.accordion[open] > summary::after {
    transform: rotate(180deg);
    color: #3b82f6;
}

details.accordion .accordion-body {
    padding: 24px;
    background: #ffffff;
    animation: accordionSlideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes accordionSlideDown {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 16px 0 20px;
    font-size: 13px;
    color: #64748b;
}

.login-options label {
    font-weight: 500;
    margin-left: 6px;
    color: #475569;
}

.login-options a {
    color: #2563eb;
    font-weight: 600;
    transition: color 0.2s;
}

.login-options a:hover { color: #1d4ed8; }

.login-btn {
    height: 50px;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 15px;
    background: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 60%, #0ea5e9 100%);
    box-shadow: 0 10px 28px rgba(37, 99, 235, 0.3);
    letter-spacing: 0.3px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    position: relative;
    overflow: hidden;
}

.login-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.15), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 36px rgba(37, 99, 235, 0.4);
    filter: brightness(1.05);
}

.login-btn:hover::after {
    transform: translateX(100%);
}

.login-btn:active {
    transform: translateY(0);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.3);
}

.divider {
    position: relative;
    text-align: center;
    margin: 24px 0;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.divider::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    border-top: 1px solid #e2e8f0;
}

.divider span {
    position: relative;
    background: #fff;
    padding: 0 14px;
}

.sso-btn {
    height: 48px;
    border-radius: 10px;
    font-weight: 600;
    background: #fff;
}

.muted {
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
    margin-bottom: 0;
}

.login-footer {
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    background: #f1f5f9;
    border-top: 1px solid #e2e8f0;
    font-size: 13px;
    letter-spacing: 0.2px;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 992px) {
    .mental-login-wrapper {
        grid-template-columns: 1fr;
    }
    .mental-login-left {
        display: none;
    }
    .mental-login-right {
        min-height: calc(100vh - 46px);
        padding: 28px 16px;
    }
    .language-box {
        display: none;
    }
    .login-card {
        padding: 32px 22px;
        border-radius: 16px;
    }
}

/* ---- FLOATING INPUT ---- */
.floating-group {
    position: relative;
    margin-bottom: 20px;
}

.floating-group input {
    width: 100%;
    height: 52px;
    padding: 16px 14px 6px 42px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    font-size: 14px;
    outline: none;
    color: #0f172a;
    transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.floating-group label {
    position: absolute;
    top: 50%;
    left: 42px;
    transform: translateY(-50%);
    font-size: 14px;
    color: #94a3b8;
    background: transparent;
    padding: 0 4px;
    transition: all 0.25s ease;
    pointer-events: none;
    font-weight: 500;
}

.input-icon {
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 15px;
    transition: color 0.25s ease;
    pointer-events: none;
}

.floating-group input:focus,
.floating-group input:not(:placeholder-shown) {
    background: #fff;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

.floating-group input:focus ~ .input-icon {
    color: #3b82f6;
}

.floating-group input:focus + label,
.floating-group input:not(:placeholder-shown) + label {
    top: 10px;
    left: 38px;
    font-size: 11px;
    font-weight: 600;
    background: #fff;
    color: #3b82f6;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}


 / *   A c c o r d i o n   S t y l e s   * / 
 d e t a i l s . a c c o r d i o n   { 
         m a r g i n - b o t t o m :   2 0 p x ; 
         b a c k g r o u n d :   # f f f ; 
         b o r d e r - r a d i u s :   8 p x ; 
         b o x - s h a d o w :   0   1 p x   3 p x   r g b a ( 0 , 0 , 0 , 0 . 0 8 ) ; 
         o v e r f l o w :   h i d d e n ; 
 } 
 
 d e t a i l s . a c c o r d i o n   >   s u m m a r y   { 
         l i s t - s t y l e :   n o n e ; 
         c u r s o r :   p o i n t e r ; 
         p a d d i n g :   1 5 p x   2 0 p x ; 
         f o n t - w e i g h t :   6 0 0 ; 
         c o l o r :   # 1 e 2 9 3 b ; 
         b a c k g r o u n d :   # f 8 f a f c ; 
         b o r d e r - b o t t o m :   1 p x   s o l i d   t r a n s p a r e n t ; 
         d i s p l a y :   f l e x ; 
         j u s t i f y - c o n t e n t :   s p a c e - b e t w e e n ; 
         a l i g n - i t e m s :   c e n t e r ; 
         t r a n s i t i o n :   b a c k g r o u n d   0 . 2 s ; 
 } 
 
 d e t a i l s . a c c o r d i o n   >   s u m m a r y : : - w e b k i t - d e t a i l s - m a r k e r   { 
         d i s p l a y :   n o n e ; 
 } 
 
 d e t a i l s . a c c o r d i o n   >   s u m m a r y : h o v e r   { 
         b a c k g r o u n d :   # f 1 f 5 f 9 ; 
 } 
 
 d e t a i l s . a c c o r d i o n [ o p e n ]   >   s u m m a r y   { 
         b o r d e r - b o t t o m :   1 p x   s o l i d   # e 2 e 8 f 0 ; 
 } 
 
 d e t a i l s . a c c o r d i o n   >   s u m m a r y : : a f t e r   { 
         c o n t e n t :   ' \ f 0 7 8 ' ; 
         f o n t - f a m i l y :   ' F o n t   A w e s o m e   6   F r e e ' ; 
         f o n t - w e i g h t :   9 0 0 ; 
         c o l o r :   # 6 4 7 4 8 b ; 
         t r a n s i t i o n :   t r a n s f o r m   0 . 2 s ; 
 } 
 
 d e t a i l s . a c c o r d i o n [ o p e n ]   >   s u m m a r y : : a f t e r   { 
         t r a n s f o r m :   r o t a t e ( 1 8 0 d e g ) ; 
 } 
 
 d e t a i l s . a c c o r d i o n   . a c c o r d i o n - b o d y   { 
         p a d d i n g :   2 0 p x ; 
 } 
  
 