:root {
  --bg: #050505;
  --bg-2: #0c0c0f;
  --panel: #111115;
  --line: #23232b;
  --line-soft: #1a1a20;
  --text: #eceff7;
  --muted: #b0b8ce;
  --blue: #4f83ff;
  --blue-soft: rgba(79, 131, 255, 0.18);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 5, 5, 0.96);
  border-bottom: 1px solid var(--line-soft);
}

.topbar-inner {
  width: min(1240px, calc(100% - 1rem));
  margin: 0 auto;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.menu-toggle {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-2);
  cursor: pointer;
  padding: 0.45rem;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  margin: 0.3rem 0;
  border-radius: 999px;
  background: #f0f2f8;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle.is-open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.menu-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.is-open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.brand {
  color: #ffffff;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.top-search {
  width: min(430px, 100%);
  margin-left: 0.3rem;
}

.top-search input {
  width: 100%;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-2);
  color: var(--text);
  padding: 0 0.8rem;
  outline: none;
}

.top-search input:focus {
  border-color: var(--blue);
}

.date-pill {
  margin-left: auto;
  color: #c7d3eb;
  font-size: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.42rem 0.6rem;
  background: var(--bg-2);
}

.layout {
  width: min(1240px, calc(100% - 1rem));
  margin: 1rem auto;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 1rem;
}

body.sidebar-collapsed .layout {
  grid-template-columns: minmax(0, 1fr);
}

.sidebar {
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: var(--bg-2);
  padding: 0.85rem;
  min-height: calc(100vh - 92px);
}

body.sidebar-collapsed .sidebar {
  display: none;
}

.sidebar-label {
  margin: 0;
  color: #92a3c8;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.menu-links {
  margin-top: 0.45rem;
  display: grid;
  gap: 0.35rem;
}

.menu-links a {
  display: block;
  padding: 0.45rem 0.55rem;
  border-radius: 7px;
  border: 1px solid transparent;
  color: #ccd7ee;
  text-decoration: none;
  transition: 0.15s ease;
}

.menu-links a:hover,
.menu-links a.active {
  color: #ffffff;
  border-color: rgba(79, 131, 255, 0.5);
  background: var(--blue-soft);
}

.content {
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: var(--bg-2);
  padding: 1rem;
}

.panel {
  border: 1px solid var(--line);
  border-left: 3px solid var(--blue);
  border-radius: 9px;
  background: var(--panel);
  padding: 0.9rem;
}

.panel + .panel {
  margin-top: 0.75rem;
}

.kicker {
  margin: 0;
  color: #bfd0f3;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

h1 {
  margin: 0.35rem 0 0.45rem;
  font-size: clamp(1.35rem, 2.4vw, 1.95rem);
}

h2 {
  margin: 0 0 0.35rem;
  font-size: 1.18rem;
}

p,
li {
  color: var(--muted);
  line-height: 1.6;
}

.search-status {
  margin-top: 0.65rem;
  font-size: 0.87rem;
  color: #c8d6f0;
}

.cards {
  margin-top: 0.75rem;
  display: grid;
  gap: 0.6rem;
}

.card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #131318;
  padding: 0.85rem;
}

.card-number {
  color: #93b4ff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.card h3 {
  margin: 0.3rem 0 0;
  font-size: 1.03rem;
  color: #f2f5ff;
}

.card p {
  margin: 0.45rem 0 0;
}

.card.is-hidden {
  display: none;
}

@media (max-width: 900px) {
  .topbar-inner {
    flex-wrap: wrap;
    padding: 0.6rem 0;
    min-height: unset;
  }

  .top-search {
    order: 3;
    width: 100%;
    margin-left: 0;
  }

  .date-pill {
    margin-left: 0;
  }

  .layout {
    grid-template-columns: minmax(0, 1fr);
  }

  body.sidebar-collapsed .sidebar {
    display: block;
  }

  .sidebar {
    position: fixed;
    top: 74px;
    left: 0.5rem;
    width: min(300px, calc(100vw - 1rem));
    min-height: auto;
    max-height: calc(100vh - 84px);
    overflow: auto;
    z-index: 150;
    transform: translateX(calc(-100% - 1rem));
    transition: transform 0.2s ease;
    box-shadow: 0 20px 34px rgba(0, 0, 0, 0.5);
  }

  .sidebar.is-open {
    transform: translateX(0);
  }
}
