/* Momma B's Household — kiosk dashboard
   Target: 24" touchscreen, 1920x1080 landscape, viewed from across a room.
   Dark theme: easier on the eyes for an always-on wall display, less burn-in. */

:root {
  --bg:        #0d1117;
  --bg-card:   #161b22;
  --bg-card-2: #1c2330;
  --line:      #2a3340;
  --text:      #e6edf3;
  --text-dim:  #8b97a7;
  --text-mute: #5b6675;

  --accent:    #58a6ff;  /* household blue */
  --pantry:    #8b5cf6;  /* matches framePantry */
  --runna:     #34d399;  /* training green */
  --warn:      #f0883e;
  --danger:    #f85149;
  --ok:        #3fb950;

  --r: 18px;
  --pad: clamp(14px, 1.4vw, 24px);
  --gap: clamp(12px, 1.2vw, 22px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "Segoe UI", Roboto, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  cursor: none; /* kiosk: hide the pointer */
}

body {
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: var(--gap);
  gap: var(--gap);
}

/* ---------- Top bar ---------- */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 0 6px;
}
.greeting { font-size: clamp(22px, 2.4vw, 40px); font-weight: 650; letter-spacing: .3px; }
.date     { font-size: clamp(15px, 1.4vw, 22px); color: var(--text-dim); margin-top: 2px; }
.topbar__right { text-align: right; display: flex; align-items: baseline; gap: 10px; }
.clock { font-size: clamp(40px, 5vw, 84px); font-weight: 300; font-variant-numeric: tabular-nums; line-height: 1; }
.ampm  { font-size: clamp(16px, 1.6vw, 26px); color: var(--text-dim); font-weight: 500; }

/* ---------- Grid of cards ---------- */
.grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  grid-template-areas:
    "weather today  runna"
    "pantry  upcoming todos";
  gap: var(--gap);
  min-height: 0;
}
.card--weather  { grid-area: weather; }
.card--today    { grid-area: today; }
.card--runna    { grid-area: runna; }
.card--pantry   { grid-area: pantry; }
.card--upcoming { grid-area: upcoming; }
.card--todos    { grid-area: todos; }

.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: var(--pad);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}
.card__head h2 { font-size: clamp(15px, 1.4vw, 22px); font-weight: 600; letter-spacing: .4px; text-transform: uppercase; color: var(--text-dim); }
.card__loc { font-size: clamp(12px, 1vw, 15px); color: var(--text-mute); }
.card__body { flex: 1; min-height: 0; overflow: hidden; }

.card--runna .card__head h2  { color: var(--runna); }
.card--pantry .card__head h2 { color: var(--pantry); }

.loading { color: var(--text-mute); font-size: 18px; }
.empty   { color: var(--text-mute); font-size: clamp(15px, 1.3vw, 19px); padding: 8px 0; }

/* ---------- Weather ---------- */
.wx-now { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.wx-icon { font-size: clamp(42px, 4.4vw, 74px); line-height: 1; }
.wx-temp { font-size: clamp(40px, 4.6vw, 76px); font-weight: 300; font-variant-numeric: tabular-nums; }
.wx-meta { color: var(--text-dim); font-size: clamp(13px, 1.1vw, 17px); line-height: 1.5; }
.wx-days { display: flex; gap: 10px; }
.wx-day {
  flex: 1; background: var(--bg-card-2); border-radius: 12px; padding: 10px 6px; text-align: center;
}
.wx-day__name { font-size: clamp(12px, 1vw, 15px); color: var(--text-dim); }
.wx-day__icon { font-size: clamp(22px, 2.2vw, 34px); margin: 4px 0; }
.wx-day__hi { font-size: clamp(14px, 1.2vw, 19px); font-weight: 600; }
.wx-day__lo { font-size: clamp(12px, 1vw, 16px); color: var(--text-mute); }
.wx-day.is-hot .wx-day__hi { color: var(--warn); }

/* ---------- Event lists ---------- */
.evt { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.evt:last-child { border-bottom: 0; }
.evt__time { flex: 0 0 clamp(70px, 7vw, 104px); color: var(--accent); font-weight: 600; font-variant-numeric: tabular-nums; font-size: clamp(14px, 1.3vw, 20px); }
.evt__title { font-size: clamp(15px, 1.4vw, 22px); line-height: 1.25; }
.evt__allday .evt__time { color: var(--text-dim); }

/* ---------- Runna ---------- */
.runna-today {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-card-2); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px;
  border-left: 4px solid var(--runna);
}
.runna-today.is-done { opacity: .85; }
.runna-today__check { font-size: clamp(22px, 2.2vw, 32px); }
.runna-today__title { font-size: clamp(16px, 1.5vw, 23px); font-weight: 600; }
.runna-today__detail { font-size: clamp(12px, 1.1vw, 16px); color: var(--text-dim); margin-top: 2px; }
.runna-next { display: flex; flex-direction: column; gap: 10px; }
.runna-item { border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.runna-item:last-child { border-bottom: 0; }
.runna-item__date { font-size: clamp(12px, 1.1vw, 16px); color: var(--runna); font-weight: 600; }
.runna-item__title { font-size: clamp(15px, 1.4vw, 21px); }
.runna-item__detail { font-size: clamp(12px, 1.05vw, 16px); color: var(--text-dim); margin-top: 2px; }

/* ---------- Pantry ---------- */
.pantry-item { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.pantry-item:last-child { border-bottom: 0; }
.pantry-badge {
  flex: 0 0 auto; min-width: 58px; text-align: center;
  font-size: clamp(13px, 1.2vw, 18px); font-weight: 700; font-variant-numeric: tabular-nums;
  padding: 4px 8px; border-radius: 999px; background: rgba(139,92,246,.18); color: #c4b5fd;
}
.pantry-badge.is-soon { background: rgba(240,136,62,.18); color: #ffc999; }
.pantry-name { font-size: clamp(15px, 1.4vw, 21px); }
.pantry-loc  { font-size: clamp(12px, 1vw, 15px); color: var(--text-mute); }
.pantry-cleanup { margin-top: 12px; font-size: clamp(12px, 1.1vw, 16px); color: var(--warn); }

/* ---------- Status banner / footer ---------- */
.status-banner {
  position: fixed; top: 0; left: 0; right: 0;
  background: var(--warn); color: #1a1100; text-align: center;
  font-size: 15px; font-weight: 600; padding: 6px; z-index: 50;
}
.status-banner.is-error { background: var(--danger); color: #fff; }
.footer {
  display: flex; justify-content: space-between; align-items: center;
  padding: 2px 8px; color: var(--text-mute); font-size: clamp(11px, .95vw, 14px);
}
.footer__brand { letter-spacing: .5px; }

/* Slightly larger type when there's room (true 1080p+) */
@media (min-width: 1700px) { :root { --gap: 22px; } }
