/* ==========================================================================
   MKH - Dashboard
   Visual language from the Claude Design project.
   Requires tokens.css, base.css, components.css and layout.css.

   The dashboard ships blank on purpose: this file provides the grid and the
   labelled placeholder slots. Replace each .slot with a .card.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Hero strip
   Says what the empty grid below actually is, so a blank screen reads as
   "reserved" rather than "broken".
   -------------------------------------------------------------------------- */

.dash-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 18px 22px;
  border-radius: var(--r-lg);
  background: var(--grad-brand);
  color: #EDEEF9;
  box-shadow: var(--sh-md);
}

.dash-hero__grid {
  position: absolute;
  inset: 0;
  opacity: 0.4;
  background-image:
    linear-gradient(rgba(237, 238, 249, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(237, 238, 249, 0.06) 1px, transparent 1px);
  background-size: 34px 34px;
}

/* A slow highlight sweeping across the strip. Decorative only, and
   prefers-reduced-motion stops it in base.css. */
.dash-hero__shine {
  position: absolute;
  top: 0;
  left: 0;
  width: 90px;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
  animation: mkh-shine 6.5s ease-in-out infinite;
}

.dash-hero__text { position: relative; display: flex; flex-direction: column; gap: 4px; }
.dash-hero__eyebrow {
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green-300);
}
.dash-hero__title {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: var(--fw-bold);
  letter-spacing: -0.015em;
  color: #FFFFFF;
}

.dash-hero__meta { position: relative; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.dash-hero__stat { display: flex; flex-direction: column; gap: 2px; }
.dash-hero__stat dt {
  font-size: 9.5px;
  font-weight: var(--fw-bold);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--rail-txt-3);
}
.dash-hero__stat dd { margin: 0; font-family: var(--font-mono); font-size: var(--fs-base); color: #FFFFFF; }

/* --------------------------------------------------------------------------
   12-column grid
   -------------------------------------------------------------------------- */

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(12px, 1.4vw, 18px);
}

.col-3  { grid-column: span 3; }
.col-4  { grid-column: span 4; }
.col-6  { grid-column: span 6; }
.col-8  { grid-column: span 8; }
.col-12 { grid-column: span 12; }

/* --------------------------------------------------------------------------
   Placeholder slot
   Swap for a real .card when the widget is built.
   -------------------------------------------------------------------------- */

.slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 132px;
  padding: 20px;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--r-lg);
  background: var(--surface-2);
  text-align: center;
  transition: border-color var(--dur-base) var(--ease), background-color var(--dur-base) var(--ease);
}
.slot:hover { border-color: var(--primary); background: var(--surface); }

.slot__icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--txt-3);
}
.slot__icon svg { width: 18px; height: 18px; }

.slot__name {
  font-family: var(--font-display);
  font-size: var(--fs-base);
  font-weight: var(--fw-bold);
  color: var(--txt-2);
}
.slot__hint { font-size: var(--fs-sm); color: var(--txt-3); max-width: 34ch; line-height: 1.5; }

.slot--stat { min-height: 112px; }
.slot--tall { min-height: 300px; }

/* --------------------------------------------------------------------------
   Responsive

   Keyed to the CONTENT container, not the viewport. The same 1280px window
   gives the grid a different width depending on whether the rail is expanded,
   and a viewport breakpoint cannot tell those apart - it would reflow the grid
   whenever the sidebar is toggled at a fixed window size.

   Each threshold is the width below which that row's narrowest cell stops
   being usable, not a device size.
   -------------------------------------------------------------------------- */

/* A 4-col panel beside an 8-col one gets too thin for a list below this. */
@container content (max-width: 1000px) {
  .col-8, .col-4 { grid-column: span 12; }
}

/* Four stat tiles across would drop under ~200px each. */
@container content (max-width: 860px) {
  .col-3 { grid-column: span 6; }
}

/* Nothing sits side by side any more. */
@container content (max-width: 560px) {
  .col-3, .col-6 { grid-column: span 12; }
  .slot--tall { min-height: 220px; }
  .dash-hero { padding: 16px; }
}

/* Fallback for engines without container queries. */
@supports not (container-type: inline-size) {
  @media (max-width: 1320px) { .col-8, .col-4 { grid-column: span 12; } }
  @media (max-width: 1180px) { .col-3 { grid-column: span 6; } }
  @media (max-width: 820px) {
    .col-3, .col-6 { grid-column: span 12; }
    .slot--tall { min-height: 220px; }
  }
}
