
/* ============================================================
   CAT ACADEMY IMIPAS — css/dashboard.css
   VERSION 3.0 — UI/UX, RESPONSIVE & STABILITY

   CAKUPAN:
   01. Design tokens & accessibility
   02. Dashboard hero
   03. Subscription banner
   04. Resume examination
   05. Section header
   06. Quick actions
   07. Learning progress
   08. Exam list & cards
   09. Exam filters
   10. Examination history
   11. Examination results
   12. User profile
   13. Articles & learning materials
   14. Article details
   15. FAQ accordion
   16. Recommendations
   17. Dashboard statistics
   18. Responsive layouts
   19. Reduced motion
   20. Print

   COMPATIBILITY:
   - Mempertahankan selector v2.0.
   - Tidak mengubah JavaScript.
   - Tidak mengubah struktur Firestore.
   - Menggunakan token global dengan fallback.
   - Mendukung dark/light theme.
   ============================================================ */


/* ============================================================
   01. DESIGN TOKENS
   ============================================================ */

:root {
  --dash-bg:
    var(--bg-app, #0a1929);

  --dash-surface:
    var(--bg-surface, #102338);

  --dash-surface-2:
    var(--bg-surface-2, #173047);

  --dash-hover:
    var(--bg-hover, #1b354d);

  --dash-muted-bg:
    var(--bg-muted, rgba(127, 150, 170, .10));

  --dash-text:
    var(--text-primary, #f8fafc);

  --dash-text-secondary:
    var(--text-secondary, #b7c9dc);

  --dash-text-muted:
    var(--text-tertiary, #91a7ba);

  --dash-border:
    var(--border-default, rgba(127, 150, 170, .22));

  --dash-border-soft:
    var(--border-subtle, rgba(127, 150, 170, .12));

  --dash-accent:
    var(--accent-primary, #70a6ed);

  --dash-accent-hover:
    var(--accent-primary-hover, #3884e6);

  --dash-accent-soft:
    var(--accent-subtle, rgba(112,166,237, .12));

  --dash-accent-muted:
    var(--accent-muted, rgba(112,166,237, .20));

  --dash-success:
    var(--status-correct, #10b981);

  --dash-warning:
    var(--status-flagged, #f59e0b);

  --dash-danger:
    var(--status-wrong, #ef4444);

  --dash-info:
    var(--color-info-500, #87b4f0);

  --dash-success-bg:
    var(--success-subtle, rgba(16, 185, 129, .12));

  --dash-warning-bg:
    var(--warning-subtle, rgba(245, 158, 11, .12));

  --dash-danger-bg:
    var(--danger-subtle, rgba(239, 68, 68, .12));

  --dash-info-bg:
    var(--info-subtle, rgba(135,180,240, .12));

  --dash-focus:
    var(--border-focus, #a0c1eb);

  --dash-radius-sm:
    var(--radius-sm, 8px);

  --dash-radius-md:
    var(--radius-md, 12px);

  --dash-radius-lg:
    var(--radius-lg, 16px);

  --dash-radius-xl:
    var(--radius-xl, 20px);

  --dash-radius-pill:
    var(--radius-pill, 999px);

  --dash-radius-circle:
    var(--radius-circle, 50%);

  --dash-duration-fast:
    var(--duration-fast, 150ms);

  --dash-duration-base:
    var(--duration-base, 200ms);

  --dash-ease:
    var(--ease-out, ease-out);

  --dash-shadow:
    var(--shadow-md, 0 8px 24px rgba(0,0,0,.12));

  --dash-space-1: var(--space-1, 4px);
  --dash-space-2: var(--space-2, 8px);
  --dash-space-3: var(--space-3, 12px);
  --dash-space-4: var(--space-4, 16px);
  --dash-space-5: var(--space-5, 20px);
  --dash-space-6: var(--space-6, 24px);
  --dash-space-8: var(--space-8, 32px);
}


/* ============================================================
   02. SHARED STABILITY & ACCESSIBILITY
   ============================================================ */

.dash-hero,
.dash-subs,
.dash-resume,
.dash-progress-card,
.exam-card,
.exam-filters,
.history-item,
.result-hero,
.result-category,
.result-summary-item,
.profile-hero,
.profile-info-item,
.profile-menu,
.article-card,
.faq-item,
.reco-item {
  box-sizing: border-box;
  min-width: 0;
}

.dash-hero *,
.dash-subs *,
.dash-resume *,
.dash-progress-card *,
.exam-card *,
.exam-filters *,
.history-item *,
.result-hero *,
.result-category *,
.result-summary-item *,
.profile-hero *,
.profile-info-item *,
.profile-menu *,
.article-card *,
.faq-item *,
.reco-item * {
  box-sizing: border-box;
}

.dash-action:focus-visible,
.dash-section-action:focus-visible,
.exam-card:focus-visible,
.history-item:focus-visible,
.profile-menu-item:focus-visible,
.profile-avatar-edit:focus-visible,
.article-card:focus-visible,
.faq-question:focus-visible,
.reco-item:focus-visible {
  outline: 2px solid var(--dash-focus);
  outline-offset: 3px;
}

.dash-hero [hidden],
.dash-subs [hidden],
.dash-resume [hidden],
.exam-list [hidden],
.history-list [hidden],
.profile-menu [hidden],
.article-grid [hidden],
.faq-list [hidden],
.reco-list [hidden] {
  display: none !important;
}


/* ============================================================
   03. DASHBOARD HERO
   ============================================================ */

.dash-hero {
  position: relative;

  overflow: hidden;

  margin-bottom: var(--dash-space-5);

  padding: var(--dash-space-5);

  border:
    1px solid var(--dash-border-soft);

  border-radius: var(--dash-radius-xl);

  background:
    radial-gradient(
      circle at 100% 0%,
      var(--dash-accent-muted),
      transparent 55%
    ),
    linear-gradient(
      135deg,
      var(--dash-surface) 0%,
      var(--dash-surface-2) 100%
    );
}

.dash-hero::after {
  content: "";

  position: absolute;

  right: -10%;
  bottom: -30%;

  width: 45%;
  height: 140%;

  background:
    radial-gradient(
      circle,
      var(--dash-accent-soft) 0%,
      transparent 70%
    );

  pointer-events: none;
}

[data-theme="light"] .dash-hero {
  background:
    radial-gradient(
      circle at 100% 0%,
      var(--dash-accent-soft),
      transparent 55%
    ),
    linear-gradient(
      135deg,
      var(--bg-surface, #ffffff) 0%,
      var(--bg-surface-2, #f2f6fa) 100%
    );
}

.dash-hero-inner {
  position: relative;
  z-index: 1;

  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;

  gap: var(--dash-space-4);

  min-width: 0;
}

.dash-greeting {
  display: flex;
  flex-direction: column;

  flex: 1 1 220px;

  gap: var(--dash-space-1);

  min-width: 0;
}

.dash-greeting-label {
  font-size: var(--fs-xs, 12px);
  font-weight: var(--fw-semibold, 600);

  color: var(--dash-text-muted);

  letter-spacing: var(--ls-wide, .04em);

  text-transform: uppercase;
}

.dash-greeting-name {
  margin: 0;

  font-size: var(--fs-xl, 24px);
  font-weight: var(--fw-bold, 700);

  line-height: 1.2;

  letter-spacing: var(--ls-tight, -.025em);

  color: var(--dash-text);

  overflow-wrap: anywhere;
}

.dash-greeting-sub {
  margin: var(--dash-space-1) 0 0;

  font-size: var(--fs-sm, 14px);
  line-height: var(--lh-relaxed, 1.65);

  color: var(--dash-text-secondary);

  overflow-wrap: anywhere;
}

.dash-greeting-sub strong {
  color:
    var(--text-brand, var(--dash-accent));

  font-weight: var(--fw-semibold, 600);
}

.dash-hero-avatar {
  display: flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 auto;

  width: 64px;
  height: 64px;

  overflow: hidden;

  border:
    3px solid var(--dash-surface);

  border-radius: var(--dash-radius-circle);

  background:
    var(
      --accent-gradient,
      linear-gradient(135deg, #70a6ed, #3884e6)
    );

  color:
    var(--text-on-accent, #06141c);

  box-shadow:
    var(
      --shadow-brand,
      0 6px 20px rgba(112,166,237,.2)
    );

  font-size: var(--fs-xl, 24px);
  font-weight: var(--fw-extrabold, 800);

  text-transform: uppercase;
}

.dash-hero-avatar img {
  display: block;

  width: 100%;
  height: 100%;

  border-radius: inherit;

  object-fit: cover;
}


/* ============================================================
   04. SUBSCRIPTION BANNER
   ============================================================ */

.dash-subs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;

  gap: var(--dash-space-3);

  margin-bottom: var(--dash-space-5);

  padding: var(--dash-space-4);

  border:
    1px solid var(--dash-border);

  border-radius: var(--dash-radius-lg);

  background: var(--dash-surface);
}

.dash-subs.is-active {
  background:
    linear-gradient(
      135deg,
      var(--dash-accent-soft),
      transparent
    );

  border-color: var(--dash-accent-muted);
}

.dash-subs.is-warning {
  background:
    linear-gradient(
      135deg,
      var(--dash-warning-bg),
      transparent
    );

  border-color:
    var(--warning-muted, var(--dash-warning));
}

.dash-subs.is-expired {
  background:
    linear-gradient(
      135deg,
      var(--dash-danger-bg),
      transparent
    );

  border-color:
    var(--danger-muted, var(--dash-danger));
}

.dash-subs-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 auto;

  width: 44px;
  height: 44px;

  border-radius: var(--dash-radius-md);

  background: var(--dash-accent-muted);

  color: var(--dash-accent);

  font-size: var(--fs-lg, 20px);
}

.dash-subs-icon svg {
  width: 22px;
  height: 22px;
}

.dash-subs.is-warning .dash-subs-icon {
  background:
    var(--warning-muted, var(--dash-warning-bg));

  color: var(--dash-warning);
}

.dash-subs.is-expired .dash-subs-icon {
  background:
    var(--danger-muted, var(--dash-danger-bg));

  color: var(--dash-danger);
}

.dash-subs-content {
  flex: 1 1 180px;

  min-width: 0;
}

.dash-subs-title {
  margin: 0 0 2px;

  font-size: var(--fs-sm, 14px);
  font-weight: var(--fw-semibold, 600);

  line-height: 1.3;

  color: var(--dash-text);

  overflow-wrap: anywhere;
}

.dash-subs-meta {
  margin: 0;

  font-size: var(--fs-xs, 12px);
  line-height: 1.4;

  color: var(--dash-text-muted);

  overflow-wrap: anywhere;
}

.dash-subs-meta strong {
  color: var(--dash-text);

  font-weight: var(--fw-semibold, 600);
}

.dash-subs-action {
  flex: 0 0 auto;
}


/* ============================================================
   05. RESUME EXAMINATION
   ============================================================ */

.dash-resume {
  position: relative;

  display: flex;
  align-items: center;
  flex-wrap: wrap;

  gap: var(--dash-space-3);

  overflow: hidden;

  margin-bottom: var(--dash-space-5);

  padding: var(--dash-space-4);

  border:
    1px solid var(--dash-accent-muted);

  border-radius: var(--dash-radius-lg);

  background:
    linear-gradient(
      135deg,
      var(--dash-accent-soft),
      transparent
    );
}

.dash-resume::before {
  content: "";

  position: absolute;
  inset: 0;

  background:
    radial-gradient(
      circle at 100% 0%,
      var(--dash-accent-muted),
      transparent 60%
    );

  pointer-events: none;
}

.dash-resume-icon {
  position: relative;
  z-index: 1;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 auto;

  width: 44px;
  height: 44px;

  border-radius: var(--dash-radius-md);

  background: var(--dash-accent-muted);

  color: var(--dash-accent);

  font-size: var(--fs-lg, 20px);

  animation:
    dash-resume-pulse
    2.4s
    var(--ease-in-out, ease-in-out)
    infinite;
}

.dash-resume-icon svg {
  width: 22px;
  height: 22px;
}

@keyframes dash-resume-pulse {
  0%, 100% {
    box-shadow:
      0 0 0 0 var(--dash-accent-muted);
  }

  50% {
    box-shadow:
      0 0 0 6px transparent;
  }
}

.dash-resume-content {
  position: relative;
  z-index: 1;

  flex: 1 1 180px;

  min-width: 0;
}

.dash-resume-title {
  margin: 0 0 2px;

  font-size: var(--fs-sm, 14px);
  font-weight: var(--fw-semibold, 600);

  line-height: 1.3;

  color: var(--dash-text);

  overflow-wrap: anywhere;
}

.dash-resume-meta {
  margin: 0;

  font-size: var(--fs-xs, 12px);
  line-height: 1.4;

  color: var(--dash-text-secondary);

  overflow-wrap: anywhere;
}

.dash-resume-meta strong {
  color: var(--dash-text);

  font-weight: var(--fw-semibold, 600);
}

.dash-resume-action {
  position: relative;
  z-index: 1;

  flex: 0 0 auto;
}


/* ============================================================
   06. SECTION HEADER
   ============================================================ */

.dash-section {
  min-width: 0;

  margin-bottom: var(--dash-space-6);
}

.dash-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;

  gap: var(--dash-space-3);

  margin-bottom: var(--dash-space-3);
}

.dash-section-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;

  gap: var(--dash-space-2);

  min-width: 0;

  margin: 0;

  font-size: var(--fs-md, 16px);
  font-weight: var(--fw-bold, 700);

  letter-spacing: var(--ls-tight, -.025em);

  color: var(--dash-text);

  overflow-wrap: anywhere;
}

.dash-section-title .badge {
  font-size: var(--fs-2xs, 11px);
}

.dash-section-action {
  display: inline-flex;
  align-items: center;

  gap: var(--dash-space-1);

  flex: 0 0 auto;

  font-size: var(--fs-xs, 12px);
  font-weight: var(--fw-semibold, 600);

  color: var(--dash-accent);

  text-decoration: none;

  white-space: nowrap;

  transition:
    color var(--dash-duration-fast) ease;
}

.dash-section-action:hover {
  color: var(--dash-accent-hover);

  text-decoration: underline;

  text-underline-offset: 3px;
}


/* ============================================================
   07. QUICK ACTIONS
   ============================================================ */

.dash-actions {
  display: grid;

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

  gap: var(--dash-space-2);

  min-width: 0;

  margin-bottom: var(--dash-space-5);
}

.dash-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  gap: var(--dash-space-2);

  min-width: 0;
  min-height: 96px;

  padding:
    var(--dash-space-3)
    var(--dash-space-2);

  border:
    1px solid var(--dash-border-soft);

  border-radius: var(--dash-radius-lg);

  background: var(--dash-surface);

  color: var(--dash-text-secondary);

  text-align: center;
  text-decoration: none;

  cursor: pointer;

  -webkit-tap-highlight-color: transparent;

  transition:
    background-color var(--dash-duration-fast) ease,
    border-color var(--dash-duration-fast) ease,
    transform var(--dash-duration-fast) ease;
}

@media (hover: hover) {
  .dash-action:hover {
    background: var(--dash-surface-2);

    border-color: var(--dash-border);

    color: var(--dash-text);

    text-decoration: none;

    transform: translateY(-2px);
  }
}

.dash-action:active {
  transform: translateY(0);
}

.dash-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 auto;

  width: 40px;
  height: 40px;

  border-radius: var(--dash-radius-md);

  background: var(--dash-accent-muted);

  color: var(--dash-accent);
}

.dash-action-icon svg {
  width: 20px;
  height: 20px;
}

.dash-action:nth-child(2) .dash-action-icon {
  background: var(--dash-info-bg);

  color: var(--dash-info);
}

.dash-action:nth-child(3) .dash-action-icon {
  background: var(--dash-warning-bg);

  color: var(--dash-warning);
}

.dash-action:nth-child(4) .dash-action-icon {
  background: var(--dash-success-bg);

  color: var(--dash-success);
}

.dash-action-label {
  min-width: 0;

  font-size: var(--fs-xs, 12px);
  font-weight: var(--fw-medium, 500);

  line-height: 1.35;

  color: inherit;

  overflow-wrap: anywhere;
}


/* ============================================================
   08. LEARNING PROGRESS
   ============================================================ */

.dash-progress-card {
  display: flex;
  flex-direction: column;

  gap: var(--dash-space-4);

  padding: var(--dash-space-4);

  border:
    1px solid var(--dash-border-soft);

  border-radius: var(--dash-radius-lg);

  background: var(--dash-surface);
}

.dash-progress-body {
  display: flex;
  align-items: center;
  flex-wrap: wrap;

  gap: var(--dash-space-4);

  min-width: 0;
}

.dash-progress-info {
  display: flex;
  flex-direction: column;

  flex: 1 1 180px;

  gap: var(--dash-space-2);

  min-width: 0;
}

.dash-progress-label {
  margin: 0;

  font-size: var(--fs-xs, 12px);
  font-weight: var(--fw-semibold, 600);

  color: var(--dash-text-muted);

  text-transform: uppercase;

  letter-spacing: var(--ls-wider, .08em);
}

.dash-progress-value {
  margin: 0;

  font-size: var(--fs-2xl, 30px);
  font-weight: var(--fw-bold, 700);

  line-height: 1.1;

  color: var(--dash-text);

  font-variant-numeric: tabular-nums;
}

.dash-progress-value small {
  font-size: var(--fs-sm, 14px);
  font-weight: var(--fw-medium, 500);

  color: var(--dash-text-muted);
}

.dash-progress-desc {
  margin: 0;

  font-size: var(--fs-xs, 12px);
  line-height: var(--lh-relaxed, 1.65);

  color: var(--dash-text-secondary);

  overflow-wrap: anywhere;
}

.dash-progress-breakdown {
  display: flex;
  flex-direction: column;

  gap: var(--dash-space-3);

  padding-top: var(--dash-space-3);

  border-top:
    1px solid var(--dash-border-soft);
}

.dash-progress-row {
  display: flex;
  flex-direction: column;

  gap: var(--dash-space-1);

  min-width: 0;
}

.dash-progress-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: var(--dash-space-2);

  font-size: var(--fs-xs, 12px);
}

.dash-progress-row-label {
  color: var(--dash-text-secondary);

  font-weight: var(--fw-medium, 500);

  overflow-wrap: anywhere;
}

.dash-progress-row-value {
  flex: 0 0 auto;

  color: var(--dash-text);

  font-weight: var(--fw-semibold, 600);

  font-variant-numeric: tabular-nums;
}


/* ============================================================
   09. EXAM LIST & CARDS
   ============================================================ */

.exam-list {
  display: grid;

  grid-template-columns:
    repeat(
      auto-fill,
      minmax(min(100%, 260px), 1fr)
    );

  gap: var(--dash-space-3);

  min-width: 0;
}

.exam-card {
  position: relative;

  display: flex;
  flex-direction: column;

  gap: var(--dash-space-3);

  min-width: 0;
  min-height: 180px;

  overflow: hidden;

  padding: var(--dash-space-4);

  border:
    1px solid var(--dash-border-soft);

  border-radius: var(--dash-radius-lg);

  background: var(--dash-surface);

  color: inherit;

  text-decoration: none;

  cursor: pointer;

  transition:
    transform var(--dash-duration-base) var(--dash-ease),
    border-color var(--dash-duration-base) var(--dash-ease),
    box-shadow var(--dash-duration-base) var(--dash-ease);
}

@media (hover: hover) {
  .exam-card:not(.is-locked):hover {
    transform: translateY(-2px);

    border-color: var(--dash-border);

    box-shadow: var(--dash-shadow);

    text-decoration: none;

    color: inherit;
  }
}

.exam-card.is-locked {
  cursor: not-allowed;

  opacity: .65;
}

.exam-card.is-locked:hover {
  transform: none;

  box-shadow: none;
}

.exam-card.is-completed {
  border-left:
    3px solid var(--dash-success);

  padding-left:
    calc(var(--dash-space-4) - 2px);
}

.exam-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;

  gap: var(--dash-space-2);

  min-width: 0;
}

.exam-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 auto;

  width: 40px;
  height: 40px;

  border-radius: var(--dash-radius-md);

  background: var(--dash-accent-muted);

  color: var(--dash-accent);

  font-size: var(--fs-lg, 20px);
}

.exam-card-icon svg {
  width: 20px;
  height: 20px;
}

.exam-card-title {
  display: -webkit-box;

  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;

  overflow: hidden;

  margin: 0;

  font-size: var(--fs-md, 16px);
  font-weight: var(--fw-semibold, 600);

  line-height: 1.35;

  color: var(--dash-text);

  overflow-wrap: anywhere;
}

.exam-card-desc {
  display: -webkit-box;

  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;

  overflow: hidden;

  margin: 0;

  font-size: var(--fs-xs, 12px);
  line-height: var(--lh-relaxed, 1.65);

  color: var(--dash-text-muted);

  overflow-wrap: anywhere;
}

.exam-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;

  gap: var(--dash-space-3);

  margin-top: auto;

  padding-top: var(--dash-space-2);

  border-top:
    1px solid var(--dash-border-soft);

  font-size: var(--fs-xs, 12px);

  color: var(--dash-text-muted);
}

.exam-card-meta-item {
  display: inline-flex;
  align-items: center;

  gap: var(--dash-space-1);

  min-width: 0;
}

.exam-card-meta-item strong {
  color: var(--dash-text-secondary);

  font-weight: var(--fw-semibold, 600);
}

.exam-card-badge {
  position: absolute;

  top: var(--dash-space-3);
  right: var(--dash-space-3);

  max-width: calc(100% - 24px);
}

.exam-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;

  gap: var(--dash-space-2);

  margin-top: var(--dash-space-1);
}

.exam-card-lock {
  display: inline-flex;
  align-items: center;

  gap: var(--dash-space-1);

  font-size: var(--fs-xs, 12px);
  font-weight: var(--fw-medium, 500);

  color: var(--dash-warning);
}

.exam-card-status {
  display: inline-flex;
  align-items: center;

  gap: var(--dash-space-1);

  max-width: 100%;

  padding: 3px var(--dash-space-2);

  border-radius: var(--dash-radius-pill);

  font-size: var(--fs-2xs, 11px);
  font-weight: var(--fw-semibold, 600);

  line-height: 1.3;

  text-transform: uppercase;

  letter-spacing: var(--ls-wide, .04em);

  overflow-wrap: anywhere;
}

.exam-card-status.is-available {
  background: var(--dash-accent-soft);

  color: var(--dash-accent);
}

.exam-card-status.is-completed {
  background: var(--dash-success-bg);

  color: var(--dash-success);
}

.exam-card-status.is-locked {
  background: var(--dash-warning-bg);

  color: var(--dash-warning);
}


/* ============================================================
   10. EXAM FILTERS
   ============================================================ */

.exam-filters {
  display: flex;
  flex-direction: column;

  gap: var(--dash-space-3);

  min-width: 0;

  margin-bottom: var(--dash-space-4);

  padding:
    var(--dash-space-3)
    var(--dash-space-4);

  border:
    1px solid var(--dash-border-soft);

  border-radius: var(--dash-radius-lg);

  background: var(--dash-surface);
}

.exam-filters-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;

  gap: var(--dash-space-2);

  min-width: 0;
}

.exam-search {
  flex: 1 1 200px;

  min-width: 0;
}

.exam-search input,
.exam-search .input,
.exam-filters select {
  max-width: 100%;
}

.exam-filters button,
.exam-filters select {
  min-height: 40px;
}


/* ============================================================
   11. EXAMINATION HISTORY
   ============================================================ */

.history-list {
  display: flex;
  flex-direction: column;

  gap: var(--dash-space-2);

  min-width: 0;
}

.history-item {
  display: grid;

  grid-template-columns:
    44px minmax(0, 1fr) auto;

  align-items: center;

  gap: var(--dash-space-3);

  padding:
    var(--dash-space-3)
    var(--dash-space-4);

  border:
    1px solid var(--dash-border-soft);

  border-radius: var(--dash-radius-md);

  background: var(--dash-surface);

  color: inherit;

  text-decoration: none;

  transition:
    background-color var(--dash-duration-fast) ease,
    border-color var(--dash-duration-fast) ease;
}

@media (hover: hover) {
  .history-item:hover {
    background: var(--dash-surface-2);

    border-color: var(--dash-border);

    color: inherit;

    text-decoration: none;
  }
}

.history-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 auto;

  width: 44px;
  height: 44px;

  border-radius: var(--dash-radius-md);

  background: var(--dash-accent-muted);

  color: var(--dash-accent);

  font-size: var(--fs-md, 16px);
  font-weight: var(--fw-bold, 700);
}

.history-icon.is-success {
  background: var(--dash-success-bg);

  color: var(--dash-success);
}

.history-icon.is-fail {
  background: var(--dash-danger-bg);

  color: var(--dash-danger);
}

.history-content {
  min-width: 0;
}

.history-title {
  margin: 0 0 2px;

  overflow: hidden;

  font-size: var(--fs-sm, 14px);
  font-weight: var(--fw-semibold, 600);

  color: var(--dash-text);

  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;

  gap: var(--dash-space-2);

  min-width: 0;

  font-size: var(--fs-xs, 12px);

  color: var(--dash-text-muted);

  overflow-wrap: anywhere;
}

.history-meta-dot {
  flex: 0 0 auto;

  width: 3px;
  height: 3px;

  border-radius: var(--dash-radius-circle);

  background:
    var(--text-muted, var(--dash-text-muted));
}

.history-score {
  display: flex;
  flex-direction: column;
  align-items: flex-end;

  gap: 3px;

  min-width: 0;
}

.history-score-value {
  font-size: var(--fs-md, 16px);
  font-weight: var(--fw-bold, 700);

  line-height: 1;

  color: var(--dash-text);

  font-variant-numeric: tabular-nums;
}

.history-score-value small {
  font-size: var(--fs-xs, 12px);
  font-weight: var(--fw-regular, 400);

  color: var(--dash-text-muted);
}

.history-score-status {
  font-size: var(--fs-2xs, 11px);
  font-weight: var(--fw-semibold, 600);

  text-transform: uppercase;

  letter-spacing: var(--ls-wide, .04em);
}

.history-score-status.is-pass {
  color: var(--dash-success);
}

.history-score-status.is-fail {
  color: var(--dash-danger);
}


/* ============================================================
   12. RESULT HERO
   ============================================================ */

.result-hero {
  display: flex;
  flex-direction: column;
  align-items: center;

  gap: var(--dash-space-3);

  margin-bottom: var(--dash-space-5);

  padding:
    var(--dash-space-6)
    var(--dash-space-4);

  border:
    1px solid var(--dash-border);

  border-radius: var(--dash-radius-xl);

  background:
    radial-gradient(
      circle at 50% 0%,
      var(--dash-accent-soft),
      transparent 60%
    ),
    var(--dash-surface);

  text-align: center;
}

.result-hero.is-pass {
  background:
    radial-gradient(
      circle at 50% 0%,
      var(
        --success-muted,
        var(--dash-success-bg)
      ),
      transparent 60%
    ),
    var(--dash-surface);

  border-color:
    var(--success-muted, var(--dash-success));
}

.result-hero.is-fail {
  background:
    radial-gradient(
      circle at 50% 0%,
      var(
        --danger-muted,
        var(--dash-danger-bg)
      ),
      transparent 60%
    ),
    var(--dash-surface);

  border-color:
    var(--danger-muted, var(--dash-danger));
}

.result-hero-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 auto;

  width: 72px;
  height: 72px;

  margin-bottom: var(--dash-space-1);

  border-radius: var(--dash-radius-circle);

  background: var(--dash-accent-muted);

  color: var(--dash-accent);

  font-size: var(--fs-2xl, 30px);
  font-weight: var(--fw-bold, 700);
}

.result-hero-icon svg {
  width: 32px;
  height: 32px;
}

.result-hero.is-pass .result-hero-icon {
  background:
    var(--success-muted, var(--dash-success-bg));

  color: var(--dash-success);
}

.result-hero.is-fail .result-hero-icon {
  background:
    var(--danger-muted, var(--dash-danger-bg));

  color: var(--dash-danger);
}

.result-title {
  margin: 0;

  font-size: var(--fs-lg, 20px);
  font-weight: var(--fw-bold, 700);

  letter-spacing: var(--ls-tight, -.025em);

  color: var(--dash-text);

  overflow-wrap: anywhere;
}

.result-subtitle {
  max-width: 400px;

  margin: 0;

  font-size: var(--fs-sm, 14px);
  line-height: var(--lh-relaxed, 1.65);

  color: var(--dash-text-secondary);
}

.result-score {
  display: flex;
  align-items: baseline;

  gap: var(--dash-space-2);

  margin-top: var(--dash-space-2);
}

.result-score-value {
  font-size: var(--fs-4xl, 48px);
  font-weight: var(--fw-extrabold, 800);

  line-height: 1;

  letter-spacing: var(--ls-tight, -.025em);

  color: var(--dash-text);

  font-variant-numeric: tabular-nums;
}

.result-score-max {
  font-size: var(--fs-md, 16px);
  font-weight: var(--fw-medium, 500);

  color: var(--dash-text-muted);
}

.result-status-badge {
  display: inline-flex;
  align-items: center;

  gap: var(--dash-space-1);

  margin-top: var(--dash-space-1);

  padding:
    var(--dash-space-1)
    var(--dash-space-3);

  border-radius: var(--dash-radius-pill);

  font-size: var(--fs-xs, 12px);
  font-weight: var(--fw-bold, 700);

  text-transform: uppercase;

  letter-spacing: var(--ls-wide, .04em);
}

.result-status-badge.is-pass {
  background: var(--dash-success-bg);

  color: var(--dash-success);

  border:
    1px solid
    var(--success-muted, var(--dash-success));
}

.result-status-badge.is-fail {
  background: var(--dash-danger-bg);

  color: var(--dash-danger);

  border:
    1px solid
    var(--danger-muted, var(--dash-danger));
}


/* ============================================================
   13. RESULT BREAKDOWN
   ============================================================ */

.result-breakdown {
  display: flex;
  flex-direction: column;

  gap: var(--dash-space-3);

  min-width: 0;

  margin-bottom: var(--dash-space-5);
}

.result-category {
  padding: var(--dash-space-4);

  border:
    1px solid var(--dash-border-soft);

  border-radius: var(--dash-radius-md);

  background: var(--dash-surface);
}

.result-category-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;

  gap: var(--dash-space-2);

  margin-bottom: var(--dash-space-2);
}

.result-category-name {
  display: flex;
  align-items: center;
  flex-wrap: wrap;

  gap: var(--dash-space-2);

  min-width: 0;

  margin: 0;

  font-size: var(--fs-sm, 14px);
  font-weight: var(--fw-semibold, 600);

  color: var(--dash-text);

  overflow-wrap: anywhere;
}

.result-category-score {
  flex: 0 0 auto;

  font-size: var(--fs-sm, 14px);
  font-weight: var(--fw-bold, 700);

  color: var(--dash-text);

  font-variant-numeric: tabular-nums;
}

.result-category-score small {
  font-size: var(--fs-xs, 12px);
  font-weight: var(--fw-regular, 400);

  color: var(--dash-text-muted);
}

.result-category-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;

  gap: var(--dash-space-2);

  margin-top: var(--dash-space-1);

  font-size: var(--fs-xs, 12px);

  color: var(--dash-text-muted);
}

.result-category-meta strong {
  color: var(--dash-text-secondary);

  font-weight: var(--fw-semibold, 600);
}

.result-category-meta .is-pass {
  color: var(--dash-success);

  font-weight: var(--fw-semibold, 600);
}

.result-category-meta .is-fail {
  color: var(--dash-danger);

  font-weight: var(--fw-semibold, 600);
}


/* ============================================================
   14. RESULT SUMMARY
   ============================================================ */

.result-summary {
  display: grid;

  grid-template-columns:
    repeat(3, minmax(0, 1fr));

  gap: var(--dash-space-3);

  min-width: 0;

  margin-bottom: var(--dash-space-5);
}

.result-summary-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  gap: var(--dash-space-1);

  min-width: 0;

  padding: var(--dash-space-3);

  border:
    1px solid var(--dash-border-soft);

  border-radius: var(--dash-radius-md);

  background: var(--dash-surface);

  text-align: center;
}

.result-summary-value {
  font-size: var(--fs-xl, 24px);
  font-weight: var(--fw-bold, 700);

  line-height: 1.1;

  color: var(--dash-text);

  font-variant-numeric: tabular-nums;
}

.result-summary-label {
  font-size: var(--fs-2xs, 11px);
  font-weight: var(--fw-semibold, 600);

  color: var(--dash-text-muted);

  text-transform: uppercase;

  letter-spacing: var(--ls-wide, .04em);

  overflow-wrap: anywhere;
}

.result-summary-item.is-correct
.result-summary-value {
  color: var(--dash-success);
}

.result-summary-item.is-wrong
.result-summary-value {
  color: var(--dash-danger);
}

.result-summary-item.is-empty
.result-summary-value {
  color:
    var(--text-muted, var(--dash-text-muted));
}

.result-actions {
  display: flex;
  flex-direction: column;

  gap: var(--dash-space-2);

  margin-top: var(--dash-space-2);
}

.result-actions .btn {
  width: 100%;
  min-width: 0;
  min-height: 44px;
}


/* ============================================================
   15. PROFILE HERO
   ============================================================ */

.profile-hero {
  display: flex;
  flex-direction: column;
  align-items: center;

  gap: var(--dash-space-3);

  margin-bottom: var(--dash-space-5);

  padding:
    var(--dash-space-5)
    var(--dash-space-4);

  border:
    1px solid var(--dash-border-soft);

  border-radius: var(--dash-radius-xl);

  background:
    radial-gradient(
      circle at 50% 0%,
      var(--dash-accent-soft),
      transparent 60%
    ),
    var(--dash-surface);

  text-align: center;
}

.profile-avatar {
  position: relative;

  display: flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 auto;

  width: 96px;
  height: 96px;

  overflow: hidden;

  border:
    3px solid var(--dash-surface);

  border-radius: var(--dash-radius-circle);

  background:
    var(
      --accent-gradient,
      linear-gradient(135deg, #70a6ed, #3884e6)
    );

  color:
    var(--text-on-accent, #06141c);

  box-shadow:
    var(
      --shadow-brand,
      0 6px 20px rgba(112,166,237,.2)
    );

  font-size: var(--fs-2xl, 30px);
  font-weight: var(--fw-extrabold, 800);

  text-transform: uppercase;
}

.profile-avatar img {
  display: block;

  width: 100%;
  height: 100%;

  border-radius: inherit;

  object-fit: cover;
}

.profile-avatar-edit {
  position: absolute;

  right: 0;
  bottom: 0;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 28px;
  height: 28px;

  padding: 0;

  border:
    2px solid var(--dash-surface);

  border-radius: var(--dash-radius-circle);

  background: var(--dash-surface);

  color: var(--dash-accent);

  box-shadow:
    var(--shadow-sm, 0 2px 8px rgba(0,0,0,.15));

  cursor: pointer;

  transition:
    background-color var(--dash-duration-fast) ease,
    color var(--dash-duration-fast) ease;
}

.profile-avatar-edit:hover {
  background: var(--dash-accent);

  color:
    var(--text-on-accent, #06141c);
}

.profile-avatar-edit svg {
  width: 14px;
  height: 14px;
}

.profile-name {
  margin: 0;

  font-size: var(--fs-lg, 20px);
  font-weight: var(--fw-bold, 700);

  line-height: 1.2;

  color: var(--dash-text);

  overflow-wrap: anywhere;
}

.profile-role {
  display: flex;
  align-items: center;
  flex-wrap: wrap;

  gap: var(--dash-space-1);

  margin: 0;

  font-size: var(--fs-xs, 12px);

  color: var(--dash-text-muted);
}


/* ============================================================
   16. PROFILE INFORMATION
   ============================================================ */

.profile-info {
  display: grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: var(--dash-space-3);

  min-width: 0;

  margin-bottom: var(--dash-space-4);
}

.profile-info-item {
  display: flex;
  flex-direction: column;

  gap: 3px;

  padding: var(--dash-space-3);

  border:
    1px solid var(--dash-border-soft);

  border-radius: var(--dash-radius-md);

  background: var(--dash-surface);
}

.profile-info-label {
  font-size: var(--fs-2xs, 11px);
  font-weight: var(--fw-semibold, 600);

  color: var(--dash-text-muted);

  text-transform: uppercase;

  letter-spacing: var(--ls-wide, .04em);
}

.profile-info-value {
  font-size: var(--fs-sm, 14px);
  font-weight: var(--fw-medium, 500);

  color: var(--dash-text);

  overflow-wrap: anywhere;
}


/* ============================================================
   17. PROFILE MENU
   ============================================================ */

.profile-menu {
  display: flex;
  flex-direction: column;

  overflow: hidden;

  margin-bottom: var(--dash-space-4);

  border:
    1px solid var(--dash-border-soft);

  border-radius: var(--dash-radius-md);

  background: var(--dash-surface);
}

.profile-menu-item {
  display: flex;
  align-items: center;

  gap: var(--dash-space-3);

  width: 100%;
  min-width: 0;
  min-height: 56px;

  padding:
    var(--dash-space-3)
    var(--dash-space-4);

  border: 0;

  border-bottom:
    1px solid var(--dash-border-soft);

  background: transparent;

  color: var(--dash-text-secondary);

  font: inherit;
  font-size: var(--fs-sm, 14px);

  text-align: left;
  text-decoration: none;

  cursor: pointer;

  transition:
    background-color var(--dash-duration-fast) ease,
    color var(--dash-duration-fast) ease;
}

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

@media (hover: hover) {
  .profile-menu-item:hover {
    background: var(--dash-hover);

    color: var(--dash-text);

    text-decoration: none;
  }
}

.profile-menu-item.is-danger {
  color: var(--dash-danger);
}

.profile-menu-item.is-danger:hover {
  background: var(--dash-danger-bg);
}

.profile-menu-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 auto;

  width: 32px;
  height: 32px;

  border-radius: var(--dash-radius-sm);

  background: var(--dash-muted-bg);

  color: inherit;
}

.profile-menu-icon svg {
  width: 16px;
  height: 16px;
}

.profile-menu-content {
  flex: 1 1 auto;

  min-width: 0;
}

.profile-menu-title {
  font-size: var(--fs-sm, 14px);
  font-weight: var(--fw-medium, 500);

  color: inherit;

  overflow-wrap: anywhere;
}

.profile-menu-subtitle {
  margin-top: 2px;

  font-size: var(--fs-xs, 12px);

  color: var(--dash-text-muted);

  overflow-wrap: anywhere;
}

.profile-menu-arrow {
  display: inline-flex;

  flex: 0 0 auto;

  color:
    var(--text-muted, var(--dash-text-muted));
}

.profile-menu-arrow svg {
  width: 16px;
  height: 16px;
}


/* ============================================================
   18. ARTICLE GRID & CARDS
   ============================================================ */

.article-grid {
  display: grid;

  grid-template-columns:
    repeat(
      auto-fill,
      minmax(min(100%, 280px), 1fr)
    );

  gap: var(--dash-space-3);

  min-width: 0;
}

.article-card {
  display: flex;
  flex-direction: column;

  overflow: hidden;

  border:
    1px solid var(--dash-border-soft);

  border-radius: var(--dash-radius-lg);

  background: var(--dash-surface);

  color: inherit;

  text-decoration: none;

  transition:
    transform var(--dash-duration-base) var(--dash-ease),
    border-color var(--dash-duration-base) var(--dash-ease),
    box-shadow var(--dash-duration-base) var(--dash-ease);
}

@media (hover: hover) {
  .article-card:hover {
    transform: translateY(-2px);

    border-color: var(--dash-border);

    box-shadow: var(--dash-shadow);

    color: inherit;

    text-decoration: none;
  }
}

.article-cover {
  position: relative;

  width: 100%;

  aspect-ratio: 16 / 9;

  overflow: hidden;

  background: var(--dash-surface-2);
}

.article-cover img {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;
}

.article-cover-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  height: 100%;

  background:
    var(
      --accent-gradient,
      linear-gradient(135deg, #70a6ed, #3884e6)
    );

  color:
    var(--text-on-accent, #06141c);

  font-size: var(--fs-3xl, 36px);
  font-weight: var(--fw-extrabold, 800);
}

.article-body {
  display: flex;
  flex-direction: column;

  flex: 1 1 auto;

  gap: var(--dash-space-2);

  min-width: 0;

  padding: var(--dash-space-4);
}

.article-category {
  font-size: var(--fs-2xs, 11px);
  font-weight: var(--fw-semibold, 600);

  color: var(--dash-accent);

  text-transform: uppercase;

  letter-spacing: var(--ls-wider, .08em);
}

.article-title {
  display: -webkit-box;

  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;

  overflow: hidden;

  margin: 0;

  font-size: var(--fs-md, 16px);
  font-weight: var(--fw-semibold, 600);

  line-height: 1.35;

  color: var(--dash-text);

  overflow-wrap: anywhere;
}

.article-excerpt {
  display: -webkit-box;

  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;

  overflow: hidden;

  margin: 0;

  font-size: var(--fs-xs, 12px);
  line-height: var(--lh-relaxed, 1.65);

  color: var(--dash-text-muted);

  overflow-wrap: anywhere;
}

.article-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;

  gap: var(--dash-space-2);

  margin-top: auto;

  padding-top: var(--dash-space-2);

  font-size: var(--fs-2xs, 11px);

  color:
    var(--text-muted, var(--dash-text-muted));
}

.article-meta-dot {
  flex: 0 0 auto;

  width: 3px;
  height: 3px;

  border-radius: var(--dash-radius-circle);

  background: currentColor;
}


/* ============================================================
   19. ARTICLE DETAILS
   ============================================================ */

.article-detail {
  width: 100%;
  max-width: 720px;

  min-width: 0;

  margin: 0 auto;
}

.article-detail-cover {
  display: block;

  width: 100%;
  height: auto;

  aspect-ratio: 16 / 9;

  margin-bottom: var(--dash-space-4);

  border-radius: var(--dash-radius-lg);

  object-fit: cover;
}

.article-detail-title {
  margin: 0 0 var(--dash-space-3);

  font-size: var(--fs-2xl, 30px);
  font-weight: var(--fw-bold, 700);

  line-height: 1.2;

  letter-spacing: var(--ls-tight, -.025em);

  color: var(--dash-text);

  overflow-wrap: anywhere;
}

.article-detail-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;

  gap: var(--dash-space-2);

  margin-bottom: var(--dash-space-4);

  font-size: var(--fs-xs, 12px);

  color: var(--dash-text-muted);
}

.article-detail-content {
  min-width: 0;

  font-size: var(--fs-base, 16px);
  line-height: var(--lh-relaxed, 1.7);

  color: var(--dash-text-secondary);

  overflow-wrap: anywhere;
}

.article-detail-content h1,
.article-detail-content h2,
.article-detail-content h3,
.article-detail-content h4 {
  margin-top: var(--dash-space-6);
  margin-bottom: var(--dash-space-3);

  line-height: var(--lh-heading, 1.3);

  letter-spacing: var(--ls-tight, -.025em);

  color: var(--dash-text);
}

.article-detail-content h1 {
  margin-top: var(--dash-space-8);

  font-size: var(--fs-2xl, 30px);
}

.article-detail-content h2 {
  font-size: var(--fs-xl, 24px);
}

.article-detail-content h3 {
  font-size: var(--fs-lg, 20px);
}

.article-detail-content h4 {
  font-size: var(--fs-md, 16px);
}

.article-detail-content > *:first-child {
  margin-top: 0;
}

.article-detail-content p {
  margin: 0 0 var(--dash-space-4);
}

.article-detail-content ul,
.article-detail-content ol {
  margin: 0 0 var(--dash-space-4);

  padding-left: var(--dash-space-6);
}

.article-detail-content ul {
  list-style: disc;
}

.article-detail-content ol {
  list-style: decimal;
}

.article-detail-content li {
  margin-bottom: var(--dash-space-2);
}

.article-detail-content li:last-child {
  margin-bottom: 0;
}

.article-detail-content li > ul,
.article-detail-content li > ol {
  margin-top: var(--dash-space-2);
}

.article-detail-content strong,
.article-detail-content b {
  color: var(--dash-text);

  font-weight: var(--fw-semibold, 600);
}

.article-detail-content a {
  color:
    var(--text-link, var(--dash-accent));

  text-decoration: underline;

  text-underline-offset: 3px;

  overflow-wrap: anywhere;
}

.article-detail-content a:hover {
  color:
    var(--text-brand, var(--dash-accent-hover));
}

.article-detail-content a:focus-visible {
  outline: 2px solid var(--dash-focus);
  outline-offset: 3px;
}

.article-detail-content code {
  padding: 2px 6px;

  border-radius:
    var(--radius-xs, 4px);

  background:
    var(--bg-code, var(--dash-surface-2));

  color:
    var(--text-brand, var(--dash-accent));

  font-size: .9em;

  overflow-wrap: anywhere;
}

.article-detail-content pre {
  max-width: 100%;

  overflow-x: auto;

  margin: 0 0 var(--dash-space-4);

  padding: var(--dash-space-4);

  border:
    1px solid var(--dash-border-soft);

  border-radius: var(--dash-radius-md);

  background: var(--dash-surface-2);

  font-size: var(--fs-sm, 14px);
  line-height: var(--lh-relaxed, 1.65);

  tab-size: 2;

  -webkit-overflow-scrolling: touch;
}

.article-detail-content pre code {
  padding: 0;

  background: transparent;

  color: var(--dash-text);

  white-space: pre;

  overflow-wrap: normal;
}

.article-detail-content blockquote {
  margin: var(--dash-space-4) 0;

  padding:
    var(--dash-space-3)
    var(--dash-space-5);

  border-left:
    4px solid var(--dash-accent);

  border-radius:
    0
    var(--dash-radius-md)
    var(--dash-radius-md)
    0;

  background: var(--dash-muted-bg);

  color: var(--dash-text-secondary);

  font-style: italic;
}

.article-detail-content img {
  display: block;

  max-width: 100%;
  height: auto;

  margin: var(--dash-space-4) 0;

  border-radius: var(--dash-radius-md);
}

.article-detail-content hr {
  height: 1px;

  margin: var(--dash-space-6) 0;

  border: 0;

  background: var(--dash-border);
}


/* ============================================================
   20. ARTICLE TABLES
   ============================================================ */

.article-detail-content table {
  display: block;

  width: 100%;
  max-width: 100%;

  overflow-x: auto;

  margin: var(--dash-space-4) 0;

  border:
    1px solid var(--dash-border);

  border-radius: var(--dash-radius-md);

  border-collapse: separate;
  border-spacing: 0;

  font-size: var(--fs-sm, 14px);

  -webkit-overflow-scrolling: touch;
}

.article-detail-content th,
.article-detail-content td {
  padding:
    var(--dash-space-2)
    var(--dash-space-3);

  border-bottom:
    1px solid var(--dash-border-soft);

  text-align: left;
  vertical-align: top;

  white-space: normal;
}

.article-detail-content th {
  background: var(--dash-surface-2);

  color: var(--dash-text);

  font-size: var(--fs-xs, 12px);
  font-weight: var(--fw-semibold, 600);

  text-transform: uppercase;

  letter-spacing: var(--ls-wide, .04em);
}

.article-detail-content tr:last-child td {
  border-bottom: 0;
}


/* ============================================================
   21. FAQ ACCORDION
   ============================================================ */

.faq-list {
  display: flex;
  flex-direction: column;

  gap: var(--dash-space-2);

  min-width: 0;
}

.faq-item {
  overflow: hidden;

  border:
    1px solid var(--dash-border-soft);

  border-radius: var(--dash-radius-md);

  background: var(--dash-surface);

  transition:
    border-color var(--dash-duration-fast) ease,
    background-color var(--dash-duration-fast) ease;
}

.faq-item.is-open {
  border-color: var(--dash-border);

  background: var(--dash-surface-2);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: var(--dash-space-3);

  width: 100%;
  min-height: 52px;

  padding:
    var(--dash-space-3)
    var(--dash-space-4);

  border: 0;

  background: transparent;

  color: var(--dash-text);

  font: inherit;
  font-size: var(--fs-sm, 14px);
  font-weight: var(--fw-medium, 500);

  text-align: left;

  cursor: pointer;

  transition:
    background-color var(--dash-duration-fast) ease;
}

@media (hover: hover) {
  .faq-question:hover {
    background: var(--dash-hover);
  }
}

.faq-question:focus-visible {
  outline: 2px solid var(--dash-focus);

  outline-offset: -2px;
}

.faq-question-text {
  flex: 1 1 auto;

  min-width: 0;

  overflow-wrap: anywhere;
}

.faq-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 auto;

  width: 20px;
  height: 20px;

  color: var(--dash-text-muted);

  transition:
    transform var(--dash-duration-base) var(--dash-ease),
    color var(--dash-duration-base) ease;
}

.faq-icon svg {
  width: 16px;
  height: 16px;
}

.faq-item.is-open .faq-icon {
  transform: rotate(180deg);

  color: var(--dash-accent);
}

.faq-answer {
  display: grid;

  grid-template-rows: 0fr;

  transition:
    grid-template-rows
    var(--dash-duration-base)
    var(--dash-ease);
}

.faq-item.is-open .faq-answer {
  grid-template-rows: 1fr;
}

.faq-answer-inner {
  min-height: 0;

  overflow: hidden;

  padding:
    0
    var(--dash-space-4);

  font-size: var(--fs-xs, 12px);
  line-height: var(--lh-relaxed, 1.65);

  color: var(--dash-text-secondary);
}

.faq-item.is-open .faq-answer-inner {
  padding-bottom: var(--dash-space-4);
}

.faq-answer-inner p {
  margin: 0 0 var(--dash-space-2);
}

.faq-answer-inner p:last-child {
  margin-bottom: 0;
}

.faq-answer-inner ul,
.faq-answer-inner ol {
  margin: 0 0 var(--dash-space-2);

  padding-left: var(--dash-space-5);
}

.faq-answer-inner a {
  color:
    var(--text-link, var(--dash-accent));

  text-decoration: underline;

  text-underline-offset: 2px;
}


/* ============================================================
   22. RECOMMENDATIONS
   ============================================================ */

.reco-list {
  display: flex;
  flex-direction: column;

  gap: var(--dash-space-2);

  min-width: 0;
}

.reco-item {
  display: flex;
  align-items: center;

  gap: var(--dash-space-3);

  min-width: 0;
  min-height: 64px;

  padding:
    var(--dash-space-3)
    var(--dash-space-4);

  border:
    1px solid var(--dash-border-soft);

  border-radius: var(--dash-radius-md);

  background: var(--dash-surface);

  color: inherit;

  text-decoration: none;

  transition:
    background-color var(--dash-duration-fast) ease,
    border-color var(--dash-duration-fast) ease;
}

@media (hover: hover) {
  .reco-item:hover {
    background: var(--dash-surface-2);

    border-color: var(--dash-border);

    color: inherit;

    text-decoration: none;
  }
}

.reco-item-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 auto;

  width: 40px;
  height: 40px;

  border-radius: var(--dash-radius-md);

  background: var(--dash-accent-muted);

  color: var(--dash-accent);
}

