* { box-sizing: border-box; }
body { margin:0; background:#111827; }

.rw-app { background:#111827; min-height:100vh; color:#f1f5f9; font-family:system-ui,sans-serif; padding-bottom:60px; }

/* HEADER */
.rw-header { background:#1f2937; border-bottom:1px solid #374151; padding:12px 24px; display:flex; align-items:center; justify-content:space-between; }
.rw-logo { display:flex; align-items:center; gap:10px; }
.rw-logo-icon { width:28px; height:28px; background:#3b82f6; border-radius:6px; display:flex; align-items:center; justify-content:center; color:white; font-size:14px; }
.rw-logo-title { font-size:16px; font-weight:700; color:#f1f5f9; letter-spacing:-0.3px; }
.rw-logo-sub { font-size:11px; color:#9ca3af; margin-top:1px; }
.rw-btn-import { font-size:11px; color:#d1d5db; background:#374151; border:1px solid #4b5563; border-radius:6px; padding:6px 12px; cursor:pointer; }
.rw-btn-import:hover { background:#4b5563; }

/* LOCATION SUMMARY */
.rw-geo-section { background:#1f2937; border-bottom:1px solid #374151; padding:14px 24px; }
.rw-geo-cards { display:grid; grid-template-columns:repeat(3,1fr); gap:1px; background:#374151; border:1px solid #374151; border-radius:8px; overflow:hidden; margin-bottom:8px; }
.rw-geo-card { background:#111827; padding:12px 16px; cursor:pointer; text-align:center; transition:background 0.1s; }
.rw-geo-card:hover { background:#1a2333; }
.rw-geo-val { font-size:22px; font-weight:700; color:#60a5fa; letter-spacing:-0.3px; }
.rw-geo-lbl { font-size:10px; color:#9ca3af; text-transform:uppercase; letter-spacing:0.5px; margin-top:2px; }
.rw-geo-list { list-style:none; margin:0; padding:0; max-height:320px; overflow-y:auto; }
.rw-geo-list li { padding:8px 0; border-bottom:1px solid #374151; font-size:13px; color:#e5e7eb; cursor:pointer; }
.rw-geo-list li:hover { color:#93c5fd; }
.rw-geo-list li:last-child { border-bottom:none; }

/* TICKER */
.rw-ticker-wrap { background:#1f2937; border-bottom:1px solid #374151; padding:8px 24px; display:flex; align-items:center; gap:12px; }
.rw-ticker-label { font-size:9px; color:#6b7280; text-transform:uppercase; letter-spacing:1.5px; white-space:nowrap; }
.rw-ticker-items { display:flex; gap:8px; overflow:hidden; flex:1; }
.rw-ticker-item { background:#111827; border:1px solid #374151; border-radius:20px; padding:4px 10px; font-size:11px; color:#9ca3af; white-space:nowrap; cursor:pointer; }
.rw-ticker-item:hover { border-color:#3b82f6; color:#93c5fd; }
.rw-ticker-nav { display:flex; align-items:center; gap:4px; }
.rw-ticker-nav button { background:#111827; border:1px solid #374151; color:#6b7280; border-radius:4px; padding:2px 8px; cursor:pointer; font-size:14px; }
.rw-ticker-nav button:hover { border-color:#3b82f6; color:#93c5fd; }
.rw-ticker-nav span { font-size:10px; color:#6b7280; padding:0 4px; }

/* FILTERS */
.rw-filters { padding:12px 24px; display:flex; gap:8px; align-items:center; flex-wrap:wrap; background:#1f2937; border-bottom:1px solid #374151; }
.rw-filters select { background:#111827; border:1px solid #374151; color:#d1d5db; border-radius:6px; padding:6px 10px; font-size:12px; cursor:pointer; }
.rw-btn-search { background:#3b82f6; border:none; color:white; border-radius:6px; padding:6px 16px; font-size:12px; font-weight:600; cursor:pointer; }
.rw-btn-search:hover { background:#2563eb; }
.rw-btn-reset { background:#374151; border:1px solid #4b5563; color:#9ca3af; border-radius:6px; padding:6px 14px; font-size:12px; cursor:pointer; }
.rw-btn-reset:hover { background:#4b5563; }

/* FOCUS BAR */
.rw-focus-bar { padding:10px 24px; display:flex; align-items:center; gap:8px; background:#1f2937; border-bottom:1px solid #374151; }
.rw-focus-label { font-size:10px; color:#6b7280; text-transform:uppercase; letter-spacing:1px; margin-right:4px; }
.rw-focus-btn { background:#111827; border:1px solid #374151; color:#9ca3af; border-radius:20px; padding:4px 12px; font-size:11px; cursor:pointer; }
.rw-focus-btn:hover { border-color:#3b82f6; color:#93c5fd; }
.rw-focus-btn.active { background:#3b82f6; border-color:#3b82f6; color:#fff; font-weight:600; }


.rw-section-label { padding:14px 24px 6px; font-size:10px; color:#6b7280; text-transform:uppercase; letter-spacing:1.5px; }

/* STAT CARDS */
.rw-cards-grid { display:grid; grid-template-columns:repeat(5,1fr); gap:1px; padding:0 24px; background:#374151; border-top:1px solid #374151; border-bottom:1px solid #374151; }
.rw-card { background:#1f2937; padding:12px 16px; cursor:pointer; transition:background 0.1s; }
.rw-card:hover { background:#293548; }
.rw-card.no-click { cursor:default; }
.rw-card.no-click:hover { background:#1f2937; }
.rw-card-val { font-size:18px; font-weight:700; color:#60a5fa; margin-bottom:2px; letter-spacing:-0.3px; }
.rw-card-lbl { font-size:10px; color:#9ca3af; text-transform:uppercase; letter-spacing:0.5px; }
.rw-card-sub { font-size:10px; color:#6b7280; margin-top:2px; }

/* RECORDS GRID */
.rw-records-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); gap:1px; padding:0 24px; background:#374151; border-top:1px solid #374151; border-bottom:1px solid #374151; }

/* RECENT RUNS */
.rw-recent-section { padding:0 24px; margin-top:28px; }
.rw-recent-title { font-size:13px; font-weight:700; color:#f1f5f9; border-bottom:2px solid #3b82f6; padding-bottom:6px; margin-bottom:0; }
.rw-run-row { display:grid; grid-template-columns:60px minmax(120px,220px) 80px 80px 70px 60px; gap:8px; align-items:center; padding:9px 0; border-bottom:1px solid #1f2937; cursor:pointer; }
.rw-run-row:hover { background:#1f2937; margin:0 -8px; padding:9px 8px; border-radius:6px; }
.rw-run-row.header { cursor:default; font-size:9px; color:#6b7280; text-transform:uppercase; letter-spacing:1px; padding:8px 0; border-bottom:1px solid #374151; }
.rw-run-row.header:hover { background:none; margin:0; padding:8px 0; border-radius:0; }
.rw-run-date { font-size:12px; color:#9ca3af; }
.rw-run-name { font-size:13px; color:#f1f5f9; font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.rw-run-location { font-size:11px; color:#6b7280; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.rw-run-dist { font-size:13px; font-weight:600; color:#60a5fa; text-align:right; }
.rw-run-pace { font-size:12px; color:#d1d5db; text-align:right; }
.rw-run-hr { font-size:12px; color:#9ca3af; text-align:right; }
.rw-run-time { font-size:11px; color:#6b7280; text-align:right; }

/* TABLES */
.rw-table-section { padding:0 24px; margin-top:28px; }
.rw-table-title { font-size:13px; font-weight:700; color:#f1f5f9; border-bottom:2px solid #3b82f6; padding-bottom:6px; margin-bottom:0; }
.rw-sum-table { width:100%; border-collapse:collapse; font-size:13px; margin-top:0; table-layout:fixed; }
.rw-sum-table th { font-size:9px; color:#6b7280; text-transform:uppercase; letter-spacing:1px; font-weight:500; text-align:right; padding:7px 8px; border-bottom:1px solid #374151; white-space:nowrap; overflow:hidden; }
.rw-sum-table th:first-child { text-align:left; width:80px; }
.rw-sum-table th:nth-child(2) { width:50px; }
.rw-sum-table th:nth-child(3) { width:140px; }
.rw-sum-table th:nth-child(4) { width:80px; }
.rw-sum-table th:nth-child(5) { width:80px; }
.rw-sum-table th:nth-child(6) { width:70px; }
.rw-sum-table td { color:#d1d5db; padding:8px 8px; border-bottom:1px solid #1f2937; text-align:right; vertical-align:middle; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.rw-sum-table td:first-child { text-align:left; font-weight:600; color:#f1f5f9; }
.rw-sum-table tr:hover td { background:#1f2937; cursor:pointer; }
.rw-sum-table tr:last-child td { border-bottom:none; }
.rw-bar-cell { display:flex; align-items:center; gap:4px; justify-content:flex-end; }
.rw-bar { height:4px; background:#3b82f6; border-radius:2px; min-width:2px; flex-shrink:0; opacity:0.6; }
.rw-yr-best { color:#60a5fa; }

/* MODAL */
.rw-modal-overlay { position:fixed; inset:0; background:rgba(0,0,0,0.6); display:flex; align-items:center; justify-content:center; z-index:1000; }
.rw-modal { background:#1f2937; border:1px solid #374151; border-radius:10px; width:90%; max-width:700px; max-height:80vh; display:flex; flex-direction:column; box-shadow:0 8px 32px rgba(0,0,0,0.4); }
.rw-modal-header { display:flex; justify-content:space-between; align-items:center; padding:16px 20px; border-bottom:1px solid #374151; }
.rw-modal-title { font-size:14px; font-weight:700; color:#f1f5f9; }
.rw-modal-close { background:none; border:none; color:#6b7280; font-size:20px; cursor:pointer; }
.rw-modal-close:hover { color:#f1f5f9; }
.rw-modal-body { overflow-y:auto; padding:0 20px 16px; }
.rw-table { width:100%; border-collapse:collapse; font-size:12px; margin-top:12px; }
.rw-table th { color:#6b7280; font-weight:500; text-align:left; padding:6px 8px; border-bottom:1px solid #374151; font-size:10px; text-transform:uppercase; letter-spacing:0.5px; }
.rw-table td { color:#9ca3af; padding:9px 8px; border-bottom:1px solid #111827; }
.rw-table tr:hover td { background:#111827; color:#f1f5f9; cursor:pointer; }
.rw-table tr:last-child td { border-bottom:none; }

/* ACTIVITY PILLS */
.rw-act-run { background:#431407; color:#fb923c; font-size:10px; border-radius:4px; padding:2px 7px; }
.rw-act-swim { background:#0c1a40; color:#60a5fa; font-size:10px; border-radius:4px; padding:2px 7px; }
.rw-act-cycle { background:#14290a; color:#4ade80; font-size:10px; border-radius:4px; padding:2px 7px; }
.rw-act-walk { background:#1a1a0a; color:#fbbf24; font-size:10px; border-radius:4px; padding:2px 7px; }

/* RUN DETAIL SPLITS */
.rd-split-hr { font-size:10px; color:#f87171; margin-top:2px; }

/* MOBILE */
@media (max-width:600px) {
  .rw-cards-grid { grid-template-columns:repeat(2,1fr); padding:0 14px; }
  .rw-records-grid { padding:0 14px; }
  .rw-run-row { grid-template-columns:55px 1fr 70px 60px; }
  .rw-run-hr, .rw-run-time { display:none; }
  .rw-sum-table th:nth-child(n+5), .rw-sum-table td:nth-child(n+5) { display:none; }
  .rw-header, .rw-filters, .rw-ticker-wrap, .rw-section-label,
  .rw-recent-section, .rw-table-section { padding-left:14px; padding-right:14px; }
}