/*
 * layout.css — page-level structure: drop screen, sticky header, main content
 * area, two-column report grid, and panel containers.
 * Edit here to change overall page proportions, breakpoints, or panel spacing.
 */

/* ── Drop screen ── */
#drop-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

#drop-screen::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 20% 30%, rgba(79,156,249,.07) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 80% 70%, rgba(56,217,169,.05) 0%, transparent 70%);
  pointer-events: none;
}

.brand {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;      /* override h1 bold default */
  letter-spacing: .15em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 3rem;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1;        /* override h1 line-height default */
}

.brand-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* ── Report screen ── */
#report-screen { display: none; }

header {
  border-bottom: 1px solid var(--border);
  padding: .875rem 2rem;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  background: rgba(13,15,18,.92);
  backdrop-filter: blur(12px);
  z-index: 10;
  gap: .75rem;
}

.header-brand {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .1em;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-right: auto;        /* push all controls to the right */
}

.header-brand .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent2); }

#period-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

main { max-width: 1160px; margin: 0 auto; padding: 2.5rem 2rem 4rem; }

/* ── Mobile / tablet breakpoints ── */
@media (max-width: 640px) {
  header          { padding: .75rem 1rem; gap: .5rem; }
  #period-label   { display: none; }           /* hides date range — visible in the file strip */
  main            { padding: 1.25rem 1rem 3rem; }
  .panel          { padding: 1rem; }
  .stats-grid     { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}

/* ── Stat cards grid ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 1.5rem;
}

/* ── Report grid and panels ── */
.report-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

/* Prevent grid children from overflowing their track (min-width:auto default) */
.report-grid > * { min-width: 0; }

@media (max-width: 760px) { .report-grid { grid-template-columns: 1fr; } }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  animation: fadeUp .5s ease both;
  /* Panels must never be wider than their grid/flex track */
  min-width: 0;
  overflow: hidden;
}

.panel-wide { grid-column: 1 / -1; }

.report-tabs {
  position: sticky;
  top: 57px;
  z-index: 8;
  display: flex;
  gap: 8px;
  align-items: center;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: rgba(13,15,18,.92);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px;
  margin: 0 0 1.5rem;
  scrollbar-width: thin;
  scrollbar-color: #3a424d var(--surface);
  scroll-margin-top: 72px;
}

.report-tabs::-webkit-scrollbar { height: 6px; }
.report-tabs::-webkit-scrollbar-track { background: var(--surface); }
.report-tabs::-webkit-scrollbar-thumb { background: #3a424d; border-radius: 999px; }

.report-tab {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 7px 10px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s, border-color .2s, color .2s;
}

.report-tab:hover {
  color: var(--text);
  border-color: var(--border2);
  background: rgba(255,255,255,.025);
}

.report-tab.active {
  color: var(--accent);
  border-color: rgba(79,156,249,.35);
  background: rgba(79,156,249,.1);
}

.report-tab span {
  color: var(--muted);
  background: rgba(255,255,255,.055);
  border-radius: 999px;
  padding: 1px 6px;
  font-size: 10px;
}

.report-tab-hidden {
  display: none !important;
}

[data-report-tab] {
  scroll-margin-top: var(--report-sticky-offset);
}

.panel-title {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