.reco-item-icon svg {
  width: 20px;
  height: 20px;
}

.reco-item-content {
  flex: 1 1 auto;

  min-width: 0;
}

.reco-item-title {
  margin: 0 0 2px;

  font-size: var(--fs-sm, 14px);
  font-weight: var(--fw-semibold, 600);

  color: var(--dash-text);

  overflow-wrap: anywhere;
}

.reco-item-desc {
  margin: 0;

  font-size: var(--fs-xs, 12px);
  line-height: 1.4;

  color: var(--dash-text-muted);

  overflow-wrap: anywhere;
}

.reco-item-action {
  flex: 0 0 auto;

  color:
    var(--text-muted, var(--dash-text-muted));
}

.reco-item-action svg {
  width: 16px;
  height: 16px;
}


/* ============================================================
   23. DASHBOARD STATISTICS
   ============================================================ */

.dash-stats {
  display: grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: var(--dash-space-3);

  min-width: 0;

  margin-bottom: var(--dash-space-5);
}


/* ============================================================
   24. RESPONSIVE — DESKTOP
   ============================================================ */

@media (min-width: 768px) {

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

  .result-actions {
    flex-direction: row;
  }

  .result-actions .btn {
    flex: 1 1 0;

    width: auto;
  }

}


/* ============================================================
   25. RESPONSIVE — TABLET
   ============================================================ */

