/* Hazır Kıt'a v3 — Askeri tema, mobil öncelikli */

:root {
  --bg-primary:    #070B06;
  --bg-secondary:  #0F1610;
  --bg-card:       #141C14;
  --bg-elevated:   #1A241A;
  --gold:          #F3D27A;
  --gold-dim:      #C4A84E;
  --gold-glow:     rgba(243, 210, 122, 0.15);
  --text-primary:  #E8EDE4;
  --text-secondary:#9BA894;
  --text-muted:    #6B7566;
  --border:        #2A352A;
  --danger:        #E05A5A;
  --success:       #5ABF7A;
  --warning:       #E0B85A;
  --nav-height:    84px;
  --bottom-dock-progress: 224px;
  --bottom-dock-activity: 192px;
  --bar-zone-width: 100vw;
  --bottom-nav-span: calc(
    var(--bar-zone-width)
    - var(--nav-float-gap) * 2
    - var(--nav-dock-gap) * 2
    - var(--bottom-dock-progress)
    - var(--bottom-dock-activity)
  );
  --nav-float-gap: 12px;
  --nav-dock-gap:  clamp(0.75rem, 1.35vw, 1.05rem);
  --nav-shell-height: calc(var(--nav-height) + var(--nav-float-gap) * 2);
  --header-height: 56px;
  --radius:        12px;
  --radius-sm:     8px;
  --shadow:        0 4px 24px rgba(0, 0, 0, 0.4);
  --font:          'Segoe UI', system-ui, -apple-system, sans-serif;
  --transition:    0.2s ease;
  --scrollbar-track: var(--bg-secondary);
  --scrollbar-thumb: var(--border);
  --scrollbar-thumb-hover: var(--gold-dim);
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}

*::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 4px;
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

html[data-theme="light"] {
  --bg-primary:    #eef1e8;
  --bg-secondary:  #e4e8df;
  --bg-card:       #f8faf5;
  --bg-elevated:   #ffffff;
  --gold:          #9a7b2f;
  --gold-dim:      #7a6225;
  --gold-glow:     rgba(154, 123, 47, 0.12);
  --text-primary:  #1a2218;
  --text-secondary:#4a5644;
  --text-muted:    #6b7566;
  --border:        #c8d0c0;
  --danger:        #c0392b;
  --success:       #2d8a4e;
  --warning:       #b8860b;
  --scrollbar-track: #e4e8df;
  --scrollbar-thumb: #b8c4b0;
  --scrollbar-thumb-hover: #9a7b2f;
}

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100dvh;
  line-height: 1.5;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(243, 210, 122, 0.04) 0%, transparent 60%),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(243, 210, 122, 0.01) 2px,
      rgba(243, 210, 122, 0.01) 4px
    );
  pointer-events: none;
  z-index: 0;
}

#app {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ── Tipografi ─────────────────────────────────────────── */
h1, h2, h3 {
  font-weight: 700;
  letter-spacing: 0.02em;
}

h1 { font-size: 1.5rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.1rem; }

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

a:hover { color: var(--gold-dim); }

/* ── Butonlar ──────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  min-height: 44px;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dim) 100%);
  color: var(--bg-primary);
  box-shadow: 0 2px 12px var(--gold-glow);
}

.btn-primary:hover {
  box-shadow: 0 4px 20px rgba(243, 210, 122, 0.3);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-ghost {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: var(--gold-glow);
  border-color: var(--gold-dim);
}

.btn-block { width: 100%; }
.btn-sm { padding: 0.4rem 0.75rem; min-height: 36px; font-size: 0.85rem; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

textarea.form-input {
  min-height: 80px;
  resize: vertical;
}

select.form-input { cursor: pointer; }

.admin-tabs { display: flex; gap: 0.5rem; }

.quick-links { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* ── Liste öğeleri ─────────────────────────────────────── */
.list-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.875rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: var(--text-primary);
  transition: border-color var(--transition), background var(--transition);
}

.list-item:hover {
  border-color: var(--gold-dim);
  background: var(--bg-elevated);
}

.list-item__icon {
  font-size: 1.65rem;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
}

.list-item__body { flex: 1; min-width: 0; }

.list-item__title {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
}

.list-item__meta {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.list-item__arrow {
  color: var(--gold-dim);
  font-size: 1.25rem;
}

/* ── Quiz ──────────────────────────────────────────────── */
.quiz-progress {
  position: relative;
  height: 6px;
  background: var(--bg-secondary);
  border-radius: 999px;
  overflow: hidden;
}

.quiz-progress__bar {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold));
  transition: width 0.3s ease;
}

.quiz-progress__text {
  display: block;
  text-align: right;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.quiz-card { overflow: hidden; }

.quiz-image {
  width: 100%;
  max-height: 240px;
  object-fit: contain;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
}

.quiz-text {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.quiz-options { display: flex; flex-direction: column; gap: 0.5rem; }

.quiz-option {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  width: 100%;
  padding: 0.875rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: var(--text-primary);
  transition: border-color var(--transition), background var(--transition);
  min-height: 44px;
}

.quiz-option:hover:not(:disabled) {
  border-color: var(--gold-dim);
  background: var(--gold-glow);
}

.quiz-option:disabled { cursor: default; opacity: 0.85; }

.quiz-option__key {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-weight: 700;
  color: var(--gold);
  font-size: 0.85rem;
}

.quiz-option__text { flex: 1; font-size: 0.95rem; line-height: 1.4; }

.quiz-option--correct {
  border-color: var(--success);
  background: rgba(90, 191, 122, 0.12);
}

.quiz-option--wrong {
  border-color: var(--danger);
  background: rgba(224, 90, 90, 0.12);
}

.quiz-feedback {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  line-height: 1.45;
}

.quiz-feedback--ok {
  color: var(--success);
  background: rgba(90, 191, 122, 0.1);
  border: 1px solid var(--success);
}

.quiz-feedback--err {
  color: var(--danger);
  background: rgba(224, 90, 90, 0.1);
  border: 1px solid var(--danger);
}

.quiz-summary-stats {
  padding: 1rem 1.25rem;
}

.quiz-summary-stats__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
}

.quiz-summary-stats__row:last-child {
  border-bottom: none;
}

.quiz-result {
  font-weight: 700;
  font-size: 1.1rem;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  margin-top: 1rem;
}

.quiz-result--correct {
  color: var(--success);
  background: rgba(90, 191, 122, 0.1);
  border: 1px solid var(--success);
}

.quiz-result--wrong {
  color: var(--danger);
  background: rgba(224, 90, 90, 0.1);
  border: 1px solid var(--danger);
}

.quiz-explanation {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
}

.quiz-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.quiz-actions .btn { flex: 1; min-width: 120px; }

.option-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.option-row .form-input { flex: 1; }

/* ── Meydan HUD ────────────────────────────────────────── */
.arena-hud {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.arena-hud__item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem;
  text-align: center;
}

.arena-hud__label {
  display: block;
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.arena-hud__value {
  display: block;
  font-size: 1.25rem;
  font-weight: 800;
}

.arena-timer--warn { color: var(--danger); animation: pulse 1s infinite; }

.arena-filter-card .form-select {
  appearance: none;
  background-color: var(--bg-input, var(--bg-card));
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23888' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 2.5rem;
}

.arena-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.arena-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.35rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  text-align: center;
}

.arena-chip:hover {
  border-color: var(--gold-dim);
  color: var(--text-primary);
}

.arena-chip.active {
  border-color: var(--gold);
  background: linear-gradient(160deg, rgba(243, 210, 122, 0.38) 0%, rgba(196, 168, 78, 0.14) 100%);
  color: var(--gold);
  box-shadow:
    0 0 14px rgba(243, 210, 122, 0.32),
    inset 0 0 0 1px rgba(243, 210, 122, 0.4);
  font-weight: 700;
}

.arena-chip-group + .arena-chip-group {
  margin-top: 0.85rem;
}

.arena-topic-scroll {
  max-height: 16rem;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.arena-topic-scroll--flat {
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.arena-filter-card--duel .arena-chip-group + .arena-chip-group {
  margin-top: 0.65rem;
}

.arena-filter-card--duel .arena-topic-group {
  margin-bottom: 0.5rem;
}

.arena-topic-group {
  margin-bottom: 0.75rem;
}

.arena-topic-group__label {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-muted);
  margin: 0 0 0.35rem;
}

.arena-topic-groups--disabled {
  opacity: 0.45;
  pointer-events: none;
}

.arena-room-code {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-align: center;
}

.arena-lobby-players--live {
  min-height: 3rem;
}

.admin-users-toolbar {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
}

.admin-users-toolbar__search {
  flex: 1;
}

.admin-users-toolbar__add {
  flex: 0 0 2.75rem;
  width: 2.75rem;
  min-width: 2.75rem;
  padding: 0;
  font-size: 1.35rem;
  line-height: 1;
}

.modal-overlay.admin-create-user-overlay {
  padding: 0.35rem;
  overflow: hidden;
  align-items: stretch;
  justify-content: stretch;
}

.modal-card.admin-create-user-modal {
  width: 100%;
  max-width: 100%;
  height: calc(100vh - 0.7rem);
  max-height: calc(100vh - 0.7rem);
  margin: 0;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
}

.modal-card.admin-create-user-modal .modal-card__head {
  flex-shrink: 0;
  padding: 0.55rem 0.85rem;
}

.modal-card.admin-create-user-modal .modal-card__title {
  font-size: 0.95rem;
}

.modal-card.admin-create-user-modal .modal-card__body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  max-height: none;
  padding: 0.55rem 0.75rem 0.65rem;
  display: flex;
  flex-direction: column;
}

.admin-create-user-form--fullscreen {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.admin-create-user-form__top {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr auto;
  gap: 0.45rem;
  align-items: end;
}

.admin-create-user-form__top .form-group {
  margin-bottom: 0;
}

.admin-create-user-form__top .form-group label {
  font-size: 0.68rem;
  margin-bottom: 0.15rem;
  opacity: 0.85;
}

.admin-create-user-form__top .form-input--sm {
  padding: 0.38rem 0.5rem;
  font-size: 0.8rem;
}

.admin-create-user-form__top .btn {
  white-space: nowrap;
  padding-left: 0.85rem;
  padding-right: 0.85rem;
}

.admin-create-user-form__cascade-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.admin-create-user-form__cascade-head {
  flex-shrink: 0;
}

.admin-create-user-form__cascade {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.admin-create-user-form__section {
  margin: 0;
  font-size: 0.78rem;
  color: var(--gold);
}

.admin-create-user-form__hint {
  margin: 0;
  font-size: 0.68rem;
  line-height: 1.3;
}

.unit-cascade__columns {
  flex: 1;
  min-height: 0;
  display: grid;
  gap: 0.35rem;
  overflow: hidden;
}

.unit-cascade__col {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  overflow: hidden;
}

.unit-cascade__col-head {
  flex-shrink: 0;
  padding: 0.28rem 0.4rem;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gold);
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.15);
  text-align: center;
}

.unit-cascade__col-body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 0.28rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.22rem;
  align-content: start;
}

.unit-cascade__col-body--dense {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.unit-cascade__item {
  display: block;
  width: 100%;
  padding: 0.3rem 0.32rem;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg-card);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: clamp(0.58rem, 0.72vw, 0.68rem);
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.unit-cascade__item--command {
  font-weight: 600;
}

.unit-cascade__item:hover:not(:disabled) {
  border-color: var(--gold-dim);
  color: var(--text-primary);
}

.unit-cascade__item.active {
  border-color: var(--gold);
  background: linear-gradient(160deg, rgba(243, 210, 122, 0.38) 0%, rgba(196, 168, 78, 0.14) 100%);
  color: var(--gold);
  box-shadow:
    0 0 14px rgba(243, 210, 122, 0.35),
    inset 0 0 0 1px rgba(243, 210, 122, 0.45);
  font-weight: 700;
}

.unit-cascade__item:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.unit-cascade__empty {
  padding: 0.25rem;
  font-size: 0.65rem;
  text-align: center;
  grid-column: 1 / -1;
}

.unit-cascade__status {
  flex-shrink: 0;
  margin: 0;
  padding: 0.35rem 0.45rem;
  font-size: 0.72rem;
  line-height: 1.35;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(243, 210, 122, 0.06);
}

.unit-cascade__status strong {
  color: var(--gold);
}

@media (max-width: 720px) {
  .admin-create-user-form__top {
    grid-template-columns: 1fr 1fr;
  }

  .admin-create-user-form__top .btn {
    grid-column: 1 / -1;
  }
}

.arena-opponent {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-color: rgba(243, 210, 122, 0.35);
}

.arena-opponent__label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.arena-opponent__name {
  font-weight: 700;
  color: var(--gold);
}

.arena-vs__row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.35rem 0;
  font-size: 0.9rem;
}

.arena-vs__verdict {
  font-weight: 700;
  color: var(--gold);
}

.arena-quick-card .btn-primary {
  min-height: 2.75rem;
  font-size: 1rem;
  font-weight: 700;
}

.arena-check-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  cursor: pointer;
}

.arena-check-row input { accent-color: var(--gold); }

.team-pick-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.team-pick-btn {
  padding: 0.85rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
}

.team-pick-btn:hover { border-color: var(--text-muted); }

.team-pick-btn--left.active {
  border-color: var(--primary, #3b82f6);
  background: rgba(59, 130, 246, 0.12);
  color: var(--primary, #3b82f6);
}

.team-pick-btn--right.active {
  border-color: var(--gold);
  background: rgba(212, 175, 55, 0.12);
  color: var(--gold);
}

.arena-lobby-players {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.arena-lobby-chip {
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.8rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.arena-lobby-chip--t1 { border-color: var(--primary, #3b82f6); }
.arena-lobby-chip--t2 { border-color: var(--gold); }

.arena-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.25rem 0;
}

@keyframes pulse {
  50% { opacity: 0.6; }
}

.feed-item {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.feed-item:last-child { border-bottom: none; }

/* ── Sıralama ──────────────────────────────────────────── */
.rank-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.35rem;
}

.rank-tab {
  padding: 0.5rem 0.25rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.rank-tab.active {
  background: var(--gold-glow);
  border-color: var(--gold-dim);
  color: var(--gold);
}

.rank-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.4rem;
}

.rank-row--me {
  border-color: var(--gold-dim);
  background: var(--gold-glow);
}

.rank-row__pos {
  font-size: 1.1rem;
  font-weight: 800;
  min-width: 2rem;
  text-align: center;
}

.rank-row__body { flex: 1; min-width: 0; }

.rank-row__name {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
}

.rank-row__meta {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.rank-row__score {
  font-weight: 800;
  font-size: 1rem;
}

/* ── Seviye & rozet ────────────────────────────────────── */
.level-bar__header {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
}

.level-bar__track {
  height: 8px;
  background: var(--bg-secondary);
  border-radius: 999px;
  overflow: hidden;
}

.level-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold));
  border-radius: 999px;
  transition: width 0.4s ease;
}

.badge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 0.65rem;
}

.badge-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 0.55rem;
  text-align: center;
}

.badge-item__icon {
  font-size: clamp(2rem, 4.5vw, 2.65rem);
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(2.65rem, 5.5vw, 3.25rem);
  height: clamp(2.65rem, 5.5vw, 3.25rem);
  margin: 0 auto;
}

.badge-item__name {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  margin-top: 0.25rem;
  color: var(--text-secondary);
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.5rem 0;
  font-size: 0.9rem;
  cursor: pointer;
}

.check-row input { margin-top: 0.2rem; flex-shrink: 0; }

.invite-actions { display: flex; gap: 0.5rem; }

.invite-banner { border-color: rgba(243, 210, 122, 0.4); }

.pdf-frame {
  width: 100%;
  height: 70vh;
  min-height: 400px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
}

.content-html p { margin-bottom: 0.75rem; line-height: 1.6; }
.content-html h2, .content-html h3 { color: var(--gold); margin: 0.75rem 0 0.5rem; }

.help-list { padding-left: 1.25rem; color: var(--text-secondary); }
.help-list li { margin-bottom: 0.5rem; }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  z-index: 1000;
  padding: max(1rem, env(safe-area-inset-top)) 1rem max(1rem, env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

body.modal-open {
  overflow: hidden;
}

.modal-card {
  width: 100%;
  max-width: 420px;
  max-height: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  margin: auto;
  flex-shrink: 0;
}

.modal-overlay .modal-card {
  max-height: min(90vh, 900px);
}

.modal-card--sm {
  max-width: 320px;
}

.modal-card--md {
  max-width: 480px;
}

.modal-card--lg {
  max-width: min(720px, 92vw);
}

.modal-card--xl {
  max-width: min(760px, 96vw);
  width: min(760px, 96vw);
  max-height: 90vh;
}

.popup-anchor-card.modal-card--xl {
  max-height: min(640px, 82vh);
}

.popup-anchor-card.modal-card--xl.ataturk-popup {
  min-height: min(520px, 72vh);
}

.popup-anchor-card.modal-card--xl .modal-card__body {
  overflow: visible;
  max-height: none;
  padding: 0.75rem 0.95rem 0.95rem;
}

.modal-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg-card);
  z-index: 1;
}

.modal-card__title {
  margin: 0;
  font-size: 1.1rem;
  color: var(--gold);
}

.modal-card__close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
}

.modal-card__close:hover {
  color: var(--text-primary);
}

.modal-card__body {
  padding: 1rem 1.25rem 1.25rem;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.modal-overlay .modal-card--xl .modal-card__body,
.modal-overlay .modal-card--lg .modal-card__body {
  max-height: calc(min(90vh, 900px) - 3.75rem);
}

.popup-anchor-layer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
}

.popup-anchor-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.06);
  pointer-events: auto;
}

