.page {
  padding: 28px clamp(16px, 4vw, 48px) 64px;
  max-width: 1280px;
  margin: 0 auto;
  position: relative;
  z-index: 0;
}

.page > * {
  position: relative;
  z-index: 1;
}

header.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 20px 32px;
  margin-bottom: 24px;
  padding: 22px 24px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(239, 244, 255, 0.82));
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

header.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(109, 94, 252, 0.14), transparent 45%);
  pointer-events: none;
}

.hero-art {
  position: absolute;
  inset: 0;
  background: url("/ui/assets/hero-shapes.svg") no-repeat right top / cover;
  opacity: 0.75;
  pointer-events: none;
  z-index: 0;
}

.title-block {
  flex: 1 1 320px;
  position: relative;
  z-index: 1;
}

.kicker {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 11px;
  color: var(--muted);
  padding-left: 22px;
  background: url("/ui/assets/icon-barbell.svg") no-repeat left center / 16px 16px;
  display: inline-flex;
  align-items: center;
}

h1 {
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  font-weight: 600;
  font-size: clamp(30px, 4vw, 44px);
  letter-spacing: 0.01em;
  margin: 10px 0 8px;
}

.subtitle {
  font-size: 15px;
  color: var(--muted);
  margin: 0;
  max-width: 460px;
}

.status-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.76);
  min-width: 240px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
  position: relative;
  z-index: 1;
}

.status-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("/ui/assets/panel-shapes.svg") no-repeat right top / contain;
  opacity: 0.65;
  pointer-events: none;
}

.status-panel > * {
  position: relative;
  z-index: 1;
}

.status-line {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
}

.data-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.06);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.data-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e3a008;
  box-shadow: 0 0 0 4px rgba(227, 160, 8, 0.15);
}

.data-status.is-offline {
  background: rgba(180, 35, 24, 0.12);
  color: #8a1c12;
}

.data-status.is-offline .data-status-dot {
  background: #d92d20;
  box-shadow: 0 0 0 4px rgba(217, 45, 32, 0.18);
}

.data-status.is-stale:not(.is-offline) {
  background: rgba(255, 229, 143, 0.25);
  color: #7a5a00;
}

.alert-summary {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.75);
  box-shadow: var(--shadow-soft);
}

.alert-summary.has-alerts {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(247, 176, 75, 0.12));
  border-color: rgba(247, 176, 75, 0.35);
}

.alert-summary-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.alert-summary-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cbd5f5;
  box-shadow: 0 0 0 4px rgba(109, 94, 252, 0.1);
}

.alert-summary-count {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  color: var(--ink);
}

.alert-summary-message {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.alert-summary[data-severity="high"] .alert-summary-dot,
.alert-summary[data-severity="high"] .alert-summary-count {
  background: rgba(180, 35, 24, 0.18);
  color: #8a1c12;
}

.alert-summary[data-severity="warning"] .alert-summary-dot,
.alert-summary[data-severity="warning"] .alert-summary-count {
  background: rgba(247, 176, 75, 0.22);
  color: #8a5a12;
}

.alert-summary[data-severity="info"] .alert-summary-dot,
.alert-summary[data-severity="info"] .alert-summary-count {
  background: rgba(59, 130, 246, 0.18);
  color: #1f4ed8;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #cbd5f5;
  box-shadow: 0 0 0 4px rgba(109, 94, 252, 0.08);
}

.dot.online {
  background: #1ed78f;
  box-shadow: 0 0 0 6px rgba(30, 215, 143, 0.15);
  animation: pulse 2s infinite ease;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px 0 22px;
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: none;
  gap: 10px;
  padding: 10px 14px calc(12px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.9);
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 800;
}

.bottom-tab {
  flex: 1 1 0;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.7);
  border-radius: 16px;
  padding: 8px 6px;
  display: grid;
  gap: 4px;
  justify-items: center;
  font-weight: 600;
  font-size: 11px;
  color: var(--muted);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.bottom-tab .nav-icon {
  width: 18px;
  height: 18px;
  background: url("/ui/assets/icon-day.svg") no-repeat center / contain;
  opacity: 0.7;
}

.bottom-tab[data-view="all-days"] .nav-icon {
  background-image: url("/ui/assets/icon-all.svg");
}

.bottom-tab[data-view="exercise"] .nav-icon {
  background-image: url("/ui/assets/icon-exercise.svg");
}

.bottom-tab[data-view="coach"] .nav-icon {
  background-image: url("/ui/assets/icon-barbell.svg");
}

.bottom-tab[data-view="ranking"] .nav-icon {
  background-image: url("/ui/assets/icon-ranking.svg");
}

.bottom-tab[data-view="body"] .nav-icon {
  background-image: url("/ui/assets/icon-body.svg");
}

.bottom-tab[data-view="info"] .nav-icon {
  background-image: url("/ui/assets/icon-all.svg");
}

.bottom-tab.nav-more .nav-icon {
  background-image: url("/ui/assets/icon-all.svg");
}

.bottom-tab:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(109, 94, 252, 0.12);
}