@media (max-width: 767px) {

  .dash-hero {
    padding: var(--dash-space-4);
  }

  .dash-greeting-name {
    font-size: var(--fs-lg, 20px);
  }

  .dash-hero-avatar {
    width: 56px;
    height: 56px;

    font-size: var(--fs-lg, 20px);
  }

  .dash-action {
    min-height: 88px;
  }

  .result-score-value {
    font-size: var(--fs-3xl, 36px);
  }

  .article-detail-title {
    font-size: var(--fs-xl, 24px);
  }

}


/* ============================================================
   26. RESPONSIVE — MOBILE
   ============================================================ */

@media (max-width: 480px) {

  .dash-hero {
    padding: var(--dash-space-4);
  }

  .dash-hero-inner {
    gap: var(--dash-space-3);
  }

  .dash-greeting {
    flex-basis: 160px;
  }

  .dash-greeting-name {
    font-size: var(--fs-lg, 20px);
  }

  .dash-hero-avatar {
    width: 52px;
    height: 52px;

    font-size: var(--fs-md, 16px);
  }

  .dash-subs-action,
  .dash-resume-action {
    width: 100%;

    flex: 1 1 100%;
  }

  .dash-subs-action .btn,
  .dash-resume-action .btn {
    width: 100%;
    min-height: 44px;
  }

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

    gap: var(--dash-space-1);
  }

  .dash-action {
    min-height: 82px;

    gap: var(--dash-space-1);

    padding:
      var(--dash-space-2)
      var(--dash-space-1);

    border-radius: var(--dash-radius-md);
  }

  .dash-action-icon {
    width: 34px;
    height: 34px;
  }

  .dash-action-icon svg {
    width: 18px;
    height: 18px;
  }

  .dash-action-label {
    font-size: 10px;
    line-height: 1.3;
  }

  .exam-list,
  .article-grid {
    grid-template-columns:
      minmax(0, 1fr);
  }

  .exam-filters {
    padding: var(--dash-space-3);
  }

  .exam-search {
    flex: 1 1 100%;
  }

  .history-item {
    grid-template-columns:
      40px minmax(0, 1fr);

    gap: var(--dash-space-2);

    padding: var(--dash-space-3);
  }

  .history-icon {
    width: 40px;
    height: 40px;

    font-size: var(--fs-sm, 14px);
  }

  .history-score {
    grid-column: 1 / -1;

    flex-direction: row;
    align-items: center;
    justify-content: space-between;

    gap: var(--dash-space-2);

    padding-top: var(--dash-space-2);

    border-top:
      1px solid var(--dash-border-soft);
  }

  .result-hero {
    padding:
      var(--dash-space-5)
      var(--dash-space-3);
  }

  .result-score-value {
    font-size: var(--fs-3xl, 36px);
  }

  .result-summary {
    gap: var(--dash-space-2);
  }

  .result-summary-item {
    padding: var(--dash-space-2);
  }

  .profile-avatar {
    width: 80px;
    height: 80px;

    font-size: var(--fs-xl, 24px);
  }

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

  .article-detail-title {
    font-size: var(--fs-xl, 24px);
  }

  .article-detail-content {
    font-size: 15px;
  }

}


