:root {
  --bg: #0f172a;
  --surface: #1e293b;
  --surface2: #1a1a2e;
  --fill: #16213e;
  --accent: #60a5fa;
  --accent2: #4fc3f7;
  --violet: #a78bfa;
  --pink: #f472b6;
  --gold: #fbbf24;
  --green: #4ade80;
  --red: #f87171;
  --text: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.6);
  --text-dim: rgba(255, 255, 255, 0.55);
  --border: rgba(255, 255, 255, 0.08);
}

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

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--accent2);
  outline-offset: 2px;
  border-radius: 4px;
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  overscroll-behavior-y: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}

body {
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

.screen { min-height: 100vh; }

.hidden { display: none !important; }

/* ── Splash ─────────────────────────────────────────── */
.splash {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--surface2);
  gap: 20px;
  position: fixed;
  inset: 0;
}
.splash-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
}
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(79, 195, 247, 0.15);
  border-top-color: var(--accent2);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

#app-root { display: none; min-height: 100vh; }
#app-root.ready { display: block; }

/* ── Boutons ────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: 12px;
  padding: 14px 24px;
  font-size: 15px; font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.05s;
  -webkit-appearance: none;
}
.btn:active { transform: scale(0.97); }
.btn[disabled] { opacity: 0.4; cursor: not-allowed; }
.btn-primary {
  background: var(--accent2);
  color: #0b1220;
}
.btn-text {
  background: transparent; color: var(--text-muted);
  font-weight: 600; padding: 10px 16px;
}

.icon-btn {
  background: transparent; border: none; color: var(--text-muted);
  font-size: 24px; padding: 10px 12px; cursor: pointer; line-height: 1;
  min-width: 44px; min-height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
}

/* ── Privacy screen ─────────────────────────────────── */
.privacy {
  background: var(--surface2);
  padding: 40px 24px 24px;
  display: flex; flex-direction: column; align-items: center;
}
.privacy-content {
  max-width: 460px; width: 100%;
}
.privacy-logo {
  width: 96px; height: 96px;
  background: url('/app/icons/icon-192.png') center/cover;
  border-radius: 24px;
  margin: 0 auto 20px;
}
.privacy-title {
  text-align: center;
  font-size: 28px; font-weight: 800; letter-spacing: -0.5px;
}
.privacy-subtitle {
  text-align: center; color: var(--text-muted);
  font-size: 14px; margin-top: 4px; margin-bottom: 24px;
}
.privacy-section {
  background: var(--fill); border-radius: 14px;
  padding: 16px 18px; margin-bottom: 14px;
}
.privacy-section h3 {
  font-size: 13px; font-weight: 700;
  color: var(--accent2); letter-spacing: 0.5px; text-transform: uppercase;
  margin-bottom: 10px;
}
.privacy-section ul { list-style: none; }
.privacy-section li {
  font-size: 14px; color: var(--text-muted);
  padding: 4px 0 4px 18px; position: relative;
  line-height: 1.4;
}
.privacy-section li::before {
  content: '•'; color: var(--accent2);
  position: absolute; left: 4px;
}
.privacy-check {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 20px 0 16px;
  color: var(--text-muted); font-size: 14px;
  cursor: pointer; line-height: 1.4;
}
.privacy-check input[type="checkbox"] {
  width: 20px; height: 20px; flex-shrink: 0; margin-top: 1px;
  accent-color: var(--accent2);
}
.privacy .btn { width: 100%; }

/* ── Licence screen ─────────────────────────────────── */
.licence {
  background: var(--surface2);
  padding-bottom: 32px;
}
.licence-header {
  background: var(--surface);
  padding: 28px 20px 24px;
  text-align: center;
}
.app-logo {
  width: 72px; height: 72px;
  background: url('/app/icons/icon-192.png') center/cover;
  border-radius: 18px;
  margin: 0 auto 14px;
}
.app-title {
  font-size: 22px; font-weight: 800; letter-spacing: -0.3px;
}
.app-subtitle {
  font-size: 13px; color: var(--text-muted); margin-top: 4px;
}
.licence-body { padding: 22px 20px; }
.licence-help {
  font-size: 13px; color: var(--text-muted); line-height: 1.5;
  margin-bottom: 18px;
}
.licence-input {
  width: 100%;
  background: var(--fill);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 16px;
  outline: none;
}
.licence-input:focus { border-color: var(--accent2); }
.licence-status {
  margin: 14px 4px;
  font-size: 13px; color: var(--text-muted);
  line-height: 1.5;
}
.licence-results { display: flex; flex-direction: column; gap: 10px; }
.licence-card {
  background: var(--fill);
  border-radius: 12px;
  padding: 14px 16px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: border-color 0.15s, transform 0.05s;
}
.licence-card:active { transform: scale(0.99); border-color: var(--accent2); }
.licence-name { font-size: 15px; font-weight: 700; }
.licence-club { font-size: 12px; color: var(--text-muted); margin-top: 3px; }