.popup-anchor-card {
  pointer-events: auto;
  z-index: 1;
  max-height: min(70vh, 520px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(224, 184, 90, 0.35);
}



/* ── Form ──────────────────────────────────────────────── */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
  font-weight: 500;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  min-height: 44px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-input:focus {
  outline: none;
  border-color: var(--gold-dim);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

.form-input::placeholder { color: var(--text-muted); }

.form-error {
  color: var(--danger);
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

/* ── Kart ──────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.card-gold {
  border-color: rgba(243, 210, 122, 0.2);
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-elevated) 100%);
}

/* ── Header ────────────────────────────────────────────── */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: color-mix(in srgb, var(--bg-primary) 92%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
}

.app-header__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.app-header__badge {
  font-size: 0.75rem;
  background: var(--gold-glow);
  color: var(--gold);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(243, 210, 122, 0.3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.75rem;
  min-width: 1.75rem;
}

.hk-icon-img {
  width: 1.5rem;
  height: 1.5rem;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  vertical-align: middle;
  display: inline-block;
  flex-shrink: 0;
}

/* PNG ikonlar: kapsayıcıyı doldur (emoji font-size ile uyumlu slot) */
.hk-icon-img--fill {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
}

.hk-icon-img--preview {
  width: 2.5rem;
  height: 2.5rem;
}

.app-icon-preview {
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.75rem;
  line-height: 1;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
}

.app-icon-row__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.sidebar__brand-icon .hk-icon-img,
.auth-logo__icon .hk-icon-img {
  width: 2rem;
  height: 2rem;
  max-width: 2rem;
  max-height: 2rem;
  object-fit: contain;
}

.home-dash__brand-icon .hk-icon-img {
  width: 2rem;
  height: 2rem;
}

.bottom-nav__icon .hk-icon-img {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
}

.admin-card__icon .hk-icon-img,
.work-panel-card__icon .hk-icon-img,
.home-dash__corner-btn-icon .hk-icon-img,
.list-item__icon .hk-icon-img,
.topic-branch-hero__icon .hk-icon-img,
.branch-sim-banner__icon .hk-icon-img {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
}

.sidebar-download-block__icon,
.sidebar-download-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
}

.sidebar-download-block__icon {
  width: 1.25rem;
  height: 1.25rem;
}

.sidebar-download-card__icon {
  width: 1.75rem;
  height: 1.75rem;
}

.sidebar-download-block__icon .hk-icon-img,
.sidebar-download-card__icon .hk-icon-img {
  width: 1rem;
  height: 1rem;
  max-width: 1rem;
  max-height: 1rem;
  object-fit: contain;
}

.sidebar-download-card__icon .hk-icon-img {
  width: 1.35rem;
  height: 1.35rem;
  max-width: 1.35rem;
  max-height: 1.35rem;
}

.home-subject-chip__icon .hk-icon-img,
.home-quick-card__icon .hk-icon-img,
.home-menu-card__icon .hk-icon-img,
.badge-item__icon .hk-icon-img {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
}

.sidebar-section__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  overflow: hidden;
}

.sidebar-section__icon .hk-icon-img {
  width: 1.35rem;
  height: 1.35rem;
  max-width: 1.35rem;
  max-height: 1.35rem;
  object-fit: contain;
}

.sidebar__brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  overflow: hidden;
}

/* Anasayfa kategori / hızlı erişim — PNG ve emoji aynı büyük slot */
.hk-icon-img--home-tile {
  width: var(--home-tile-icon, 4.25rem) !important;
  height: var(--home-tile-icon, 4.25rem) !important;
  max-width: none !important;
  max-height: none !important;
  min-width: var(--home-tile-icon, 4.25rem);
  min-height: var(--home-tile-icon, 4.25rem);
  object-fit: contain;
}

.home-tile-emoji {
  font-size: var(--home-tile-icon, 4.25rem);
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.app-header__badge .hk-icon-img {
  width: 1.65rem;
  height: 1.65rem;
  max-width: none;
  max-height: none;
}

.home-strike-fire .hk-icon-img {
  width: 1.15rem;
  height: 1.15rem;
}

/* ── Ana içerik ────────────────────────────────────────── */
.app-main {
  flex: 1;
  padding: 1rem;
  padding-bottom: calc(var(--nav-shell-height) + 0.75rem);
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
}

.app-main--no-nav {
  padding-bottom: 1rem;
}

/* ── Alt navigasyon ────────────────────────────────────── */
.bottom-bar-zone {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  padding: 0 var(--nav-float-gap) calc(var(--nav-float-gap) + env(safe-area-inset-bottom, 0));
  pointer-events: none;
  display: flex;
  justify-content: center;
  align-items: stretch;
}

.bottom-bar-zone--home {
  justify-content: stretch;
  gap: var(--nav-dock-gap);
}

.sim-branch-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.sim-branch-chips .sim-branch-chip.active {
  border-color: var(--gold);
  color: var(--gold);
}

.sim-section-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 0.75rem;
}

.sim-branch-scope {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.sim-scope-option {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), color var(--transition), box-shadow var(--transition);
}

.sim-scope-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.sim-scope-option:has(input:checked) {
  border-color: var(--gold);
  background: linear-gradient(160deg, rgba(243, 210, 122, 0.28) 0%, rgba(196, 168, 78, 0.1) 100%);
  color: var(--gold);
  box-shadow: inset 0 0 0 1px rgba(243, 210, 122, 0.25);
}

.sim-history-card {
  padding: 0.35rem 0.85rem;
}

.feed-item--btn {
  width: 100%;
  border: none;
  background: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
  transition: background var(--transition), color var(--transition);
}

.feed-item--btn:hover {
  color: var(--gold);
  background: var(--gold-glow);
}

.sim-history-detail__stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.sim-history-detail__heading {
  margin: 0 0 0.5rem;
  font-size: 0.88rem;
  color: var(--gold);
}

.sim-review-row {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
}

.sim-review-row:last-child {
  border-bottom: none;
}

.sim-review-row__q {
  margin: 0 0 0.25rem;
  font-size: 0.86rem;
  line-height: 1.4;
}

.branch-sim-block {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.85rem 8.5rem 0.85rem 0.85rem;
  min-height: 4.5rem;
}

.branch-sim-block__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.35rem;
  width: 100%;
  min-width: 0;
}

.branch-sim-block__icon {
  font-size: 1.75rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.branch-sim-block__icon .hk-icon-img {
  width: 1.75rem;
  height: 1.75rem;
  max-width: 1.75rem;
  max-height: 1.75rem;
  object-fit: contain;
}

.branch-sim-block__label {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
  text-align: center;
}

.branch-sim-block__btn {
  position: absolute;
  right: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  flex-shrink: 0;
  white-space: nowrap;
}

@media (max-width: 1023px) {
  .bottom-dock--progress,
  .bottom-dock--activity {
    display: none !important;
  }

  .bottom-bar-zone--home {
    --bottom-nav-span: calc(100% - var(--nav-float-gap) * 2);
  }

  .bottom-bar-zone--home .bottom-nav--stretch {
    flex: 1 1 100%;
    width: 100%;
    max-width: calc(100% - var(--nav-float-gap) * 2);
  }
}

.bottom-nav {
  pointer-events: auto;
  width: var(--bottom-nav-span);
  max-width: calc(100% - var(--nav-float-gap) * 2);
  height: var(--nav-height);
  background: linear-gradient(165deg, rgba(30, 42, 30, 0.97) 0%, rgba(12, 18, 12, 0.98) 100%);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(196, 168, 78, 0.22);
  border-radius: 22px;
  box-shadow:
    0 10px 36px rgba(0, 0, 0, 0.48),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 1px 0 rgba(243, 210, 122, 0.08) inset;
  display: flex;
  align-items: stretch;
  gap: 0.2rem;
  padding: 0.35rem 0.55rem;
  flex-shrink: 0;
  box-sizing: border-box;
}

.bottom-nav--stretch {
  flex: 1 1 auto;
  width: var(--bottom-nav-span);
  min-width: 0;
  max-width: none;
}

.bottom-dock {
  pointer-events: auto;
  height: var(--nav-height);
  border-radius: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.38);
  box-sizing: border-box;
  flex-shrink: 0;
}

.bottom-dock.card {
  padding: inherit;
  box-shadow: none;
}

.bottom-dock--progress {
  flex: 0 0 var(--bottom-dock-progress);
  width: var(--bottom-dock-progress);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: left;
  overflow: hidden;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.bottom-dock--progress .home-progress--dock,
.bottom-dock--progress .spinner {
  width: 100%;
}

.bottom-dock--progress:hover {
  border-color: rgba(196, 168, 78, 0.45);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(243, 210, 122, 0.08);
}

.bottom-dock--progress:active {
  transform: scale(0.98);
}

.bottom-dock--activity {
  flex: 0 0 var(--bottom-dock-activity);
  width: var(--bottom-dock-activity);
  padding: 0.38rem 0.48rem;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.bottom-dock__title {
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  color: var(--gold-dim);
  margin: 0 0 0.24rem;
  text-transform: uppercase;
  flex-shrink: 0;
  font-weight: 600;
  line-height: 1.15;
}

.bottom-dock--activity .home-dash__feed {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bottom-dock--activity .home-dash__feed li {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.04rem;
  font-size: 0.66rem;
  line-height: 1.22;
  color: var(--text-primary);
}

.bottom-dock--activity .home-dash__feed li span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  width: 100%;
}

.bottom-dock--activity .home-dash__feed time {
  font-size: 0.58rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.bottom-dock--activity .home-dash__feed li + li {
  margin-top: 0.14rem;
}

.bottom-nav__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  color: var(--text-muted);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease, transform 0.15s ease;
  min-height: 44px;
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  border-radius: 16px;
  padding: 0.2rem 0.1rem;
}

.bottom-nav__item:hover {
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
}

.bottom-nav__item.active {
  color: var(--gold);
  background: linear-gradient(180deg, rgba(243, 210, 122, 0.16) 0%, rgba(243, 210, 122, 0.06) 100%);
  box-shadow: inset 0 0 0 1px rgba(243, 210, 122, 0.14);
}

.bottom-nav__item:active {
  transform: scale(0.97);
}

.bottom-nav__icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: 12px;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.bottom-nav__item.active .bottom-nav__icon-wrap {
  background: rgba(243, 210, 122, 0.1);
  box-shadow: 0 0 14px rgba(243, 210, 122, 0.18);
}

.bottom-nav__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: calc(var(--nav-height) * 0.52);
  line-height: 1;
}

.bottom-nav__item.active .bottom-nav__icon {
  filter: drop-shadow(0 0 8px rgba(243, 210, 122, 0.45));
}

.bottom-nav__label {
  line-height: 1.1;
  white-space: nowrap;
}

/* ── Login sayfası ─────────────────────────────────────── */
.auth-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.auth-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-logo__icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.auth-logo__title {
  font-size: 1.75rem;
  color: var(--gold);
  font-weight: 800;
  letter-spacing: 0.05em;
}

.auth-logo__subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

.auth-card {
  width: 100%;
  max-width: 400px;
}

.auth-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.auth-tab {
  flex: 1;
  padding: 0.6rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.auth-tab.active {
  background: var(--gold-glow);
  border-color: var(--gold-dim);
  color: var(--gold);
}

/* ── Stat kartları ─────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  text-align: center;
}

.stat-card__value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--gold);
}

.stat-card__label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Banner ────────────────────────────────────────────── */
.banner {
  background: linear-gradient(135deg, rgba(243,210,122,0.12) 0%, rgba(243,210,122,0.04) 100%);
  border: 1px solid rgba(243, 210, 122, 0.25);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1rem;
}

.banner__title {
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 0.25rem;
}

.banner__text {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ── Toast ─────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  top: calc(var(--header-height) + 0.5rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  width: calc(100% - 2rem);
  max-width: 400px;
  pointer-events: none;
}

.toast {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  box-shadow: var(--shadow);
  animation: toast-in 0.3s ease;
  pointer-events: auto;
}

.toast--error { border-color: var(--danger); color: var(--danger); }
.toast--success { border-color: var(--success); color: var(--success); }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Loading ───────────────────────────────────────────── */
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 2rem auto;
}

@keyframes spin { to { transform: rotate(360deg); } }

.page-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 40dvh;
  color: var(--text-secondary);
}

/* ── v2 yerleşim: anasayfa & profil menü ───────────────── */
.section-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
}

.home-top-bar {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.home-top-bar__left,
.home-top-bar__right {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.home-top-bar__right {
  align-items: flex-end;
}

.home-corner-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 4.5rem;
  padding: 0.5rem 0.65rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-primary);
  font-family: inherit;
}

.home-corner-card__icon { font-size: 1.35rem; }
.home-corner-card__label { font-size: 0.65rem; color: var(--text-secondary); margin-top: 0.15rem; }

.home-corner-card {
  position: relative;
}

.home-corner-card__badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--bg-primary);
  font-size: 0.65rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.work-panel {
  margin-bottom: 1rem;
}

.work-panel-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .work-panel-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
  }
}

.work-panel-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 1rem;
  min-height: 120px;
  background: linear-gradient(145deg, var(--bg-card) 0%, var(--bg-elevated) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  font-family: inherit;
  color: inherit;
}

.work-panel-card:hover {
  border-color: var(--gold-dim);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.work-panel-card__glow {
  position: absolute;
  top: -20px;
  right: -20px;
  width: 80px;
  height: 80px;
  background: radial-gradient(circle, var(--gold-glow) 0%, transparent 70%);
  pointer-events: none;
}

.work-panel-card__icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
}

.work-panel-card__title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 0.25rem;
  line-height: 1.2;
}

.work-panel-card__subtitle {
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.home-quick-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.home-quick-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-card);
  color: var(--text-secondary);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.home-quick-chip:hover {
  border-color: var(--gold-dim);
  color: var(--gold);
}

.friend-request-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.friend-request-card--sent {
  opacity: 0.85;
}

.friend-request-card__actions {
  display: flex;
  gap: 0.35rem;
}

.friend-status-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--warning);
  padding: 0.25rem 0.5rem;
  border: 1px solid rgba(224, 184, 90, 0.35);
  border-radius: 999px;
  background: rgba(224, 184, 90, 0.08);
}

.home-strike-bar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s;
  min-width: 2.75rem;
  min-height: 2.75rem;
}

.home-strike-bar:hover {
  opacity: 0.85;
}

.home-strike-fire {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2.25rem;
  line-height: 1;
  width: 2.25rem;
  height: 2.25rem;
}

.home-strike-fire--corner {
  animation: home-strike-burn 1.05s ease-in-out infinite;
  transform-origin: 50% 88%;
}

.home-strike-fire__num {
  position: absolute;
  left: 50%;
  top: 64%;
  transform: translate(-50%, -50%);
  font-family: "Bahnschrift", "Segoe UI", system-ui, sans-serif;
  font-size: clamp(0.55rem, 2.8vw, 0.78rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--gold);
  text-shadow:
    0 0 2px rgba(0, 0, 0, 1),
    0 1px 2px rgba(0, 0, 0, 0.95),
    0 0 5px rgba(0, 0, 0, 0.85);
  max-width: 72%;
  overflow: hidden;
  text-align: center;
  letter-spacing: -0.02em;
  line-height: 1;
  z-index: 1;
}

.home-strike-fire__num--sm {
  font-size: clamp(0.56rem, 1.05vw, 0.72rem);
}

.home-strike-fire__num--md {
  font-size: clamp(0.48rem, 0.92vw, 0.62rem);
  letter-spacing: -0.05em;
  max-width: 76%;
}

.home-strike-fire__num--lg {
  font-size: clamp(0.4rem, 0.78vw, 0.52rem);
  letter-spacing: -0.07em;
  max-width: 80%;
}

@keyframes home-strike-burn {
  0%, 100% {
    transform: scale(1) translateY(0);
    filter: brightness(1) drop-shadow(0 0 3px rgba(255, 100, 0, 0.35));
  }
  35% {
    transform: scale(1.06) translateY(-1px);
    filter: brightness(1.14) drop-shadow(0 0 5px rgba(255, 140, 0, 0.5));
  }
  65% {
    transform: scale(0.98) translateY(0);
    filter: brightness(1.06) drop-shadow(0 0 4px rgba(255, 110, 0, 0.42));
  }
}

.strike-popup-bar {
  height: 10px;
  background: var(--bg-secondary);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.strike-popup-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold));
  border-radius: 999px;
  transition: width 0.3s ease;
}

.strike-popup-count {
  text-align: center;
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0.35rem 0;
}

.strike-popup-streak {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
}

.commander-hub-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .commander-hub-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.commander-hub-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 1.25rem 1.5rem;
  min-height: 140px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: inherit;
  transition: border-color 0.15s, transform 0.15s;
}

.commander-hub-card:hover {
  border-color: var(--gold-dim);
  transform: translateY(-2px);
}

.commander-hub-card--accent {
  border-color: rgba(224, 184, 90, 0.45);
  background: linear-gradient(145deg, var(--bg-card), rgba(224, 184, 90, 0.06));
}

.commander-hub-card__icon {
  font-size: 2rem;
}

.commander-hub-card__label {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold);
}

.commander-hub-card__desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.commander-ref-card {
  text-align: center;
  padding: 1.5rem;
}

.commander-ref-card__code {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: 0.15em;
  color: var(--gold);
  margin: 0.5rem 0;
}

.commander-ref-card__hint {
  font-size: 0.85rem;
}

.ref-purpose-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
}

.ref-purpose-badge--personnel {
  background: rgba(46, 125, 50, 0.2);
  color: #81c784;
  border: 1px solid rgba(129, 199, 132, 0.35);
}

.ref-purpose-badge--unit {
  background: rgba(21, 101, 192, 0.2);
  color: #64b5f6;
  border: 1px solid rgba(100, 181, 246, 0.35);
}

.commander-stat-grid .stat-card--lg .stat-card__value {
  font-size: 2rem;
}

/* ── Komutan hiyerarşisi ───────────────────────────────── */
.cmd-rank-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gold);
  padding: 0.25rem 0.6rem;
  border: 1px solid rgba(243, 210, 122, 0.35);
  border-radius: 999px;
  background: var(--gold-glow);
}

.cmd-hierarchy-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.cmd-hierarchy-superior {
  font-size: 0.85rem;
}