/* ============================================================
   27. RESPONSIVE — SMALL MOBILE
   ============================================================ */

@media (max-width: 360px) {

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

    gap: var(--dash-space-2);
  }

  .dash-action {
    min-height: 84px;
  }

  .dash-action-label {
    font-size: var(--fs-xs, 12px);
  }

  .dash-hero-inner {
    gap: var(--dash-space-2);
  }

  .dash-hero-avatar {
    width: 46px;
    height: 46px;
  }

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

    gap: var(--dash-space-1);
  }

  .result-summary-item {
    padding: var(--dash-space-2);
  }

  .result-summary-value {
    font-size: var(--fs-md, 16px);
  }

  .result-summary-label {
    font-size: 10px;
  }

  .exam-card {
    padding: var(--dash-space-3);
  }

  .profile-menu-item {
    padding:
      var(--dash-space-3)
      var(--dash-space-2);
  }

}


/* ============================================================
   28. TOUCH DEVICES
   ============================================================ */

@media (pointer: coarse) {

  .dash-section-action {
    min-height: 40px;
  }

  .dash-action {
    min-height: 80px;
  }

  .faq-question {
    min-height: 48px;
  }

  .profile-menu-item {
    min-height: 56px;
  }

  .result-actions .btn {
    min-height: 44px;
  }

}


