:root {
  --bg: #08111f;
  --bg-soft: #0f172a;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --surface-muted: #e2e8f0;
  --text: #0f172a;
  --text-soft: #475569;
  --text-inverted: #f8fafc;
  --muted-inverted: #cbd5e1;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #dbeafe;
  --accent: #22c55e;
  --accent-soft: #dcfce7;
  --warning: #f59e0b;
  --danger: #ef4444;
  --border: rgba(15, 23, 42, 0.1);
  --border-dark: rgba(255, 255, 255, 0.12);
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.16);
  --shadow-soft: 0 12px 34px rgba(15, 23, 42, 0.08);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --topbar-height: 82px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 10% 0%, rgba(37, 99, 235, 0.28), transparent 34rem),
    radial-gradient(circle at 88% 10%, rgba(34, 197, 94, 0.19), transparent 30rem),
    linear-gradient(180deg, #08111f 0%, #111827 24%, #f8fafc 24.1%, #eef4fb 100%);
  color: var(--text);
  min-height: 100vh;
}

body.modal-open { overflow: hidden; }

a { color: inherit; text-decoration: none; }

button, input, select, textarea { font: inherit; }

button { cursor: pointer; }

.site-shell { min-height: 100vh; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: var(--topbar-height);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(8, 17, 31, 0.82);
  border-bottom: 1px solid var(--border-dark);
  backdrop-filter: blur(18px);
  color: var(--text-inverted);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), #38bdf8 52%, var(--accent));
  color: white;
  font-weight: 900;
  letter-spacing: -0.08em;
  box-shadow: 0 16px 42px rgba(37, 99, 235, 0.35);
}

.brand-text { display: grid; gap: 2px; }
.brand-text strong { font-size: 1rem; letter-spacing: -0.03em; }
.brand-text small { color: var(--muted-inverted); font-size: 0.76rem; }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border-dark);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: white;
  padding: 10px;
}
.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: white;
  border-radius: 999px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 13px;
  color: #e2e8f0;
  font-size: 0.92rem;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.14);
  color: white;
}

.nav-link.locked::after {
  content: "🔒";
  font-size: 0.72rem;
  opacity: 0.72;
}
.nav-link.unlocked::after { content: ""; }
.nav-link.hidden { display: none; }

.account-box {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: 10px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  border: 1px solid var(--border-dark);
  border-radius: 999px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  max-width: 270px;
}
.user-chip span:nth-child(2) {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-chip small {
  text-transform: uppercase;
  color: var(--muted-inverted);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.14);
  flex: 0 0 auto;
}

main { padding: clamp(22px, 4vw, 56px); }

.page { display: none; animation: fadeUp 0.28s ease; }
.page-active { display: block; }

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

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.55fr);
  gap: clamp(22px, 4vw, 52px);
  align-items: center;
  color: white;
  min-height: calc(72vh - var(--topbar-height));
  padding: 34px 0 76px;
}

.hero-content { max-width: 880px; }
.eyebrow {
  margin: 0 0 10px;
  color: var(--primary);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.76rem;
}
.hero .eyebrow,
.page-hero .eyebrow { color: #93c5fd; }

h1, h2, h3, p { margin-top: 0; }
h1 {
  font-size: clamp(3rem, 8vw, 7.2rem);
  line-height: 0.9;
  letter-spacing: -0.085em;
  margin-bottom: 20px;
}
h2 { font-size: clamp(1.35rem, 2.2vw, 2.1rem); letter-spacing: -0.055em; margin-bottom: 10px; }
h3 { letter-spacing: -0.04em; margin-bottom: 8px; }

.hero-lead {
  max-width: 760px;
  font-size: clamp(1.25rem, 2.5vw, 2.05rem);
  line-height: 1.22;
  color: #eff6ff;
  margin-bottom: 18px;
}
.hero-copy {
  max-width: 720px;
  color: #cbd5e1;
  font-size: 1.06rem;
  line-height: 1.7;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), #38bdf8);
  color: white;
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.28);
}
.btn-primary:hover { box-shadow: 0 18px 42px rgba(37, 99, 235, 0.36); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-dark);
  color: white;
}
.btn-soft {
  background: var(--primary-soft);
  color: #1e3a8a;
  border-color: rgba(37, 99, 235, 0.14);
}
.btn-lg { padding: 14px 20px; font-size: 1rem; }
.full-width { width: 100%; }

