.history-layout {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  min-height: calc(100vh - var(--nav-height));
}

.history-side {
  padding: 20px 12px 32px;
  border-right: 1px solid var(--border);
  background: rgba(0, 25, 51, 0.55);
}

.history-side__label {
  margin: 0 10px 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.history-side__nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.history-side__link {
  display: block;
  padding: 9px 12px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: background 0.15s, color 0.15s;
}

.history-side__link:hover {
  background: rgba(1, 243, 215, 0.1);
  color: var(--text);
}

.history-side__link--active {
  background: rgba(4, 205, 102, 0.16);
  color: var(--text);
}

.history-main {
  min-width: 0;
  min-height: calc(100vh - var(--nav-height));
  background: var(--navy);
}

.history-frame {
  display: block;
  width: 100%;
  height: calc(100vh - var(--nav-height));
  border: 0;
  background: var(--navy);
}

.history-fallback {
  max-width: 36rem;
  padding: 28px 24px;
}

.history-fallback__title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.history-fallback__text {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.45;
}

.history-fallback__link {
  color: var(--cyan);
  font-weight: 600;
  text-decoration: none;
}

.history-fallback__link:hover {
  text-decoration: underline;
}

.history-status {
  padding: 28px 24px;
  color: var(--muted);
  font-size: 0.95rem;
}

.history-status--error {
  color: var(--danger);
}

@media (max-width: 720px) {
  .history-layout {
    grid-template-columns: 1fr;
  }

  .history-side {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 12px 12px 10px;
  }

  .history-side__nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
  }

  .history-side__label {
    margin: 0 4px 8px;
  }

  .history-frame {
    height: calc(100vh - var(--nav-height) - 88px);
  }

  .history-main {
    min-height: calc(100vh - var(--nav-height) - 88px);
  }
}