/* ── Results screen ─────────────────────────────────── */
.results { background: var(--bg); padding-bottom: 40px; }

.app-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface);
  padding: 14px 16px;
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid transparent;
  transition: background 0.18s, border-color 0.18s, backdrop-filter 0.18s;
}
.app-bar.scrolled {
  background: rgba(30, 41, 59, 0.78);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom-color: var(--border);
}
.app-bar-leading {
  width: 32px; height: 32px;
  background: url('/app/icons/icon-192.png') center/cover;
  border-radius: 6px;
}
.app-bar-title { font-size: 16px; font-weight: 700; flex: 1; margin: 0; }
.app-bar-actions { display: flex; align-items: center; gap: 4px; }

.sync-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent;
  border: none;
  color: var(--accent);
  font-size: 14px; font-weight: 700;
  padding: 10px 14px; cursor: pointer;
  min-height: 44px;
}
.sync-btn[disabled] { opacity: 0.4; cursor: not-allowed; }
.sync-icon { font-size: 16px; }

.app-menu {
  position: absolute; top: 100%; right: 8px;
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid var(--border);
  min-width: 200px;
  z-index: 50;
  display: none;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  margin-top: 4px;
}
.app-menu.open { display: block; }
.menu-item {
  padding: 12px 16px;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
}
.menu-item:last-child { border-bottom: none; }
.menu-item:active { background: var(--fill); }

.progress-bar {
  position: relative;
  background: var(--surface);
  padding: 8px 16px 6px;
  border-bottom: 1px solid var(--border);
}
.progress-step {
  font-size: 11px; color: var(--text-dim);
  margin-bottom: 6px; min-height: 14px;
}
.progress-track {
  height: 3px;
  background: var(--fill);
  border-radius: 2px; overflow: hidden;
}
.progress-fill {
  height: 100%; width: 0;
  background: var(--accent);
  transition: width 0.3s;
}