.cmd-hierarchy-panel {
  padding: 1rem 1.15rem;
}

.cmd-hierarchy-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.65rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.cmd-hierarchy-stats strong {
  color: var(--gold);
}

.cmd-section {
  margin-bottom: 0.5rem;
}

.cmd-section__head {
  margin-bottom: 0.75rem;
}

.cmd-section__title {
  margin: 0;
  font-size: 1rem;
  color: var(--gold);
}

.cmd-section__desc {
  margin: 0.25rem 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.cmd-units {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cmd-unit-row {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.75rem 0.85rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  transition: border-color 0.15s, background 0.15s;
}

.cmd-unit-row:hover {
  border-color: var(--gold-dim);
  background: var(--bg-elevated);
}

.cmd-unit-row__head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.cmd-unit-row__rank {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  min-width: 1.5rem;
}

.cmd-unit-row__name {
  flex: 1;
  font-weight: 600;
  font-size: 0.92rem;
}

.cmd-unit-row__acc {
  font-weight: 800;
  font-size: 0.95rem;
}

.cmd-unit-row__track {
  height: 6px;
}

.cmd-unit-row__meta {
  font-size: 0.75rem;
  margin: 0.35rem 0 0;
}

.cmd-rank-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 640px) {
  .cmd-rank-grid {
    grid-template-columns: 1fr;
  }
}

.cmd-rank-card {
  padding: 1rem;
}

.cmd-rank-card__title {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  color: var(--gold);
}

.cmd-rank-card--top {
  border-color: rgba(90, 191, 122, 0.25);
}

.cmd-rank-card--bottom {
  border-color: rgba(224, 90, 90, 0.2);
}

.cmd-rank-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.cmd-rank-list__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 0.55rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  color: inherit;
  transition: border-color 0.15s;
}

.cmd-rank-list__item:hover {
  border-color: var(--gold-dim);
}

.cmd-rank-list__pos {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text-muted);
  min-width: 1.25rem;
}

.cmd-rank-list__main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.cmd-rank-list__main strong {
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cmd-rank-list__main .text-muted {
  font-size: 0.72rem;
}

.cmd-rank-list__acc {
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--gold);
}

.cmd-rank-empty {
  font-size: 0.85rem;
  margin: 0;
}

.cmd-sub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.5rem;
}

.cmd-sub-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  padding: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  text-align: left;
  transition: border-color 0.15s;
}

.cmd-sub-card:hover {
  border-color: var(--gold-dim);
}

.cmd-sub-card__name {
  font-weight: 700;
  font-size: 0.88rem;
}

.cmd-sub-card__meta {
  font-size: 0.72rem;
}

.cmd-sub-card__stat {
  font-size: 0.78rem;
  color: var(--gold);
  font-weight: 600;
  margin-top: 0.25rem;
}

.cmd-rank-badge--sm {
  font-size: 0.65rem;
  padding: 0.15rem 0.4rem;
}

.cmd-personnel-group {
  margin-bottom: 1rem;
  padding: 0.85rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.cmd-personnel-group--unit {
  border-color: rgba(224, 184, 90, 0.2);
}

.cmd-personnel-group__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.cmd-personnel-group__title {
  margin: 0;
  font-size: 0.95rem;
}

.cmd-personnel-group__meta {
  margin: 0.25rem 0 0;
  font-size: 0.78rem;
}

.cmd-personnel-mini-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.cmd-personnel-mini {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.65rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
}

.cmd-personnel-mini__main {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.cmd-personnel-mini__main strong {
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cmd-personnel-mini__main .text-muted {
  font-size: 0.72rem;
}

.cmd-personnel-mini__actions {
  display: flex;
  gap: 0.25rem;
  flex-shrink: 0;
}

.cmd-superior-link {
  border-color: rgba(224, 184, 90, 0.25);
}

.cmd-personnel-search-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.cmd-personnel-search-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 0.85rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  color: inherit;
  transition: border-color 0.15s;
}

.cmd-personnel-search-item:hover {
  border-color: var(--gold-dim);
}

.cmd-personnel-search-item__main {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
  flex: 1;
}

.cmd-personnel-search-item__main strong {
  font-size: 0.92rem;
}

.cmd-personnel-search-item__main .text-muted {
  font-size: 0.75rem;
}

.cmd-personnel-search-item__arrow {
  color: var(--text-muted);
  font-size: 1.25rem;
  flex-shrink: 0;
}

.cmd-personnel-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.cmd-personnel-tag--direct {
  color: var(--gold);
}

.cmd-personnel-empty {
  padding: 1rem 0;
  text-align: center;
}

.cmd-superior-link h3 {
  font-size: 1rem;
}

.stat-card--wide {
  grid-column: span 2;
}

.stat-card__value--sm {
  font-size: 1rem !important;
  line-height: 1.3;
}

.stats-branch-row {
  margin-bottom: 1rem;
}

.stats-branch-row:last-child {
  margin-bottom: 0;
}

.stats-branch-row__head {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}

.stats-branch-row__track {
  height: 6px;
}

.stats-branch-row__meta {
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

.live-table-wrap {
  overflow-x: auto;
}

.live-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.live-table th,
.live-table td {
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.live-table th {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.live-table__row--fail td {
  color: var(--danger, #e07070);
}

.live-table__ua {
  max-width: 160px;
  word-break: break-word;
}

.live-code {
  font-size: 0.72rem;
  color: var(--gold-dim);
}

.commander-home-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

@media (max-width: 640px) {
  .commander-home-grid { grid-template-columns: 1fr; }
}

.commander-home-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  font-family: inherit;
  color: inherit;
}

.commander-home-card__icon { font-size: 1.75rem; }
.commander-home-card__label { font-size: 0.85rem; font-weight: 600; color: var(--gold); }

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-switch__slider {
  position: absolute;
  inset: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s;
}

.toggle-switch__slider::before {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  left: 2px;
  top: 2px;
  background: var(--text-secondary);
  border-radius: 50%;
  transition: transform 0.2s, background 0.2s;
}

.toggle-switch input:checked + .toggle-switch__slider {
  background: rgba(224, 184, 90, 0.25);
  border-color: var(--gold-dim);
}

.toggle-switch input:checked + .toggle-switch__slider::before {
  transform: translateX(24px);
  background: var(--gold);
}

.banner--warn {
  border-color: rgba(224, 112, 112, 0.45);
  background: rgba(224, 112, 112, 0.08);
}

.home-brand {
  text-align: center;
  margin-bottom: 1.25rem;
}

.home-brand__logo { font-size: 2.5rem; margin-bottom: 0.25rem; }
.home-brand__title { font-size: 1.35rem; color: var(--gold); margin-bottom: 0.35rem; }

.home-brand__titles-hint {
  font-size: 0.7rem;
  margin-top: 0.35rem;
  opacity: 0.55;
}

.user-identity {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

.user-identity__side {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  flex-shrink: 0;
}

.user-identity__side--left {
  justify-content: flex-end;
  flex-wrap: nowrap;
}

.user-identity__center {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.user-identity__name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-identity__levels-link {
  flex-shrink: 0;
  background: none;
  border: none;
  padding: 0.15rem 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--gold);
  cursor: pointer;
  font-family: inherit;
  opacity: 0.85;
  border-radius: var(--radius-sm);
}

.user-identity__levels-link:hover {
  opacity: 1;
  background: var(--gold-glow);
}

.user-titles-slot {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 0.25rem;
  max-width: 8rem;
  overflow: hidden;
}

.level-tier-badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border: 1px solid;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  white-space: nowrap;
  line-height: 1.3;
}

.level-tier-badge--sm {
  font-size: 0.65rem;
  padding: 0.15rem 0.45rem;
}

.level-table {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.level-table__row {
  display: grid;
  grid-template-columns: 3.5rem 1fr auto;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 0.65rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.level-table__num {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.level-table__xp {
  font-size: 0.8rem;
  font-weight: 600;
}

.profile-hero .user-identity {
  margin-top: 0.35rem;
  margin-bottom: 0.25rem;
}

.profile-hero__username {
  font-size: 0.8rem;
  margin-top: 0.35rem;
}

.profile-avatar {
  position: relative;
  width: 5.5rem;
  height: 5.5rem;
  margin: 0 auto 0.5rem;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 2px solid rgba(243, 210, 122, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.profile-avatar__placeholder {
  font-size: 2.5rem;
  line-height: 1;
}

.profile-avatar__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-avatar__edit {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  padding: 0;
}

.profile-avatar__edit:hover {
  border-color: var(--gold-dim);
}

.profile-avatar__edit:disabled {
  opacity: 0.55;
  cursor: wait;
}

.profile-code-block__title {
  font-size: 1rem;
  margin: 0 0 0.5rem;
  color: var(--gold);
}

.profile-code-block--compact {
  padding: 0.55rem 0.65rem;
}

.profile-code-inline {
  display: flex;
  gap: 0.45rem;
  align-items: center;
}

.profile-code-inline__btn {
  flex-shrink: 0;
  min-width: 3.25rem;
}

.profile-code-inline__error {
  font-size: 0.78rem;
  margin: 0.35rem 0 0;
}

.profile-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.profile-unlink-bar {
  display: inline-flex;
  align-items: center;
  width: auto;
  max-width: calc(100% - 3rem);
  padding: 0.28rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  font: inherit;
  font-size: 0.72rem;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.profile-unlink-bar:hover {
  color: var(--danger, #e74c3c);
  border-color: rgba(231, 76, 60, 0.45);
  background: rgba(231, 76, 60, 0.08);
}

.profile-code-unlink {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.modal-card.profile-revoke-modal {
  width: auto;
  max-width: min(680px, 96vw);
  min-width: min(520px, 96vw);
}

.modal-card.profile-revoke-modal .modal-card__head {
  display: none;
}

.modal-card.profile-revoke-modal .modal-card__body {
  padding: 0.75rem 1rem;
}

.profile-revoke-confirm {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.85rem;
}

.profile-revoke-confirm__text {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--text-primary);
}

.profile-revoke-confirm__text-col {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.profile-revoke-confirm__question {
  margin: 0;
  color: var(--gold);
  font-size: 0.9rem;
  line-height: 1.4;
  font-weight: 600;
}

.profile-revoke-confirm__warn {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: var(--danger, #e74c3c);
  text-transform: uppercase;
}

.profile-revoke-confirm__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
}

@media (max-width: 540px) {
  .modal-card.profile-revoke-modal {
    min-width: 0;
    width: 100%;
  }
}

.profile-code-block__status {
  margin-bottom: 0.5rem;
}

.profile-code-block__line {
  font-size: 0.85rem;
  margin: 0.2rem 0;
}

.profile-code-block__hint {
  font-size: 0.85rem;
  line-height: 1.45;
  margin-bottom: 0.75rem;
}

.profile-code__input {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.45rem 0.55rem;
  min-width: 0;
  flex: 1;
}

.profile-code__value {
  font-size: 1.35rem;
  letter-spacing: 0.15em;
  font-weight: 700;
  color: var(--gold);
  word-break: break-all;
}

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.data-table th,
.data-table td {
  border-bottom: 1px solid var(--border);
  padding: 0.45rem 0.35rem;
  text-align: left;
  vertical-align: top;
}

.sidebar-section--commander {
  margin-top: 0.35rem;
  border-top: 1px solid var(--border);
  padding-top: 0.35rem;
}

.sidebar-section--info {
  margin-top: 0.35rem;
  border-top: 1px solid var(--border);
  padding-top: 0.35rem;
}

.sidebar-section__body--info {
  padding: 0;
}

.sidebar-info-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-info-item:last-child {
  border-bottom: none;
}

.sidebar-info-item__head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.85rem;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: color var(--transition);
}

.sidebar-info-item__head:hover,
.sidebar-info-item--open .sidebar-info-item__head {
  color: var(--gold);
}

.sidebar-info-item__chevron {
  flex-shrink: 0;
  font-size: 0.9rem;
  opacity: 0.55;
  transition: transform 0.2s ease;
}

.sidebar-info-item--open .sidebar-info-item__chevron {
  transform: rotate(90deg);
  opacity: 0.9;
}

.sidebar-info-item__panel {
  display: none;
  padding: 0 0.85rem 0.75rem;
  max-height: min(42vh, 320px);
  overflow-y: auto;
  scrollbar-width: thin;
}

.sidebar-info-item--open .sidebar-info-item__panel {
  display: block;
}

.sidebar-info-item__content.content-html {
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.sidebar-info-item__content.content-html p {
  margin-bottom: 0.55rem;
}

.sidebar-info-item__content.content-html p:last-child {
  margin-bottom: 0;
}

.sidebar-info-item__content.content-html h2,
.sidebar-info-item__content.content-html h3 {
  font-size: 0.84rem;
  margin: 0.45rem 0 0.3rem;
}

.sidebar-info-item__content.content-html img {
  display: block;
  max-width: 100%;
  max-height: 7rem;
  height: auto;
  margin: 0.35rem 0;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  object-fit: contain;
}

.sidebar-download-block {
  padding: 0 0.5rem 0.5rem;
}

.sidebar-download-block__title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.5rem 0.5rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.sidebar-download-block__icon {
  font-size: 1rem;
  line-height: 1;
}

.sidebar__footer-extras {
  padding: 0 0.25rem 0.15rem;
}

.sidebar-admin-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: calc(100% - 2rem);
  margin: 0 1rem 0.5rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--gold-dim);
  border-radius: var(--radius-sm);
  background: rgba(201, 162, 39, 0.08);
  color: var(--gold);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: background var(--transition), border-color var(--transition);
}

.sidebar-admin-link .hk-icon-img {
  width: 1rem;
  height: 1rem;
  max-width: 1rem;
  max-height: 1rem;
  object-fit: contain;
  flex-shrink: 0;
}

.sidebar-admin-link:hover,
.sidebar-admin-link.active {
  background: rgba(201, 162, 39, 0.15);
  border-color: var(--gold);
}

.sidebar-download-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  padding: 0 0.25rem;
}

.sidebar-download-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 4.25rem;
  padding: 0.55rem 0.35rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  text-decoration: none;
  transition: border-color var(--transition), background var(--transition);
}

.sidebar-download-card:hover {
  border-color: var(--gold-dim);
  background: rgba(201, 162, 39, 0.06);
}

.sidebar-download-card__icon {
  font-size: 1.35rem;
  line-height: 1;
}

.sidebar-download-card__label {
  font-size: 0.68rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
  color: var(--text-secondary);
}

.sidebar-download-card:hover .sidebar-download-card__label {
  color: var(--gold);
}

.sidebar-section__head--static {
  cursor: default;
  pointer-events: none;
  opacity: 1;
}

.sidebar-section__head--static .sidebar-section__chevron {
  display: none;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.home-menu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
  margin-bottom: 0.65rem;
}

.home-menu-grid--partial {
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
}

.home-menu-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 6.25rem;
  padding: 0.75rem 0.45rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-primary);
  font-family: inherit;
  transition: border-color var(--transition);
}

.home-menu-card:hover { border-color: var(--gold-dim); }

.home-menu-card__icon {
  font-size: clamp(2rem, 3.5vw, 2.45rem);
  margin-bottom: 0.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(2.65rem, 4.8vw, 3.15rem);
  height: clamp(2.65rem, 4.8vw, 3.15rem);
  flex-shrink: 0;
}
.home-menu-card__title {
  font-size: 0.72rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.25;
}

.home-menu-card__badge {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.25rem;
  background: var(--danger);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-avatar {
  font-size: 2.5rem;
  margin-bottom: 0.35rem;
}

.home-action-row { display: flex; gap: 0.5rem; }

/* ── Admin panel grid ──────────────────────────────────── */
.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
}

.admin-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  text-decoration: none;
  color: var(--text-primary);
  min-height: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font: inherit;
  width: 100%;
  box-sizing: border-box;
}

.admin-card:hover {
  border-color: var(--gold-dim);
  background: var(--bg-elevated);
}

.admin-card__icon {
  font-size: 1.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
}
.admin-card__label { font-size: 0.8rem; font-weight: 600; }

/* ── Responsive ────────────────────────────────────────── */
@media (min-width: 768px) {
  .app-main { padding: 1.5rem; }
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
  .admin-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}

.sidebar-mobile-trigger {
  display: none;
  position: fixed;
  top: max(0.55rem, env(safe-area-inset-top, 0px));
  left: max(0.55rem, env(safe-area-inset-left, 0px));
  z-index: 95;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--bg-card) 92%, transparent);
  backdrop-filter: blur(10px);
  color: var(--gold);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.sidebar-drawer-backdrop {
  display: none;
}

@media (max-width: 1023px) {
  .sidebar-mobile-trigger {
    display: inline-flex;
  }

  html.hk-drawer-open {
    overflow: hidden;
  }

  .sidebar-drawer-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s ease, visibility 0.22s ease;
  }

  .app-shell--drawer-open .sidebar-drawer-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .sidebar {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(300px, 88vw);
    max-width: 100%;
    z-index: 210;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    overflow: hidden;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.35);
  }

  .app-shell--drawer-open .sidebar {
    transform: translateX(0);
  }

  .sidebar__head {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.75rem 0.85rem 0.65rem;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
  }

  .sidebar__brand-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-right: 2rem;
  }

  .sidebar__brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    min-width: 0;
    overflow: hidden;
  }

  .sidebar__brand-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
    line-height: 1;
  }

  .sidebar__brand-text {
    font-weight: 700;
    font-size: 1rem;
    color: var(--gold);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }

  .sidebar__toggle {
    position: absolute;
    top: 0.55rem;
    right: 0.55rem;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    width: 36px;
    height: 36px;
    cursor: pointer;
    flex-shrink: 0;
  }

  .sidebar__nav {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 0;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
  }

  .sidebar__footer {
    margin-top: auto;
    padding: 0.75rem 0 1rem;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
  }

  .sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.65rem 1rem;
    border: none;
    background: none;
    color: var(--text-secondary);
    font: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: color var(--transition), background var(--transition);
  }

  .sidebar-link:hover,
  .sidebar-link.active {
    color: var(--gold);
    background: var(--gold-glow);
  }

  .sidebar-link__icon {
    font-size: 1.1rem;
    width: 1.5rem;
    text-align: center;
    flex-shrink: 0;
  }

  .sidebar-section__head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.65rem 1rem;
    border: none;
    background: none;
    color: var(--text-primary);
    font: inherit;
    font-size: 0.875rem;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
  }

  .sidebar-section__head:hover {
    background: var(--bg-elevated);
  }

  .sidebar-section__icon {
    font-size: 1.25rem;
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex-shrink: 0;
  }

  .sidebar-section__chevron {
    margin-left: auto;
    transition: transform var(--transition);
    color: var(--text-muted);
  }

  .sidebar-section--open .sidebar-section__chevron {
    transform: rotate(90deg);
  }

  .sidebar-section__body {
    display: none;
    padding: 0.25rem 0 0.5rem 0.5rem;
  }

  .sidebar-section--open .sidebar-section__body {
    display: block;
  }

  .sidebar-topic {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: calc(100% - 0.5rem);
    margin-left: 0.5rem;
    padding: 0.45rem 0.75rem 0.45rem 1.75rem;
    border: none;
    background: none;
    color: var(--text-secondary);
    font: inherit;
    font-size: 0.8rem;
    text-align: left;
    cursor: pointer;
    border-radius: var(--radius-sm);
  }

  .sidebar-topic:hover {
    color: var(--gold);
    background: var(--gold-glow);
  }

  .sidebar-topic__count {
    font-size: 0.7rem;
    color: var(--text-muted);
    flex-shrink: 0;
  }

  .sidebar-empty {
    padding: 0.35rem 1rem 0.35rem 1.75rem;
    font-size: 0.75rem;
    color: var(--text-muted);
  }

  .sidebar-logout {
    display: block;
    width: calc(100% - 2rem);
    margin: 0 1rem;
    padding: 0.45rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-muted);
    font: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
  }

  .sidebar-logout:hover {
    color: var(--danger);
    border-color: rgba(224, 90, 90, 0.35);
    background: rgba(224, 90, 90, 0.08);
  }
}