.bottom-tab.active {
  color: #f9fafc;
  background: linear-gradient(135deg, #1d1f2b, #3a2f6f);
  border-color: transparent;
  box-shadow: 0 14px 26px rgba(25, 24, 38, 0.3);
}

.bottom-tab.active .nav-icon {
  opacity: 1;
  filter: brightness(1.1);
}

.nav-sheet {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: block;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.nav-sheet.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.nav-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.nav-sheet.is-open .nav-sheet-backdrop {
  opacity: 1;
}

.nav-sheet-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px 18px 24px;
  background: #fff;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -24px 50px rgba(15, 23, 42, 0.2);
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.nav-sheet.is-open .nav-sheet-panel {
  transform: translateY(0);
}

.nav-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.nav-sheet-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  font-weight: 600;
}

.nav-sheet-close {
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.9);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
}

.nav-sheet-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.nav-sheet-item {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #fff;
  border-radius: 16px;
  padding: 10px 12px;
  font-weight: 600;
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-sheet-item .nav-icon {
  width: 18px;
  height: 18px;
  background: url("/ui/assets/icon-day.svg") no-repeat center / contain;
  opacity: 0.8;
}

.nav-sheet-item[data-view="all-days"] .nav-icon {
  background-image: url("/ui/assets/icon-all.svg");
}

.nav-sheet-item[data-view="exercise"] .nav-icon {
  background-image: url("/ui/assets/icon-exercise.svg");
}

.nav-sheet-item[data-view="coach"] .nav-icon {
  background-image: url("/ui/assets/icon-barbell.svg");
}

.nav-sheet-item[data-view="ranking"] .nav-icon {
  background-image: url("/ui/assets/icon-ranking.svg");
}

.nav-sheet-item[data-view="body"] .nav-icon {
  background-image: url("/ui/assets/icon-body.svg");
}

.nav-sheet-item[data-view="info"] .nav-icon {
  background-image: url("/ui/assets/icon-all.svg");
}

.nav-sheet-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(109, 94, 252, 0.12);
}

.nav-sheet-item.active {
  background: linear-gradient(135deg, #1d1f2b, #3a2f6f);
  color: #f9fafc;
  border-color: transparent;
  box-shadow: 0 16px 28px rgba(25, 24, 38, 0.25);
}

.nav-sheet-item.active .nav-icon {
  opacity: 1;
  filter: brightness(1.1);
}

.tab {
  position: relative;
  padding: 10px 18px 10px 42px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.7);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  backdrop-filter: blur(8px);
}

.tab::before {
  content: "";
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  background: url("/ui/assets/icon-day.svg") no-repeat center / contain;
  opacity: 0.85;
}

.tab[data-view="all-days"]::before {
  background-image: url("/ui/assets/icon-all.svg");
}

.tab[data-view="exercise"]::before {
  background-image: url("/ui/assets/icon-exercise.svg");
}

.tab[data-view="coach"]::before {
  background-image: url("/ui/assets/icon-barbell.svg");
}

.tab[data-view="ranking"]::before {
  background-image: url("/ui/assets/icon-ranking.svg");
}

.tab[data-view="body"]::before {
  background-image: url("/ui/assets/icon-body.svg");
}

.tab[data-view="info"]::before {
  background-image: url("/ui/assets/icon-all.svg");
}

.tab:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(109, 94, 252, 0.12);
}

.tab.active {
  background: linear-gradient(135deg, #1d1f2b, #3a2f6f);
  color: #f9fafc;
  border-color: transparent;
  box-shadow: 0 16px 28px rgba(25, 24, 38, 0.25);
}

.tab.active::before {
  opacity: 1;
  filter: brightness(1.1);
}

.controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 26px;
}

.control {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 18px;
  padding: 12px 14px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.control:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.1);
}

.control label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 8px;
}

select,
input {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  padding: 9px 12px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

select:focus-visible,
input:focus-visible,
.tab:focus-visible,
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(109, 94, 252, 0.2);
  border-color: rgba(109, 94, 252, 0.6);
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
}