.gymnast-header {
  background: var(--surface);
  padding: 14px 16px 18px;
  display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid var(--border);
}
.gymnast-avatar {
  width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(135deg, #1e40af, #3b82f6);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700; flex-shrink: 0;
}
.gymnast-info { flex: 1; min-width: 0; }
.gymnast-name {
  font-size: 16px; font-weight: 700;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.gymnast-club {
  font-size: 12px; color: var(--text-muted); margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.tabs-bar {
  display: flex; overflow-x: auto;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  scrollbar-width: none;
}
.tabs-bar::-webkit-scrollbar { display: none; }
.tab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 14px 18px;
  font-family: inherit;
  font-size: 14px; font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
}
.tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.tabs-content { padding: 12px; }

.empty-state {
  padding: 60px 24px; text-align: center;
  color: var(--text-muted);
}
.empty-icon { font-size: 38px; margin-bottom: 12px; opacity: 0.5; }
.empty-message { font-size: 14px; line-height: 1.5; }

/* Skeleton loaders */
.skeleton-card {
  background: var(--surface);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.skeleton-line {
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg,
    rgba(255,255,255,0.04) 0%,
    rgba(255,255,255,0.10) 50%,
    rgba(255,255,255,0.04) 100%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
}
.skeleton-line.w-30 { width: 30%; }
.skeleton-line.w-50 { width: 50%; }
.skeleton-line.w-70 { width: 70%; }
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .skeleton-line { animation: none; }
}

.result-list { display: flex; flex-direction: column; gap: 10px; }
.result-card {
  background: var(--surface);
  border-radius: 14px;
  padding: 14px 16px;
}
.result-row1 {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 8px;
}
.result-date {
  font-size: 12px; color: var(--text-muted);
  margin-right: auto;
}
.badge {
  display: inline-block;
  font-size: 10px; font-weight: 700;
  padding: 3px 8px;
  border-radius: 10px;
  letter-spacing: 0.3px;
}
.equ-badge {
  background: rgba(244, 114, 182, 0.15);
  color: var(--pink);
  border: 1px solid rgba(244, 114, 182, 0.4);
}
.result-name {
  font-size: 14px; font-weight: 600; line-height: 1.4;
}
.result-cat {
  font-size: 12px; color: var(--text-muted);
  margin-top: 2px; margin-bottom: 10px;
}
.result-total {
  display: flex; align-items: baseline; gap: 8px;
  margin-bottom: 10px;
}
.total-label { font-size: 11px; color: var(--text-dim); }
.total-value {
  font-size: 22px; font-weight: 800; color: var(--accent);
  letter-spacing: -0.5px;
}
.app-chips {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.app-chip {
  display: inline-flex; align-items: baseline; gap: 5px;
  background: var(--fill);
  border-radius: 8px;
  padding: 7px 12px;
}
.app-chip-code { font-size: 10px; font-weight: 700; color: var(--text-muted); }
.app-chip-total { font-size: 13px; font-weight: 700; color: var(--text); }

/* ── Modales ────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal {
  background: var(--surface);
  border-radius: 16px;
  padding: 22px;
  width: 100%; max-width: 360px;
}
.modal h3 {
  font-size: 17px; font-weight: 700; margin-bottom: 12px;
}
.modal-text {
  font-size: 14px; color: var(--text-muted); line-height: 1.5;
  margin-bottom: 16px;
}
.modal-line { font-size: 14px; margin-bottom: 4px; }
.modal-line.small { font-size: 12px; color: var(--text-muted); margin-bottom: 12px; }
.modal-actions {
  display: flex; gap: 8px; justify-content: flex-end;
  margin-top: 8px;
}
.modal-confirm { padding: 10px 18px; font-size: 14px; }

/* ── Rich Results : panels génériques ─────────────────── */
.panel {
  background: var(--surface);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 12px;
}
.panel-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 10px;
  letter-spacing: 0.2px;
}
.history-title { margin-top: 18px; margin-bottom: 8px; padding-left: 4px; }

/* ── Best scores ────────────────────────────────────── */
.potential-card {
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  border-radius: 10px;
  padding: 12px 16px;
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 10px;
}
.potential-left { flex: 1; }
.potential-title { color: var(--text); font-size: 12px; font-weight: 600; }
.potential-sub { color: rgba(255,255,255,0.7); font-size: 10px; }
.potential-value {
  color: var(--text); font-size: 26px; font-weight: 900;
  letter-spacing: -0.5px;
}
.best-grid {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.best-cell {
  padding: 10px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  display: flex; flex-direction: column; align-items: center;
  min-width: 70px;
}
.best-cell-gold {
  background: rgba(251,191,36,0.08);
  border-color: rgba(251,191,36,0.5);
  border-width: 1.5px;
}
.best-cell-code {
  font-size: 10px; font-weight: 700; color: var(--text-dim);
}
.best-cell-gold .best-cell-code { color: rgba(251,191,36,0.8); }
.best-cell-score {
  font-size: 16px; font-weight: 800;
  letter-spacing: -0.3px;
  margin: 4px 0 0;
}
.best-cell-gold .best-cell-score { color: var(--gold); }
.best-cell-sub { font-size: 9px; color: var(--text-dim); margin-top: 2px; }

/* ── Progression chart ───────────────────────────────── */
.chart-wrap {
  width: 100%; overflow: hidden;
}
.chart-svg {
  width: 100%; height: auto;
  display: block;
}
.chart-legend {
  display: flex; align-items: center;
  gap: 12px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.legend-codes {
  display: flex; flex-wrap: wrap;
  gap: 10px 12px;
  flex: 1;
}
.legend-item {
  display: inline-flex; align-items: center; gap: 4px;
}
.legend-line {
  display: inline-block;
  width: 12px; height: 2px;
  border-radius: 1px;
}
.legend-label { font-size: 10px; font-weight: 600; }
.legend-equ {
  display: inline-flex; align-items: center; gap: 4px;
  margin-left: auto;
}
.legend-equ-circle {
  width: 10px; height: 10px;
  border: 1.2px solid rgba(255,255,255,0.38);
  border-radius: 50%;
  background: var(--surface);
}
.legend-equ-label {
  font-size: 9px;
  color: rgba(255,255,255,0.38);
}

/* ── Bilan agrès ─────────────────────────────────────── */
.cat-header {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(96,165,250,0.12);
  border: 1px solid rgba(96,165,250,0.35);
  border-radius: 6px;
  color: var(--accent);
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.2px;
  margin: 14px 0 8px;
}
.app-card {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid;
  margin-bottom: 12px;
}
.app-card-header {
  padding: 10px 14px;
  display: flex; align-items: center; gap: 8px;
  color: var(--text);
}
.app-card-label { font-weight: 800; font-size: 15px; }
.app-card-passages { font-size: 12px; color: rgba(255,255,255,0.75); }
.app-card-best {
  margin-left: auto;
  font-size: 20px; font-weight: 900;
  letter-spacing: -0.5px;
}
/* Stat cells : 1 ligne, cellules égales (Flutter Row + Expanded) */
.stat-row {
  display: flex; align-items: stretch;
  background: var(--bg);
}
.stat-cell {
  flex: 1;
  padding: 10px 6px;
  border-right: 1px solid rgba(255,255,255,0.06);
  border-top: 1px solid rgba(255,255,255,0.06);
  text-align: center;
  min-width: 0;
}
.stat-cell:last-child { border-right: none; }
.stat-label {
  font-size: 9px; font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.2px;
}
.stat-value {
  font-size: 16px; font-weight: 800;
  letter-spacing: -0.3px;
  margin-top: 4px;
}
.stat-sub {
  font-size: 9px; color: var(--text-dim);
  margin-top: 2px;
}
.stat-trend {
  font-size: 9px; font-weight: 600;
  margin-top: 1px;
}
.trend-up { color: var(--green); }
.trend-down { color: var(--red); }

/* Évolution par compétition */
.evol-section {
  background: var(--surface);
  padding: 12px 14px;
}
.evol-title {
  font-size: 9px; font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.8px;
  margin-bottom: 8px;
}
.evol-list {
  display: flex; flex-direction: column;
}
.evol-row {
  display: flex; align-items: center;
  gap: 6px;
  padding: 2px 4px;
  margin-bottom: 3px;
  border-radius: 4px;
}
.evol-row-best {
  background: rgba(251,191,36,0.08);
  padding: 2px 4px;
}
.evol-date {
  width: 48px; flex-shrink: 0;
  font-size: 10px; color: var(--text-dim);
}
.evol-row-best .evol-date { color: var(--gold); }
.evol-equ {
  width: 24px; flex-shrink: 0;
  font-size: 8px; font-weight: 700;
  color: var(--pink);
}
.evol-track {
  flex: 1; min-width: 0;
  height: 14px;
}
.evol-track-bg {
  width: 100%; height: 100%;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
  display: flex;
}
.evol-bar { height: 100%; }
.evol-d { background: var(--violet); }
.evol-e { background: var(--accent); }
.evol-bonus { background: var(--green); }
.evol-pen { background: var(--red); }
.evol-total {
  width: 50px; flex-shrink: 0;
  text-align: right;
  font-size: 11px;
  color: var(--text-muted);
}
.evol-total-best {
  color: var(--gold);
  font-weight: 800;
}
.evol-legend {
  display: flex; flex-wrap: wrap;
  gap: 4px 12px;
  margin-top: 6px;
}
.legend-dot {
  display: inline-flex; align-items: center;
  gap: 4px;
  font-size: 9px; color: var(--text-dim);
}
.dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 2px;
}
.dot-d { background: var(--violet); }
.dot-e { background: var(--accent); }
.dot-bonus { background: var(--green); }
.dot-pen { background: var(--red); }

/* ── History section : filtres + DataTable ─────────── */
.history-panel { padding: 14px; }
.history-header { margin-bottom: 10px; }
.filter-tabs {
  display: inline-flex;
  border: 1.5px solid var(--accent);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 10px;
}
.filter-tab {
  padding: 6px 12px;
  font-size: 12px; font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  background: transparent;
  border-right: 1px solid rgba(96,165,250,0.3);
}
.filter-tab:last-child { border-right: none; }
.filter-tab.active {
  background: var(--accent);
  color: #0b1220;
}

.history-table-wrap {
  margin: 0 -14px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.history-table {
  border-collapse: collapse;
  width: max-content;
  min-width: 100%;
  font-size: 11px;
}
.history-table thead { background: var(--bg); }
.history-table th {
  font-size: 10px; font-weight: 700;
  color: var(--text-muted);
  padding: 8px 8px;
  text-align: left;
  white-space: nowrap;
}
.history-table th.numeric { text-align: right; }
.history-table td {
  padding: 10px 8px;
  border-top: 0.5px solid rgba(255,255,255,0.06);
  color: var(--text);
  white-space: nowrap;
  vertical-align: middle;
}
.history-table td.numeric { text-align: right; }
.history-table td:first-child { padding-left: 14px; }
.history-table td:last-child { padding-right: 14px; }
.history-table tr { cursor: pointer; }
.history-table tr:active td { background: rgba(255,255,255,0.04); }
.history-table tr.row-best td { background: rgba(251,191,36,0.06); }
/* Cellules : sélecteurs scoped pour battre `.history-table td` (spécificité). */
.history-table td.cell-date { color: var(--text-dim); font-size: 10px; }
.history-table td.cell-name {
  max-width: 130px;
  white-space: normal;
  font-size: 11px;
  line-height: 1.3;
}
.history-table td.cell-total {
  font-size: 13px; font-weight: 800;
}
.history-table td.cell-best { color: var(--gold); }
.history-table td.cell-app { color: var(--text-muted); font-size: 11px; }
.history-table td.cell-best-app {
  color: var(--gold);
  font-weight: 700;
}
.history-empty {
  padding: 16px 4px;
  color: var(--text-dim);
  font-size: 13px;
}

/* ── Clickable cards ─────────────────────────────────── */
.result-card.clickable {
  cursor: pointer;
  transition: transform 0.05s;
}
.result-card.clickable:active { transform: scale(0.99); }

/* ── Bottom sheet ────────────────────────────────────── */
.sheet-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 200;
  display: flex; align-items: flex-end;
  animation: fade-in 0.2s;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.sheet {
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: slide-up 0.25s ease-out;
  padding-bottom: env(safe-area-inset-bottom);
}
@keyframes slide-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.sheet-handle {
  width: 40px; height: 4px;
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
  margin: 12px auto 0;
}
.sheet-body { padding: 16px 20px 36px; }
.sheet-row1 {
  display: flex; align-items: center; gap: 8px;
}
.sheet-date {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 12px;
}
.sheet-name {
  font-size: 18px; font-weight: 800;
  margin-top: 12px; line-height: 1.3;
}
.sheet-cat {
  font-size: 13px; color: var(--text-muted);
  margin-top: 4px;
}
.sheet-team {
  font-size: 13px; color: var(--pink);
  margin-top: 6px;
}
.sheet-total {
  margin-top: 16px;
  padding: 14px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex; align-items: center; gap: 10px;
}
.sheet-total-pr {
  background: rgba(251,191,36,0.1);
  border-color: rgba(251,191,36,0.35);
}
.sheet-star {
  color: var(--gold); font-size: 16px;
}
.sheet-total-label {
  color: var(--text-muted); font-size: 14px;
}
.sheet-total-value {
  margin-left: auto;
  font-size: 26px; font-weight: 900;
  letter-spacing: -0.5px;
  color: var(--text);
}
.sheet-total-pr .sheet-total-value { color: var(--gold); }
.sheet-section-title {
  margin-top: 20px;
  color: var(--text-muted);
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.5px;
}
.sheet-app-list {
  margin-top: 10px;
  display: flex; flex-direction: column; gap: 6px;
}
.detail-app-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.detail-app-best {
  background: rgba(251,191,36,0.06);
  border-color: rgba(251,191,36,0.3);
}
.detail-app-code {
  font-size: 13px; font-weight: 800;
  min-width: 36px;
}
.detail-app-stats {
  display: flex; flex-wrap: wrap; gap: 8px;
  flex: 1;
  font-size: 11px;
}
.detail-de {
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255,255,255,0.06);
  color: var(--text-muted);
}
.detail-d { color: var(--violet); }
.detail-e { color: var(--accent); }
.detail-bonus { color: var(--green); }
.detail-pen { color: var(--red); }
.detail-app-total {
  font-size: 16px; font-weight: 800;
  letter-spacing: -0.3px;
}