.home-mobile-menu {
  display: block;
}

@media (min-width: 1024px) {
  .sidebar-mobile-trigger,
  .sidebar-drawer-backdrop {
    display: none !important;
  }

  :root {
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 72px;
  }

  .app-shell {
    --bar-zone-width: calc(100vw - var(--sidebar-width));
  }

  .app-shell--sidebar-collapsed {
    --bar-zone-width: calc(100vw - var(--sidebar-collapsed-width));
  }

  .sidebar {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    z-index: 90;
    overflow: hidden;
    transition: width var(--transition);
  }

  .sidebar--collapsed {
    width: var(--sidebar-collapsed-width);
  }

  .sidebar__head {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.75rem 0.85rem 0.65rem;
    border-bottom: 1px solid var(--border);
    min-height: auto;
  }

  .sidebar__brand-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-right: 2rem;
  }

  .sidebar__brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    min-width: 0;
    overflow: hidden;
    margin-bottom: 0;
  }

  .sidebar__brand-icon { font-size: 2.5rem; flex-shrink: 0; line-height: 1; }

  .sidebar__brand-text {
    font-weight: 700;
    font-size: 1rem;
    color: var(--gold);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }

  .sidebar__toggle {
    position: absolute;
    top: 0.55rem;
    right: 0.55rem;
  }

  .sidebar--collapsed .sidebar__brand-stack {
    display: none;
  }

  .sidebar--collapsed .sidebar__brand-text,
  .sidebar--collapsed .sidebar-link__label,
  .sidebar--collapsed .sidebar-section__label,
  .sidebar--collapsed .sidebar-section__chevron,
  .sidebar--collapsed .sidebar-topic span:first-child,
  .sidebar--collapsed .sidebar-topic__count,
  .sidebar--collapsed .sidebar-empty,
  .sidebar--collapsed .sidebar-info-item__head span:first-child,
  .sidebar--collapsed .sidebar-info-item__chevron,
  .sidebar--collapsed .sidebar-info-item__panel {
    display: none;
  }

  .sidebar--collapsed .sidebar-section__head {
    justify-content: center;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  .sidebar--collapsed .sidebar-section__body {
    display: none !important;
  }

  .sidebar--collapsed .sidebar-info-item__head {
    justify-content: center;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  .sidebar__toggle {
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    width: 36px;
    height: 36px;
    cursor: pointer;
    flex-shrink: 0;
  }

  .sidebar__nav {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 0;
    min-height: 0;
  }

  .sidebar__footer {
    margin-top: auto;
    padding: 0.75rem 0 1rem;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
  }

  .sidebar-link--profile {
    margin-bottom: 0.35rem;
  }

  .sidebar-profile-name {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .sidebar-profile-sub {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }

  .sidebar-logout {
    display: block;
    width: calc(100% - 2rem);
    margin: 0 1rem;
    padding: 0.45rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-muted);
    font: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
  }

  .sidebar-logout:hover {
    color: var(--danger);
    border-color: rgba(224, 90, 90, 0.35);
    background: rgba(224, 90, 90, 0.08);
  }

  .sidebar--collapsed .sidebar-profile-name,
  .sidebar--collapsed .sidebar-profile-sub,
  .sidebar--collapsed .sidebar-logout,
  .sidebar--collapsed .sidebar__footer-extras {
    display: none;
  }

  .sidebar--collapsed .sidebar-admin-link__label {
    display: none;
  }

  .sidebar--collapsed .sidebar-admin-link {
    width: auto;
    margin: 0 0.5rem 0.5rem;
    padding: 0.45rem;
    font-size: 1rem;
    line-height: 1;
  }

  .sidebar__divider {
    height: 1px;
    background: var(--border);
    margin: 0.5rem 0.75rem;
  }

  .sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.65rem 1rem;
    border: none;
    background: none;
    color: var(--text-secondary);
    font: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: color var(--transition), background var(--transition);
  }

  .sidebar-link:hover,
  .sidebar-link.active {
    color: var(--gold);
    background: var(--gold-glow);
  }

  .sidebar-link__icon {
    font-size: 1.1rem;
    width: 1.5rem;
    text-align: center;
    flex-shrink: 0;
  }

  .sidebar-section__head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.65rem 1rem;
    border: none;
    background: none;
    color: var(--text-primary);
    font: inherit;
    font-size: 0.875rem;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
  }

  .sidebar-section__head:hover {
    background: var(--bg-elevated);
  }

  .sidebar-section__icon {
    font-size: clamp(1.35rem, 1.6vw, 1.55rem);
    width: clamp(2rem, 2.4vw, 2.25rem);
    height: clamp(2rem, 2.4vw, 2.25rem);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex-shrink: 0;
  }

  .sidebar-section__chevron {
    margin-left: auto;
    transition: transform var(--transition);
    color: var(--text-muted);
  }

  .sidebar-section--open .sidebar-section__chevron {
    transform: rotate(90deg);
  }

  .sidebar-section__body {
    display: none;
    padding: 0.25rem 0 0.5rem 0.5rem;
  }

  .sidebar-section--open .sidebar-section__body {
    display: block;
  }

  .sidebar-topic {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: calc(100% - 0.5rem);
    margin-left: 0.5rem;
    padding: 0.45rem 0.75rem 0.45rem 1.75rem;
    border: none;
    background: none;
    color: var(--text-secondary);
    font: inherit;
    font-size: 0.8rem;
    text-align: left;
    cursor: pointer;
    border-radius: var(--radius-sm);
  }

  .sidebar-topic:hover {
    color: var(--gold);
    background: var(--gold-glow);
  }

  .sidebar-topic__count {
    font-size: 0.7rem;
    color: var(--text-muted);
    flex-shrink: 0;
  }

  .sidebar-empty {
    padding: 0.35rem 1rem 0.35rem 1.75rem;
    font-size: 0.75rem;
    color: var(--text-muted);
  }

  .app-shell__body {
    margin-left: var(--sidebar-width);
    min-height: 100dvh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: margin-left var(--transition);
  }

  .app-shell--sidebar-collapsed .app-shell__body {
    margin-left: var(--sidebar-collapsed-width);
  }

  .bottom-bar-zone {
    left: var(--sidebar-width);
    transition: left var(--transition);
  }

  .app-shell--sidebar-collapsed .bottom-bar-zone {
    left: var(--sidebar-collapsed-width);
  }

  .app-shell .app-main {
    max-width: 960px;
    margin: 0 auto;
    width: 100%;
    padding-bottom: calc(var(--nav-shell-height) + 0.75rem);
  }

  .app-shell .app-main:not(.app-main--home) {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
  }

  .app-shell .app-main.app-main--home {
    max-width: none;
    margin: 0;
    padding: 0.5rem 1.25rem calc(var(--nav-shell-height) + 0.35rem);
    height: 100%;
    min-height: 0;
    flex: 1;
  }

  .app-header {
    padding-left: 1rem;
  }

  .home-mobile-menu {
    display: none;
  }
}

@media (max-width: 1023px) {
  .app-shell .app-main {
    padding-bottom: calc(var(--nav-shell-height) + 0.5rem);
  }

  .app-shell .app-main.app-main--home {
    padding-bottom: calc(var(--nav-shell-height) + 0.35rem);
  }
}

.sidebar-section--myunits {
  margin-top: 0.35rem;
  border-top: 1px solid var(--border);
  padding-top: 0.15rem;
}

.sidebar-section__head--nav {
  cursor: pointer;
}

.sidebar-section__head--nav:hover,
.sidebar-section__head--nav.active {
  color: var(--gold);
  background: var(--gold-glow);
}

@media (min-width: 1024px) {
  .sidebar--collapsed .sidebar-section--myunits {
    padding-top: 0.25rem;
  }

  .sidebar--collapsed .sidebar-section__head--nav {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
    gap: 0;
  }

  .sidebar--collapsed .sidebar-section--myunits .sidebar-section__head--nav + .sidebar-section__head--nav {
    margin-top: 0.15rem;
  }
}

@media (min-width: 1024px) {
  .app-shell .app-main.app-main--my-units {
    max-width: none;
    margin: 0;
    padding: 0;
    height: 100%;
    min-height: 0;
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .my-units-page {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .my-units-page__empty {
    margin: 1rem;
  }

  .my-units-layout {
    display: grid;
    grid-template-columns: minmax(200px, 240px) minmax(0, 1fr);
    flex: 1;
    min-height: 0;
    align-items: stretch;
    gap: 0.75rem;
    padding: 0.75rem 0.75rem calc(var(--nav-shell-height) + 0.5rem) 0;
  }

  .my-units-tree-zone {
    display: flex;
    flex-direction: column;
    min-height: 0;
    min-width: 0;
  }

  .my-units-tree-card {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
  }

  .my-units-tree-card__head {
    flex-shrink: 0;
    padding: 0.75rem 0.85rem 0.55rem;
    border-bottom: 1px solid var(--border);
  }

  .my-units-tree-card__scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 0.5rem 0.5rem 0.65rem 0.65rem;
  }

  .my-units-dashboard-panel {
    overflow-y: auto;
    padding: 0.1rem 0.5rem 0 0;
    min-height: 0;
  }
}

.my-units-panel__title {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
}

.my-units-dashboard__head {
  margin-bottom: 1rem;
}

.my-units-dashboard__title {
  margin: 0 0 0.25rem;
  font-size: 1.2rem;
  color: var(--gold);
}

.unit-dash-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.unit-dash-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-height: 5.5rem;
}

.unit-dash-card--success {
  background: rgba(72, 160, 96, 0.18);
  border-color: rgba(72, 160, 96, 0.45);
}

.unit-dash-card--warn {
  background: rgba(224, 140, 60, 0.18);
  border-color: rgba(224, 140, 60, 0.45);
}

.unit-dash-card--danger {
  background: rgba(200, 72, 72, 0.18);
  border-color: rgba(200, 72, 72, 0.45);
}

.unit-dash-card--topic-best {
  background: rgba(72, 160, 96, 0.18);
  border-color: rgba(72, 160, 96, 0.45);
}

.unit-dash-card--topic-worst {
  background: rgba(200, 72, 72, 0.18);
  border-color: rgba(200, 72, 72, 0.45);
}

.unit-dash-card__label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.unit-dash-card__value {
  font-size: 0.95rem;
  line-height: 1.35;
  color: var(--text-primary);
}

.unit-dash-card__meta {
  margin-top: auto;
}

.unit-dash-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.unit-dash-block {
  padding: 0.85rem 1rem;
  margin-bottom: 0.75rem;
}

.unit-dash-block--clickable {
  display: block;
  width: 100%;
  text-align: left;
  cursor: pointer;
  color: var(--text-primary);
  font-family: inherit;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.unit-dash-block--clickable:hover {
  border-color: var(--gold-dim);
  box-shadow: 0 0 0 1px rgba(224, 184, 90, 0.15);
}

.unit-dash-block__hint {
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 0.35rem;
}

.unit-dash-block__more {
  margin-top: 0.35rem;
}

.unit-dash-roster {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.unit-leaderboard-modal .unit-user-rank--modal {
  max-height: min(70vh, 520px);
  overflow-y: auto;
}

.unit-leaderboard-modal .unit-user-rank__item {
  padding: 0.5rem 0;
}

.unit-dash-block__title {
  margin: 0 0 0.65rem;
  font-size: 0.9rem;
}

.unit-user-rank {
  list-style: none;
  margin: 0;
  padding: 0;
}

.unit-user-rank__item {
  display: grid;
  grid-template-columns: 1.75rem 1fr auto;
  gap: 0.35rem;
  align-items: center;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--text-primary);
}

.unit-user-rank__item--clickable {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  font-family: inherit;
  cursor: pointer;
  transition: background 0.12s;
}

.unit-user-rank__item--clickable:hover {
  background: rgba(224, 184, 90, 0.08);
}

.unit-user-rank__name {
  color: var(--text-primary);
}

.unit-user-rank__item:last-child {
  border-bottom: none;
}

.unit-user-rank__pos {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.unit-user-rank__score {
  color: var(--gold);
  font-weight: 600;
  font-size: 0.85rem;
}

.unit-training-tips {
  margin: 0;
  padding-left: 1.1rem;
}

.unit-training-tips li {
  margin-bottom: 0.45rem;
  font-size: 0.88rem;
  line-height: 1.45;
}

.unit-training-tips li:last-child {
  margin-bottom: 0;
}

.my-units-dashboard--personel {
  padding-top: 0.5rem;
}

@media (max-width: 1023px) {
  .my-units-layout {
    grid-template-columns: 1fr;
    padding: 0.75rem;
    padding-bottom: calc(var(--nav-shell-height) + 0.75rem);
    gap: 0.75rem;
  }

  .my-units-tree-card {
    max-height: min(42vh, 320px);
  }

  .my-units-dashboard-panel {
    padding: 0;
  }

  .unit-dash-grid,
  .unit-dash-columns {
    grid-template-columns: 1fr;
  }
}

.unit-personnel-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 220px;
  overflow-y: auto;
}

.unit-personnel-list__item {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
}

.unit-personnel-list__item--command {
  border-left: 3px solid var(--gold);
  padding-left: 0.5rem;
  margin-left: -0.5rem;
}

.unit-personnel-list__item:last-child {
  border-bottom: none;
}

.unit-personnel-list__name {
  font-weight: 600;
  font-size: 0.9rem;
}

/* Komutanlar kare kart + hiyerarşi modal */
.unit-commanders-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 9.5rem;
  min-height: 9.5rem;
  margin-bottom: 0.85rem;
  padding: 0.85rem 0.65rem;
  text-align: center;
  cursor: pointer;
  color: var(--text-primary);
  font-family: inherit;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.unit-commanders-card:hover {
  border-color: var(--gold-dim);
  box-shadow: 0 0 0 1px rgba(224, 184, 90, 0.15);
}

.unit-commanders-card__icon {
  font-size: 1.75rem;
  color: var(--gold);
  margin-bottom: 0.35rem;
  line-height: 1;
}

.unit-commanders-card__title {
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.unit-commanders-card__meta {
  font-size: 0.72rem;
  color: var(--gold);
  font-weight: 600;
}

.unit-commanders-card__hint {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.unit-commanders-modal.modal-card {
  max-height: min(90vh, 820px);
}

.unit-commanders-modal .modal-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding: 0;
  max-height: none;
  overflow: hidden;
}

.unit-member-stats-modal .modal-card__body {
  max-height: min(75vh, 640px);
  overflow-y: auto;
}

.unit-cmd-modal-wrap {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  height: 100%;
}

.unit-cmd-branch-tabs {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
  flex-shrink: 0;
}

.unit-cmd-branch-tab {
  flex: 1;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  color: var(--text-muted);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s, box-shadow 0.15s;
}

.unit-cmd-branch-tab:hover:not(.is-active) {
  border-color: var(--gold-dim);
  color: var(--text-primary);
}

.unit-cmd-branch-tab.is-active {
  background: linear-gradient(180deg, rgba(224, 184, 90, 0.28) 0%, rgba(224, 184, 90, 0.12) 100%);
  border-color: var(--gold);
  color: var(--gold);
  box-shadow: 0 0 14px rgba(224, 184, 90, 0.35), inset 0 0 0 1px rgba(224, 184, 90, 0.2);
}

.unit-cmd-branch-tab__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  margin-left: 0.25rem;
  padding: 0.05rem 0.35rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
  font-size: 0.72rem;
  font-weight: 700;
}

.unit-cmd-branch-tab.is-active .unit-cmd-branch-tab__count {
  background: rgba(224, 184, 90, 0.25);
  color: var(--gold);
}

.unit-cmd-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 1rem 1.25rem 1.25rem;
  touch-action: pan-y;
}

.unit-cmd-section {
  margin-bottom: 1.1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border);
}

.unit-cmd-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.unit-cmd-section__title {
  margin: 0 0 0.65rem;
  font-size: 0.92rem;
  color: var(--gold);
  letter-spacing: 0.02em;
}