/* ============================================================
   29. REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {

  .dash-resume-icon {
    animation: none !important;
  }

  .dash-action,
  .exam-card,
  .history-item,
  .article-card,
  .faq-item,
  .faq-question,
  .faq-answer,
  .faq-icon,
  .reco-item,
  .profile-menu-item,
  .profile-avatar-edit {
    transition: none !important;
  }

  .dash-action:hover,
  .exam-card:hover,
  .article-card:hover {
    transform: none !important;
  }

}


/* ============================================================
   30. PRINT
   ============================================================ */

@media print {

  .dash-hero,
  .dash-subs,
  .dash-resume,
  .dash-actions,
  .profile-hero,
  .result-hero {
    background: #ffffff !important;

    border:
      1px solid #cccccc !important;

    box-shadow: none !important;
  }

  .dash-resume::before,
  .dash-hero::after {
    display: none !important;
  }

  .result-status-badge,
  .history-score-status {
    border: 1px solid currentColor;
  }

  .exam-card,
  .article-card,
  .history-item,
  .reco-item,
  .result-category,
  .result-summary-item {
    background: #ffffff !important;

    box-shadow: none !important;

    break-inside: avoid;
  }

  .exam-card:hover,
  .article-card:hover,
  .history-item:hover,
  .reco-item:hover {
    transform: none !important;

    box-shadow: none !important;
  }

  .faq-answer {
    grid-template-rows: 1fr !important;
  }

  .faq-answer-inner {
    overflow: visible !important;

    padding-bottom: var(--dash-space-4) !important;
  }

  .article-detail-content {
    color: #000000 !important;
  }

  .article-detail-content h1,
  .article-detail-content h2,
  .article-detail-content h3,
  .article-detail-content h4 {
    color: #000000 !important;
  }

}


/* ============================================================
   END OF FILE
   CAT ACADEMY IMIPAS
   css/dashboard.css v3.0
   ============================================================ */
