/* Observatory redesign — aside component styles (owned by the aside view agent).
 *
 * Styles the 318px-column card stack: flex bank, month progress, semester pot,
 * the time-report panel, then the restyled year-ring + this-week cards — plus
 * the manual-entry card (same chrome, different page slot). Loads after
 * app.css, so equal-specificity rules here win.
 *
 * Card order: CalendarRoot renders #year-summary-slot (the five strip cards)
 * and THEN the time-report panel as siblings inside .summary-aside. The slot
 * is display:contents so its cards join the aside's flex flow, and explicit
 * `order` slots the time report between the semester pot and the year ring —
 * the slot id and its hx-swap-oob contract are untouched.
 */

/* ── Aside layout + card sequencing ───────────────────────────────────── */

.summary-aside {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
#year-summary-slot { display: contents; }
.summary-aside .ys-card + .ys-card { margin-top: 0; } /* flex gap owns spacing */

.summary-aside .obs-card--flexbank { order: 1; }
.summary-aside .obs-card--month    { order: 2; }
.summary-aside .obs-card--pot      { order: 3; }
.summary-aside #time-report-panel  { order: 4; }
.summary-aside .ys-card--progress  { order: 5; }
.summary-aside .ys-card--week      { order: 6; }

/* ── Shared card chrome (mockup panel: surface 0.025 / border 0.07 / r16) ── */

.summary-aside .ys-card,
.summary-aside .trp,
.manual-entry {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 18px 20px 16px;
}

.obs-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.obs-card--month,
.obs-card--pot { gap: 12px; }

.obs-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}

/* Azeret micro-label (9px, uppercase, 0.16em) — every card's eyebrow. */
.obs-microlabel,
.ys-card-title,
.trp-title,
.manual-entry-title {
  font-family: var(--font-mono);
  font-style: normal;
  font-weight: 500;
  font-size: 9px;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--color-text-faint);
  margin: 0;
}

/* Italic caption (Familjen, muted-ladder #6c7689). */
.obs-caption {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 12px;
  color: #6c7689;
}
.obs-caption--over { color: var(--color-negative); }

/* ── Flex bank ────────────────────────────────────────────────────────── */

.obs-flexbank-value {
  font-size: 24px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
/* Surplus/deficit tint rides on the shared balance--* classes; an exactly
 * even bank reads in plain text rather than muted. */
.obs-flexbank-value.balance--neutral { color: var(--color-text); }

/* ── Month progress ───────────────────────────────────────────────────── */

.obs-month-figures {
  font-size: 11px;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.obs-bar {
  position: relative;
  height: 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
}
.obs-bar--project {
  height: 6px;
  border-radius: 3px;
}
.obs-bar-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: inherit;
}
.obs-bar-fill--total {
  background: linear-gradient(90deg, rgba(94, 230, 200, 0.5), var(--color-accent));
}
.obs-bar-marker {
  position: absolute;
  top: -2px;
  bottom: -2px;
  width: 0;
  border-left: 1px solid var(--color-text);
}

.obs-month-projects {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 12px;
}
.obs-month-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-size: 12px;
  color: var(--color-text);
}
.obs-month-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.obs-month-pct {
  flex-shrink: 0;
  font-size: 11px;
  color: var(--color-text-muted);
}
.obs-month-target { color: var(--color-text-faint); }

/* ── Semester pot ─────────────────────────────────────────────────────── */

.obs-pot-left {
  font-size: 12px;
  color: var(--color-text-muted);
  white-space: nowrap;
}
.obs-pot-left strong {
  color: var(--color-text);
  font-weight: 600;
}

.obs-pot-grid {
  display: grid;
  grid-template-columns: repeat(11, 1fr);
  gap: 6px;
}
.obs-pot-dot {
  aspect-ratio: 1;
  border-radius: 50%;
  box-sizing: border-box;
}
.obs-pot-dot--spent { background: #e8c46b; }
.obs-pot-dot--planned {
  border: 2px dashed rgba(232, 196, 107, 0.6);
  background: rgba(232, 196, 107, 0.08);
}
.obs-pot-dot--free { border: 1px solid rgba(255, 255, 255, 0.12); }

/* ── Time report (functionality untouched; chrome + chips here) ───────── */

.trp-head { margin-bottom: 10px; }

.trp-chips {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}
.trp-chip {
  flex: 1;
  min-width: 0;
  background: var(--color-surface-2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 11px;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trp-textarea,
.trp-proposal {
  background: var(--color-surface-2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9px;
}
.trp-hint,
.trp-proposal-summary {
  font-style: italic;
  color: var(--color-text-faint);
}
.trp-entry {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
}
.trp-proposal-label,
.trp-review-title,
.trp-status {
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* ── Year ring + this-week cards (restyle only; markup + RingDash kept) ── */

.summary-aside .ys-card-goal {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.summary-aside .ys-stat-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
}
.summary-aside .ys-progress-caption {
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-text-faint);
  display: block;
}
.summary-aside .ys-progress-hours,
.summary-aside .ys-week-hours {
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.summary-aside .ys-progress-balance,
.summary-aside .ys-week-balance {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 12px;
  color: #6c7689;
}

/* ── Manual entry (same chrome; sits under the day panel, not the aside) ── */

.manual-entry-head { margin-bottom: 12px; }
.manual-entry-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.manual-entry-sub {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: #6c7689;
  margin-left: 0;
}
.manual-entry-form .field-label {
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-faint);
}
.manual-entry-tool,
.manual-entry-form .field input,
.manual-entry-form .field select {
  background: var(--color-surface-2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  padding: 7px 10px;
}
