/**
 * Level System — profile & post author badge
 */

.deps-level-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1;
  border: 1px solid rgba(0, 0, 0, 0.08);
  margin-left: 4px;
  vertical-align: middle;
  cursor: help;
  font-weight: 600;
  text-shadow: none;
}

.deps-level-badge.is-numeric {
  width: auto;
  min-width: 22px;
  padding: 0 5px;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

/* Post feed avatar — bottom-left corner, half overlapping the picture */
.post-avatar {
  overflow: visible;
}

.post-avatar .deps-level-badge-post-avatar {
  position: absolute;
  bottom: 0;
  inset-inline-start: 0;
  inset-inline-end: auto;
  top: auto;
  transform: translate(-25%, 25%);
  z-index: 4;
  margin: 0;
  width: 18px;
  height: 18px;
  font-size: 10px;
  line-height: 1;
  border: 2px solid var(--bs-body-bg, #fff);
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  pointer-events: auto;
}

.post-avatar .deps-level-badge-post-avatar.is-numeric {
  min-width: 18px;
  padding: 0 3px;
  font-size: 9px;
}

.post-avatar-picture.small + .deps-level-badge-post-avatar {
  width: 14px;
  height: 14px;
  min-width: 14px;
  font-size: 8px;
  border-width: 1px;
  transform: translate(-20%, 20%);
}

.reel-actions .post-avatar .deps-level-badge-post-avatar {
  transform: translate(-22%, 22%);
}

body.night-mode .post-avatar .deps-level-badge-post-avatar {
  border-color: var(--card-dark-color, #262d34);
}

.deps-level-badge-profile-header,
.deps-level-badge-profile-name {
  margin-left: 0;
  margin-top: 0;
}

/* Profile page avatar — bottom-left corner overlay */
.profile-avatar-wrapper {
  overflow: visible;
}

.profile-avatar-wrapper .deps-level-avatar-link {
  position: absolute;
  bottom: 4px;
  inset-inline-start: 4px;
  inset-inline-end: auto;
  top: auto;
  transform: translate(-15%, 15%);
  z-index: 6;
  line-height: 1;
  text-decoration: none;
}

.deps-level-badge-profile-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  min-width: 26px;
  margin: 0;
  padding: 0;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.28);
  cursor: pointer;
}

.deps-level-badge-profile-avatar.is-numeric {
  width: auto;
  min-width: 26px;
  padding: 0 6px;
  font-variant-numeric: tabular-nums;
}

body.night-mode .deps-level-badge-profile-avatar {
  border-color: var(--body-bg-color-dark, #1e252b);
}

.deps-level-avatar-link:hover .deps-level-badge-profile-avatar {
  transform: scale(1.05);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.32);
}

.deps-level-badge-profile-avatar {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

@media (min-width: 768px) {
  .profile-avatar-wrapper .deps-level-avatar-link {
    bottom: 6px;
    inset-inline-start: 6px;
  }

  .deps-level-badge-profile-avatar {
    width: 30px;
    height: 30px;
    min-width: 30px;
    font-size: 13px;
    border-radius: 9px;
  }

  .deps-level-badge-profile-avatar.is-numeric {
    min-width: 30px;
    padding: 0 7px;
  }
}

@media (min-width: 992px) {
  .profile-avatar-wrapper .deps-level-avatar-link {
    bottom: 8px;
    inset-inline-start: 8px;
  }

  .deps-level-badge-profile-avatar {
    width: 32px;
    height: 32px;
    min-width: 32px;
    font-size: 14px;
  }

  .deps-level-badge-profile-avatar.is-numeric {
    min-width: 32px;
  }
}

.deps-level-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  vertical-align: middle;
}

.deps-level-link:hover {
  opacity: 0.92;
  text-decoration: none;
}

.deps-level-badge-profile-page {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  font-size: 1.35rem;
  margin: 0;
}

.deps-level-badge-profile-page.is-numeric {
  min-width: 56px;
  padding: 0 10px;
  font-size: 1.25rem;
}

.deps-level-profile {
  border: 1px solid var(--bs-border-color, #dee2e6);
  margin-bottom: 20px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.deps-level-profile-head {
  padding-top: 1rem;
  padding-bottom: 1rem;
  background: linear-gradient(180deg, rgba(13, 110, 253, 0.04) 0%, transparent 100%);
}

.deps-level-help {
  border-top: 1px dashed var(--bs-border-color-translucent, rgba(0, 0, 0, 0.12));
  padding-top: 1rem;
}

.deps-level-help-trigger {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: 10px;
  background: var(--bs-body-bg, #fff);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.deps-level-help-trigger:hover {
  border-color: rgba(13, 110, 253, 0.35);
  box-shadow: 0 2px 8px rgba(13, 110, 253, 0.08);
}

.deps-level-help-trigger[aria-expanded="true"] {
  border-color: rgba(13, 110, 253, 0.4);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  background: rgba(13, 110, 253, 0.03);
}

.deps-level-help-trigger-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(13, 110, 253, 0.1);
  color: var(--bs-primary, #0d6efd);
  flex-shrink: 0;
  font-size: 1rem;
}

.deps-level-help-trigger-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1 1 auto;
  min-width: 0;
}

.deps-level-help-trigger-text strong {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--bs-body-color, #212529);
}

.deps-level-help-trigger-text span {
  font-size: 0.75rem;
  color: var(--bs-secondary-color, #6c757d);
  line-height: 1.35;
}

.deps-level-help-chevron {
  color: var(--bs-secondary-color, #6c757d);
  font-size: 0.75rem;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.deps-level-help-trigger[aria-expanded="true"] .deps-level-help-chevron {
  transform: rotate(180deg);
  color: var(--bs-primary, #0d6efd);
}

.deps-level-help-body {
  border: 1px solid rgba(13, 110, 253, 0.4);
  border-top: none;
  border-radius: 0 0 10px 10px;
  background: var(--bs-body-bg, #fff);
  padding: 12px;
}

.deps-level-help-pending {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
  border-radius: 8px;
  background: rgba(255, 193, 7, 0.1);
  border: 1px solid rgba(255, 193, 7, 0.22);
}

.deps-level-help-pending-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 193, 7, 0.2);
  color: #9a6700;
  flex-shrink: 0;
}

.deps-level-help-pending strong {
  display: block;
  font-size: 0.8125rem;
  color: #9a6700;
  margin-bottom: 2px;
}

.deps-level-help-pending p {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--bs-secondary-color, #6c757d);
}

.deps-level-help-accordion {
  --bs-accordion-border-radius: 8px;
  --bs-accordion-inner-border-radius: 8px;
}

.deps-level-help-item {
  border: 1px solid var(--bs-border-color-translucent, rgba(0, 0, 0, 0.1));
  border-radius: 8px !important;
  overflow: hidden;
  background: transparent;
}

.deps-level-help-item + .deps-level-help-item {
  margin-top: 8px;
}

.deps-level-help-item .accordion-button {
  padding: 10px 12px;
  font-size: 0.8125rem;
  font-weight: 600;
  gap: 8px;
  background: var(--bs-light, #f8f9fa);
  box-shadow: none;
}

.deps-level-help-item .accordion-button:not(.collapsed) {
  color: var(--bs-primary, #0d6efd);
  background: rgba(13, 110, 253, 0.06);
}

.deps-level-help-item .accordion-button::after {
  width: 0.9rem;
  height: 0.9rem;
  background-size: 0.9rem;
}

.deps-level-help-item-icon {
  width: 18px;
  text-align: center;
  color: var(--bs-primary, #0d6efd);
  flex-shrink: 0;
}

.deps-level-help-item .accordion-body {
  padding: 10px 12px 12px;
}

.deps-level-help-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.deps-level-help-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--bs-secondary-color, #6c757d);
}

.deps-level-help-list li .fa-check {
  margin-top: 3px;
  font-size: 0.625rem;
  color: var(--bs-success, #198754);
  flex-shrink: 0;
}

body.night-mode .deps-level-help-trigger {
  background: var(--card-dark-color, #262d34);
  border-color: var(--card-dark-divider, #3a4249);
}

body.night-mode .deps-level-help-trigger[aria-expanded="true"] {
  background: rgba(13, 110, 253, 0.1);
}

body.night-mode .deps-level-help-body {
  background: var(--card-dark-color, #262d34);
  border-color: rgba(13, 110, 253, 0.35);
}

body.night-mode .deps-level-help-item {
  border-color: var(--card-dark-divider, #3a4249);
}

body.night-mode .deps-level-help-item .accordion-button {
  background: var(--card-dark-input, #2a3138);
  color: var(--bs-body-color, #e9ecef);
}

body.night-mode .deps-level-help-item .accordion-button:not(.collapsed) {
  background: rgba(13, 110, 253, 0.14);
}

body.night-mode .deps-level-help-pending {
  background: rgba(255, 193, 7, 0.08);
  border-color: rgba(255, 193, 7, 0.18);
}

body.night-mode .deps-level-help-pending strong {
  color: #f0c14d;
}

.deps-level-badge-profile-page.is-unranked {
  opacity: 0.85;
}

.deps-level-definitions-table-wrap {
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: 10px;
  overflow: hidden;
}

/* Level journey — balanced compact cards */
.deps-level-journey {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.deps-level-step {
  padding: 10px 12px;
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: 10px;
  background: var(--bs-body-bg, #fff);
}

.deps-level-step-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.deps-level-badge-step {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 9px;
  font-size: 0.8125rem;
  margin: 0;
  flex-shrink: 0;
}

.deps-level-badge-step.is-numeric {
  min-width: 32px;
  padding: 0 5px;
  font-size: 0.75rem;
}

.deps-level-step-info {
  flex: 1 1 auto;
  min-width: 0;
}

.deps-level-step-name {
  display: block;
  font-size: 0.875rem;
  line-height: 1.25;
}

.deps-level-step-sub {
  display: block;
  font-size: 0.6875rem;
  color: var(--bs-secondary-color, #6c757d);
  margin-top: 1px;
}

.deps-level-step-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.deps-level-step-tag {
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--bs-secondary-color, #6c757d);
}

.deps-level-step--current {
  border-color: var(--deps-level-accent, var(--bs-primary, #0d6efd));
  box-shadow: inset 3px 0 0 var(--deps-level-accent, var(--bs-primary, #0d6efd));
}

.deps-level-step--current .deps-level-step-tag {
  color: var(--deps-level-accent, var(--bs-primary, #0d6efd));
}

.deps-level-step--target {
  border-color: rgba(255, 193, 7, 0.45);
  box-shadow: inset 3px 0 0 #ffc107;
}

.deps-level-step--target .deps-level-step-tag {
  color: #9a6700;
}

.deps-level-step--claimable {
  border-color: rgba(25, 135, 84, 0.4);
  box-shadow: inset 3px 0 0 var(--bs-success, #198754);
}

.deps-level-step--claimable .deps-level-step-tag {
  color: var(--bs-success, #198754);
}

.deps-level-step--completed {
  opacity: 0.85;
}

.deps-level-step--locked {
  opacity: 0.78;
}

.deps-level-step-criteria {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--bs-border-color-translucent, rgba(0, 0, 0, 0.1));
}

.deps-level-crit-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.6875rem;
  line-height: 1.3;
  background: var(--bs-light, #f1f3f5);
  color: var(--bs-body-color, #212529);
  border: 1px solid transparent;
}

.deps-level-crit-chip.is-met {
  background: rgba(25, 135, 84, 0.1);
  border-color: rgba(25, 135, 84, 0.2);
  color: var(--bs-success, #198754);
}

.deps-level-crit-chip.is-met .fa-check-circle {
  color: var(--bs-success, #198754);
}

.deps-level-crit-chip.is-muted {
  opacity: 0.85;
}

.deps-level-crit-chip .fa-circle {
  font-size: 0.5rem;
  color: var(--bs-secondary-color, #adb5bd);
}

.deps-level-crit-chip-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 140px;
}

.deps-level-crit-chip-val {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.deps-level-step-empty {
  margin-top: 6px;
}

/* legacy compact rows (sidebar) */
.deps-level-roadmap--compact {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: 10px;
  overflow: hidden;
}

.deps-level-row {
  padding: 8px 10px;
  border-bottom: 1px solid var(--bs-border-color-translucent, rgba(0, 0, 0, 0.08));
  background: var(--bs-body-bg, #fff);
}

.deps-level-row:last-child {
  border-bottom: none;
}

.deps-level-row-top {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
}

.deps-level-badge-row {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 8px;
  font-size: 0.75rem;
  margin: 0;
  flex-shrink: 0;
}

.deps-level-badge-row.is-numeric {
  min-width: 28px;
  padding: 0 4px;
  font-size: 0.6875rem;
}

.deps-level-row-main {
  flex: 1 1 auto;
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}

.deps-level-row-name {
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.deps-level-row-lv {
  font-size: 0.6875rem;
  color: var(--bs-secondary-color, #6c757d);
  flex-shrink: 0;
}

.deps-level-row-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.deps-level-row-tag {
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding: 0.15em 0.45em;
  border-radius: 4px;
  line-height: 1.3;
}

.deps-level-row-tag.is-current { color: var(--bs-primary, #0d6efd); background: rgba(13, 110, 253, 0.1); }
.deps-level-row-tag.is-target { color: #9a6700; background: rgba(255, 193, 7, 0.15); }
.deps-level-row-tag.is-claimable { color: var(--bs-success, #198754); background: rgba(25, 135, 84, 0.12); }
.deps-level-row-tag.is-completed { color: var(--bs-success, #198754); background: rgba(25, 135, 84, 0.08); }

.deps-level-row--current { background: rgba(13, 110, 253, 0.04); }
.deps-level-row--target { background: rgba(255, 193, 7, 0.05); }
.deps-level-row--claimable { background: rgba(25, 135, 84, 0.04); }
.deps-level-row--completed,
.deps-level-row--locked { opacity: 0.72; }

.deps-level-row-criteria {
  list-style: none;
  padding: 6px 0 2px 36px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.deps-level-row-crit-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.6875rem;
  color: var(--bs-secondary-color, #6c757d);
  margin-bottom: 2px;
}

.deps-level-row-crit.is-met .deps-level-row-crit-head span:last-child {
  color: var(--bs-success, #198754);
  font-weight: 600;
}

.deps-level-progress-mini {
  height: 3px;
  border-radius: 99px;
  background: var(--bs-border-color-translucent, rgba(0, 0, 0, 0.08));
}

.deps-level-row-hint {
  padding: 2px 0 0 36px;
}

.deps-level-recent-compact {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.deps-level-recent-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px 3px 3px;
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: 999px;
  font-size: 0.6875rem;
  color: inherit;
  background: var(--bs-body-bg, #fff);
  max-width: 100%;
}

.deps-level-recent-chip-name {
  max-width: 88px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deps-level-badge-chip {
  width: 18px;
  height: 18px;
  min-width: 18px;
  border-radius: 5px;
  font-size: 0.625rem;
  margin: 0;
}

.deps-level-badge-chip.is-numeric {
  min-width: 18px;
  padding: 0 3px;
}

.xsmall {
  font-size: 0.6875rem;
}

/* legacy card styles kept for sidebar widget */
.deps-level-roadmap:not(.deps-level-roadmap--compact) {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.deps-level-definitions-table {
  font-size: 0.875rem;
  margin-bottom: 0;
}

.deps-level-definitions-table thead th {
  background: var(--bs-light, #f8f9fa);
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
}

.deps-level-definitions-table tbody tr.is-current {
  background-color: rgba(13, 110, 253, 0.08);
}

.deps-level-definitions-table tbody tr.is-target {
  background-color: rgba(255, 193, 7, 0.12);
}

.deps-level-definitions-table tbody tr.is-claimable {
  background-color: rgba(25, 135, 84, 0.1);
}

.deps-level-claim-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.2;
  padding: 0.3em 0.6em;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  vertical-align: middle;
  background-color: var(--bs-success, #198754);
  color: #fff;
  transition: opacity 0.15s ease, filter 0.15s ease;
}

.deps-level-claim-pill:not(:disabled) {
  cursor: pointer;
}

.deps-level-claim-pill:not(:disabled):hover {
  filter: brightness(1.06);
  color: #fff;
}

.deps-level-claim-pill:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background-color: var(--bs-secondary, #6c757d);
}

body.night-mode .deps-level-claim-pill:not(:disabled) {
  background-color: #2ea872;
}

.deps-level-definitions-criteria {
  list-style: none;
  padding: 0;
  margin: 0;
}

.deps-level-definitions-criteria li + li {
  margin-top: 4px;
}

.deps-level-criterion-progress {
  color: var(--bs-secondary-color, #6c757d);
  font-size: 0.8125rem;
}

.deps-level-criterion-progress.is-met {
  color: var(--bs-success, #198754);
  font-weight: 600;
}

body.night-mode .deps-level-definitions-table thead th {
  background: var(--card-dark-input, #2a3138);
}

body.night-mode .deps-level-definitions-table-wrap {
  border-color: var(--card-dark-divider, #3a4249);
}

body.night-mode .deps-level-profile {
  border-color: var(--card-dark-divider, #3a4249);
  box-shadow: none;
}

body.night-mode .deps-level-profile-head {
  background: linear-gradient(180deg, rgba(13, 110, 253, 0.1) 0%, transparent 100%);
}

.deps-level-tabs .nav-link {
  font-size: 0.875rem;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--bs-secondary-color, #6c757d);
}

.deps-level-tabs .nav-link.active {
  color: var(--bs-primary, #0d6efd);
  border-bottom-color: var(--bs-primary, #0d6efd);
  background: transparent;
}

.deps-level-progress-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.deps-level-progress-item {
  padding: 10px 0;
  border-top: 1px dashed var(--bs-border-color, #dee2e6);
}

.deps-level-progress-item:first-child {
  border-top: none;
  padding-top: 0;
}

.deps-level-progress-item-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.8125rem;
  margin-bottom: 4px;
}

.deps-level-rewards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.deps-level-reward-card {
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: 10px;
  padding: 14px;
  background: var(--bs-light, #f8f9fa);
}

.deps-level-reward-card.is-earned {
  background: var(--bs-body-bg, #fff);
}

.deps-level-reward-card-head {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.deps-level-reward-level-name {
  font-weight: 600;
  margin-bottom: 4px;
}

.deps-level-reward-summary {
  font-size: 0.9375rem;
  margin-bottom: 6px;
}

.deps-level-reward-coupon code {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--bs-light, #f8f9fa);
  border: 1px dashed var(--bs-border-color, #dee2e6);
  font-size: 0.875rem;
}

.deps-level-reward-meta {
  margin-top: 8px;
}

@media (max-width: 767.98px) {
  .deps-level-rewards-grid {
    grid-template-columns: 1fr;
  }
}

.deps-level-badge-post-author {
  margin-left: 4px;
}

.deps-level-rules-item {
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 10px;
  background: var(--bs-body-bg, #fff);
}

.deps-level-rules-item-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.deps-level-rules-badge,
.deps-level-badge-rules {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 10px;
  font-size: 1rem;
  margin: 0;
}

.deps-level-badge-rules.is-numeric {
  min-width: 40px;
  padding: 0 8px;
}

.deps-level-rules-hierarchy {
  padding-left: 1.1rem;
}

.deps-level-rules-criteria {
  padding-left: 1.25rem;
  font-size: 0.875rem;
}

.deps-level-rules-criteria li + li {
  margin-top: 2px;
}

/* Sidebar widget (profile left panel) */
.deps-level-sidebar-widget .card-body {
  padding-top: 0.75rem;
}

.deps-level-badge-sidebar {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 12px;
  font-size: 1.1rem;
  margin: 0;
  border: 2px solid var(--bs-body-bg, #fff);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.deps-level-badge-sidebar.is-numeric {
  min-width: 44px;
  padding: 0 8px;
}

.deps-level-badge-sidebar-mini {
  width: 24px;
  height: 24px;
  min-width: 24px;
  border-radius: 6px;
  font-size: 10px;
  margin: 0;
  flex-shrink: 0;
}

.deps-level-badge-sidebar-mini.is-numeric {
  min-width: 24px;
  padding: 0 4px;
}

.deps-level-sidebar-criteria li + li {
  border-top: 1px dashed var(--bs-border-color-translucent, rgba(0, 0, 0, 0.08));
}

.deps-level-recent-list .deps-level-recent-item + .deps-level-recent-item {
  margin-top: 0.5rem;
}

.deps-level-recent-item a:hover {
  opacity: 0.92;
}

/* Full levels page — recent level-ups grid */
.deps-level-recent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}

.deps-level-recent-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: 10px;
  background: var(--bs-body-bg, #fff);
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.deps-level-recent-card:hover {
  border-color: var(--bs-primary, #0d6efd);
  box-shadow: 0 2px 8px rgba(13, 110, 253, 0.12);
  color: inherit;
}

.deps-level-recent-card-body {
  flex: 1 1 auto;
}

.deps-level-badge-recent {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 10px;
  font-size: 0.95rem;
  margin: 0;
  flex-shrink: 0;
}

.deps-level-badge-recent.is-numeric {
  min-width: 36px;
  padding: 0 6px;
}

body.night-mode .deps-level-recent-card {
  background: var(--card-dark-color, #262d34);
  border-color: var(--bs-border-color-translucent, rgba(255, 255, 255, 0.12));
}

body.night-mode .deps-level-badge-sidebar {
  border-color: var(--card-dark-color, #262d34);
}

body.night-mode .deps-level-step {
  background: var(--card-dark-color, #262d34);
  border-color: var(--card-dark-divider, #3a4249);
}

body.night-mode .deps-level-crit-chip {
  background: var(--card-dark-input, #2a3138);
}

body.night-mode .deps-level-crit-chip.is-met {
  background: rgba(46, 168, 114, 0.14);
  border-color: rgba(46, 168, 114, 0.25);
}

body.night-mode .deps-level-row {
  background: var(--card-dark-color, #262d34);
}

body.night-mode .deps-level-roadmap--compact {
  border-color: var(--card-dark-divider, #3a4249);
}

body.night-mode .deps-level-recent-chip {
  background: var(--card-dark-input, #2a3138);
  border-color: var(--card-dark-divider, #3a4249);
}