.unit-cmd-boluk-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.unit-cmd-boluk-col__head {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.unit-cmd-group {
  margin-bottom: 0.65rem;
}

.unit-cmd-group__label {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.unit-cmd-group__chips {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.unit-cmd-group__chips--row {
  flex-direction: row;
  flex-wrap: wrap;
}

.unit-cmd-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  width: 100%;
  padding: 0.5rem 0.65rem;
  text-align: left;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}

.unit-cmd-chip:hover:not(:disabled) {
  border-color: var(--gold-dim);
  background: rgba(224, 184, 90, 0.06);
}

.unit-cmd-chip--vacant {
  opacity: 0.55;
  cursor: default;
}

.unit-cmd-chip__duty {
  font-size: 0.68rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.unit-cmd-chip__name {
  font-size: 0.88rem;
  font-weight: 600;
}

.unit-cmd-chip__unit {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.unit-member-stats__head {
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--border);
}

.unit-member-stats__name {
  font-size: 1.05rem;
}

@media (max-width: 640px) {
  .unit-cmd-boluk-split {
    grid-template-columns: 1fr;
  }

  .unit-commanders-card {
    max-width: none;
    min-height: 7rem;
    flex-direction: row;
    gap: 0.75rem;
    text-align: left;
    justify-content: flex-start;
    padding: 0.85rem 1rem;
  }

  .unit-commanders-card__icon {
    margin-bottom: 0;
    font-size: 1.5rem;
  }
}

.demo-create-modal .modal-card__close {
  display: none;
}

.demo-create-progress {
  text-align: center;
  padding: 0.5rem 0;
}

.demo-create-progress__label {
  margin-bottom: 0.35rem;
}

.demo-create-progress__count {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
}

.demo-create-progress__bar {
  height: 10px;
  background: var(--bg-secondary);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 0.75rem;
}

.demo-create-progress__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold));
  border-radius: 999px;
  transition: width 0.25s ease;
}

.demo-create-done {
  text-align: center;
}

.demo-create-done__icon {
  font-size: 2.5rem;
  margin: 0 0 0.5rem;
}

.admin-demo-users__examples {
  font-size: 0.85rem;
  padding-left: 1.1rem;
  margin-bottom: 0.75rem;
}

.admin-demo-stats-config {
  padding: 0.85rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
}

.admin-demo-stats-config__title {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  color: var(--gold);
}

.admin-demo-stats-config__row {
  margin-bottom: 0.75rem;
}

.admin-demo-stats-config__label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--text-primary);
}

.admin-demo-stats-config__controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.admin-demo-stats-config__controls input[type="range"] {
  flex: 1;
  min-width: 0;
  accent-color: var(--gold);
}

.admin-demo-stats-config__num {
  width: 4.25rem;
  text-align: center;
  padding: 0.35rem 0.4rem;
}

.admin-demo-stats-config__suffix {
  font-size: 0.85rem;
  color: var(--text-secondary);
  min-width: 1rem;
}

@media (max-width: 767px) {
  .my-units-layout {
    grid-template-columns: 1fr;
  }
}

.my-units-exams-page {
  padding: 0.25rem 0;
}

.unit-tree {
  list-style: none;
  margin: 0;
  padding: 0;
}

.unit-tree.is-collapsed {
  display: none;
}

.unit-tree--depth-0 { padding-left: 0; }
.unit-tree--depth-1 { padding-left: 0.75rem; }
.unit-tree--depth-2 { padding-left: 1.25rem; }
.unit-tree--depth-3 { padding-left: 1.75rem; }

.unit-tree__label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.unit-tree__chevron {
  flex-shrink: 0;
  width: 0.85rem;
  font-size: 0.65rem;
  color: var(--gold);
}

.unit-tree__chevron--spacer {
  visibility: hidden;
}

.unit-tree__btn {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  width: 100%;
  padding: 0.4rem 0.5rem;
  border: none;
  background: none;
  color: var(--text-secondary);
  font: inherit;
  font-size: 0.85rem;
  text-align: left;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.unit-tree__btn:hover,
.unit-tree__btn.active {
  background: rgba(201, 168, 76, 0.12);
  color: var(--gold);
}

.personnel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}

.personnel-card__meta {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
}

.personnel-card__meta div {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.2rem 0;
}

.personnel-card__meta dt {
  color: var(--text-muted);
}

.personnel-card__meta dd {
  margin: 0;
  text-align: right;
}

.hierarchy-picker .hp-level + .hp-level {
  margin-top: 0.5rem;
}

.ref-code, .ref-code-lg {
  font-family: ui-monospace, monospace;
  letter-spacing: 0.12em;
}

.ref-code-lg {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--gold);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
  border: 1px solid transparent;
}

.btn-danger:hover {
  filter: brightness(1.08);
}

.stepper-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.stepper-btn {
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.stepper-input {
  flex: 1;
  text-align: center;
}

.settings-row {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

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

.settings-row--font {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.font-stepper {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.font-stepper__btn {
  width: 1.75rem;
  height: 1.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
}

.font-stepper__val {
  min-width: 2.5rem;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.level-tier-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.level-tier-list__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.level-tier-list__range {
  font-weight: 700;
  font-size: 0.9rem;
  min-width: 5.5rem;
}

.level-tier-list__xp {
  font-size: 0.75rem;
  margin-left: auto;
}

.sidebar-section__head--link {
  width: 100%;
  cursor: pointer;
  pointer-events: auto;
  background: none;
  border: none;
  font: inherit;
  color: inherit;
  text-align: left;
}

.sidebar-section__head--link.active {
  color: var(--gold);
}

.user-pick-card {
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
}

.ataturk-accordion__item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.45rem;
  overflow: hidden;
  background: var(--bg-card);
}

.ataturk-modal .ataturk-accordion__item:last-child {
  margin-bottom: 0;
}

.ataturk-accordion__head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  background: var(--bg-secondary);
  border: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}

.ataturk-modal .ataturk-accordion__item {
  margin-bottom: 0.32rem;
}

.ataturk-modal .ataturk-accordion__head {
  padding: 0.62rem 0.78rem;
  font-size: 0.86rem;
}

.ataturk-modal .ataturk-accordion__body {
  max-height: min(520px, 68vh);
  padding: 0.65rem 0.78rem;
}

.ataturk-modal .content-html.ataturk-text {
  columns: 1;
}

.ataturk-modal .content-html.ataturk-text p {
  break-inside: avoid;
  margin-bottom: 0.42rem;
  text-align: left;
  hyphens: none;
}

.ataturk-modal .content-html.ataturk-text p:last-child {
  margin-bottom: 0;
}

.ataturk-modal .ataturk-text {
  font-size: 0.8rem;
  line-height: 1.48;
  margin-bottom: 0.42rem;
}

.ataturk-modal .ataturk-duty-table {
  font-size: 0.78rem;
}

.ataturk-modal .ataturk-duty-table th,
.ataturk-modal .ataturk-duty-table td {
  padding: 0.42rem 0.52rem;
}

.ataturk-accordion__chev {
  transition: transform 0.2s;
  color: var(--gold);
}

.ataturk-accordion__item--open .ataturk-accordion__chev {
  transform: rotate(90deg);
}

.ataturk-accordion__body {
  display: none;
  padding: 1rem;
  max-height: 50vh;
  overflow-y: auto;
}

.ataturk-accordion__item--open .ataturk-accordion__body {
  display: block;
}

.ataturk-text {
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--text-secondary);
  margin-bottom: 0.65rem;
}

.ataturk-duty-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.ataturk-duty-table th,
.ataturk-duty-table td {
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.ataturk-duty-table th {
  background: var(--bg-secondary);
  color: var(--gold);
  font-weight: 700;
}

.ataturk-duty-table tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.02);
}

html[data-theme="light"] .ataturk-duty-table tr:nth-child(even) td {
  background: rgba(0, 0, 0, 0.03);
}

/* ── Çalışma programı ─────────────────────────────────── */
.study-plan-hub {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr));
  gap: 0.75rem;
}

.study-plan-hub-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 1rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  cursor: pointer;
  font: inherit;
  color: inherit;
  min-height: 7.5rem;
}

.study-plan-hub-card__icon {
  font-size: 1.75rem;
  line-height: 1;
  margin-bottom: 0.45rem;
}

.study-plan-hub-card__title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1.25;
  margin-bottom: 0.35rem;
}

.study-plan-hub-card__desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

.study-plan-section-title {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  color: var(--gold);
  font-weight: 700;
}

.study-plan-tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0.65rem;
}

.study-plan-tech-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 0.85rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.study-plan-tech-card__icon {
  font-size: 1.5rem;
  margin-bottom: 0.35rem;
}

.study-plan-tech-card__title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 0.25rem;
}

.study-plan-tech-card__summary {
  font-size: 0.74rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

.study-plan-tech-detail {
  padding: 1rem 0.95rem;
}

.study-plan-tech-detail__icon {
  font-size: 2rem;
  margin: 0 0 0.35rem;
  text-align: center;
}

.study-plan-tech-detail__summary {
  margin: 0 0 0.65rem;
  font-weight: 600;
  color: var(--gold);
  line-height: 1.4;
}

.study-plan-tech-detail__body {
  margin: 0 0 0.85rem;
  color: var(--text-secondary);
  line-height: 1.55;
  font-size: 0.88rem;
}

.study-plan-tech-detail__steps-title {
  margin: 0 0 0.45rem;
  font-size: 0.92rem;
  color: var(--gold);
}

.study-plan-tech-detail__steps {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--text-primary);
  line-height: 1.5;
  font-size: 0.86rem;
}

.study-plan-tech-detail__steps li {
  margin-bottom: 0.4rem;
}

.study-plan-tech-detail__when {
  margin: 0 0 0.85rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(212, 168, 67, 0.35);
  border-radius: var(--radius-sm);
  background: rgba(212, 168, 67, 0.08);
  font-size: 0.84rem;
  line-height: 1.45;
}

.study-plan-tech-detail__when strong {
  display: block;
  color: var(--gold);
  margin-bottom: 0.25rem;
  font-size: 0.82rem;
}

.study-plan-tech-examples {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.study-plan-tech-example {
  padding: 0.75rem 0.8rem;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
}

.study-plan-tech-example__title {
  margin: 0 0 0.45rem;
  font-size: 0.88rem;
  color: var(--gold);
  font-weight: 700;
}

.study-plan-tech-example__label {
  margin: 0 0 0.2rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

.study-plan-tech-example__text {
  margin: 0 0 0.55rem;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--text-primary);
}

.study-plan-tech-example__text--apply {
  margin-bottom: 0;
  padding: 0.5rem 0.55rem;
  border-left: 3px solid rgba(212, 168, 67, 0.65);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
}

.study-plan-tech-detail__tips {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--text-primary);
  line-height: 1.5;
  font-size: 0.84rem;
}

.study-plan-tech-detail__tips li {
  margin-bottom: 0.35rem;
}

.study-plan-intro {
  text-align: center;
}

.study-plan-intro__icon {
  font-size: 2rem;
  margin: 0 0 0.5rem;
}

.study-plan-intro__text {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.55;
  font-size: 0.92rem;
}

.study-plan-table-wrap {
  padding: 0;
  overflow-x: auto;
}

.study-plan-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.study-plan-table th,
.study-plan-table td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.study-plan-table th {
  background: var(--bg-secondary);
  color: var(--gold);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.study-plan-table__topic {
  display: block;
  color: var(--text-primary);
  font-size: 0.88rem;
  margin-top: 0.15rem;
}

.study-plan-table__reason {
  display: block;
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

.study-plan-priority {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
}

.study-plan-priority--high {
  color: var(--danger);
  background: rgba(224, 90, 90, 0.12);
  border: 1px solid rgba(224, 90, 90, 0.3);
}

.study-plan-priority--mid {
  color: var(--warning);
  background: rgba(224, 184, 90, 0.12);
  border: 1px solid rgba(224, 184, 90, 0.3);
}

.study-plan-priority--normal {
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
}

.app-main--study-plan {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
  overflow: hidden;
  padding-top: 0.5rem;
  padding-bottom: calc(var(--nav-shell-height) + 0.35rem);
}

.app-shell .app-main.app-main--study-plan {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.app-main--study-plan .btn.btn-ghost.mb-2 {
  margin-bottom: 0.35rem;
  flex-shrink: 0;
}

.app-main--study-plan #study-plan-app {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.study-plan-screen {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  gap: 0.45rem;
  overflow: hidden;
}

.study-plan-intro--compact {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-align: left;
  padding: 0.55rem 0.75rem;
  margin-bottom: 0;
  flex-shrink: 0;
}

.study-plan-intro--compact .study-plan-intro__icon {
  font-size: 1.35rem;
  margin: 0;
  flex-shrink: 0;
}

.study-plan-intro--compact .study-plan-intro__text {
  font-size: 0.92rem;
  line-height: 1.35;
}

.study-plan-table-wrap--fit {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
}

.study-plan-table--fit {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.study-plan-table--fit thead {
  flex-shrink: 0;
  display: table;
  width: 100%;
  table-layout: fixed;
}

.study-plan-table--fit tbody {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.study-plan-table--fit tbody tr {
  flex: 1 1 0;
  display: table;
  width: 100%;
  table-layout: fixed;
}

.study-plan-table--fit th,
.study-plan-table--fit td {
  padding: 0.35rem 0.5rem;
  vertical-align: middle;
}

.study-plan-table--fit .study-plan-table__topic {
  margin-top: 0.08rem;
  line-height: 1.25;
}

.study-plan-table--fit td:last-child .btn {
  padding: 0.3rem 0.5rem;
  min-height: auto;
}

@media (min-width: 1024px) {
  .app-shell .app-main.app-main--study-plan {
    height: calc(100dvh - var(--header-height));
    max-height: calc(100dvh - var(--header-height));
  }
}

@media (max-width: 1023px) {
  .app-shell__body:has(.app-main--study-plan) {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
  }

  .app-main--study-plan {
    height: calc(100dvh - var(--header-height) - var(--nav-shell-height));
    max-height: calc(100dvh - var(--header-height) - var(--nav-shell-height));
  }
}

/* ── Arkadaşlar ────────────────────────────────────────── */
.friend-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.friend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0.85rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.friend-row__main {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
  flex: 1;
}

.friend-row__main strong {
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.friend-row__main .text-muted {
  font-size: 0.78rem;
}

.friend-row__actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.friend-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-top: 0.15rem;
}

.friend-meta__strike {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--warning);
}

.friend-meta__lv {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gold);
  opacity: 0.85;
}

.friend-status-badge {
  font-size: 0.72rem;
  color: var(--text-muted);
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 999px;
}

/* ── Utility ───────────────────────────────────────────── */
.hidden { display: none !important; }

.arena-queue-active {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.arena-queue-status {
  text-align: center;
  font-size: 0.95rem;
}

.arena-queue-cancel-btn {
  background: transparent;
  color: var(--danger);
  border: 1px solid color-mix(in srgb, var(--danger) 55%, var(--border));
}

.arena-queue-cancel-btn:hover:not(:disabled) {
  background: color-mix(in srgb, var(--danger) 12%, transparent);
  border-color: var(--danger);
}

.arena-queue-cancel-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ── Konu test boyutu seçimi ───────────────────────────── */
.topic-test-card {
  padding: 1.25rem 1rem 1.5rem;
  text-align: center;
}

.topic-test-card__meta {
  margin: 0 0 0.25rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.topic-test-card__meta strong {
  color: var(--gold);
}

.test-size-hint {
  font-size: 0.85rem;
  margin: 0.75rem 0 1rem;
}

.test-size-row {
  display: flex;
  gap: 0.65rem;
  justify-content: center;
  align-items: stretch;
}

.test-size-pill {
  flex: 1;
  min-width: 0;
  max-width: 118px;
  padding: 0.85rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(224, 184, 90, 0.35);
  background: linear-gradient(160deg, var(--bg-card) 0%, rgba(224, 184, 90, 0.08) 100%);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  transition: border-color var(--transition), background var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.test-size-pill:hover:not(:disabled) {
  border-color: var(--gold);
  background: var(--gold-glow);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(224, 184, 90, 0.18);
}

.test-size-pill:active:not(:disabled) {
  transform: translateY(0);
}

.test-size-pill:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  box-shadow: none;
}

.test-size-pill__num {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--gold);
}

.test-size-pill__label {
  font-size: 0.62rem;
  line-height: 1.2;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: center;
}

.topic-branch-hero {
  text-align: center;
  padding: 1.25rem;
}

.topic-branch-hero__icon {
  font-size: 2.25rem;
  margin-bottom: 0.35rem;
}

@media (max-width: 420px) {
  .test-size-pill__label {
    font-size: 0.58rem;
  }

  .test-size-pill__num {
    font-size: 1.2rem;
  }
}
.text-center { text-align: center; }
.text-muted { color: var(--text-secondary); }
.text-gold { color: var(--gold); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-2 { margin-bottom: 1rem; }

/* ── UI v4: Anasayfa dashboard, hover border, quiz session ── */

@property --border-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

.hover-border-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.hover-border-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(from var(--border-angle), transparent 65%, var(--gold) 82%, transparent 95%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
  z-index: 2;
}

.hover-border-card:hover::before {
  opacity: 1;
  animation: hover-border-spin 2.4s linear infinite;
}

@keyframes hover-border-spin {
  to { --border-angle: 360deg; }
}

.app-main--home {
  overflow: hidden;
  padding: clamp(0.35rem, 0.9vh, 0.65rem) clamp(0.5rem, 1.2vw, 1rem);
  padding-bottom: calc(var(--nav-shell-height) + clamp(0.35rem, 0.9vh, 0.65rem));
  max-width: none !important;
  margin: 0 !important;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 100%;
  height: 100%;
}

.home-dash {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  height: 100%;
  width: 100%;
  gap: 0;
  position: relative;
}

.home-dash__top {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: auto;
  align-items: start;
  flex-shrink: 0;
  column-gap: clamp(0.55rem, 1.2vw, 1.1rem);
  --home-brand-top: clamp(5.5rem, 10vh, 6.25rem);
  padding: clamp(0.15rem, 0.35vh, 0.3rem) clamp(0.5rem, 1vw, 0.85rem) clamp(0.35rem, 0.75vh, 0.55rem);
}

.home-dash__corner-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.12rem, 0.32vh, 0.22rem);
  align-self: start;
  z-index: 2;
}

.home-dash__corner-col--left {
  grid-column: 1;
  grid-row: 1;
}

.home-dash__corner-col--right {
  grid-column: 3;
  grid-row: 1;
}

.home-dash__brand-stack {
  grid-column: 2;
  grid-row: 1;
  position: relative;
  left: auto;
  top: auto;
  transform: none;
  justify-self: center;
  align-self: start;
  padding-top: var(--home-brand-top);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.22rem, 0.45vh, 0.35rem);
  width: min(360px, 100%);
  z-index: 1;
  pointer-events: none;
}

.home-dash__brand-stack > * {
  pointer-events: auto;
  width: 100%;
}

.home-dash__brand-head {
  padding-top: 0;
  width: 100%;
  max-width: 360px;
}

.home-dash__xp-wrap {
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
}

.home-dash__quote-wrap {
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  flex-shrink: 0;
  height: clamp(4.85rem, 10.5vh, 5.85rem);
  padding: 0 clamp(0.5rem, 1vw, 0.85rem);
  overflow: visible;
}

.home-dash__quote-bar {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(clamp(190px, 26vw, 320px), calc(100% - 4.5rem));
  height: clamp(4.65rem, 10vh, 5.65rem);
  min-height: 0;
  max-height: clamp(4.65rem, 10vh, 5.65rem);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(0.5rem, 1vh, 0.7rem) clamp(0.6rem, 1.1vw, 0.85rem);
  padding-bottom: clamp(1.25rem, 2.2vh, 1.5rem);
  overflow: hidden;
  margin: 0;
  box-sizing: border-box;
}

.home-dash__quote-bar .home-quote__text {
  display: -webkit-box;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  max-height: 100%;
  font-size: clamp(0.68rem, 0.98vw, 0.82rem);
  line-height: 1.4;
  color: var(--text-primary);
  margin: 0;
  transition: opacity 0.6s ease;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-align: left;
  word-break: break-word;
  font-style: italic;
}

.home-dash__quote-bar .home-quote__sig {
  position: absolute;
  right: clamp(0.65rem, 1.2vw, 0.9rem);
  bottom: clamp(0.42rem, 0.85vh, 0.58rem);
  font-size: clamp(0.6rem, 0.88vw, 0.72rem);
  color: var(--gold);
  font-style: italic;
  white-space: nowrap;
  text-align: right;
}

.home-dash__corner-btn--strike .home-dash__corner-btn-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.75rem, 2.85vw, 2.25rem);
  line-height: 1;
  width: clamp(1.75rem, 2.85vw, 2.25rem);
  height: clamp(1.75rem, 2.85vw, 2.25rem);
  overflow: visible;
}