.text-btn {
  border: 0;
  background: transparent;
  color: var(--primary);
  padding: 0;
  font-weight: 850;
}
.text-btn:hover { text-decoration: underline; }

.glass-card {
  border: 1px solid var(--border-dark);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(22px);
}
.hero-card {
  border-radius: var(--radius-xl);
  padding: clamp(22px, 3vw, 32px);
  color: white;
}
.hero-card p { color: #cbd5e1; line-height: 1.65; }
.profile-orbit {
  position: relative;
  height: 210px;
  display: grid;
  place-items: center;
  margin-bottom: 8px;
}
.avatar {
  width: 128px;
  height: 128px;
  border-radius: 36px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  color: #1e3a8a;
  font-size: 3rem;
  font-weight: 950;
  letter-spacing: -0.1em;
  box-shadow: 0 24px 56px rgba(59, 130, 246, 0.3);
}
.orbit {
  position: absolute;
  border: 1px solid var(--border-dark);
  background: rgba(8, 17, 31, 0.74);
  border-radius: 999px;
  padding: 8px 12px;
  color: white;
  font-size: 0.8rem;
  font-weight: 850;
}
.orbit-1 { top: 18px; left: 22px; }
.orbit-2 { right: 12px; top: 76px; color: #bbf7d0; }
.orbit-3 { left: 48px; bottom: 20px; color: #bfdbfe; }
.mini-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 22px;
}
.mini-grid div {
  border: 1px solid var(--border-dark);
  border-radius: 16px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.08);
}
.mini-grid strong { display: block; font-size: 1.35rem; }
.mini-grid span { display: block; color: #cbd5e1; font-size: 0.78rem; margin-top: 2px; }

.section-wrap {
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: clamp(24px, 4vw, 44px);
}
.section-heading { max-width: 760px; margin-bottom: 28px; }
.section-heading p:not(.eyebrow) { color: var(--text-soft); line-height: 1.7; }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.feature-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  box-shadow: var(--shadow-soft);
  min-height: 240px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.feature-card p { color: var(--text-soft); line-height: 1.62; flex: 1; }
.feature-icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: var(--primary-soft);
  font-size: 1.45rem;
  margin-bottom: 16px;
}

.page-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  color: white;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-xl);
  padding: clamp(28px, 5vw, 54px);
  margin-bottom: 22px;
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.6;
  background: radial-gradient(circle at 80% 20%, rgba(255,255,255,0.18), transparent 26rem);
  pointer-events: none;
}
.page-hero > * { position: relative; z-index: 1; }
.page-hero h1 { font-size: clamp(2.6rem, 6vw, 5.2rem); margin-bottom: 12px; }
.page-hero p:not(.eyebrow) { max-width: 820px; color: #e2e8f0; line-height: 1.7; margin: 0; }
.sport-hero { background: linear-gradient(135deg, #14532d, #0f172a 44%, #1d4ed8); }
.it-hero { background: linear-gradient(135deg, #0f172a, #1e3a8a, #0891b2); }
.family-hero { background: linear-gradient(135deg, #581c87, #0f172a 52%, #be123c); }
.career-hero { background: linear-gradient(135deg, #713f12, #111827 45%, #1d4ed8); }
.admin-hero { background: linear-gradient(135deg, #111827, #7f1d1d); }
.page-hero-actions { display: grid; gap: 8px; min-width: 250px; }
.date-picker-label { color: #bfdbfe; font-weight: 850; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; }
.date-picker {
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 999px;
  padding: 13px 14px;
  background: rgba(255,255,255,0.12);
  color: white;
  color-scheme: dark;
}

.dashboard-grid,
.content-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
}
.content-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: clamp(18px, 3vw, 28px);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-soft);
}
.span-12 { grid-column: span 12; }
.span-7 { grid-column: span 7; }
.span-5 { grid-column: span 5; }
.content-grid > .panel { grid-column: span 6; }
.content-grid.three > .panel { grid-column: auto; }
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}
.panel-header.compact { margin-bottom: 14px; }
.panel-header h2 { margin-bottom: 0; }
.button-row { display: flex; gap: 8px; flex-wrap: wrap; }

.table-scroll { overflow-x: auto; border-radius: 16px; border: 1px solid var(--border); }
.tracker-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
  background: white;
}
.tracker-table th,
.tracker-table td {
  border-bottom: 1px solid var(--border);
  padding: 11px;
  text-align: left;
  vertical-align: middle;
}
.tracker-table th {
  background: #f1f5f9;
  color: #334155;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.tracker-table tr:last-child td { border-bottom: 0; }
.tracker-table input,
.tracker-table select,
.tracker-table textarea {
  width: 100%;
  min-width: 95px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 10px;
  background: #f8fafc;
}
.tracker-table textarea { min-height: 42px; resize: vertical; }
.tracker-table .small-cell { width: 70px; min-width: 70px; }
.tracker-table .delete-row {
  border: 0;
  background: #fee2e2;
  color: #991b1b;
  border-radius: 10px;
  padding: 8px 10px;
  font-weight: 850;
}

.metric-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.metric-form label,
.modal-card label {
  display: grid;
  gap: 6px;
  color: #334155;
  font-weight: 800;
  font-size: 0.86rem;
}
.metric-form label.full { grid-column: 1 / -1; }
.metric-form input,
.metric-form textarea,
.modal-card input,
.modal-card textarea,
.modal-card select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: #f8fafc;
  padding: 12px 13px;
  color: var(--text);
}
.metric-form textarea { resize: vertical; }
.metric-form input:focus,
.metric-form textarea:focus,
.modal-card input:focus {
  outline: 3px solid rgba(37, 99, 235, 0.14);
  border-color: rgba(37, 99, 235, 0.45);
}

.clean-list {
  list-style: none;
  display: grid;
  gap: 14px;
  padding: 0;
  margin: 0;
}
.clean-list li {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #f8fafc;
  padding: 16px;
  line-height: 1.55;
}
.rich-card p { color: var(--text-soft); line-height: 1.7; }
.kanban-preview { display: grid; gap: 12px; }
.kanban-preview div {
  border: 1px solid var(--border);
  background: #f8fafc;
  border-radius: 18px;
  padding: 16px;
}
.kanban-preview span {
  color: var(--primary);
  text-transform: uppercase;
  font-weight: 900;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}
.kanban-preview p { margin: 6px 0 0; }
.memory-card { min-height: 220px; }
.memory-card p { color: var(--text-soft); line-height: 1.7; }

.timeline { display: grid; gap: 20px; }
.timeline-item { display: grid; grid-template-columns: 64px 1fr; gap: 18px; }
.timeline-item span {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: var(--primary-soft);
  color: #1e3a8a;
  font-weight: 950;
}
.timeline-item p { color: var(--text-soft); line-height: 1.7; }

.locked-state {
  max-width: 680px;
  margin: 90px auto;
  text-align: center;
}
.lock-icon { font-size: 4rem; margin-bottom: 16px; }
.locked-state h1 { color: var(--text); font-size: clamp(2.4rem, 6vw, 4.6rem); margin-bottom: 12px; }
.locked-state p { color: var(--text-soft); line-height: 1.7; }

.site-footer {
  margin: 28px clamp(18px, 4vw, 56px) 42px;
  border-radius: var(--radius-xl);
  padding: clamp(24px, 4vw, 36px);
  background: #0f172a;
  color: white;
  box-shadow: var(--shadow);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr 1.5fr;
  gap: 24px;
}
.site-footer h2 { font-size: 1.1rem; margin-bottom: 10px; }
.site-footer p { color: #cbd5e1; line-height: 1.65; }
.site-footer a { color: #bfdbfe; }
.social-list { display: grid; gap: 10px; }
.social-list a {
  border: 1px solid var(--border-dark);
  border-radius: 14px;
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.06);
}
.fineprint { color: #94a3b8 !important; font-size: 0.78rem; }

.modal {
  border: 0;
  background: transparent;
  padding: 0;
  width: min(94vw, 520px);
}
.modal::backdrop { background: rgba(2, 6, 23, 0.72); backdrop-filter: blur(8px); }
.modal-card {
  position: relative;
  border-radius: var(--radius-xl);
  padding: 28px;
  background: white;
  box-shadow: var(--shadow);
  color: var(--text);
  display: grid;
  gap: 14px;
}
.legal-card { width: min(94vw, 760px); max-height: 82vh; overflow: auto; }
.modal-card h2 { margin-bottom: 0; }
.modal-copy { color: var(--text-soft); line-height: 1.62; }
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #f8fafc;
  font-size: 1.35rem;
  line-height: 1;
}
.message {
  min-height: 22px;
  color: var(--danger);
  font-size: 0.88rem;
  font-weight: 800;
}
.message.success { color: #15803d; }

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 70;
  max-width: min(420px, calc(100vw - 40px));
  border-radius: 18px;
  padding: 14px 16px;
  background: #0f172a;
  color: white;
  box-shadow: 0 18px 50px rgba(2, 6, 23, 0.28);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.toast.visible { opacity: 1; transform: translateY(0); }

.hidden { display: none !important; }

@media (max-width: 1180px) {
  .topbar { flex-wrap: wrap; }
  .account-box { margin-left: auto; }
  .main-nav { order: 3; width: 100%; justify-content: flex-start; overflow-x: auto; padding-bottom: 3px; margin-left: 0; }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-card { max-width: 620px; }
  .span-5, .span-7 { grid-column: span 12; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  :root { --topbar-height: 72px; }
  body { background: linear-gradient(180deg, #08111f 0%, #111827 19%, #f8fafc 19.1%, #eef4fb 100%); }
  .topbar { padding: 12px 16px; }
  .brand-text small { display: none; }
  .nav-toggle { display: inline-block; margin-left: auto; }
  .main-nav {
    display: none;
    order: 4;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    overflow: visible;
  }
  .main-nav.open { display: flex; }
  .nav-link { justify-content: space-between; border-radius: 14px; }
  .account-box { width: 100%; justify-content: space-between; margin-left: 0; }
  .user-chip { max-width: 100%; flex: 1; }
  main { padding: 16px; }
  h1 { font-size: clamp(2.65rem, 15vw, 4.2rem); }
  .hero { padding: 20px 0 36px; }
  .hero-actions, .panel-header, .page-hero { align-items: stretch; flex-direction: column; }
  .feature-grid, .content-grid, .content-grid.three { grid-template-columns: 1fr; }
  .content-grid > .panel, .content-grid.three > .panel { grid-column: auto; }
  .metric-form { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .site-footer { margin: 18px 16px 28px; }
  .modal-card { padding: 22px; }
}

/* Sport Dashboard v2 */
.btn-danger {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  color: white;
  box-shadow: 0 16px 38px rgba(239, 68, 68, 0.34);
}
.btn-danger:hover { box-shadow: 0 20px 46px rgba(239, 68, 68, 0.44); }

.sport-page { position: relative; }
.sport-topline {
  position: sticky;
  top: calc(var(--topbar-height) + 10px);
  z-index: 45;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  border-radius: 999px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(18px);
}
.sport-date-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding-left: 12px;
}
.sport-date-card .date-picker-label { color: #1e3a8a; white-space: nowrap; }
.sport-date-card .date-picker {
  border-color: rgba(15, 23, 42, 0.14);
  background: #fff;
  color: var(--text);
  color-scheme: light;
  min-width: 165px;
}
.selected-day-label {
  color: var(--text-soft);
  font-weight: 850;
  white-space: nowrap;
}
.sticky-save { min-width: 132px; text-transform: uppercase; letter-spacing: 0.04em; }
.compact-sport-hero { margin-bottom: 16px; }
.compact-sport-hero h1 { font-size: clamp(2.45rem, 5vw, 4.8rem); }

.sport-tabs {
  display: flex;
  gap: 10px;
  margin: 0 0 18px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: var(--shadow-soft);
  width: fit-content;
}
.sport-tab {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  background: transparent;
  color: var(--text-soft);
  font-weight: 900;
}
.sport-tab.active {
  background: #0f172a;
  color: white;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
}
.sport-tab-panel { display: none; }
.sport-tab-panel.active { display: block; }
.sport-panel-primary { overflow: hidden; }
.panel-copy { color: var(--text-soft); line-height: 1.6; margin: 6px 0 0; }

.today-plan-box {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 22px;
  padding: 16px;
  background: linear-gradient(180deg, #eff6ff, #ffffff);
}
.today-plan-box h3 { margin: 0; }
.today-plan-list { display: grid; gap: 8px; }
.today-plan-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: 16px;
  padding: 12px;
  background: white;
}
.today-plan-item strong { display: block; color: var(--text); }
.today-plan-item span { display: block; color: var(--text-soft); font-size: 0.9rem; margin-top: 2px; }
.empty-state {
  border: 1px dashed rgba(15, 23, 42, 0.18);
  border-radius: 18px;
  padding: 16px;
  background: #f8fafc;
  color: var(--text-soft);
  font-weight: 750;
}
.empty-state.small { padding: 12px; font-size: 0.9rem; }

.summary-header { align-items: flex-start; }
.summary-range {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}
.summary-range label {
  display: grid;
  gap: 6px;
  color: #334155;
  font-weight: 850;
  font-size: 0.84rem;
}
.summary-range input,
.plan-row input {
  border: 1px solid var(--border);
  border-radius: 13px;
  background: #f8fafc;
  color: var(--text);
  padding: 11px 12px;
}
.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.summary-card {
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 16px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}
.summary-card span {
  display: block;
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.summary-card strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(1.25rem, 2vw, 1.85rem);
  letter-spacing: -0.05em;
}
.summary-card small {
  display: block;
  margin-top: 6px;
  color: var(--text-soft);
  line-height: 1.4;
}

.sport-plan-panel { grid-column: span 12; }
.plan-week-tabs {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.plan-week-tab {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 13px 12px;
  background: #f8fafc;
  color: var(--text);
  text-align: left;
}
.plan-week-tab strong { display: block; font-size: 1rem; }
.plan-week-tab span { display: block; margin-top: 3px; color: var(--text-soft); font-size: 0.78rem; }
.plan-week-tab.active {
  border-color: rgba(37, 99, 235, 0.4);
  background: var(--primary-soft);
  color: #1e3a8a;
}
.plan-editor {
  border: 1px solid var(--border);
  border-radius: 22px;
  background: white;
  padding: 16px;
}
.plan-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.plan-editor-head h3 { margin: 0; }
.plan-row-list { display: grid; gap: 10px; }
.plan-row {
  display: grid;
  grid-template-columns: minmax(160px, 1.25fr) 90px minmax(120px, 0.75fr) minmax(160px, 1.35fr) 44px;
  gap: 10px;
  align-items: end;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 12px;
  background: #f8fafc;
}
.plan-row label {
  display: grid;
  gap: 6px;
  color: #334155;
  font-size: 0.83rem;
  font-weight: 850;
}

@media (max-width: 1180px) {
  .summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .plan-week-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .plan-row { grid-template-columns: repeat(2, minmax(0, 1fr)) 44px; }
  .plan-note { grid-column: span 2; }
}

@media (max-width: 760px) {
  .sport-topline {
    top: calc(var(--topbar-height) + 6px);
    align-items: stretch;
    border-radius: 24px;
    padding: 10px;
  }
  .sport-date-card {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
    padding-left: 0;
    flex: 1;
  }
  .sport-date-card .date-picker { width: 100%; min-width: 0; }
  .selected-day-label { font-size: 0.86rem; }
  .sticky-save {
    min-width: 106px;
    border-radius: 18px;
    padding-inline: 12px;
  }
  .compact-sport-hero { padding: 24px; }
  .sport-tabs {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    border-radius: 20px;
  }
  .sport-tab { border-radius: 16px; padding: 12px 10px; }
  .sport-day-grid { gap: 14px; }
  .sport-table-scroll {
    overflow: visible;
    border: 0;
  }
  .sport-table {
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0 12px;
    background: transparent;
  }
  .sport-table thead { display: none; }
  .sport-table,
  .sport-table tbody,
  .sport-table tr,
  .sport-table td { display: block; width: 100%; }
  .sport-table tr {
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 12px;
    background: white;
    box-shadow: var(--shadow-soft);
  }
  .sport-table td {
    border: 0;
    padding: 7px 0;
  }
  .sport-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 5px;
    color: var(--text-soft);
    font-size: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }
  .sport-table td[data-label=""]::before { display: none; }
  .sport-table input,
  .sport-table select { width: 100%; min-width: 0; }
  .sport-table .delete-row { width: 100%; height: 42px; border-radius: 14px; }
  .today-plan-item { align-items: stretch; flex-direction: column; }
  .today-plan-item button { align-self: flex-start; }
  .summary-header { align-items: stretch; }
  .summary-range { display: grid; grid-template-columns: 1fr; justify-content: stretch; }
  .summary-range input,
  .summary-range button { width: 100%; }
  .summary-grid { grid-template-columns: 1fr; }
  .plan-week-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plan-editor-head { align-items: stretch; flex-direction: column; }
  .plan-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .plan-note { grid-column: auto; }
  .plan-row .delete-row { width: 100%; height: 42px; border-radius: 14px; }
}
