/* My Shadow Track — Social Feed Design Tokens */
:root {
  /* Brand */
  --msk-blue: #2f66c8;
  --msk-blue-light: #5ea1ff;
  --msk-blue-dark: #0f2d60;
  --msk-blue-50: #eaf2ff;
  --msk-blue-100: #d4e3ff;

  /* Racing accents */
  --racing-red: #e63946;
  --racing-orange: #f59e0b;
  --racing-green: #16a34a;
  --racing-checker: #111;

  /* Neutrals (Facebook-like ash) */
  --bg: #f0f2f5;
  --bg-deep: #e4e6eb;
  --surface: #ffffff;
  --surface-alt: #f7f8fa;
  --line: #e4e6eb;
  --line-strong: #d8dadf;

  /* Ink */
  --ink-1: #050505;
  --ink-2: #1c1e21;
  --ink-3: #65676b;
  --ink-4: #8a8d91;

  /* Curve coloring (matches dashboard) */
  --curve-tight: #e63946;     /* Cerrada R<50 */
  --curve-medium: #f59e0b;    /* Media 50-150 */
  --curve-wide: #16a34a;      /* Amplia 150-600 */
  --curve-straight: #6b7280;  /* Recto */

  /* Type */
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Space Grotesk', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Radius */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;

  /* Shadow */
  --sh-1: 0 1px 2px rgba(0,0,0,0.06), 0 1px 1px rgba(0,0,0,0.04);
  --sh-2: 0 4px 16px rgba(15,45,96,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --sh-3: 0 12px 32px rgba(15,45,96,0.14), 0 4px 8px rgba(0,0,0,0.06);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink-1);
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* ===== Top nav (Facebook-like) ===== */
.fbnav {
  position: sticky; top: 0; z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  height: 60px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 16px;
  box-shadow: var(--sh-1);
}
.fbnav-left { display: flex; align-items: center; gap: 10px; }
.fbnav-logo {
  width: 40px; height: 40px; border-radius: 10px;
  background: linear-gradient(135deg, var(--msk-blue-light), var(--msk-blue));
  display: grid; place-items: center;
  flex-shrink: 0;
}
.fbnav-logo svg { width: 26px; height: 26px; }
.fbnav-search {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg);
  border-radius: 999px;
  padding: 9px 14px;
  width: 240px;
  color: var(--ink-3);
  font-size: 14px;
}
.fbnav-center { display: flex; gap: 4px; }
.fbnav-tab {
  padding: 0 28px;
  height: 56px;
  display: grid; place-items: center;
  border-bottom: 3px solid transparent;
  color: var(--ink-3);
  position: relative;
}
.fbnav-tab.active {
  color: var(--msk-blue);
  border-bottom-color: var(--msk-blue);
}
.fbnav-tab svg { width: 26px; height: 26px; }
.fbnav-tab .badge {
  position: absolute; top: 8px; right: 14px;
  background: var(--racing-red);
  color: white; font-size: 11px; font-weight: 700;
  padding: 2px 6px; border-radius: 999px; min-width: 18px; text-align: center;
}
.fbnav-right { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.fbnav-iconbtn {
  width: 40px; height: 40px;
  background: var(--bg); border: none; border-radius: 50%;
  display: grid; place-items: center;
  position: relative;
}
.fbnav-iconbtn svg { width: 20px; height: 20px; color: var(--ink-2); }
.fbnav-iconbtn .dot {
  position: absolute; top: 2px; right: 2px;
  width: 16px; height: 16px;
  background: var(--racing-red); color: white;
  font-size: 10px; font-weight: 700;
  border-radius: 50%; display: grid; place-items: center;
  border: 2px solid var(--surface);
}
.fbnav-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #e63946);
  display: grid; place-items: center;
  color: white; font-weight: 700; font-size: 14px;
}

/* ===== Three-column shell ===== */
.fb-shell {
  max-width: 1480px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 320px 1fr 360px;
  gap: 16px;
  padding: 16px;
  align-items: start;
}
.fb-col-left, .fb-col-right { position: sticky; top: 76px; }

/* ===== Sidebar items ===== */
.side-section { padding: 6px 0; }
.side-title {
  font-size: 13px; color: var(--ink-3); font-weight: 600;
  padding: 10px 12px 4px; letter-spacing: 0.02em;
  text-transform: uppercase;
}
.side-item {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 12px;
  border-radius: var(--r-md);
  color: var(--ink-2);
  font-size: 15px; font-weight: 500;
  cursor: pointer;
}
.side-item:hover { background: var(--bg-deep); }
.side-item.active { background: var(--msk-blue-50); color: var(--msk-blue-dark); }
.side-icon {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg-deep);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.side-icon svg { width: 18px; height: 18px; color: var(--msk-blue-dark); }
.side-icon.bike-thumb {
  background: linear-gradient(135deg, #1c1e21, #3a3c40);
  color: white;
}

/* ===== Cards (Facebook-style) ===== */
.card {
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  margin-bottom: 16px;
  overflow: hidden;
}

/* ===== Composer ===== */
.composer {
  padding: 12px 16px;
}
.composer-row {
  display: flex; align-items: center; gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.composer-input {
  flex: 1;
  background: var(--bg);
  border-radius: 999px;
  padding: 10px 16px;
  color: var(--ink-3);
  font-size: 15px;
}
.composer-actions {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  padding-top: 8px;
}
.composer-action {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 8px;
  border-radius: var(--r-md);
  font-size: 14px; font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
}
.composer-action:hover { background: var(--bg); }
.composer-action svg { width: 22px; height: 22px; }

/* ===== Stories rail ===== */
.stories {
  display: flex; gap: 8px;
  overflow-x: auto;
  padding: 0 4px;
}
.story {
  flex-shrink: 0;
  width: 112px; height: 200px;
  border-radius: var(--r-md);
  background-size: cover; background-position: center;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.15s;
}
.story:hover { transform: translateY(-2px); }
.story::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 50%, rgba(0,0,0,0.7) 100%);
}
.story-name {
  position: absolute; bottom: 8px; left: 8px; right: 8px;
  color: white; font-weight: 600; font-size: 12px;
  z-index: 1;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
.story-bike-badge {
  position: absolute; top: 8px; left: 8px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--msk-blue);
  border: 3px solid white;
  display: grid; place-items: center;
  z-index: 1;
}
.story-bike-badge svg { width: 16px; height: 16px; color: white; }
.story.add {
  background: var(--surface);
  border: 1px solid var(--line);
}
.story.add::after { display: none; }
.story-add-img {
  width: 100%; height: 70%;
  background: linear-gradient(135deg, var(--msk-blue-50), var(--msk-blue-100));
  display: grid; place-items: center;
}
.story-add-plus {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--msk-blue); color: white;
  display: grid; place-items: center;
  border: 4px solid white;
  position: absolute;
  left: 50%; top: 65%; transform: translate(-50%, -50%);
  z-index: 1;
  font-size: 24px; font-weight: 300; line-height: 1;
}
.story-add-text {
  position: absolute; bottom: 12px; left: 0; right: 0;
  text-align: center;
  color: var(--ink-2); font-weight: 600; font-size: 13px;
  z-index: 1;
}