.home-dash__corner-btn--strike .home-strike-fire.home-strike-fire--corner {
  font-size: clamp(1.75rem, 2.85vw, 2.25rem) !important;
  width: clamp(1.75rem, 2.85vw, 2.25rem) !important;
  height: clamp(1.75rem, 2.85vw, 2.25rem) !important;
  line-height: 1;
}

.home-dash__corner-btn--strike .home-strike-fire--corner .home-strike-fire__num {
  top: 64%;
  font-weight: 700;
  color: var(--gold);
}

.home-dash__corner-btn--strike .home-strike-fire--corner .home-strike-fire__num--sm {
  font-size: clamp(0.54rem, 1vw, 0.68rem);
}

.home-dash__corner-btn--strike .home-strike-fire--corner .home-strike-fire__num--md {
  font-size: clamp(0.46rem, 0.88vw, 0.58rem);
}

.home-dash__corner-btn--strike .home-strike-fire--corner .home-strike-fire__num--lg {
  font-size: clamp(0.38rem, 0.74vw, 0.48rem);
}

.home-dash__corner-btn--strike {
  cursor: pointer;
  padding-bottom: clamp(0.95rem, 1.8vh, 1.15rem);
}

.home-dash__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0;
  min-width: 0;
  width: 100%;
  max-width: 360px;
}

.home-dash__brand-icon {
  font-size: clamp(2.35rem, 4.5vw, 3.25rem);
  line-height: 1;
}

.home-dash__brand-name {
  font-size: clamp(1.12rem, 1.82vw, 1.38rem);
  font-weight: 700;
  color: var(--gold);
  line-height: 1.2;
  width: 100%;
  text-align: center;
  margin: 0;
}

.home-dash__user-line {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  min-height: 1.45em;
  margin-top: clamp(0.58rem, 1.15vh, 0.9rem);
}

.home-dash__user-anchor {
  position: relative;
  display: inline-block;
  max-width: min(56vw, 220px);
}

.home-dash__user-name {
  display: block;
  font-size: clamp(0.9rem, 1.25vw, 1.05rem);
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  text-align: center;
  margin: 0 auto;
}

.home-dash__user-tier {
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  margin-right: clamp(0.28rem, 0.55vw, 0.42rem);
  white-space: nowrap;
  flex-shrink: 0;
}

.home-dash__user-tier .level-tier-badge {
  font-size: clamp(0.58rem, 0.85vw, 0.68rem);
  padding: 0.12rem 0.38rem;
}

.home-dash__user-level {
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  margin-left: clamp(0.28rem, 0.55vw, 0.42rem);
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--gold);
  font-size: clamp(0.68rem, 1vw, 0.8rem);
  font-weight: 600;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.home-dash__brand .level-tier-badge {
  font-size: clamp(0.62rem, 0.9vw, 0.72rem);
  padding: 0.15rem 0.45rem;
}

.home-dash__xp {
  width: 100%;
  margin-top: 0;
}

.home-dash__xp-bar {
  position: relative;
  height: clamp(7px, 0.9vh, 9px);
  background: linear-gradient(180deg, #1a1814 0%, #252118 100%);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(80, 68, 40, 0.55);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.45);
}

.home-dash__xp-fill {
  position: relative;
  height: 100%;
  width: 0;
  border-radius: 999px;
  overflow: hidden;
  background: linear-gradient(
    180deg,
    #a88432 0%,
    #c49a3a 42%,
    #b08830 78%,
    #8f6e28 100%
  );
}

.home-dash__xp-bubbles {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 200%;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  will-change: transform;
}

.home-dash__xp-bubbles--a {
  background-image:
    radial-gradient(circle, rgba(255, 236, 190, 0.38) 0 1px, transparent 1.5px),
    radial-gradient(circle, rgba(255, 220, 150, 0.28) 0 0.75px, transparent 1.2px),
    radial-gradient(circle, rgba(255, 248, 215, 0.32) 0 1.05px, transparent 1.55px),
    radial-gradient(circle, rgba(255, 210, 130, 0.22) 0 0.65px, transparent 1.1px);
  background-size: 24px 14px, 18px 11px, 30px 16px, 20px 12px;
  background-position: 2px 0, 10px 5px, 16px 2px, 22px 8px;
}

.home-dash__xp-bubbles--b {
  background-image:
    radial-gradient(circle, rgba(255, 230, 165, 0.26) 0 0.85px, transparent 1.35px),
    radial-gradient(circle, rgba(255, 245, 205, 0.2) 0 0.6px, transparent 1px),
    radial-gradient(circle, rgba(255, 215, 140, 0.24) 0 0.9px, transparent 1.4px);
  background-size: 26px 13px, 16px 10px, 22px 15px;
  background-position: 6px 3px, 14px 7px, 20px 1px;
}

.home-dash__xp-fill--animate {
  animation: home-dash-xp-fill 2.85s cubic-bezier(0.22, 0.95, 0.28, 1) forwards;
}

.home-dash__xp-fill--animate .home-dash__xp-bubbles--a {
  animation:
    home-dash-xp-bubble-in 0.01s linear 2.85s forwards,
    home-dash-xp-bubble-rise-a 2.6s linear 2.85s infinite;
}

.home-dash__xp-fill--animate .home-dash__xp-bubbles--b {
  animation:
    home-dash-xp-bubble-in 0.01s linear 3.05s forwards,
    home-dash-xp-bubble-rise-b 3.4s linear 3.05s infinite;
}

@keyframes home-dash-xp-fill {
  from { width: 0; }
  to { width: var(--xp-target, 0%); }
}

@keyframes home-dash-xp-bubble-in {
  to { opacity: 0.75; }
}

@keyframes home-dash-xp-bubble-rise-a {
  from { transform: translateY(0); }
  to { transform: translateY(-50%); }
}

@keyframes home-dash-xp-bubble-rise-b {
  from { transform: translateY(10%); }
  to { transform: translateY(-40%); }
}

.home-dash__xp-text {
  display: block;
  width: 100%;
  text-align: center;
  font-size: clamp(0.58rem, 0.85vw, 0.68rem);
  color: var(--text-secondary);
  margin-top: 0.22rem;
  font-variant-numeric: tabular-nums;
}

.home-dash__body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin-top: 0;
}

.home-dash__block--cats {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.home-dash__activity-title {
  font-size: clamp(0.55rem, 0.82vw, 0.65rem);
  letter-spacing: 0.08em;
  color: var(--gold-dim);
  margin: 0 0 0.28rem;
  text-transform: uppercase;
}

.home-dash__activity .home-dash__feed {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.home-dash__activity .home-dash__feed li {
  font-size: clamp(0.58rem, 0.85vw, 0.68rem);
  line-height: 1.25;
}

.home-dash__activity .home-dash__feed li + li {
  margin-top: 0.18rem;
}

.home-dash__activity .home-dash__feed time {
  font-size: clamp(0.52rem, 0.78vw, 0.62rem);
}

.home-dash__corner-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.2rem, 0.38vh, 0.28rem);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.1rem 0.3rem;
  font-family: inherit;
  color: inherit;
  z-index: 2;
}

.home-dash__corner-btn:hover { opacity: 0.85; }

.home-dash__corner-btn-icon {
  font-size: clamp(1.75rem, 2.75vw, 2.15rem);
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(2.15rem, 3.4vw, 2.65rem);
  height: clamp(2.15rem, 3.4vw, 2.65rem);
}

.home-dash__corner-btn span:last-child {
  font-size: clamp(0.65rem, 0.95vw, 0.78rem);
  color: var(--text-secondary);
  line-height: 1.15;
}

.home-dash__corner-btn--badge {
  position: relative;
}

.home-dash__corner-btn--badge .home-dash__badge {
  top: -2px;
  right: 0;
}

.home-dash__icon-btn {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: clamp(2.35rem, 4.2vw, 2.95rem);
  height: clamp(2.35rem, 4.2vw, 2.95rem);
  font-size: clamp(1.15rem, 1.9vw, 1.4rem);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  line-height: 1;
}

.home-dash__icon-btn:hover { border-color: var(--gold-dim); }

.home-dash__badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 15px;
  height: 15px;
  padding: 0 3px;
  border-radius: 999px;
  background: var(--gold);
  color: #111;
  font-size: 0.55rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-dash__block--cats {
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: clamp(0.35rem, 0.75vh, 0.5rem);
}

.home-dash__block-title--cats {
  margin: 0 0 clamp(0.3rem, 0.65vh, 0.42rem);
}

.home-dash__block-title--quick {
  margin: clamp(0.15rem, 0.35vh, 0.25rem) 0 clamp(0.3rem, 0.65vh, 0.42rem);
}

.home-dash__subjects-row,
.home-dash__quick-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(0.35rem, 0.75vw, 0.55rem);
}

.home-dash__subjects-row {
  flex-shrink: 0;
}

.home-dash__quick-row {
  flex: 1;
  min-height: 0;
}

.home-subject-chip,
.home-quick-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(0.75rem, 1.35vh, 0.95rem) clamp(0.4rem, 0.65vw, 0.5rem) clamp(0.55rem, 0.95vh, 0.7rem);
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0;
  min-height: clamp(9.25rem, 19vh, 11rem);
  height: clamp(9.25rem, 19vh, 11rem);
  text-align: center;
  min-width: 0;
  --home-tile-icon: clamp(4.25rem, 14vw, 5.5rem);
}

.home-quick-card--badge {
  position: relative;
}

.home-quick-card__badge {
  position: absolute;
  top: clamp(0.35rem, 0.75vh, 0.5rem);
  right: clamp(0.35rem, 0.75vw, 0.5rem);
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: #e53935;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 0 0 2px var(--bg-card);
}

.home-subject-chip__icon,
.home-quick-card__icon {
  font-size: var(--home-tile-icon);
  line-height: 1;
  flex: 0 0 var(--home-tile-icon);
  width: 100%;
  height: var(--home-tile-icon);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}

.home-subject-chip__icon .hk-icon-img--home-tile,
.home-quick-card__icon .hk-icon-img--home-tile,
.home-subject-chip__icon .home-tile-emoji,
.home-quick-card__icon .home-tile-emoji {
  transform: scale(
    var(--home-tile-scale-x, var(--home-tile-scale, 1)),
    var(--home-tile-scale-y, var(--home-tile-scale, 1))
  ) translateY(var(--home-tile-shift-y, 0));
  transform-origin: top center;
}

/* Görsel algısı — PNG yapısına göre ince ayar */
.home-subject-chip[data-tile-id="askeri"] { --home-tile-scale: 1.22; }
.home-subject-chip[data-tile-id="turkce"] { --home-tile-scale: 1.18; }
.home-subject-chip[data-tile-id="mevzuat"] { --home-tile-scale: 0.92; --home-tile-shift-y: 0.28rem; }
.home-quick-card[data-tile-id="favorites"] { --home-tile-scale: 1.2; }
.home-quick-card[data-tile-id="study-plan"] { --home-tile-shift-y: 0.28rem; }
.home-quick-card[data-tile-id="simulation"] {
  --home-tile-scale-x: 1.08;
  --home-tile-scale-y: 1.24;
}

/* Sidebar / admin — Sınav Yönetimi PNG dikey büyütme */
.sidebar-section__head--nav[data-nav="/my-units/exams"] .sidebar-section__icon .hk-icon-img,
.admin-card[data-nav="/admin/exams"] .admin-card__icon .hk-icon-img {
  transform: scale(1, 1.14);
  transform-origin: center center;
}

.home-subject-chip__title,
.home-quick-card__title {
  flex: 1 1 auto;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin-top: auto;
  min-height: 2.65em;
  padding-top: 0.35rem;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: 0.01em;
  text-align: center;
  -webkit-line-clamp: unset;
  -webkit-box-orient: unset;
  overflow: visible;
  word-break: break-word;
  hyphens: auto;
}

.home-subject-chip__title {
  color: var(--gold);
}

.home-quick-card__title {
  color: var(--text-primary);
}

.home-quick-card--accent {
  border-color: rgba(212, 168, 67, 0.55);
  background: linear-gradient(165deg, rgba(212, 168, 67, 0.18) 0%, rgba(212, 168, 67, 0.06) 48%, var(--bg-card) 100%);
  box-shadow: inset 0 1px 0 rgba(212, 168, 67, 0.12);
}

.home-quick-card--accent .home-quick-card__title {
  color: var(--gold);
}

.home-quick-card--exam {
  border-color: rgba(34, 120, 68, 0.65);
  background: linear-gradient(165deg, rgba(22, 92, 52, 0.28) 0%, rgba(22, 92, 52, 0.08) 48%, var(--bg-card) 100%);
  box-shadow: inset 0 1px 0 rgba(72, 180, 110, 0.14);
}

.home-quick-card--exam .home-quick-card__title {
  color: #6ecf98;
}

.exams-assigned-panel {
  border: 1px solid rgba(34, 120, 68, 0.55);
  border-radius: var(--radius);
  background: linear-gradient(165deg, rgba(22, 92, 52, 0.16) 0%, rgba(22, 92, 52, 0.04) 55%, transparent 100%);
  padding: clamp(0.65rem, 1.5vw, 1rem);
  box-shadow: inset 0 1px 0 rgba(72, 180, 110, 0.1);
}

.exams-assigned-item {
  border-color: rgba(34, 120, 68, 0.35);
}

.exam-answer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.home-dash__stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.45rem, 1vw, 0.85rem);
  flex-shrink: 0;
}

.home-stat-pill {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(0.55rem, 1.15vh, 0.8rem) clamp(0.5rem, 1vw, 0.75rem);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: clamp(60px, 9vh, 88px);
  font-family: inherit;
  color: inherit;
  text-align: left;
}

button.home-stat-pill { cursor: pointer; }

.home-stat-pill--strike {
  background: none;
  border: none;
  align-items: center;
  justify-content: center;
  padding: 0;
  min-height: clamp(60px, 9vh, 88px);
}

.home-stat-pill--strike .home-strike-fire {
  font-size: clamp(2.85rem, 5.2vw, 4rem);
  width: clamp(2.85rem, 5.2vw, 4rem);
  height: clamp(2.85rem, 5.2vw, 4rem);
}

.home-stat-pill--strike .home-strike-fire__num {
  font-size: clamp(0.72rem, 1.15vw, 0.95rem);
}

.home-stat-pill__icon {
  font-size: clamp(1.3rem, 2.1vw, 1.7rem);
  line-height: 1;
}

.home-stat-pill__value {
  font-size: clamp(1.15rem, 1.9vw, 1.5rem);
  font-weight: 700;
  color: var(--gold);
  line-height: 1.1;
}

.home-stat-pill__label {
  font-size: clamp(0.68rem, 1vw, 0.84rem);
  color: var(--text-secondary);
  margin-top: 0.12rem;
}

.home-stat-pill--quote {
  position: relative;
  overflow: hidden;
  padding-bottom: clamp(1.15rem, 2.2vh, 1.45rem);
}

