/*
 * Home (today cockpit) — per-view CSS layer (utility-domain-redesign FR-08 + DD-09-E).
 *
 * Replaces the style.textContent injection from pwa/views/home.js. Tokens
 * migrated to the design system (`--color-on-surface`, `--color-primary`, …)
 * from the legacy `--text` / `--hint` / `--btn` aliases.
 *
 * Scope per STATUS.md note: home.js is widget-engine-delegated — only the
 * header chrome (greeting + date + edit button + status row) is owned here.
 * Dashboard widgets are styled by widget-engine.js + per-widget files.
 *
 * Catalog: pwa/components/_domain-utility.stories.js → Home / *
 */

.today-scroll {
  height: 100%;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(120px + env(safe-area-inset-bottom, 0px));
}

.today-header {
  padding: 20px 16px 4px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.today-header-left { flex: 1; min-width: 0; }

.today-greeting {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-on-surface);
  font-family: var(--type-headline-family, Manrope, system-ui, sans-serif);
}
.today-date {
  font-size: 13px;
  color: var(--color-on-surface-variant);
  margin-top: var(--space-xs);
}

.today-status {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
  padding: 8px 16px;
  font-size: 12px;
  color: var(--color-on-surface-variant);
}
.today-status-item {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}
.today-status-dot {
  width: 7px; height: 7px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}
.today-status-dot.ok { background: var(--color-success); }
.today-status-dot.warn { background: var(--color-warning); }
.today-status-text.ok { color: var(--color-success); }
.today-status-text.warn { color: var(--color-warning); }

.today-edit-btn {
  padding: 6px 14px;
  border-radius: var(--radius-default);
  font-size: 13px;
  font-weight: 600;
  background: color-mix(in srgb, var(--color-on-surface) 6%, transparent);
  color: var(--color-primary);
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: var(--space-xs);
}
.today-edit-btn:active { opacity: 0.7; }
.today-edit-btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* ── Quick Controls (PWA-first 2026-05-03) ──
   Compact strip of pill rows surfacing Telegram-only flows: morning/
   evening/weekly routines, focus profiles, window layouts, app
   launchers, system DND/mute. Each pill POSTs to /api/controls/* and
   the agent does the macOS work via local-agent RPC. */
.today-quick-controls {
  margin: 0 16px 16px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: var(--space-base);
}
.today-qc-row {
  align-items: center;
}
.today-qc-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--color-on-surface-variant);
  flex-shrink: 0;
  width: 76px;
}
.today-qc-pill {
  padding: 5px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-outline-variant);
  background: var(--color-surface);
  color: var(--color-on-surface);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s ease;
}
.today-qc-pill:hover {
  background: color-mix(in srgb, var(--color-primary) 8%, transparent);
}
.today-qc-pill:active {
  background: color-mix(in srgb, var(--color-primary) 18%, transparent);
}
.today-qc-pill-clear {
  color: var(--color-on-surface-variant);
}