.home-stat-pill--quote .home-quote__text {
  font-size: clamp(0.72rem, 1.05vw, 0.9rem);
  line-height: 1.4;
  color: var(--text-primary);
  margin: 0;
  transition: opacity 0.6s ease;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-stat-pill--quote .home-quote__sig {
  position: absolute;
  right: clamp(0.45rem, 1vw, 0.65rem);
  bottom: clamp(0.35rem, 0.75vh, 0.5rem);
  font-size: clamp(0.62rem, 0.92vw, 0.76rem);
  color: var(--gold);
  font-style: italic;
}

.home-quote__text--fade { opacity: 0; }

.home-dash__block {
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.home-dash__activity-heading {
  font-size: clamp(0.72rem, 1.05vw, 0.88rem);
}

.home-dash__block-title {
  font-size: clamp(0.78rem, 1.12vw, 0.94rem);
  letter-spacing: 0.06em;
  color: var(--gold-dim);
  margin: 0 0 clamp(0.35rem, 0.75vh, 0.5rem);
  flex-shrink: 0;
  font-weight: 600;
}

.home-dash__cats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: clamp(0.45rem, 1vw, 0.75rem);
  flex: 1;
  min-height: 0;
  height: 100%;
}

.home-dash__block--progress { flex-shrink: 0; }

.home-progress--dock {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.3rem;
  box-sizing: border-box;
  padding: 0 0.38rem 0 0.52rem;
  width: 100%;
  min-width: 0;
  height: 100%;
  overflow: hidden;
}

.home-progress--dock .home-progress__ring-wrap {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  overflow: visible;
  border-radius: 50%;
  isolation: isolate;
  align-self: center;
  position: relative;
  z-index: 3;
}

.home-progress--dock .home-progress__orbit {
  z-index: 1;
  inset: 0;
}

.home-progress--dock .home-progress__svg {
  z-index: 2;
}

.home-progress--dock .home-progress__pct {
  z-index: 3;
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--gold);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
}

.home-progress--dock .home-progress__track,
.home-progress--dock .home-progress__arc {
  stroke-width: 6;
}

.home-progress__stats--stack {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-self: center;
  gap: 0.02rem;
  flex-wrap: nowrap;
  position: relative;
  z-index: 1;
}

.home-progress__stat-row {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 0.2rem;
  min-height: 0;
  line-height: 1.05;
  white-space: nowrap;
}

.home-progress__stats--stack .home-progress__label {
  flex: 0 0 auto;
  font-size: 0.62rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.home-progress__stats--stack strong {
  flex: 0 0 auto;
  display: inline;
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.home-progress__ring-wrap {
  position: relative;
  width: clamp(72px, 10.5vh, 92px);
  height: clamp(72px, 10.5vh, 92px);
  flex-shrink: 0;
}

.home-progress__orbit {
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: rgba(212, 168, 67, 0.65);
  border-right-color: rgba(212, 168, 67, 0.18);
  animation: home-progress-orbit 3s linear infinite;
  pointer-events: none;
}

.home-progress__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.home-progress__track {
  fill: none;
  stroke: rgba(80, 68, 40, 0.35);
  stroke-width: 7;
}

.home-progress__arc {
  fill: none;
  stroke: var(--gold);
  stroke-width: 7;
  stroke-linecap: round;
  transition: stroke 0.4s ease;
}

.home-progress__arc--animate {
  animation: home-progress-arc-fill 2.6s cubic-bezier(0.22, 0.95, 0.28, 1) forwards;
}

.home-progress__pct {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: var(--gold);
  font-size: clamp(0.82rem, 1.2vw, 1rem);
  font-variant-numeric: tabular-nums;
  z-index: 1;
  line-height: 1;
}

@keyframes home-progress-orbit {
  to { transform: rotate(360deg); }
}

@keyframes home-progress-arc-fill {
  0% {
    stroke-dashoffset: var(--ring-c, 264);
    stroke: #ffe08a;
    filter: drop-shadow(0 0 5px rgba(255, 200, 90, 0.75));
  }
  100% {
    stroke-dashoffset: var(--target-offset, 0);
    stroke: var(--gold);
    filter: none;
  }
}

.home-progress__stats {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: clamp(0.5rem, 1.5vw, 1.2rem);
}

.home-progress__stats:not(.home-progress__stats--stack) strong {
  font-size: clamp(0.88rem, 1.3vw, 1.08rem);
  display: block;
}

.home-progress__stats span {
  font-size: clamp(0.62rem, 0.95vw, 0.76rem);
  color: var(--text-secondary);
}

.home-dash__cta {
  display: flex;
  align-items: center;
  gap: clamp(0.55rem, 1.2vw, 1rem);
  padding: clamp(0.55rem, 1.15vh, 0.85rem) clamp(0.75rem, 1.5vw, 1.15rem);
  flex-shrink: 0;
}

.home-dash__cta-icon {
  font-size: clamp(1.35rem, 2.3vw, 1.9rem);
  flex-shrink: 0;
}

.home-dash__cta-text {
  flex: 1;
  margin: 0;
  font-size: clamp(0.78rem, 1.08vw, 0.94rem);
  line-height: 1.4;
  min-width: 0;
  color: var(--text-secondary);
}

.home-dash__todo,
.home-dash__feed {
  list-style: none;
  margin: 0;
  padding: 0;
}

.home-dash__todo li {
  display: flex;
  gap: clamp(0.4rem, 0.8vw, 0.55rem);
  align-items: flex-start;
}

.home-dash__todo li + li {
  margin-top: clamp(0.45rem, 1vh, 0.7rem);
}

.home-dash__todo-icon {
  font-size: clamp(1rem, 1.55vw, 1.25rem);
  flex-shrink: 0;
  line-height: 1.2;
}

.home-dash__todo strong {
  display: block;
  font-size: clamp(0.72rem, 1.02vw, 0.86rem);
  line-height: 1.3;
  font-weight: 600;
}

.home-dash__todo button {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: clamp(0.65rem, 0.92vw, 0.76rem);
  cursor: pointer;
  padding: 0.12rem 0 0;
  font-family: inherit;
  text-align: left;
}

.home-dash__todo button:hover { color: var(--gold); }

.home-dash__feed li {
  display: flex;
  justify-content: space-between;
  gap: 0.35rem;
  font-size: clamp(0.62rem, 0.9vw, 0.74rem);
  color: var(--text-secondary);
  line-height: 1.3;
}

.home-dash__feed li + li { margin-top: 0.28rem; }

.home-dash__feed time {
  color: var(--text-muted);
  white-space: nowrap;
  font-size: clamp(0.58rem, 0.82vw, 0.68rem);
}

@media (max-width: 900px) {
  .home-dash__subjects-row,
  .home-dash__quick-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-subject-chip,
  .home-quick-card {
    min-height: clamp(8.75rem, 17vh, 10.25rem);
    height: clamp(8.75rem, 17vh, 10.25rem);
    --home-tile-icon: clamp(4.5rem, 20vw, 5.75rem);
  }

  .home-subject-chip__title,
  .home-quick-card__title {
    font-size: 0.9375rem;
    min-height: 2.65em;
  }

  .home-dash__quote-wrap {
    height: clamp(4.35rem, 9.5vh, 5.25rem);
  }

  .home-dash__quote-bar {
    width: min(clamp(175px, 58vw, 300px), calc(100% - 1rem));
    height: clamp(4.15rem, 9vh, 5.05rem);
    max-height: clamp(4.15rem, 9vh, 5.05rem);
  }

  .home-dash__corner-col--left,
  .home-dash__corner-col--right {
    position: absolute;
    top: clamp(0.2rem, 0.45vh, 0.35rem);
  }

  .home-dash__corner-col--left { left: clamp(0.5rem, 1vw, 0.85rem); }
  .home-dash__corner-col--right { right: clamp(0.5rem, 1vw, 0.85rem); }

  .home-dash__brand-stack {
    grid-column: 1 / -1;
    padding-top: clamp(4.75rem, 9vh, 5.5rem);
    width: min(360px, calc(100% - 1rem));
  }
}

@media (max-width: 820px) {
  .bottom-bar-zone {
    --bottom-nav-span: 100%;
  }

  .bottom-bar-zone--home {
    flex-wrap: wrap;
    row-gap: 0.55rem;
  }

  .bottom-bar-zone--home .bottom-nav--stretch {
    flex: 1 1 100%;
    order: 1;
    width: 100%;
  }

  .bottom-bar-zone--home .bottom-dock--progress {
    flex: 1 1 calc(50% - var(--nav-dock-gap) / 2);
    order: 2;
    width: auto;
  }

  .bottom-bar-zone--home .bottom-dock--activity {
    flex: 1 1 calc(50% - var(--nav-dock-gap) / 2);
    order: 3;
    width: auto;
  }

  .app-main--home {
    padding-bottom: calc(var(--nav-shell-height) + var(--nav-height) + 0.85rem);
  }
}

@media (max-width: 768px) {
  .home-dash__body {
    overflow-y: auto;
  }

  .app-main--home { overflow: auto; }

  .ataturk-modal .content-html.ataturk-text {
    columns: 1;
  }
}

.sidebar-profile {
  padding: 0;
  border-bottom: none;
}

.sidebar-profile--under-logo {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.12rem;
}

.sidebar-profile--under-logo .level-tier-badge {
  margin-bottom: 0.15rem;
  font-size: 0.72rem;
}

.sidebar-profile__name {
  font-size: 0.82rem;
  font-weight: 600;
  margin: 0;
  color: var(--text-primary);
  line-height: 1.25;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-profile__level {
  background: none;
  border: none;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
}

.sidebar-xp {
  margin-top: 0.35rem;
  width: 100%;
}

.sidebar-xp__bar {
  height: 6px;
  background: var(--bg-secondary);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.sidebar-xp__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold));
  border-radius: 999px;
  width: 0;
}

.sidebar-xp__fill--animate {
  animation: sidebar-xp-fill 1.35s cubic-bezier(0.33, 1, 0.68, 1) forwards,
    sidebar-xp-glow 2.4s ease-in-out 1.35s infinite;
}

@keyframes sidebar-xp-fill {
  from { width: 0; }
  to { width: var(--xp-target, 0%); }
}

@keyframes sidebar-xp-glow {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.12); }
}

.sidebar-xp__text {
  display: block;
  font-size: 0.62rem;
  color: var(--text-secondary);
  margin-top: 0.28rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.sidebar-profile__titles { font-size: 0.52rem; margin: 0.25rem 0 0; }

.topic-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.65rem;
}

.topic-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  position: relative;
}

.topic-card__icon { font-size: 1.35rem; display: block; margin-bottom: 0.35rem; }
.topic-card__title { font-size: 0.85rem; font-weight: 600; color: var(--gold); display: block; }
.topic-card__meta { font-size: 0.68rem; color: var(--text-secondary); }
.topic-card__arrow { position: absolute; right: 0.55rem; bottom: 0.5rem; color: var(--gold-dim); }

.branch-sim-banner {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
}

.branch-sim-banner__icon { font-size: 2rem; }
.branch-sim-banner__title { margin: 0; font-size: 1rem; color: var(--gold); }

.quiz-session-card { position: relative; }
.quiz-session-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.quiz-session__timer {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.quiz-session__timer--warn { color: #ef4444; }

.quiz-report-btn {
  background: none;
  border: none;
  color: rgba(239, 68, 68, 0.55);
  font-size: 0.62rem;
  cursor: pointer;
  padding: 0.15rem 0;
  font-family: inherit;
}

.quiz-report-btn:hover { color: #ef4444; }

.quiz-text--balanced {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.45;
}

.quiz-options--balanced .quiz-option {
  padding: 0.55rem 0.75rem;
  min-height: auto;
}

.quiz-options--balanced .quiz-option__key {
  width: 24px;
  height: 24px;
  font-size: 0.72rem;
}

.quiz-options--balanced .quiz-option__text {
  font-size: 0.82rem;
  line-height: 1.35;
}

.quiz-image--sm { max-height: 160px; margin-bottom: 0.65rem; }

.quiz-session-actions { margin-top: 0.65rem; }

.quiz-summary__title { margin: 0 0 0.35rem; text-align: center; }
.quiz-summary__score { font-size: 2rem; font-weight: 800; text-align: center; color: var(--gold); margin: 0; }
.quiz-summary__meta { text-align: center; margin: 0.25rem 0 0; }

.tasks-tabs {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.tasks-tab {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  color: var(--text-secondary);
  font-size: 0.78rem;
  cursor: pointer;
  font-family: inherit;
}

.tasks-tab.active {
  border-color: var(--gold-dim);
  color: var(--gold);
  background: var(--gold-glow);
}

.task-card { padding: 0.75rem; margin-bottom: 0.5rem; }
.task-card--done { opacity: 0.75; }
.task-card__head { display: flex; justify-content: space-between; align-items: center; }
.task-card__badge { color: var(--gold); }
.task-card__bar {
  height: 4px;
  background: var(--bg-secondary);
  border-radius: 999px;
  margin-top: 0.5rem;
  overflow: hidden;
}

.task-card__fill {
  height: 100%;
  background: var(--gold);
}

.exam-user-picker {
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  overflow: hidden;
}

.exam-user-picker__toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
}

.exam-user-picker__search {
  flex: 1 1 10rem;
  min-width: 0;
  margin: 0;
}

.exam-user-picker__actions {
  display: flex;
  gap: 0.35rem;
  flex-shrink: 0;
}

.exam-user-picker__summary {
  margin: 0;
  padding: 0.45rem 0.75rem 0;
}

.exam-user-picker__list {
  max-height: 280px;
  overflow-y: auto;
  padding: 0.35rem 0.5rem 0.65rem;
}

.exam-user-picker__group {
  margin-bottom: 0.5rem;
}

.exam-user-picker__group-head {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 0.35rem 0.5rem;
  margin-bottom: 0.15rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold);
  background: var(--bg-secondary);
  border-radius: 6px;
}

.exam-user-picker__row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.5rem;
  margin-bottom: 0.2rem;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.exam-user-picker__row:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border);
}

.exam-user-picker__row:has(input:checked) {
  border-color: var(--gold-dim);
  background: linear-gradient(90deg, rgba(243, 210, 122, 0.14) 0%, rgba(243, 210, 122, 0.04) 100%);
}

.exam-user-picker__row input[type="checkbox"] {
  width: 1.05rem;
  height: 1.05rem;
  flex-shrink: 0;
  accent-color: var(--gold);
}

.exam-user-picker__avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--gold);
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
}

.exam-user-picker__info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.exam-user-picker__name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.exam-user-picker__meta {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.exam-user-picker__empty {
  padding: 0.75rem;
}
.audit-log__head {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: baseline;
}

/* ── Sınav oluşturucu ─────────────────────────────────── */
.exam-builder__unit-note {
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(224, 184, 90, 0.35);
  background: rgba(224, 184, 90, 0.1);
  color: var(--text-primary);
}

.exam-builder__tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.exam-builder__tab {
  flex: 1;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.exam-builder__tab:hover {
  border-color: var(--gold-dim);
  color: var(--text-primary);
}

.exam-builder__tab.active {
  background: var(--gold-glow);
  border-color: var(--gold-dim);
  color: var(--gold);
}

.exam-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: stretch;
}

.exam-chip-grid--sources .exam-chip--source {
  min-width: 5.5rem;
  max-width: 9rem;
}

.exam-chip--source.active {
  min-width: 6.5rem;
}

.exam-chip__count-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  margin-top: 0.25rem;
  width: 100%;
}

.exam-chip__count {
  width: 2.75rem;
  padding: 0.15rem 0.25rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-card);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
}

.exam-chip__count:focus {
  outline: none;
  border-color: var(--gold);
}

.exam-chip__count-label {
  font-size: 0.62rem;
  opacity: 0.85;
}

.exam-chip-grid--users {
  max-height: 220px;
  overflow-y: auto;
  padding: 0.1rem;
}

.exam-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.06rem;
  min-height: 2.05rem;
  min-width: 4.6rem;
  max-width: 8.5rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.76rem;
  line-height: 1.15;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
  text-align: center;
  flex: 0 1 auto;
}

.exam-chip:hover {
  border-color: var(--gold-dim);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.exam-chip.active {
  border-color: var(--gold);
  background: linear-gradient(160deg, rgba(243, 210, 122, 0.38) 0%, rgba(196, 168, 78, 0.14) 100%);
  color: var(--gold);
  box-shadow:
    0 0 16px rgba(243, 210, 122, 0.35),
    inset 0 0 0 1px rgba(243, 210, 122, 0.45);
  font-weight: 700;
  transform: none;
}

.exam-chip__label {
  font-weight: inherit;
  word-break: break-word;
}

.exam-chip__meta {
  font-size: 0.62rem;
  opacity: 0.9;
  font-weight: 500;
}

.exam-chip--check {
  min-width: 6.5rem;
  max-width: 10rem;
}

.exam-chip--target {
  min-width: 5rem;
  max-width: 7.5rem;
}

.exam-picker-select {
  width: 100%;
  min-height: 7.5rem;
  padding: 0.35rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.35;
}

.exam-picker-select:focus {
  outline: none;
  border-color: var(--gold-dim);
  box-shadow: 0 0 0 2px rgba(243, 210, 122, 0.12);
}

.exam-picker-select option {
  padding: 0.5rem 0.65rem;
  margin: 1px 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
}

.exam-picker-select option:checked {
  background: linear-gradient(
    90deg,
    rgba(243, 210, 122, 0.42) 0%,
    rgba(243, 210, 122, 0.16) 100%
  ) !important;
  color: var(--gold) !important;
  font-weight: 700;
  text-shadow: 0 0 14px rgba(243, 210, 122, 0.45);
  box-shadow: inset 0 0 0 1px rgba(243, 210, 122, 0.35);
}

.exam-picker-select--topics option:checked {
  background: linear-gradient(
    90deg,
    rgba(243, 210, 122, 0.5) 0%,
    rgba(196, 168, 78, 0.2) 100%
  ) !important;
}

.exam-picker-selects .form-group + .form-group {
  margin-top: 0.75rem;
}

.exam-picker-branch {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.65rem;
  margin-bottom: 0.45rem;
  background: var(--bg-secondary);
}

.exam-picker-branch__head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  cursor: pointer;
}

.exam-picker-topics {
  margin-top: 0.45rem;
  margin-left: 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.exam-picker-topic {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  cursor: pointer;
}

.exam-manual-q__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.exam-mc-option {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.35rem;
}

.exam-mc-option .form-input {
  flex: 1;
}

.exam-review-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.exam-result-stats strong {
  color: var(--text-primary);
}

.exam-result-row .list-item__body {
  gap: 0.2rem;
}

/* ── Fiziksel Yeterlilik ── */
.fitness-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.fitness-commander-top {
  display: grid;
  grid-template-columns: minmax(0, 0.55fr) minmax(0, 0.85fr) minmax(0, 1.35fr);
  gap: 0.85rem;
  margin-bottom: 1rem;
  align-items: stretch;
}

.fitness-unit-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  padding: 1rem 0.65rem;
  text-align: center;
  border: 1px solid var(--border);
}

.fitness-unit-success__pct {
  display: block;
  font-size: 2.35rem;
  font-weight: 800;
  line-height: 1.05;
  color: var(--gold);
  margin-bottom: 0.35rem;
}

.fitness-unit-success__label {
  display: block;
  font-size: 0.78rem;
  line-height: 1.25;
  color: var(--text-secondary);
  max-width: 7.5rem;
}

.fitness-unit-success.fitness-metric-tile--low .fitness-unit-success__pct {
  color: #f08080;
}

.fitness-unit-success.fitness-metric-tile--mid .fitness-unit-success__pct {
  color: #ffb366;
}

.fitness-unit-success.fitness-metric-tile--high .fitness-unit-success__pct {
  color: #7dcea0;
}

.fitness-metric-rates-panel {
  padding: 0.85rem 0.9rem;
}

.fitness-metric-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr));
  gap: 0.45rem;
}

.fitness-metric-tiles--6x2 {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.fitness-metric-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 5rem;
  padding: 0.4rem 0.3rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  text-align: center;
  overflow: hidden;
}

.fitness-metric-tile--btn {
  cursor: pointer;
  font: inherit;
  width: 100%;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.fitness-metric-tile--btn:hover {
  transform: translateY(-1px);
}

.fitness-metric-tile--selected {
  box-shadow: 0 0 0 2px var(--gold), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.fitness-metric-tile--low {
  border-color: rgba(220, 90, 90, 0.65);
  background: linear-gradient(165deg, rgba(160, 40, 40, 0.3) 0%, rgba(120, 28, 28, 0.1) 100%);
}

.fitness-metric-tile--low .fitness-metric-tile__pct {
  color: #f08080;
}

.fitness-metric-tile--mid {
  border-color: rgba(230, 140, 40, 0.65);
  background: linear-gradient(165deg, rgba(200, 120, 30, 0.3) 0%, rgba(160, 90, 20, 0.1) 100%);
}

.fitness-metric-tile--mid .fitness-metric-tile__pct {
  color: #ffb366;
}

.fitness-metric-tile--high {
  border-color: rgba(72, 180, 110, 0.65);
  background: linear-gradient(165deg, rgba(34, 120, 68, 0.3) 0%, rgba(22, 92, 52, 0.1) 100%);
}

.fitness-metric-tile--high .fitness-metric-tile__pct {
  color: #7dcea0;
}

.fitness-metric-tile__name {
  display: block;
  width: 100%;
  font-size: 0.62rem;
  line-height: 1.2;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.fitness-metric-tile__pct {
  font-size: 0.95rem;
  color: var(--gold);
  line-height: 1.1;
}

.fitness-summary-big {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.fitness-summary-card--large {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 7.5rem;
  padding: 1.15rem 0.85rem;
}

.fitness-summary-card--large .fitness-summary-card__value {
  font-size: 2.75rem;
}

.fitness-summary-card--large .fitness-summary-card__label {
  font-size: 0.92rem;
  max-width: 11rem;
}

.fitness-summary-stack {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-height: 100%;
}

.fitness-summary-stack .fitness-summary-card--large {
  flex: 1;
}

.fitness-summary-card--static {
  cursor: default;
}

.fitness-summary-card--static:hover {
  transform: none;
}

.fitness-detail-section {
  padding: 0.85rem 1rem;
}

.fitness-detail-section__title {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  color: var(--gold);
}

.fitness-metric-rates {
  padding: 0.85rem 1rem;
  min-height: 100%;
}

.fitness-metric-rates__title {
  margin: 0 0 0.55rem;
  font-size: 0.9rem;
  color: var(--gold);
}

.fitness-metric-rates__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
}

.fitness-metric-rate {
  font-size: 0.82rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.fitness-metric-rate__name {
  color: var(--text-primary);
}

.fitness-metric-rate__pct {
  color: var(--gold);
  margin-left: 0.15rem;
}

.fitness-person-cell__label {
  display: block;
  font-size: 0.82rem;
  line-height: 1.35;
  color: var(--text-primary);
}

.fitness-summary-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  color: var(--gold);
}

button.fitness-summary-card,
button.fitness-metric-tile {
  appearance: none;
  -webkit-appearance: none;
}

.fitness-summary-card:hover {
  transform: translateY(-1px);
}

.fitness-summary-card--pass {
  background: linear-gradient(165deg, rgba(34, 120, 68, 0.35) 0%, rgba(22, 92, 52, 0.12) 100%);
  border-color: rgba(72, 180, 110, 0.55);
}

.fitness-summary-card--fail {
  background: linear-gradient(165deg, rgba(160, 40, 40, 0.35) 0%, rgba(120, 28, 28, 0.12) 100%);
  border-color: rgba(220, 90, 90, 0.55);
}

.fitness-summary-card--selected {
  box-shadow: 0 0 0 2px var(--gold), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.fitness-summary-card__value {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--gold);
}

.fitness-summary-card__label {
  display: block;
  font-size: 0.85rem;
  margin-top: 0.35rem;
  color: var(--gold);
}

.fitness-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}

.fitness-filter-chip {
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
  cursor: pointer;
}

.fitness-filter-chip--active {
  border-color: rgba(212, 168, 67, 0.75);
  background: linear-gradient(165deg, rgba(212, 168, 67, 0.28) 0%, rgba(212, 168, 67, 0.08) 100%);
  color: var(--gold);
  box-shadow: 0 0 12px rgba(212, 168, 67, 0.25);
}

.fitness-table-wrap {
  overflow: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

.fitness-detail-section .fitness-table-wrap {
  overflow-x: visible;
  overflow-y: visible;
}

.fitness-detail-section .fitness-table {
  table-layout: fixed;
  width: 100%;
  font-size: 0.72rem;
}

.fitness-detail-section .fitness-table th,
.fitness-detail-section .fitness-table td {
  padding: 0.3rem 0.25rem;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.2;
}

.fitness-detail-section .fitness-table th.fitness-table__metric {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  vertical-align: bottom;
  text-align: center;
  height: 4.25rem;
  max-width: 2.1rem;
  padding: 0.2rem 0.1rem;
  font-size: 0.66rem;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
}

.fitness-detail-section .fitness-table td.fitness-table__metric {
  text-align: center;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
  font-size: 0.7rem;
  padding: 0.28rem 0.15rem;
}

.fitness-detail-section .fitness-table th:first-child,
.fitness-detail-section .fitness-table td.fitness-person-cell {
  width: 28%;
  min-width: 0;
  font-size: 0.68rem;
}

.fitness-detail-section .fitness-table th:nth-child(2),
.fitness-detail-section .fitness-table td:nth-child(2) {
  width: 2.4rem;
  text-align: center;
  white-space: nowrap;
}

.fitness-commander-page {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0.75rem;
}

#fitness-commander-root {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-right: 0.15rem;
}

.fitness-unit-picker__label {
  margin: 0 0 0.35rem;
}

.fitness-unit-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.45rem;
  margin-bottom: 0.55rem;
}

.fitness-unit-row__title {
  flex: 0 0 100%;
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.fitness-unit-row__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.fitness-unit-row--sub {
  padding-left: 0.35rem;
  border-left: 2px solid rgba(212, 168, 67, 0.35);
}

.fitness-personnel-list {
  padding: 0.75rem 0.85rem;
}

.fitness-personnel-list__title {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  color: var(--gold);
}

.fitness-personnel-list__items {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--text-primary);
}

.fitness-personnel-list__items li {
  margin-bottom: 0.35rem;
}

.fitness-personnel-list__items strong {
  display: inline-block;
  min-width: 8rem;
}

.btn-link {
  background: none;
  border: none;
  color: var(--gold);
  cursor: pointer;
  padding: 0;
  font: inherit;
  text-decoration: underline;
}

.fitness-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.fitness-table th,
.fitness-table td {
  border: 1px solid var(--border);
  padding: 0.45rem 0.5rem;
  vertical-align: top;
  white-space: nowrap;
}

.fitness-table th {
  background: var(--bg-secondary);
  color: var(--gold);
  font-weight: 600;
}

.fitness-person-cell {
  min-width: 0;
  white-space: normal;
}

.fitness-person-cell strong {
  display: block;
}

.fitness-cell--pass {
  background: rgba(34, 120, 68, 0.22);
  color: #6ecf98;
  font-weight: 600;
}

.fitness-cell--fail {
  background: rgba(160, 40, 40, 0.32);
  color: #ff6b6b;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(220, 90, 90, 0.45);
}

.fitness-filtered-section {
  padding: 0.85rem 0.9rem;
}

.fitness-filtered-section__title {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  color: var(--gold);
}

.fitness-filtered-section__hint {
  margin: 0 0 0.65rem;
}

.fitness-badge {
  display: inline-block;
  margin-top: 0.25rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 0.72rem;
  border: 1px solid var(--border);
}

.fitness-badge--pending {
  border-color: rgba(212, 168, 67, 0.6);
  color: var(--gold);
}

.fitness-badge--approved {
  border-color: rgba(72, 180, 110, 0.6);
  color: #6ecf98;
}

.fitness-badge--rejected {
  border-color: rgba(220, 90, 90, 0.6);
  color: #ffb4b4;
}

.fitness-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.fitness-modal-card .modal-card__body {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex: 1;
  min-height: 0;
  padding: 0.85rem 1.15rem 1rem;
}

.modal-overlay .modal-card.fitness-modal-card.popup-anchor-card.modal-card--xl {
  max-height: min(90vh, 900px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-overlay .modal-card.fitness-modal-card.popup-anchor-card .modal-card__body {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex: 1;
  min-height: 0;
  max-height: none;
  padding: 0.85rem 1.15rem 1rem;
}

.modal-overlay .modal-card.fitness-modal-card {
  display: flex;
  flex-direction: column;
  max-height: min(90vh, 900px);
  overflow: hidden;
}

.fitness-modal-layout {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  max-height: calc(min(90vh, 900px) - 4.5rem);
}

.fitness-modal-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-right: 0.15rem;
}

.fitness-modal-footer {
  flex-shrink: 0;
  padding-top: 0.75rem;
  margin-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.fitness-modal-tabs {
  flex-shrink: 0;
  display: flex;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
}

.fitness-modal-tab {
  flex: 1;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.75rem;
  cursor: pointer;
  font: inherit;
}

.fitness-modal-tab--active {
  border-color: rgba(212, 168, 67, 0.75);
  background: linear-gradient(165deg, rgba(212, 168, 67, 0.24) 0%, rgba(212, 168, 67, 0.08) 100%);
  color: var(--gold);
}

.fitness-standards-group__title {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  color: var(--gold);
}

.fitness-standards-item__label {
  color: var(--text-secondary);
}

.fitness-standards-table-wrap {
  overflow-x: auto;
  margin-top: 0.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.fitness-standards-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.fitness-standards-table th,
.fitness-standards-table td {
  border: 1px solid var(--border);
  padding: 0.35rem 0.45rem;
  text-align: center;
  vertical-align: middle;
}

.fitness-standards-table__topic {
  text-align: left;
  min-width: 160px;
  color: var(--text-primary);
  font-weight: 500;
}

.fitness-standards-table__band {
  background: color-mix(in srgb, var(--gold) 10%, var(--bg-card));
  color: var(--gold);
  font-weight: 700;
}

.fitness-standards-table__gender {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: 0.72rem;
}

.fitness-standards-table__gender--k,
.fitness-standards-table__k {
  background: color-mix(in srgb, #d4a843 8%, var(--bg-card));
}

.fitness-standards-table__section td {
  background: color-mix(in srgb, var(--gold) 14%, var(--bg-card));
  color: var(--gold);
  font-weight: 700;
  text-align: left;
}

.fitness-form-section,
.admin-sport-section-title {
  margin: 0.75rem 0 0.35rem;
  font-size: 0.9rem;
  color: var(--gold);
}

.admin-sport-branches {
  padding: 0.85rem 1rem;
}

.admin-sport-branches__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.admin-sport-branches__title {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
  color: var(--gold);
}

.admin-sport-branches__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 0.45rem;
}

.admin-sport-branch-toggle {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  cursor: pointer;
  opacity: 0.72;
}

.admin-sport-branch-toggle--on {
  opacity: 1;
  border-color: rgba(212, 168, 67, 0.55);
  background: linear-gradient(165deg, rgba(212, 168, 67, 0.14) 0%, rgba(212, 168, 67, 0.04) 100%);
}

.admin-sport-branch-toggle input {
  accent-color: var(--gold);
}

.admin-sport-branch-toggle__label {
  font-size: 0.82rem;
  color: var(--text-primary);
}

.fitness-admin-metric--gender {
  display: grid;
  gap: 0.35rem;
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--border);
}

.fitness-admin-metric__label {
  color: var(--text-primary);
}

.fitness-admin-gender-row {
  display: grid;
  grid-template-columns: 1.5rem 1fr;
  gap: 0.35rem;
  align-items: start;
}

.fitness-admin-gender-tag {
  font-weight: 700;
  color: var(--gold);
  padding-top: 0.45rem;
}

.fitness-admin-gender-tag--k {
  color: #e8c56a;
}

.fitness-admin-gender-cell {
  display: grid;
  grid-template-columns: 0.7fr 0.8fr 0.8fr;
  gap: 0.25rem;
}

.fitness-admin-gender-cell .fitness-admin-note {
  grid-column: 1 / -1;
  min-height: 2.5rem;
}

.fitness-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  color: var(--text-primary);
}

.form-group--checkbox {
  display: flex;
  align-items: center;
}

.fitness-unit-picker {
  margin-bottom: 1rem;
}

.fitness-unit-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.45rem;
}

.fitness-unit-row--sub {
  padding-left: 0.35rem;
  border-left: 2px solid rgba(212, 168, 67, 0.35);
}

.fitness-unit-chip {
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.75rem;
  font-size: 0.82rem;
  cursor: pointer;
}

.fitness-unit-chip--active {
  border-color: rgba(212, 168, 67, 0.85);
  background: linear-gradient(165deg, rgba(212, 168, 67, 0.32) 0%, rgba(212, 168, 67, 0.1) 100%);
  color: var(--gold);
  box-shadow: 0 0 14px rgba(212, 168, 67, 0.28);
}

.fitness-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

@media (max-width: 640px) {
  .fitness-form-grid,
  .fitness-summary-grid {
    grid-template-columns: 1fr;
  }

  .fitness-commander-top {
    grid-template-columns: 1fr;
  }

  .fitness-metric-tiles--6x2 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .fitness-summary-big {
    grid-template-columns: 1fr;
  }
}

.fitness-status {
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.75rem;
}

.fitness-status--pending {
  background: rgba(212, 168, 67, 0.15);
  border: 1px solid rgba(212, 168, 67, 0.45);
}

.fitness-status--approved {
  background: rgba(34, 120, 68, 0.15);
  border: 1px solid rgba(72, 180, 110, 0.45);
}

.fitness-status--rejected {
  background: rgba(160, 40, 40, 0.15);
  border: 1px solid rgba(220, 90, 90, 0.45);
}

.fitness-standards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.fitness-standards-item {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.35rem 0;
  border-bottom: 1px dashed var(--border);
}

.fitness-standards-item__value {
  color: var(--gold);
  font-weight: 600;
}

.fitness-admin-metrics {
  display: grid;
  gap: 0.5rem;
}

.admin-sport-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.admin-sport-tab {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text-primary);
  cursor: pointer;
  font-weight: 600;
  font: inherit;
}

.admin-sport-tab--active {
  border-color: var(--gold);
  background: color-mix(in srgb, var(--gold) 12%, var(--bg-card));
  color: var(--gold);
}

.admin-sport-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
}

button.admin-sport-card,
.admin-sport-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  min-height: 5.5rem;
  padding: 1rem 0.75rem;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
  text-align: center;
  font: inherit;
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.admin-sport-card:hover {
  border-color: var(--gold);
  transform: translateY(-1px);
  color: var(--text-primary);
}

.admin-sport-card__label {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--gold);
}

.admin-sport-card__hint {
  color: var(--text-secondary);
}

.admin-sport-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.admin-sport-editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.admin-sport-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2.5rem;
  cursor: pointer;
}

.admin-sport-max-hidden {
  display: none;
}

.admin-sport-open-ended-wrap {
  flex: 1;
  min-width: 180px;
}

.admin-sport-modal .admin-sport-editor label,
.admin-sport-modal .fitness-admin-metric strong,
.admin-sport-modal .admin-sport-checkbox-label {
  color: var(--text-primary);
}

.admin-sport-modal .text-muted {
  color: var(--text-secondary);
}

.fitness-admin-metric {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr 0.8fr;
  gap: 0.35rem;
  align-items: center;
}

@media (max-width: 768px) {
  .fitness-admin-metric {
    grid-template-columns: 1fr;
  }

  .fitness-standards-grid {
    grid-template-columns: 1fr;
  }
}

.text-success {
  color: #6ecf98;
}

.text-danger {
  color: #ffb4b4;
}
