﻿:root {
  color-scheme: light;
  --font-sans: "Montserrat", "Segoe UI", Arial, sans-serif;
  --bg: #eff1f5;
  --panel: #ffffff;
  --panel-2: #f7f8f5;
  --text: #1d2430;
  --muted: #6c7280;
  --border: rgba(29, 36, 48, 0.12);
  --primary: #2f855a;
  --primary-strong: #25684b;
  --primary-soft: rgba(47, 133, 90, 0.14);
  --danger: #ba4e41;
  --shadow: 0 18px 42px rgba(29, 36, 48, 0.08);
  --sidebar-bg: #ffffff;
  --sidebar-surface: rgba(77, 99, 255, 0.08);
  --sidebar-surface-strong: linear-gradient(135deg, var(--primary) 0%, var(--primary-strong) 100%);
  --sidebar-text: #1d2430;
  --sidebar-muted: #8a91a3;
  --font-page-title: 32px;
  --font-card-title: 20px;
  --font-label: 13px;
  --font-value: 16px;
  --font-body: 15px;
  --font-secondary: 14px;
  --font-page-subtitle: 16px;
  --font-entity-title: 18px;
  --font-badge: 13px;
  --font-button: 15px;
  --text-page-title: var(--font-page-title);
  --text-hero-title: var(--font-page-title);
  --text-section-title: var(--font-card-title);
  --text-card-title: var(--font-entity-title);
  --text-card-subtitle: var(--font-secondary);
  --text-body: var(--font-body);
  --text-input: var(--font-value);
  --text-meta: var(--font-secondary);
  --text-chip: var(--font-badge);
  --text-chip-count: var(--font-badge);
  --text-caption: var(--font-label);
  --text-chip-count-xs: var(--font-label);
  --text-hero-note: var(--font-page-subtitle);
  --text-display: 32px;
  --text-display-xl: 32px;
  --text-overlay: 20px;
  --text-utility-xl: 18px;
  --admin-card-bg: #ffffff;
  --admin-card-border: 1px solid rgba(31, 41, 55, 0.08);
  --admin-card-radius: 22px;
}

.batches-page {
  height: calc(100vh - 40px);
  min-height: calc(100vh - 40px);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-sizing: border-box;
}
.batches-layout { display: grid; grid-template-columns: minmax(300px, 40%) minmax(0, 60%); gap: 20px; height: 100%; min-height: 0; align-items: stretch; }
.batches-browser { position: sticky; top: 20px; align-self: start; display: flex; flex-direction: column; min-height: calc(100vh - 40px); height: calc(100vh - 40px); overflow: hidden; padding: 24px; border-radius: 28px; background: rgba(255,255,255,.88); box-shadow: 0 12px 30px rgba(29,36,48,.04); }
.batch-detail-shell { min-height: 0; overflow: hidden; }
.batches-browser-head, .detail-section-head, .batch-detail-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.batches-browser-head h1, .batch-detail-header h2, .detail-section-head h3 { margin: 0; letter-spacing: -.035em; }
.batches-browser-head h1 { font-size: 30px; }
.batches-browser-head.app-page-hero,
.batches-browser-head.global-journal-hero {
  padding-bottom: 0;
  margin-bottom: 6px;
  border-bottom: 0;
}
.eyebrow { margin: 0 0 6px; color: #5e7566; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.batches-total, .batch-event-count { display: inline-grid; place-items: center; min-width: 36px; height: 36px; border-radius: 99px; background: #e6f4e9; color: #16733e; font-weight: 800; }
.batches-toolbar { display: grid; gap: 8px; margin: 8px 0 4px; }
.batches-search { min-width: 0; margin: 0; }
.batches-search input { width: 100%; padding: 11px 14px; border: 1px solid #dbe7dd; border-radius: 14px; background: #eceef3; box-sizing: border-box; color: #1b3023; outline: none; }
.batches-search input:focus { border-color: #2f9955; box-shadow: 0 0 0 3px rgba(47,153,85,.12); }
.batches-filter-row { position: relative; z-index: 3; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.batches-filter { position: static; min-width: 0; }
.batches-filter-toggle { display: inline-flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-width: 0; min-height: 48px; padding: 10px 16px; border: 1px solid #dbe7dd; border-radius: 16px; background: #fff; color: #1b3023; cursor: pointer; font: inherit; font-size: 14px; font-weight: 800; line-height: 1.2; }
.batches-filter-toggle.has-value { border-color: #b8d6c0; color: #175b32; }
.batches-filter-toggle-copy { min-width: 0; }
.batches-filter-toggle-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #e7f5ec; color: #16733e; font-size: 11px; font-weight: 800; line-height: 1; }
.batches-filter-toggle::after { content: ''; flex: 0 0 auto; width: 7px; height: 7px; margin-left: 10px; border-right: 2px solid #789083; border-bottom: 2px solid #789083; transform: rotate(45deg) translateY(-2px); }
.batches-filter-menu { position: absolute; top: calc(100% + 6px); right: 0; left: 0; display: grid; width: auto; max-width: none; gap: 8px; padding: 14px; border: 1px solid #dbe7dd; border-radius: 22px; background: #fff; box-shadow: 0 14px 28px rgba(38,91,54,.12); }
.batches-filter-menu[hidden] { display: none; }
.batches-stage-filter-item { display: flex; justify-content: space-between; align-items: center; gap: 14px; min-height: 46px; padding: 0 16px; border: 1px solid #e0e6e2; border-radius: 18px; color: #697282; text-decoration: none; font-size: 14px; font-weight: 700; box-sizing: border-box; }
.batches-stage-filter-item strong { display: inline-grid; place-items: center; min-width: 28px; height: 28px; padding: 0 8px; border-radius: 999px; background: #f0f1f2; color: #697282; font-size: 12px; box-sizing: border-box; }
.batches-stage-filter-item strong { color: #789083; }
.batches-stage-filter-item:hover, .batches-stage-filter-item.active { background: #e4f3e7; color: #175b32; }
.batches-stage-filter-item.active strong { color: #16733e; }
.batches-selected-stage-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin: 10px 0 10px; }
.batches-selected-stage-title { margin: 0; color: #17251c; font-size: var(--text-section-title); letter-spacing: 0; }
.batches-selected-stage-head p { margin: 4px 0 0; color: #718279; font-size: var(--text-card-subtitle); font-weight: 700; }
.batches-reset-link { display: inline-flex; align-items: center; min-height: 32px; color: #607269; font-size: 12px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.batches-reset-link:hover, .batches-reset-link:focus-visible { color: #16733e; }
.batches-list { display: grid; align-content: start; gap: 8px; min-height: 0; flex: 1 1 auto; overflow-y: auto; padding: 2px 0 12px 0; scrollbar-width: none; -ms-overflow-style: none; }
.batches-list::-webkit-scrollbar { display: none; }
.batch-list-card { display: flex; gap: 10px; padding: 13px; border: 1px solid #e4ebe5; border-radius: 16px; background: #fff; color: #1b3023; text-decoration: none; transition: background-color .15s, border-color .15s, box-shadow .15s; }
.batch-list-card:hover { background: #f3f5f8; border-color: #e4ebe5; box-shadow: none; }
.batch-list-card.active { border-color: #4aa968; box-shadow: none; }
.status-dot { flex: 0 0 auto; width: 9px; height: 9px; margin-top: 5px; border-radius: 99px; background: #2e9956; }
.batch-list-copy { flex: 1; min-width: 0; display: grid; gap: 4px; }
.batch-list-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.batch-list-copy small { color: #718279; font-size: 11px; line-height: 1.3; }
.batch-list-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; color: #718279; font-size: 11px; line-height: 1.3; }
.batch-list-meta span { display: inline-flex; align-items: center; gap: 4px; min-width: 0; }
.batch-list-status { align-self: flex-start; justify-self: start; width: fit-content; max-width: 100%; display: inline-flex; align-items: center; justify-content: center; min-height: 22px; margin-top: 8px; padding: 0 12px; border-radius: 999px; font-size: 12px; font-weight: 800; line-height: 1.2; white-space: nowrap; }
.batch-list-status-ok { background: rgba(35, 131, 72, .12); color: #1d6b3e; }
.batch-list-status-alert { background: rgba(180, 83, 9, .14); color: #9a3412; }
.batch-list-status-muted { background: rgba(107, 114, 128, .12); color: #5f6b76; }
.batch-detail-shell { position: sticky; top: 20px; align-self: start; display: grid; grid-template-rows: auto auto minmax(0, 1fr); min-height: calc(100vh - 40px); height: calc(100vh - 40px); padding: 24px; border: 0; border-radius: 28px; background: rgba(255,255,255,.88); box-shadow: 0 12px 30px rgba(29,36,48,.04); }
.batch-detail-shell.is-loading { opacity: .62; pointer-events: none; }
.batch-empty-state { display: grid; place-items: center; align-content: center; height: 100%; min-height: 420px; text-align: center; color: #65776c; }
.batch-empty-state h2 { margin: 14px 0 8px; color: #1b3023; }
.batch-empty-state p { max-width: 360px; margin: 0; }
.batch-empty-icon { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 18px; background: #e6f4e9; font-size: 25px; }
.batch-detail-header h2 { max-width: 720px; font-size: clamp(22px, 2.1vw, 30px); }
.batch-detail-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 8px; color: #607269; font-size: 13px; }
.status-dot { display: inline-block; margin: 0 -8px 0 0; }
.batch-detail-updated { color: #788980; font-size: 12px; text-align: right; line-height: 1.5; }
.batch-detail-updated strong { color: #1b3023; }
.batch-tabs { display: flex; gap: 6px; margin: 24px 0 20px; padding: 5px; border-radius: 14px; background: #edf4ef; }
.batch-tabs a { flex: 1; padding: 11px 12px; border-radius: 10px; color: #607269; font-size: 13px; font-weight: 800; text-align: center; text-decoration: none; }
.batch-tabs a.active, .batch-tabs a:hover { background: #188341; color: #fff; }
.batch-detail-content { min-height: 0; display: grid; gap: 24px; overflow-y: auto; padding-right: 2px; scrollbar-width: none; -ms-overflow-style: none; }
.batch-detail-content::-webkit-scrollbar { display: none; }
.batch-tab-panel { scroll-margin-top: 18px; }
.batch-tab-panel:not(.active) { display: none; }
.detail-section-head { align-items: center; margin-bottom: 14px; }
.batch-calendar-list { display: grid; gap: 10px; }
.batch-journal-list { display: grid; gap: 0; }
.batch-journal-date-group { display: grid; gap: 10px; }
.batch-journal-date-group + .batch-journal-date-group { margin-top: 18px; }
.batch-journal-date { margin: 0 0 2px; color: #17251c; font-size: 20px; line-height: 1.2; font-weight: 900; letter-spacing: -.02em; }
.batch-calendar-event, .batch-journal-list article { display: grid; grid-template-columns: 68px minmax(0, 1fr); gap: 14px; padding: 14px; border: 1px solid #e3ebe4; border-radius: 14px; background: #fff; }
.batch-journal-list article { align-items: start; padding: 18px 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.batch-journal-list article + article { border-top: 1px solid #dfe6e1; }
.batch-calendar-event time { color: #16813f; font-size: 12px; font-weight: 800; }
.batch-journal-list time { display: inline-flex; align-items: center; justify-content: center; min-height: 30px; padding: 0 10px; border-radius: 8px; background: #e7f5ec; color: #16813f; font-size: 13px; line-height: 1; font-weight: 800; }
.batch-calendar-event strong, .batch-journal-list strong { color: #1b3023; font-size: 14px; }
.batch-calendar-event p, .batch-journal-list p { margin: 5px 0 0; color: #697a70; font-size: 13px; line-height: 1.45; }
.batch-event-details { display: grid; grid-template-columns: minmax(150px, 170px) minmax(0, 1fr); gap: 4px 8px; margin: 8px 0 0; }
.batch-event-details-photos { align-items: start; }
.batch-event-details dt { color: #7a897f; font-size: 12px; font-weight: 700; }
.batch-event-details dd { margin: 0; color: #1b3023; font-size: 12px; font-weight: 700; }
.passport-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.passport-grid article { padding: 16px; border: 1px solid #e3ebe4; border-radius: 16px; background: #fff; }
.passport-grid h4 { margin: 0 0 12px; color: #16813f; font-size: 15px; }
.passport-grid dl { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 12px; margin: 0; }
.passport-grid dt { color: #7a897f; font-size: 12px; }
.passport-grid dd { margin: 0; color: #1b3023; font-size: 13px; text-align: right; }

@media (max-width: 900px) {
  .app-main-stages { height: auto; min-height: 100vh; overflow: visible; }
  .batches-page { height: auto; min-height: calc(100vh - 40px); }
  .batches-layout { grid-template-columns: 1fr; height: auto; }
  .batches-browser, .batch-detail-shell { position: static; min-height: auto; height: auto; overflow: visible; }
  .batches-list { overflow: visible; }
  .batches-browser { max-height: none; }
  .batch-detail-shell { display: block; min-height: 520px; }
  .batch-detail-content { overflow: visible; padding-right: 0; }
}
@media (max-width: 560px) {
  .batches-page { padding: 0; border-radius: 0; }
  .batches-browser, .batch-detail-shell { padding: 16px; border-radius: 20px; }
  .batches-filter-row { display: grid; grid-template-columns: 1fr; }
  .batches-filter { min-width: 0; }
  .batches-filter-toggle { width: 100%; min-width: 0; min-height: 46px; padding-inline: 12px; }
  .batches-filter-menu { left: 0; right: 0; width: auto; padding: 12px; border-radius: 18px; }
  .batches-selected-stage-head { flex-direction: column; }
  .batch-detail-header { display: block; }
  .batch-detail-updated { margin-top: 14px; text-align: left; }
  .passport-grid { grid-template-columns: 1fr; }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--font-body);
  line-height: 1.5;
  background: var(--bg);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.78), transparent 34%),
    radial-gradient(circle at bottom right, rgba(255, 255, 255, 0.42), transparent 28%);
  opacity: 1;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
select {
  font: inherit;
}

.dashboard-overview-head h1,
.report-dashboard-head h1,
.stages-hero-copy h1,
.journal-hero-copy h1,
.reports-hero-copy h1,
.app-page-hero h1,
.global-journal-hero h1,
.upload-page-title h1,
.batches-browser-head h1 {
  font-size: var(--font-page-title);
  font-weight: 700;
}

.dashboard-overview-head p:not(.eyebrow),
.report-dashboard-head > div > p,
.stages-hero-copy p,
.stages-panel-head p,
.stages-detail-copy p,
.global-journal-summary,
.global-journal-results-head,
.dashboard-card-head h2 + p,
.dashboard-production h2 + p,
.photos-page-scope,
.upload-page-lede,
.lede,
.panel-header p,
.muted {
  font-size: var(--font-page-subtitle);
  font-weight: 400;
}

.dashboard-card-head h2,
.dashboard-production h2,
.stages-panel-head h2,
.stages-detail-copy h2,
.global-journal-filter-panel h2,
.global-journal-results-head strong,
.report-panel-head h2,
.photos-page-head h1,
.batch-journal-date {
  font-size: var(--font-card-title);
  font-weight: 600;
}

.dashboard-event-title,
.dashboard-attention-title,
.dashboard-employee-row strong,
.dashboard-report-row strong,
.stages-stage-card-top strong,
.stages-card-top strong,
.stages-event-head strong,
.report-attention-copy strong,
.report-related-parent strong,
.report-related-child strong,
.report-stage-row strong,
.problems-case-title strong,
.global-journal-plant-title,
.global-journal-event h3,
.batch-detail-header h2,
.passport-grid h4,
.batch-calendar-event strong,
.batch-journal-list strong {
  font-size: var(--font-entity-title);
  font-weight: 600;
}

.reports-filter-field span,
.global-journal-filters label,
.global-journal-filters label span,
.journal-filter-label,
.dashboard-stat .dashboard-stat-label,
.batch-event-details dt,
.passport-grid dt,
.global-journal-details dt,
.problems-case-fact-row dt,
.problems-case-last-action span,
.report-dashboard-info-person span,
.report-dashboard-info dt {
  font-size: var(--font-label);
  font-weight: 500;
}

.report-dashboard-info dd,
.batch-event-details dd,
.passport-grid dd,
.global-journal-details dd,
.problems-case-fact-row dd,
.problems-case-last-action strong,
.dashboard-production-list strong,
.dashboard-stat strong {
  font-size: var(--font-value);
  font-weight: 600;
}

.batch-calendar-event p,
.batch-journal-list p,
.global-journal-comment,
.global-journal-photo-note,
.photo-modal-summary-subtitle,
.photo-modal-detail-value,
.photo-modal-detail-copy p,
.stages-event-body,
.stages-card-note {
  font-size: var(--font-body);
  font-weight: 400;
}

.batch-list-meta,
.batch-list-copy small,
.batch-detail-meta,
.batch-detail-updated,
.global-journal-plant-stage,
.global-journal-event-meta,
.global-journal-batch,
.global-journal-batch span,
.dashboard-simple-event-meta,
.dashboard-simple-event-context,
.dashboard-attention-code,
.dashboard-attention-stage,
.dashboard-attention-status,
.dashboard-attention-meta,
.dashboard-report-meta,
.dashboard-inline-empty,
.stages-stage-card p,
.stages-stage-card-foot,
.stages-card-top span,
.stages-card-meta,
.stages-event-head span,
.journal-card-heading p,
.report-attention-copy span,
.report-related-parent span,
.report-related-child span,
.photos-page-summary small {
  font-size: var(--font-secondary);
  font-weight: 400;
}

.dashboard-report-pills span,
.journal-pill,
.reports-card-filter,
.dashboard-event-detail,
.dashboard-attention-detail,
.global-journal-important,
.batch-list-status,
.batches-stage-filter-item strong,
.batches-filter-toggle-count {
  font-size: var(--font-badge);
  font-weight: 600;
}

.button,
.dashboard-card-link,
.dashboard-period-switcher a,
.journal-hero-chip,
.global-journal-apply,
.global-journal-batch-link,
.batch-tabs a,
.batches-filter-toggle,
.batches-reset-link,
.reports-filter-submit {
  font-size: var(--font-button);
  font-weight: 600;
}


.app-shell {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  min-height: 100vh;
  padding: 20px;
  gap: 20px;
  background: #eceef3;
}

.app-shell-stages {
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
}

.scroll-top-button {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 120;
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(31, 41, 55, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 26px rgba(29, 36, 48, 0.14);
  color: var(--primary-strong);
  font-size: 22px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, opacity 160ms ease, box-shadow 160ms ease;
}

.scroll-top-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(29, 36, 48, 0.18);
}

.scroll-top-button[hidden] {
  display: none;
}

.sidebar {
  position: sticky;
  top: 20px;
  align-self: start;
  min-height: calc(100vh - 40px);
  padding: 18px;
  border: 1px solid rgba(29, 36, 48, 0.06);
  border-radius: 30px;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  box-shadow: 0 18px 48px rgba(29, 36, 48, 0.08);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar-brand-block {
  display: grid;
  gap: 18px;
}

.sidebar-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0;
}

.sidebar-brand-mark {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  color: var(--primary-strong);
  background: rgba(47, 133, 90, 0.1);
  font-weight: 700;
  font-size: var(--text-card-title);
}

.sidebar-brand-text {
  display: grid;
  line-height: 1.05;
}

.sidebar-brand-text strong {
  font-size: var(--text-chip);
  font-weight: 600;
  color: var(--sidebar-text);
}

.sidebar-brand-text em {
  font-style: normal;
  color: var(--sidebar-muted);
  font-size: var(--text-meta);
}

.button,
.button-secondary,
.button-small,
.sidebar-link,
.sidebar-primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  font-weight: 600;
  font-size: var(--text-body);
  cursor: pointer;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.button:hover,
.button-secondary:hover,
.button-small:hover,
.sidebar-link:hover,
.sidebar-primary-action:hover {
  transform: translateY(-1px);
}

.button {
  color: #fff;
  background: linear-gradient(180deg, var(--primary), var(--primary-strong));
}

.button-secondary,
.button-small {
  color: #1f2937;
  background: #ffffff;
  border: 1px solid rgba(31, 41, 55, 0.14);
}

.sidebar-primary-action {
  width: 100%;
  color: #fff;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-strong) 100%);
  box-shadow: 0 14px 28px rgba(47, 133, 90, 0.24);
  min-height: 54px;
  border-radius: 18px;
}

.sidebar-primary-action-bottom {
  margin-top: auto;
}

.sidebar-nav {
  display: grid;
  gap: 10px;
  padding: 8px 0 0;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 46px;
  padding: 0 16px;
  border: 0;
  border-radius: 15px;
  color: var(--sidebar-text);
  background: transparent;
  text-align: left;
  font-size: var(--font-secondary);
  font-weight: 500;
  cursor: default;
}

.sidebar-item[href] {
  cursor: pointer;
}

.sidebar-item.active {
  background: var(--sidebar-surface-strong);
  color: #fff;
  box-shadow: 0 14px 28px rgba(47, 133, 90, 0.18);
}

.sidebar-item-danger {
  color: #cf675e;
}

.sidebar-item-icon {
  display: inline-grid;
  place-items: center;
  width: 20px;
  flex: 0 0 20px;
  color: var(--sidebar-muted);
  font-size: var(--text-chip);
  line-height: 1;
}

.sidebar-item.active .sidebar-item-icon {
  color: #fff;
}

.sidebar-item-danger .sidebar-item-icon {
  color: #e58a7f;
}

.sidebar-link {
  justify-content: flex-start;
  color: var(--text);
  background: transparent;
  border: 1px solid transparent;
  min-height: 42px;
  padding: 0 14px;
}

.sidebar-link.active {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.sidebar-link-danger {
  width: 100%;
  color: #e58a7f;
  background: transparent;
}

.sidebar-clear-form {
  margin: 0;
}

.sidebar-section {
  display: grid;
  gap: 12px;
}

.sidebar-section-title {
  margin: 0;
  color: var(--sidebar-muted);
  font-size: var(--text-caption);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sidebar-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--sidebar-text);
  background: rgba(77, 99, 255, 0.06);
  border: 1px solid rgba(77, 99, 255, 0.08);
  font-size: var(--text-meta);
}

.app-main {
  min-width: 0;
  padding: 0;
  background: transparent;
}

.app-main-empty {
  padding: 0;
}

.app-main-dashboard {
  height: auto;
  min-height: 100vh;
  box-sizing: border-box;
  overflow: visible;
}

.app-main-report-dashboard {
  padding: 20px;
  min-height: 100vh;
  box-sizing: border-box;
}

.report-dashboard-page {
  width: 100%;
  min-height: calc(100vh - 40px);
  padding: 24px 28px 28px;
  box-sizing: border-box;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 18px 40px rgba(29, 36, 48, 0.06);
  backdrop-filter: blur(16px);
}

.app-main-report-dashboard.report-dashboard-page {
  min-height: 100vh;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.report-dashboard-shell { display: grid; gap: 18px; }
.report-dashboard-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; }
.report-dashboard-head h1 { margin: 0; color: var(--text); font-family: var(--font-sans); font-size: var(--text-page-title); letter-spacing: -.045em; }
.report-dashboard-head > div > p { margin: 8px 0 0; color: var(--muted); font-size: var(--text-meta); }
.report-dashboard-info { width: min(100%, 500px); padding: 16px; border: var(--admin-card-border); border-radius: var(--admin-card-radius); background: var(--admin-card-bg); }
.report-dashboard-info-person { display: grid; gap: 3px; padding-bottom: 14px; border-bottom: 1px solid rgba(31, 41, 55, .08); }
.report-dashboard-info-person strong { font-size: var(--text-card-title); }
.report-dashboard-info-person span, .report-dashboard-info dt { color: var(--muted); font-size: var(--text-caption); }
.report-dashboard-info dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 14px 0 0; }
.report-dashboard-info dl div { min-width: 0; }
.report-dashboard-info dt, .report-dashboard-info dd { margin: 0; }
.report-dashboard-info dd { margin-top: 3px; color: var(--text); font-size: var(--text-caption); font-weight: 800; line-height: 1.35; overflow-wrap: anywhere; }
.report-dashboard-stats { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.report-dashboard-section { min-width: 0; }
.report-dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.report-dashboard-batches { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.report-dashboard-batch-card { min-width: 0; }
.report-dashboard-batch-card .batch-list-status { align-self: flex-start; display: inline-flex; align-items: center; justify-content: center; padding: 4px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.report-dashboard-batch-card .batch-list-status-ok { background: rgba(35, 131, 72, .12); color: #1d6b3e; }
.report-dashboard-batch-card .batch-list-status-alert { background: rgba(180, 83, 9, .14); color: #9a3412; }
.photos-page-shell { align-content: start; }
.photos-page-head { align-items: end; }
.photos-page-scope { margin-top: 8px; }
.photos-page-summary { display: grid; gap: 4px; min-width: 180px; padding: 16px 18px; border: 1px solid rgba(31, 41, 55, 0.08); border-radius: 18px; background: rgba(255, 255, 255, 0.72); text-align: right; }
.photos-page-summary span,
.photos-page-summary small { color: var(--muted); font-size: var(--text-caption); }
.photos-page-summary strong { color: var(--text); font-size: var(--text-page-title); line-height: 1; }
.photos-page-card {
  align-content: start;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.photos-page-card .dashboard-gallery-managed { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.photos-page-pagination { justify-content: flex-end; }
.reports-employee-picker { display: grid; gap: 4px; }
.reports-employee-list { display: grid; gap: 10px; }
.reports-selection-empty { min-height: 180px; }
.reports-page-head { margin-bottom: 2px; }
.reports-page-toolbar { align-items: end; gap: 24px; }
.reports-page-toolbar-copy { min-width: 0; }
.reports-toolbar-form { flex: 0 0 320px; grid-template-columns: minmax(240px, 320px); justify-content: end; margin-left: auto; }
.reports-filters-card { padding: 20px 24px; }
.problems-page .reports-filters-card {
  position: sticky;
  top: 16px;
  z-index: 20;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}
.reports-filters-form { display: grid; grid-template-columns: minmax(220px, 320px); gap: 18px; align-items: end; }
.reports-filter-field { display: grid; gap: 8px; min-width: 0; }
.reports-filter-field span { color: var(--muted); font-size: var(--text-caption); font-weight: 700; }
.reports-filter-field .global-journal-dropdown { position: relative; min-width: 0; z-index: 30; }
.reports-filter-field .global-journal-dropdown .batches-filter-toggle { width: 100%; }
.reports-filter-field .global-journal-dropdown .batches-filter-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  z-index: 40;
  margin-top: 0;
  max-height: min(320px, calc(100vh - 120px));
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.reports-filter-field .global-journal-dropdown.is-open-up .batches-filter-menu {
  top: auto;
  bottom: calc(100% + 6px);
}
.reports-filter-field select {
  width: 100%;
  min-height: 48px;
  padding: 10px 44px 10px 16px;
  border: 1px solid #dbe7dd;
  border-radius: 16px;
  background-color: #fff;
  background-image: linear-gradient(45deg, transparent 50%, #789083 50%), linear-gradient(135deg, #789083 50%, transparent 50%);
  background-position: calc(100% - 25px) calc(50% - 2px), calc(100% - 19px) calc(50% - 2px);
  background-size: 7px 7px, 7px 7px;
  background-repeat: no-repeat;
  color: #1b3023;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  outline: none;
  box-shadow: none;
}

.reports-filter-field select:focus {
  border-color: #b8d6c0;
  outline: none;
  box-shadow: 0 0 0 3px rgba(22, 129, 63, 0.08);
}

.reports-filter-field select:disabled {
  color: var(--muted);
  background-color: #f8faf8;
  cursor: not-allowed;
  opacity: 1;
}
.report-kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.report-kpi-grid .dashboard-stat { min-height: 0; }
.report-sections-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.report-section-card { min-width: 0; }
.report-attention-list, .report-stage-summary, .report-related-batches { display: grid; gap: 10px; }
.report-attention-item, .report-stage-row, .report-related-group { display: grid; gap: 8px; padding: 14px 16px; border: 1px solid rgba(31, 41, 55, 0.08); border-radius: 18px; background: rgba(255, 255, 255, 0.7); }
.report-attention-item { grid-template-columns: minmax(0, 1fr); align-items: center; }
.report-attention-link { color: inherit; text-decoration: none; transition: background-color .16s ease; }
.report-attention-link:hover { background: #f3f5f8; }
.report-attention-link:focus-visible { outline: 2px solid rgba(22, 129, 63, 0.35); outline-offset: 2px; border-color: rgba(22, 129, 63, 0.28); }
.report-attention-copy, .report-related-parent, .report-related-children { display: grid; gap: 4px; min-width: 0; }
.report-attention-copy strong, .report-related-parent strong, .report-related-child strong, .report-stage-row strong { color: var(--text); font-size: 14px; }
.report-attention-copy span, .report-related-parent span, .report-related-child span, .report-stage-row span { color: var(--muted); font-size: 12px; line-height: 1.45; }
.report-stage-row { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr); align-items: center; }
.report-stage-link { color: inherit; text-decoration: none; transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.report-stage-link:hover { border-color: rgba(22, 129, 63, 0.22); background: rgba(239, 247, 242, 0.92); box-shadow: 0 10px 22px rgba(22, 129, 63, 0.08); transform: translateY(-1px); }
.report-stage-link:focus-visible { outline: 2px solid rgba(22, 129, 63, 0.35); outline-offset: 2px; border-color: rgba(22, 129, 63, 0.28); }
.report-related-child { display: grid; gap: 4px; padding: 10px 12px; border-radius: 14px; background: #f7faf7; text-decoration: none; }
.report-related-parent a, .report-related-child { color: inherit; }
.problems-filters-form { grid-template-columns: repeat(4, minmax(180px, 1fr)) auto; }
.problems-tabs a span { color: inherit; opacity: .72; }
.problems-content { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.problems-content-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.problems-column-sections { display: grid; gap: 16px; }
.problems-column-section { display: grid; gap: 12px; }
.problems-column-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.problems-column-section-head h3 { margin: 0; color: var(--text); font-size: 16px; line-height: 1.2; }
.problems-column-section-head span { display: inline-grid; place-items: center; min-width: 28px; height: 28px; padding: 0 8px; border-radius: 999px; background: #e8f2eb; color: #16813f; font-size: 12px; font-weight: 800; box-sizing: border-box; }
.problems-case-list { display: grid; gap: 12px; }
.problems-case-card { display: grid; gap: 14px; padding: 20px; border: 1px solid rgba(31, 41, 55, 0.08); border-radius: 22px; background: rgba(255, 255, 255, 0.82); }
.problems-case-card-active, .problems-case-card-isolated { border-color: rgba(180, 83, 9, .16); }
.problems-case-card-resolved { border-color: rgba(47, 133, 90, .16); }
.problems-case-head { display: grid; gap: 10px; }
.problems-case-title { display: grid; gap: 6px; min-width: 0; }
.problems-case-title strong { color: var(--text); font-size: 18px; line-height: 1.2; }
.problems-case-status { display: inline-flex; width: fit-content; align-items: center; gap: 8px; min-height: 32px; padding: 6px 12px; border-radius: 999px; background: #e8f2eb; color: #16813f; font-size: 14px; font-weight: 600; line-height: 1.25; }
.problems-case-status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }
.problems-case-status-active,
.problems-case-status-isolated { background: #fff3df; color: #a45c08; }
.problems-case-code { color: var(--text); font-size: 14px; font-weight: 500; line-height: 1.35; }
.problems-case-meta-line { display: flex; flex-wrap: wrap; gap: 4px; color: var(--muted); font-size: 14px; line-height: 1.45; }
.problems-case-meta-line span { white-space: nowrap; }
.problems-case-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 18px; margin: 0; padding: 14px 0 0; border-top: 1px solid rgba(31, 41, 55, 0.08); }
.problems-case-fact-row { display: grid; gap: 6px; margin: 0; }
.problems-case-fact-row-wide { grid-column: 1 / -1; }
.problems-case-fact-row dt { color: var(--muted); font-size: 12px; font-weight: 700; }
.problems-case-fact-row dd { margin: 0; color: var(--text); font-size: 16px; font-weight: 600; line-height: 1.4; }
.problems-case-result { display: grid; gap: 4px; padding-top: 14px; border-top: 1px solid rgba(31, 41, 55, 0.08); min-width: 0; }
.problems-case-result span { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .04em; line-height: 1.2; text-transform: uppercase; }
.problems-case-result strong { color: var(--text); font-size: 16px; line-height: 1.3; }
.problems-case-result small { color: var(--muted); font-size: 14px; line-height: 1.4; }
.problems-case-footer { display: flex; align-items: center; justify-content: flex-end; gap: 16px; padding-top: 14px; border-top: 1px solid rgba(31, 41, 55, 0.08); }
.problems-case-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; }

@media (max-width: 1180px) {
  .report-dashboard-head { flex-direction: column; }
  .report-dashboard-info { width: 100%; }
  .photos-page-head { align-items: flex-start; }
  .photos-page-summary { width: 100%; text-align: left; }
  .report-dashboard-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .report-dashboard-grid { grid-template-columns: 1fr; }
  .report-dashboard-batches { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reports-filters-form, .report-sections-grid { grid-template-columns: 1fr; }
  .reports-page-toolbar { align-items: flex-start; }
  .reports-toolbar-form { width: 100%; flex: 1 1 auto; margin-left: 0; justify-content: start; }
  .report-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-attention-item { grid-template-columns: 1fr; }
  .problems-filters-form, .problems-content, .problems-content-split { grid-template-columns: 1fr; }
  .problems-case-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .problems-case-footer { justify-content: flex-start; }
  .problems-case-actions { justify-content: flex-start; }
}

@media (max-width: 760px) {
  .app-main-report-dashboard { padding: 18px; }
  .report-dashboard-page { min-height: auto; padding: 20px; border-radius: 22px; }
  .report-dashboard-info dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-dashboard-stats, .report-dashboard-batches { grid-template-columns: 1fr; }
  .report-stage-row, .report-kpi-grid { grid-template-columns: 1fr; }
  .reports-filters-card { padding: 18px 20px; }
  .problems-page .reports-filters-card { top: 10px; }
  .problems-case-facts { grid-template-columns: 1fr; }
  .problems-case-meta-line span { white-space: normal; }
  .problems-case-footer { flex-direction: column; align-items: flex-start; }
}

.dashboard-page {
  width: 100%;
  height: auto;
  min-height: 100%;
  padding: 0;
  box-sizing: border-box;
  border-radius: 0;
  background: transparent;
  border: 0;
  overflow: visible;
  display: flex;
  flex-direction: column;
}

.panel,
.hero,
.summary-card,
.card,
.report-card,
.empty-state,
.alert,
.lightbox-panel {
  border: 1px solid var(--border);
  background: var(--panel);
  backdrop-filter: blur(14px);
}

.hero,
.panel {
  border-radius: 28px;
}

.hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 28px;
}

.eyebrow {
  margin: 0 0 10px;
  color: #d47f20;
  font-size: var(--text-caption);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1,
.panel h1,
.panel h2,
.panel h3,
.dashboard-empty-copy h2 {
  margin: 0;
  font-family: var(--font-sans);
}

.hero h1 {
  font-size: var(--text-hero-title);
  line-height: 0.98;
  max-width: 12ch;
}

.lede {
  max-width: 68ch;
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.top-action-form {
  margin: 0;
}

.panel {
  padding: 22px;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.panel-header p,
.muted {
  color: var(--muted);
}

.app-main-upload {
  padding: 20px;
}

.upload-page {
  width: 100%;
  max-width: none;
  min-height: calc(100vh - 40px);
  padding: 24px 28px 22px;
  border-radius: 30px;
  background: linear-gradient(180deg, #fff 0%, #fbfbf8 100%);
  border: 1px solid rgba(31, 41, 55, 0.1);
}

.upload-page-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(31, 41, 55, 0.06);
}

.upload-page-title h1 {
  margin-top: 12px;
  font-size: var(--text-page-title);
  line-height: 1;
  letter-spacing: -0.04em;
}

.upload-back-button {
  width: 250px;
  min-height: 46px;
  padding: 0 20px;
}

.upload-page-lede {
  margin: 34px 0 24px 46px;
  color: #5f6b7a;
  font-size: var(--text-hero-note);
}

.upload-form-home {
  gap: 0;
  max-width: 760px;
}

.file-picker-home {
  width: 100%;
  min-height: 344px;
  border: 2px dashed rgba(147, 163, 184, 0.42);
  border-radius: 28px;
  background: #fff;
  color: #667085;
  margin-top: 4px;
}

.file-picker-home span {
  text-align: center;
  line-height: 1.5;
  font-size: var(--text-input);
  font-weight: 600;
  color: #667085;
}

.upload-form-footer {
  display: flex;
  align-items: center;
  gap: 22px;
  margin: 24px 0 0 0;
  padding-left: 0;
  flex-wrap: wrap;
  max-width: 760px;
}

.dashboard-shell {
  display: grid;
  min-height: 0;
  flex: 1 1 auto;
  gap: 14px;
  overflow: visible;
  padding-right: 0;
}

.dashboard-overview-head {
  position: static;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 8px 0 20px;
  margin-bottom: 0;
  background: transparent;
  backdrop-filter: none;
}

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.dashboard-stat {
  padding: 18px 18px 16px;
  border-radius: 22px;
  background: #fbfbf8;
  border: 1px solid rgba(31, 41, 55, 0.08);
}

.dashboard-stat-dark {
  color: var(--text);
  border-color: rgba(47, 133, 90, 0.18);
  background: linear-gradient(180deg, #f5fbf7 0%, #f1f8f3 100%);
}

.dashboard-stat-warning {
  border-color: rgba(245, 158, 11, 0.18);
  background: linear-gradient(180deg, #fffaf1 0%, #fff7e8 100%);
}

.dashboard-stat-accent {
  border-color: rgba(37, 99, 235, 0.16);
  background: linear-gradient(180deg, #f8fbff 0%, #f3f7ff 100%);
}

.dashboard-stat-danger {
  border-color: rgba(239, 68, 68, 0.16);
  background: linear-gradient(180deg, #fff8f8 0%, #fff4f4 100%);
}

.dashboard-stat-success {
  border-color: rgba(34, 197, 94, 0.16);
  background: linear-gradient(180deg, #f8fdf9 0%, #f2fbf5 100%);
}

.dashboard-stat span,
.dashboard-summary-list span,
.dashboard-meta-grid span,
.dashboard-report-row span {
  display: block;
  color: var(--muted);
  font-size: var(--text-meta);
}

.dashboard-stat-dark span,
.dashboard-stat-dark strong {
  color: var(--text);
}

.dashboard-stat strong {
  display: block;
  margin-top: 10px;
  font-family: var(--font-sans);
  font-size: var(--text-display);
}

.dashboard-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.75fr);
  gap: 14px;
}

.dashboard-card {
  padding: 20px;
  border-radius: 26px;
  background: #fbfbf8;
  border: 1px solid rgba(31, 41, 55, 0.08);
}
.dashboard-page .dashboard-shell { transition: opacity .16s ease; }
.dashboard-page.is-loading .dashboard-shell { opacity: .58; pointer-events: none; }

.dashboard-page {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.dashboard-overview-head p:not(.eyebrow) {
  color: #737b8c;
}
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.dashboard-period-switcher a {
  min-height: 42px;
  padding: 0 18px;
  border-radius: 14px;
  color: #6e7687;
  font-size: 15px;
  font-weight: 600;
}

.dashboard-period-switcher a.active {
  background: linear-gradient(135deg, #2f855a 0%, #25684b 100%);
  box-shadow: 0 8px 18px rgba(37, 104, 75, 0.22);
}

.dashboard-stats-top {
  gap: 14px;
}

.dashboard-stat {
  min-height: 132px;
  padding: 18px 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 24px rgba(29, 36, 48, 0.04);
}

.dashboard-stat .dashboard-stat-label {
  color: #81889a;
  font-size: 14px;
  font-weight: 400;
}

.dashboard-stat strong {
  font-size: 28px;
  font-weight: 600;
  line-height: 1.05;
}

.dashboard-layout {
  gap: 18px;
}

.dashboard-card {
  padding: 22px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 30px rgba(29, 36, 48, 0.04);
}

.dashboard-card-head {
  align-items: flex-start;
}

.dashboard-card-head h2 {
  font-size: 28px;
  font-weight: 600;
  color: var(--primary-strong);
  letter-spacing: -0.03em;
}

.dashboard-card-head h2 + p,
.dashboard-production h2 + p {
  margin-top: 6px;
  color: #7a8294;
  font-size: 15px;
}

.dashboard-card-link {
  color: var(--primary-strong);
  font-size: 15px;
  font-weight: 600;
}

.dashboard-event-feed,
.dashboard-attention-list,
.dashboard-employee-list {
  gap: 12px;
}

.dashboard-simple-event-row,
.dashboard-attention-row,
.dashboard-employee-row {
  padding: 18px 20px;
  border-radius: 0;
  border: 0;
  border-bottom: 1px solid rgba(31, 41, 55, 0.08);
  background: transparent;
  box-shadow: none;
}

.dashboard-event-title,
.dashboard-attention-title,
.dashboard-employee-row strong,
.dashboard-report-row strong {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
}

.dashboard-simple-event-meta,
.dashboard-simple-event-context,
.dashboard-attention-code,
.dashboard-attention-stage,
.dashboard-attention-status,
.dashboard-attention-meta,
.dashboard-report-meta,
.dashboard-employee-row span,
.dashboard-employee-row small {
  color: #7a8294;
  font-size: 14px;
}

.dashboard-event-detail,
.dashboard-attention-detail {
  margin: 0;
  padding: 0;
  color: #475063;
  font-size: 14px;
  font-weight: 400;
  background: transparent;
  border: 0;
  border-radius: 0;
  line-height: 1.45;
  white-space: normal;
}

.dashboard-grid {
  display: grid;
  gap: 14px;
}

.dashboard-grid-primary {
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.9fr);
}

.dashboard-grid-secondary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-card-large {
  min-height: 240px;
  display: grid;
  gap: 16px;
}

.dashboard-hero-card,
.dashboard-reports-card,
.dashboard-list-card,
.dashboard-gallery-card {
  display: grid;
  gap: 16px;
}

.dashboard-reports-card {
  align-content: start;
  padding: 20px;
  gap: 12px;
  height: 100%;
}

.dashboard-reports-card .dashboard-reports {
  align-content: start;
  gap: 8px;
}

.dashboard-reports-card .dashboard-report-pills span {
  min-height: 24px;
  padding: 0 9px;
  font-size: var(--text-chip-count);
}

.dashboard-list-card {
  align-content: start;
}

.dashboard-gallery-card {
  align-content: start;
}

.dashboard-journal-card {
  align-content: start;
  gap: 12px;
}

.dashboard-journal-head {
  align-items: center;
}

.dashboard-journal-report {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid rgba(31, 41, 55, 0.08);
}

.dashboard-journal-report strong {
  display: block;
  font-size: var(--text-card-title);
}

.dashboard-journal-report span {
  color: var(--muted);
  font-size: var(--text-meta);
  text-align: right;
}

.dashboard-journal-tabs,
.dashboard-journal-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dashboard-journal-tab,
.dashboard-journal-subtab {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(31, 41, 55, 0.1);
  background: #ffffff;
  color: var(--muted);
  font-weight: 600;
  font-size: var(--text-chip);
  white-space: nowrap;
}

.dashboard-journal-tab strong,
.dashboard-journal-subtab strong {
  color: var(--text);
  font-size: var(--text-chip-count);
  font-weight: 700;
}

.dashboard-journal-tab.active,
.dashboard-journal-subtab.active {
  border-color: rgba(47, 133, 90, 0.24);
  background: linear-gradient(180deg, #eff8f1 0%, #e8f4eb 100%);
  color: var(--primary-strong);
}

.dashboard-journal-selected,
.dashboard-journal-detail {
  padding: 16px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid rgba(31, 41, 55, 0.08);
  display: grid;
  gap: 12px;
}

.dashboard-journal-selected-head,
.dashboard-journal-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-journal-selected-head strong,
.dashboard-journal-detail-head strong {
  display: block;
  font-size: var(--text-card-title);
}

.dashboard-journal-selected-head span,
.dashboard-journal-detail-head span {
  color: var(--muted);
  font-size: var(--text-meta);
}

.dashboard-journal-selected-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.dashboard-journal-selected-meta span,
.dashboard-journal-selected-facts span,
.dashboard-journal-entry-meta span,
.dashboard-journal-detail-grid span,
.dashboard-journal-detail-photos {
  color: var(--muted);
  font-size: var(--text-meta);
}

.dashboard-journal-selected-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.dashboard-journal-feed {
  display: grid;
  gap: 10px;
  align-content: start;
}

.dashboard-journal-entry {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid rgba(31, 41, 55, 0.08);
}

.dashboard-journal-entry.active {
  border-color: rgba(47, 133, 90, 0.24);
}

.dashboard-journal-entry-problem {
  border-color: rgba(186, 78, 65, 0.24);
  background: linear-gradient(180deg, #fff9f8 0%, #fff5f3 100%);
}

.dashboard-journal-entry-top,
.dashboard-journal-entry-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-journal-entry-top strong,
.dashboard-journal-entry-card span {
  font-size: var(--text-card-title);
}

.dashboard-journal-entry-top span {
  color: var(--muted);
  font-size: var(--text-meta);
  text-align: right;
}

.dashboard-journal-entry-card {
  align-items: baseline;
}

.dashboard-journal-entry-card p,
.dashboard-journal-entry-comment,
.dashboard-journal-detail-text {
  margin: 0;
  color: var(--text);
  line-height: 1.45;
}

.dashboard-journal-entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.dashboard-journal-entry-comment {
  color: var(--muted);
}

.dashboard-journal-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-journal-detail-grid div {
  padding: 12px 14px;
  border-radius: 14px;
  background: #fbfbf8;
  border: 1px solid rgba(31, 41, 55, 0.08);
}

.dashboard-journal-detail-grid strong {
  display: block;
  margin-top: 4px;
  font-size: var(--text-card-title);
}

.dashboard-journal-detail-text {
  color: var(--muted);
}

.dashboard-report-row.active {
  border-color: rgba(47, 133, 90, 0.22);
}

.dashboard-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.dashboard-card-head h2 {
  margin: 0;
  font-size: var(--text-section-title);
}

.dashboard-card-hint {
  color: var(--muted);
  font-size: var(--text-meta);
  font-weight: 600;
}

.dashboard-card-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(31, 41, 55, 0.12);
  background: #ffffff;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.dashboard-card-link:hover {
  background: #f6f7f3;
  border-color: rgba(31, 41, 55, 0.2);
  transform: translateY(-1px);
}

.dashboard-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.dashboard-mini-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-meta-grid div,
.dashboard-mini-stats div,
.dashboard-summary-list div,
.dashboard-report-row {
  padding: 20px;
  border-radius: var(--admin-card-radius);
  background: var(--admin-card-bg);
  border: var(--admin-card-border);
}

.dashboard-meta-grid strong,
.dashboard-summary-list strong,
.dashboard-mini-stats strong,
.dashboard-report-row strong {
  display: block;
  margin-top: 0;
  font-size: var(--text-card-title);
}

.dashboard-mini-stats span {
  display: block;
  color: var(--muted);
  font-size: var(--text-meta);
}

.dashboard-summary-list {
  display: grid;
  gap: 10px;
}

.dashboard-reports {
  display: grid;
  gap: 10px;
}

.dashboard-reports-page-card {
  display: grid;
  gap: 18px;
}

.dashboard-reports-page-list {
  gap: 12px;
}

.dashboard-report-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 0;
  color: var(--text);
}

.dashboard-report-row:hover {
  transform: translateY(-1px);
}

.dashboard-report-main {
  display: grid;
  gap: 12px;
}

.dashboard-report-headline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.dashboard-report-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
  color: var(--muted);
  font-size: var(--text-meta);
  text-align: right;
}

.dashboard-report-headline strong {
  min-width: 0;
}

.dashboard-report-id {
  color: var(--muted);
  font-size: var(--text-meta);
}

.dashboard-report-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
}

.dashboard-report-pills span,
.journal-pill,
.reports-card-filter {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid rgba(31, 41, 55, 0.1);
  color: var(--muted);
  font-size: var(--text-chip);
  font-weight: 700;
}

.dashboard-item-list {
  display: grid;
  gap: 10px;
  align-content: start;
}

.dashboard-item {
  padding: 14px 16px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid rgba(31, 41, 55, 0.08);
  display: grid;
  gap: 8px;
}

.dashboard-item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.dashboard-item-top span {
  color: var(--muted);
  font-size: var(--text-meta);
  text-align: right;
}

.dashboard-item p {
  margin: 0;
  color: var(--text);
}

.dashboard-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: var(--text-meta);
}

.dashboard-item-footer {
  display: flex;
  justify-content: flex-end;
  color: var(--muted);
  font-size: var(--text-caption);
}

.dashboard-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-content: start;
}

.dashboard-thumb {
  padding: 0;
  border: 1px solid rgba(31, 41, 55, 0.08);
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
  display: grid;
  text-align: left;
  color: var(--text);
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.dashboard-thumb:hover,
.dashboard-thumb:focus-visible {
  border-color: rgba(47, 133, 90, 0.34);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.dashboard-thumb:focus-visible {
  outline: 2px solid rgba(47, 133, 90, 0.18);
  outline-offset: 2px;
}

.dashboard-thumb-image {
  display: block;
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #f4f5f0;
}

.dashboard-thumb-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dashboard-thumb-caption {
  display: grid;
  gap: 3px;
  padding: 10px 10px 11px;
}

.dashboard-thumb-caption strong {
  color: var(--text);
  font-size: var(--text-chip);
  line-height: 1.25;
}

.dashboard-thumb-caption span,
.dashboard-thumb-caption em,
.dashboard-thumb-caption small {
  color: var(--muted);
  font-size: var(--text-chip-count);
  font-style: normal;
  line-height: 1.25;
}

.dashboard-thumb-code {
  font-weight: 600;
}

.dashboard-thumb-count,
.dashboard-thumb-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.dashboard-thumb-count {
  position: absolute;
  top: 10px;
  right: 10px;
  min-width: 42px;
  background: rgba(15, 23, 42, 0.82);
  color: #fff;
}

.dashboard-thumb-badge {
  color: #226245;
  background: rgba(47, 133, 90, 0.1);
}

.dashboard-photo-card-compact {
  align-content: start;
}

.dashboard-photo-card-compact .dashboard-thumb-image {
  aspect-ratio: 4 / 2.7;
}

.dashboard-photo-card-compact .dashboard-thumb-caption {
  gap: 6px;
  padding: 12px 12px 13px;
}

.dashboard-photo-card-compact .dashboard-thumb-caption strong {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.5em;
}

.dashboard-photo-card-compact .dashboard-thumb-caption > span,
.dashboard-photo-card-compact .dashboard-thumb-caption > small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-photo-card-compact .dashboard-thumb-caption > span {
  font-weight: 600;
}

.dashboard-photo-card-compact .dashboard-thumb-badge {
  margin-top: 1px;
}

.dashboard-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.dashboard-pagination-info {
  color: var(--muted);
  font-weight: 600;
}

.button.is-disabled {
  pointer-events: none;
  opacity: 0.45;
}

.dashboard-empty-state {
  min-height: 180px;
}

.dashboard-empty-state-compact {
  min-height: 120px;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}

.dashboard-layout > .dashboard-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
}

.dashboard-main-column,
.dashboard-side-column {
  display: grid;
  gap: 14px;
  min-height: 0;
}

.dashboard-main-column {
  align-content: stretch;
}

.dashboard-side-column {
  align-content: stretch;
  height: 100%;
}

.dashboard-tabs-card {
  display: grid;
  gap: 16px;
  height: 100%;
  min-height: 100%;
  grid-template-rows: auto auto 1fr;
}

.dashboard-tabs-head {
  align-items: center;
}

.dashboard-tab-switcher {
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(31, 41, 55, 0.08);
}

.dashboard-tab-button {
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
}

.dashboard-tab-button.active {
  background: linear-gradient(180deg, #eff8f1 0%, #e8f4eb 100%);
  color: var(--primary-strong);
}

@media (max-width: 900px) {
  .dashboard-tabs-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-tab-switcher {
    width: 100%;
  }
}

.dashboard-tab-panels {
  display: grid;
  min-height: 0;
}

.dashboard-tab-panel {
  display: none;
}

.dashboard-tab-panel.active {
  display: grid;
  height: 100%;
  align-content: center;
}

.dashboard-donut-wrap {
  display: grid;
  gap: 16px;
  justify-items: center;
  align-content: center;
  min-height: 100%;
  width: 100%;
}

.dashboard-donut {
  width: min(100%, 280px);
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  border-radius: 50%;
  position: relative;
  display: grid;
  place-items: center;
  padding: 18px;
}

.dashboard-donut::after {
  content: "";
  position: absolute;
  inset: 22%;
  border-radius: 50%;
  background: #fff;
}

.dashboard-donut > div {
  position: relative;
  z-index: 1;
  text-align: center;
}

.dashboard-donut strong {
  display: block;
  font-family: var(--font-sans);
  font-size: var(--text-display-xl);
  line-height: 1;
}

.dashboard-donut span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.dashboard-donut-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
  width: 100%;
}

.dashboard-donut-legend div {
  display: grid;
  grid-template-columns: 14px minmax(170px, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.dashboard-donut-legend strong {
  font-size: var(--text-chip);
}

.dashboard-donut-legend em {
  color: var(--muted);
  font-style: normal;
  font-size: var(--text-meta);
}

@media (max-width: 880px) {
  .dashboard-donut-legend {
    grid-template-columns: 1fr;
  }
}

.dashboard-donut-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.app-main-reports {
  padding: 20px;
  height: 100vh;
  box-sizing: border-box;
  overflow: hidden;
}

.app-main-stages {
  padding: 0;
  height: calc(100vh - 40px);
  min-height: calc(100vh - 40px);
  box-sizing: border-box;
  overflow: hidden;
}

.journal-page {
  width: 100%;
  height: 100%;
  padding: 24px 28px 28px;
  border-radius: 30px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid rgba(31, 41, 55, 0.1);
  box-sizing: border-box;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.stages-page {
  width: 100%;
  height: 100%;
  padding: 24px 28px 28px;
  border-radius: 30px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid rgba(31, 41, 55, 0.1);
  box-sizing: border-box;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 18px;
}

.stages-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(31, 41, 55, 0.08);
}

.stages-hero-copy h1 {
  margin: 8px 0 0;
  font-family: var(--font-sans);
  font-size: var(--text-page-title);
  line-height: 1;
  letter-spacing: -0.04em;
}

.stages-hero-copy p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: var(--text-meta);
  max-width: 720px;
}

.stages-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.stages-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.86fr) minmax(0, 1.14fr);
  gap: 14px;
  min-height: 0;
}

.stages-list-panel,
.stages-detail-panel {
  min-height: 0;
}

.stages-list-panel {
  display: grid;
  gap: 16px;
  align-content: start;
}

.stages-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.stages-panel-head h2 {
  margin: 0;
  font-size: var(--text-section-title);
}

.stages-panel-head p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: var(--text-meta);
}

.stages-list {
  display: grid;
  gap: 12px;
}

.stages-stage-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(31, 41, 55, 0.08);
  background: #fff;
  color: var(--text);
}

.stages-stage-card.active {
  border-color: #2f855a;
  box-shadow: inset 0 0 0 2px #2f855a;
}

.stages-stage-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.stages-stage-card-top strong {
  font-size: var(--text-card-title);
}

.stages-stage-card-top span {
  min-width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: rgba(31, 41, 55, 0.06);
  color: var(--text);
  font-weight: 700;
}

.stages-stage-card p {
  margin: 0;
  color: var(--muted);
  font-size: var(--text-meta);
  line-height: 1.45;
}

.stages-stage-card-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: var(--text-meta);
}

.stages-stage-card-foot strong {
  color: var(--text);
  font-weight: 600;
}

.stages-detail-panel {
  display: grid;
  gap: 16px;
  align-content: start;
}

.stages-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.stages-detail-copy h2 {
  margin: 0;
  font-size: var(--text-section-title);
}

.stages-detail-copy p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: var(--text-meta);
  max-width: 640px;
}

.stages-detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.stages-detail-badges .journal-pill strong {
  margin-left: 8px;
}

.stages-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.75fr);
  gap: 14px;
  min-height: 0;
}

.stages-subpanel {
  display: grid;
  gap: 14px;
  align-content: start;
}

.stages-card-list,
.stages-event-list {
  display: grid;
  gap: 12px;
}

.stages-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(31, 41, 55, 0.08);
  background: #fff;
}

.stages-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.stages-card-top strong {
  display: block;
  font-size: var(--text-card-title);
}

.stages-card-top span {
  color: var(--muted);
  font-size: var(--text-meta);
}

.stages-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: var(--text-meta);
}

.stages-card-note {
  margin: 0;
  color: var(--text);
  font-weight: 600;
}

.stages-event-item {
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(31, 41, 55, 0.08);
  background: #fff;
}

.stages-event-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.stages-event-head strong {
  font-size: var(--text-card-title);
}

.stages-event-head span,
.stages-event-body {
  color: var(--muted);
  font-size: var(--text-meta);
}

.stages-event-body {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.journal-hero,
.reports-hero,
.app-page-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(31, 41, 55, 0.08);
}

.journal-hero-copy h1,
.reports-hero-copy h1,
.app-page-hero h1 {
  margin: 8px 0 0;
  font-family: var(--font-sans);
  font-size: var(--text-page-title);
  line-height: 1;
  letter-spacing: -0.04em;
}

.journal-hero-chip {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(31, 41, 55, 0.08);
  color: var(--primary-strong);
  font-weight: 800;
}

.journal-detail-events {
  min-height: 0;
  overflow: auto;
  display: grid;
  gap: 14px;
  padding-right: 2px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.journal-detail-events::-webkit-scrollbar {
  display: none;
}

.journal-event {
  display: grid;
  grid-template-columns: fit-content(100px) minmax(0, 1fr);
  column-gap: 16px;
  padding: 16px;
  border: 1px solid rgba(31, 41, 55, 0.08);
  background: #fff;
  border-radius: 18px;
  align-items: start;
}

.journal-event-time-column {
  display: flex;
  align-items: flex-start;
}

.journal-event-content {
  min-width: 0;
  display: grid;
  gap: 12px;
}

.journal-event-brief {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.journal-event-body {
  display: grid;
  gap: 12px;
}

.journal-event-record {
  display: grid;
  gap: 20px;
  margin: 10px 0;
}

.journal-event-record-item {
  padding: 0;
  border: 0;
  background: transparent;
}

.journal-event-record-item dt {
  color: var(--muted);
  font-size: var(--text-card-subtitle);
  line-height: 1.3;
}

.journal-event-record-item dd {
  margin: 4px 0 0;
  color: var(--text);
  font-size: var(--text-card-title);
  line-height: 1.35;
  white-space: pre-wrap;
  font-weight: 600;
}

.journal-event-title {
  display: block;
  margin: 10px 0 0;
  font-size: var(--text-section-title);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.journal-event-time {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 14px;
  background: rgba(47, 133, 90, 0.12);
  color: var(--primary-strong);
  font-size: var(--text-card-title);
  font-weight: 800;
  width: fit-content;
}

.journal-event-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(47, 133, 90, 0.12);
  color: var(--primary-strong);
  font-size: var(--text-chip-count);
  font-weight: 800;
}

.journal-event-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 0;
}

.journal-event-photo {
  width: 92px;
  height: 92px;
  padding: 0;
  border: 1px solid rgba(31, 41, 55, 0.08);
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  cursor: zoom-in;
  flex: 0 0 auto;
}

.journal-event-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.journal-empty-state {
  min-height: 160px;
}

/* Global journal intentionally uses a timeline instead of the batch browser layout. */
.app-main-journal { display: flex; flex-direction: column; width: 100%; min-width: 0; height: calc(100vh - 40px); min-height: calc(100vh - 40px); padding: 0; box-sizing: border-box; overflow: hidden; }
.global-journal-hero { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 0 0 18px; padding: 0; border: 0; }
.global-journal-hero h1 { margin: 0; font-family: var(--font-sans); font-size: var(--text-page-title); line-height: 1; letter-spacing: -.04em; }
.global-journal-layout { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: minmax(280px, 2fr) minmax(0, 3fr); gap: 18px; align-items: stretch; overflow: hidden; }
.app-main-journal.is-loading .global-journal-filter-panel,
.app-main-journal.is-loading .global-journal-summary,
.app-main-journal.is-loading .global-journal-results { opacity: .62; pointer-events: none; }
.global-journal-filter-panel, .global-journal-results { min-width: 0; min-height: 0; height: 100%; padding: 18px; border: var(--admin-card-border); border-radius: 22px; background: rgba(255,255,255,.86); }
.global-journal-filter-panel { overflow: hidden; }
.global-journal-filter-panel h2 { margin: 0 0 16px; font-family: var(--font-sans); font-size: var(--text-section-title); letter-spacing: -.02em; }
.global-journal-filters { display: grid; grid-template-columns: 1fr; gap: 12px; }
.global-journal-filters label { display: grid; gap: 6px; min-width: 0; color: var(--muted); font-size: var(--text-caption); font-weight: 700; }
.global-journal-filters input[type="search"],
.global-journal-filters input[type="date"] { width: 100%; min-width: 0; min-height: 48px; padding: 0 14px; color: var(--text); border: 1px solid #dbe7dd; border-radius: 16px; background: #eceef3; font: inherit; box-sizing: border-box; }
.global-journal-dropdown { position: relative; min-width: 0; }
.global-journal-dropdown .batches-filter-toggle { min-height: 48px; padding: 10px 16px; font-size: 14px; font-weight: 800; }
.global-journal-dropdown .batches-filter-menu { position: absolute; top: calc(100% + 6px); right: 0; left: 0; margin-top: 0; z-index: 20; max-height: min(320px, calc(100vh - 120px)); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.global-journal-dropdown.is-open-up .batches-filter-menu { top: auto; bottom: calc(100% + 6px); }
.global-journal-dropdown-menu-scroll { max-height: min(320px, calc(100vh - 120px)); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.global-journal-dropdown .batches-stage-filter-item { width: 100%; border: 1px solid #e0e6e2; background: #fff; cursor: pointer; font: inherit; text-align: left; }
.global-journal-dropdown .batches-stage-filter-item span { pointer-events: none; }
.global-journal-custom-range { display: grid; grid-template-columns: 1fr; gap: 12px; }
.global-journal-custom-range[hidden] { display: none; }
.global-journal-apply { min-height: 42px; border: 0; border-radius: 12px; color: #fff; background: var(--primary); font-weight: 800; cursor: pointer; }
.global-journal-results { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 14px; overflow: hidden; }
.global-journal-results-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 14px; border-radius: 16px; background: #f3f8f4; color: var(--muted); font-size: var(--text-meta); }
.global-journal-results-head strong { color: var(--text); font-size: var(--text-card-title); }
.global-journal-results-head span { color: var(--muted); font-size: var(--font-secondary); font-weight: 400; }
.global-journal-summary { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 10px 18px; margin: 0; color: var(--muted); font-size: var(--text-meta); }
.global-journal-summary strong { color: var(--text); }
.global-journal-timeline { min-height: 0; display: grid; align-content: start; grid-auto-rows: max-content; gap: 18px; overflow: auto; padding-right: 8px; scrollbar-width: none; -ms-overflow-style: none; }
.global-journal-timeline::-webkit-scrollbar { display: none; }
.global-journal-day { display: grid; gap: 10px; }
.global-journal-day h2 { margin: 0 0 2px; color: #17251c; font-family: var(--font-sans); font-size: 20px; line-height: 1.2; font-weight: 900; letter-spacing: -.02em; }
.global-journal-plant-card { padding: 18px; border: 1px solid #e3ebe4; border-radius: 22px; background: #fff; }
.global-journal-plant-summary { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; cursor: pointer; list-style: none; }
.global-journal-plant-summary::-webkit-details-marker { display: none; }
.global-journal-plant-head { min-width: 0; display: grid; gap: 4px; }
.global-journal-plant-title { color: #1b3023; font-size: 20px; line-height: 1.2; font-weight: 900; letter-spacing: -.02em; }
.global-journal-plant-stage { color: #697a70; font-size: 13px; line-height: 1.35; }
.global-journal-event-meta { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 10px; color: #697a70; font-size: 13px; line-height: 1.35; }
.global-journal-events { display: grid; gap: 14px; margin-top: 18px; }
.global-journal-event { position: relative; display: grid; grid-template-columns: 68px minmax(0,1fr); align-items: start; gap: 14px; padding: 0; border: 0; border-radius: 0; background: transparent; }
.global-journal-event > time { display: inline-flex; align-items: center; justify-content: center; min-height: 30px; padding: 0 10px; border-radius: 8px; background: #e7f5ec; color: #16813f; font-size: 13px; line-height: 1; font-weight: 800; }
.global-journal-event-body { min-width: 0; }
.global-journal-event-topline { display: flex; justify-content: space-between; gap: 14px; }
.global-journal-event h3 { margin: 0; color: #1b3023; font-size: 14px; letter-spacing: 0; }
.global-journal-event-divider { width: 100%; height: 1px; margin: 4px 0; border: 0; background: #dfe6e1; opacity: 1; }
.global-journal-important { align-self: start; padding: 5px 9px; border-radius: 999px; color: #9a342b; background: #fff0ee; font-size: var(--text-caption); font-weight: 800; }
.global-journal-batch { display: grid; gap: 3px; margin: 8px 0 0; color: #697a70; font-size: 13px; line-height: 1.45; }
.global-journal-batch span { color: var(--muted); font-size: 12px; }
.global-journal-details { display: grid; grid-template-columns: minmax(170px, 190px) minmax(0, 1fr); gap: 4px 14px; margin: 8px 0 0; }
.global-journal-details-photos { align-items: start; }
.global-journal-details dt { color: #7a897f; font-size: 12px; font-weight: 700; }
.global-journal-details dd { margin: 0; color: #1b3023; font-size: 12px; font-weight: 700; }
.global-journal-comment, .global-journal-photo-note { margin: 14px 0 0; padding: 10px 12px; border-radius: 12px; color: var(--text); background: #f7faf7; line-height: 1.45; white-space: pre-wrap; }
.global-journal-photo-note { color: var(--muted); }
.global-journal-photos { display: flex; flex-wrap: wrap; gap: 8px; }
.global-journal-photo { width: 86px; height: 86px; padding: 0; overflow: hidden; border: 1px solid rgba(31,41,55,.1); border-radius: 14px; background: #fff; cursor: zoom-in; }
.global-journal-photo img { width: 100%; height: 100%; object-fit: cover; }
.global-journal-batch-link { display: flex; align-items: center; justify-content: center; min-height: 42px; margin-top: 4px; padding: 0 18px; border-radius: 999px; background: #e8f2eb; color: #16813f; font-size: 14px; font-weight: 900; text-align: center; text-decoration: none; }
.global-journal-batch-link:hover { background: #dceee2; }
.global-journal-empty { margin-top: 24px; background: rgba(255,255,255,.7); }

/* Typography audit override: unified roles across admin pages without changing structure */
.batches-browser-head h1,
.report-dashboard-head h1,
.stages-hero-copy h1,
.journal-hero-copy h1,
.reports-hero-copy h1,
.app-page-hero h1,
.global-journal-hero h1,
.upload-page-title h1,
.photos-page-head h1 {
  font-size: var(--font-page-title);
  font-weight: 700;
}

.batches-selected-stage-head p,
.batch-detail-meta,
.batch-detail-updated,
.report-dashboard-head > div > p,
.photos-page-scope,
.stages-hero-copy p,
.stages-panel-head p,
.stages-detail-copy p,
.global-journal-summary,
.global-journal-results-head,
.global-journal-plant-stage,
.global-journal-event-meta,
.global-journal-batch,
.dashboard-overview-head p:not(.eyebrow),
.dashboard-card-head h2 + p,
.dashboard-production h2 + p,
.dashboard-simple-event-meta,
.dashboard-simple-event-context,
.dashboard-attention-code,
.dashboard-attention-stage,
.dashboard-attention-status,
.dashboard-attention-meta,
.dashboard-report-meta,
.dashboard-inline-empty,
.report-attention-copy span,
.report-related-parent span,
.report-related-child span,
.report-stage-row span,
.problems-case-status-text,
.problems-case-meta-line,
.problems-case-last-action small {
  font-size: var(--font-secondary);
  font-weight: 400;
}

.batch-journal-date,
.global-journal-day h2,
.dashboard-card-head h2,
.dashboard-production h2,
.stages-panel-head h2,
.stages-detail-copy h2,
.global-journal-filter-panel h2,
.global-journal-results-head strong,
.photos-page-summary strong,
.report-panel-head h2 {
  font-size: var(--font-card-title);
  font-weight: 600;
}

.batch-list-copy strong,
.batch-calendar-event strong,
.batch-journal-list strong,
.passport-grid h4,
.global-journal-plant-title,
.global-journal-event h3,
.dashboard-event-title,
.dashboard-attention-title,
.dashboard-employee-row strong,
.dashboard-report-row strong,
.stages-stage-card-top strong,
.stages-card-top strong,
.stages-event-head strong,
.report-attention-copy strong,
.report-related-parent strong,
.report-related-child strong,
.report-stage-row strong,
.problems-case-title strong {
  font-size: var(--font-entity-title);
  font-weight: 600;
}

.eyebrow,
.reports-filter-field span,
.global-journal-filters label,
.global-journal-filters label span,
.dashboard-stat .dashboard-stat-label,
.batch-event-details dt,
.passport-grid dt,
.global-journal-details dt,
.problems-case-fact-row dt,
.problems-case-last-action span,
.report-dashboard-info-person span,
.report-dashboard-info dt {
  font-size: var(--font-label);
  font-weight: 500;
}

.report-dashboard-info dd,
.batch-event-details dd,
.passport-grid dd,
.global-journal-details dd,
.problems-case-fact-row dd,
.problems-case-last-action strong,
.dashboard-production-list strong,
.dashboard-stat strong {
  font-size: var(--font-value);
  font-weight: 500;
}

.batch-calendar-event p,
.batch-journal-list p,
.global-journal-comment,
.global-journal-photo-note,
.stages-event-body,
.stages-card-note,
.report-dashboard-info-person strong + span,
.photo-modal-summary-subtitle,
.photo-modal-detail-copy p,
.photo-modal-detail-value {
  font-size: var(--font-body);
  font-weight: 400;
}

.batches-total,
.batch-event-count,
.batches-filter-toggle-count,
.batches-stage-filter-item strong,
.batch-list-status,
.report-dashboard-batch-card .batch-list-status,
.problems-column-section-head span,
.global-journal-plant-count,
.global-journal-important,
.dashboard-report-pills span,
.journal-pill,
.reports-card-filter,
.dashboard-event-detail,
.dashboard-attention-detail {
  font-size: var(--font-badge);
  font-weight: 500;
}

.batches-filter-toggle,
.batches-reset-link,
.batch-tabs a,
.global-journal-apply,
.global-journal-batch-link,
.dashboard-period-switcher a,
.dashboard-card-link,
.reports-filter-submit {
  font-size: var(--font-button);
  font-weight: 500;
}

@media (max-width: 900px) {
  .app-main-journal { height: auto; min-height: 0; display: block; }
  .global-journal-layout { min-height: auto; grid-template-columns: 1fr; }
  .global-journal-filter-panel, .global-journal-results { overflow: visible; }
  .global-journal-results { display: block; }
  .global-journal-timeline { overflow: visible; padding-right: 0; }
}

@media (max-width: 620px) {
  .global-journal-hero { flex-direction: column; align-items: stretch; gap: 10px; }
  .global-journal-summary { justify-content: flex-start; }
  .global-journal-filter-panel, .global-journal-results { padding: 14px; }
  .global-journal-event { grid-template-columns: 68px minmax(0, 1fr); }
  .global-journal-details { grid-template-columns: 1fr; }
}

@media (max-width: 1180px) {
}

@media (max-width: 900px) {
  .journal-hero,
  .reports-hero,
  .journal-detail-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 720px) {
}

.app-main-report {
  padding: 20px;
}

.report-page {
  width: 100%;
  min-height: calc(100vh - 40px);
  padding: 24px 28px 28px;
  border-radius: 30px;
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  border: 1px solid rgba(31, 41, 55, 0.1);
}

.report-header {
  display: grid;
  gap: 16px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(31, 41, 55, 0.08);
}

.report-header-top,
.report-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.report-back-link {
  color: var(--muted);
  font-weight: 600;
}

.report-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.report-title-copy h1 {
  margin: 10px 0 0;
  font-family: var(--font-sans);
  font-size: var(--text-page-title);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.report-status-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.report-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: var(--text-chip-count);
  font-weight: 700;
}

.report-status-pill-success {
  color: #2d7a4a;
  background: rgba(47, 133, 90, 0.14);
}

.report-status-muted {
  color: var(--muted);
  font-size: var(--text-meta);
}

.report-user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 20px;
  border: 1px solid rgba(31, 41, 55, 0.08);
  background: rgba(255, 255, 255, 0.72);
}

.report-user-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--primary), var(--primary-strong));
  color: #fff;
  font-weight: 700;
}

.report-user-card strong,
.report-user-card span {
  display: block;
}

.report-user-card span {
  color: var(--muted);
  font-size: var(--text-meta);
}

.report-meta-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.report-meta-row div,
.report-card-meta div,
.report-card-event,
.report-card-alert,
.report-recent-item {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(31, 41, 55, 0.08);
}

.report-meta-row span,
.report-card-meta dt,
.report-card-event span,
.report-recent-item span,
.report-panel-head p {
  display: block;
  color: var(--muted);
  font-size: var(--text-meta);
}

.report-meta-row strong,
.report-card-meta dd,
.report-card-event strong,
.report-recent-item strong {
  display: block;
  margin-top: 6px;
  font-size: var(--text-card-title);
}

.report-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.report-stat {
  padding: 18px 18px 16px;
  border-radius: 22px;
  background: #fbfbf8;
  border: 1px solid rgba(31, 41, 55, 0.08);
}

.report-stat span {
  display: block;
  color: var(--muted);
  font-size: var(--text-meta);
}

.report-stat strong {
  display: block;
  margin-top: 10px;
  font-family: var(--font-sans);
  font-size: var(--text-display);
}

.report-stat small {
  display: block;
  margin-top: 12px;
  color: var(--muted);
}

.report-stat-primary {
  border-color: rgba(47, 133, 90, 0.18);
  background: linear-gradient(180deg, #f5fbf7 0%, #f1f8f3 100%);
}

.report-stat-blue {
  border-color: rgba(59, 130, 246, 0.18);
  background: linear-gradient(180deg, #f7fbff 0%, #f1f7ff 100%);
}

.report-stat-orange {
  border-color: rgba(245, 158, 11, 0.18);
  background: linear-gradient(180deg, #fffaf1 0%, #fff7e8 100%);
}

.report-stat-purple {
  border-color: rgba(139, 92, 246, 0.18);
  background: linear-gradient(180deg, #faf8ff 0%, #f6f2ff 100%);
}

.report-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.8fr);
  gap: 14px;
  margin-top: 18px;
}

.report-main-column,
.report-sidebar {
  display: grid;
  gap: 14px;
}

.report-sidebar {
  align-content: start;
}

.report-panel {
  padding: 20px;
  border-radius: 26px;
  background: #fbfbf8;
  border: 1px solid rgba(31, 41, 55, 0.08);
}

.report-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.report-panel-head h2 {
  margin: 0;
  font-size: var(--text-section-title);
  font-family: var(--font-sans);
}

.report-panel-head-compact {
  margin-bottom: 12px;
}

.report-filters {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(140px, 1fr));
  gap: 10px;
  align-items: center;
}

.report-filters input,
.report-filters select {
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid rgba(27, 36, 31, 0.16);
  background: rgba(255, 255, 255, 0.92);
  padding: 0 12px;
}

.report-filters input {
  background: #eceef3;
}

.report-filters .check-pill {
  justify-content: flex-start;
  width: 100%;
}

.report-cards-panel {
  min-height: 0;
}

.report-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.report-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(31, 41, 55, 0.08);
}

.report-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.report-card-code {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(47, 133, 90, 0.12);
  color: var(--primary-strong);
  font-size: var(--text-chip-count);
  font-weight: 700;
}

.report-card-main h3 {
  margin: 10px 0 0;
  font-size: var(--text-card-title);
  line-height: 1.25;
}

.report-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.report-card-photo {
  width: 92px;
  height: 92px;
  padding: 0;
  border: 1px solid rgba(31, 41, 55, 0.08);
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  cursor: zoom-in;
  flex: 0 0 auto;
}

.report-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.report-card-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.report-card-event {
  display: grid;
  gap: 2px;
}

.report-card-event p,
.report-card-alert p {
  margin: 6px 0 0;
  color: var(--muted);
}

.report-card-alert {
  border-color: rgba(239, 68, 68, 0.16);
  background: rgba(255, 248, 248, 0.9);
}

.report-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: var(--text-meta);
}

.report-card-link {
  color: var(--primary);
  font-weight: 700;
}

.report-aside-panel {
  display: grid;
  gap: 14px;
}

.report-side-list {
  display: grid;
  gap: 10px;
}

.report-side-item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(31, 41, 55, 0.08);
}

.report-side-photo {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  overflow: hidden;
  background: #edf2f7;
}

.report-side-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.report-side-copy {
  display: grid;
  gap: 4px;
}

.report-side-copy strong {
  font-size: var(--text-card-title);
}

.report-side-copy span {
  color: var(--muted);
  font-size: var(--text-meta);
}

.report-side-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.report-side-arrow {
  color: var(--muted);
  font-size: var(--text-utility-xl);
}

.report-stage-chart-wrap {
  display: grid;
  gap: 14px;
}

.report-stage-chart {
  width: min(100%, 280px);
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  border-radius: 50%;
  position: relative;
  display: grid;
  place-items: center;
  padding: 18px;
}

.report-stage-chart::after {
  content: "";
  position: absolute;
  inset: 22%;
  border-radius: 50%;
  background: #fff;
}

.report-stage-chart > div {
  position: relative;
  z-index: 1;
  text-align: center;
}

.report-stage-chart strong {
  display: block;
  font-family: var(--font-sans);
  font-size: var(--text-display-xl);
  line-height: 1;
}

.report-stage-chart span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.report-stage-legend {
  display: grid;
  gap: 10px;
}

.report-stage-legend div {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  color: var(--text);
}

.report-stage-legend strong {
  font-size: var(--text-chip);
}

.report-stage-legend em {
  color: var(--muted);
  font-style: normal;
  font-size: var(--text-meta);
}

.report-stage-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.report-recent-list {
  display: grid;
  gap: 10px;
}

.report-empty-state {
  min-height: 160px;
}

.report-empty-state-aside {
  min-height: 120px;
}

.upload-submit {
  min-width: 207px;
  min-height: 44px;
  border-radius: 9px;
  padding: 0 22px;
}

.upload-limit {
  color: #667085;
  font-size: var(--text-input);
}

.upload-error {
  margin: 18px 0 0;
}

.upload-form {
  display: grid;
  gap: 14px;
}

.file-picker {
  display: grid;
  place-items: center;
  min-height: 180px;
  border: 1.5px dashed rgba(34, 98, 69, 0.26);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--muted);
  cursor: pointer;
}

.file-picker input {
  display: none;
}

.file-picker span {
  font-size: var(--text-card-title);
  font-weight: 700;
}

.upload-loader {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(7, 24, 15, 0.36);
  backdrop-filter: blur(3px);
}

.upload-loader[hidden] {
  display: none;
}

.upload-loader-card {
  display: grid;
  justify-items: center;
  gap: 12px;
  width: min(360px, 100%);
  padding: 28px;
  border: 1px solid rgba(34, 98, 69, 0.14);
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(7, 24, 15, 0.18);
  text-align: center;
}

.upload-loader-card strong {
  color: var(--text);
  font-size: var(--text-card-title);
}

.upload-loader-card p {
  margin: 0;
  color: var(--muted);
  font-size: var(--text-input);
  line-height: 1.45;
}

.upload-loader-spinner {
  width: 42px;
  height: 42px;
  border: 4px solid rgba(21, 134, 63, 0.18);
  border-top-color: #15863f;
  border-radius: 999px;
  animation: upload-loader-spin 0.8s linear infinite;
}

@keyframes upload-loader-spin {
  to { transform: rotate(360deg); }
}

.alert {
  border-radius: 18px;
  padding: 14px;
}

.alert-error {
  margin-bottom: 14px;
  color: var(--danger);
  background: rgba(163, 63, 52, 0.08);
}

.alert-success {
  color: #1f6d44;
  background: rgba(47, 133, 90, 0.1);
  border-color: rgba(47, 133, 90, 0.18);
}

.dashboard-flash {
  margin-bottom: 14px;
  border-radius: 18px;
}

.empty-state {
  border-radius: 20px;
  padding: 26px;
  text-align: center;
}

.empty-state p {
  color: var(--muted);
  line-height: 1.6;
}

.text-link {
  color: var(--primary);
  font-weight: 700;
}

.summary-grid,
.report-grid,
.cards-stack,
.events-stack,
.kv-grid {
  min-width: 0;
}

.report-grid,
.summary-grid {
  display: grid;
}

.report-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.report-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 22px;
  transition: transform 160ms ease;
}

.report-card:hover {
  transform: translateY(-2px);
}

.report-card-top,
.card-header,
.event-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.status-stack,
.inline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(34, 98, 69, 0.12);
  color: var(--primary-strong);
  font-weight: 700;
}

.badge-primary {
  background: rgba(34, 98, 69, 0.16);
}

.badge-muted {
  background: rgba(103, 116, 108, 0.12);
  color: var(--muted);
}

.filter-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.filter-form input,
.filter-form select {
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid rgba(27, 36, 31, 0.16);
  background: rgba(255, 255, 255, 0.84);
  padding: 0 12px;
}

.filter-form input {
  background: #eceef3;
}

.check-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(27, 36, 31, 0.16);
  background: rgba(255, 255, 255, 0.84);
}

.check-pill input {
  margin: 0;
}

.dashboard-card,
.dashboard-journal-report,
.dashboard-journal-selected,
.dashboard-journal-detail,
.dashboard-journal-entry,
.journal-card,
.reports-card,
.report-user-card,
.report-card {
  background: var(--admin-card-bg);
  border: var(--admin-card-border);
  border-radius: var(--admin-card-radius);
}

/* Management dashboard: current state stays visible while period-bound data lives below. */
.dashboard-overview-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; padding: 2px 2px 4px; }
.dashboard-overview-head h1 { margin: 0; color: var(--text); font-family: var(--font-sans); font-size: var(--text-page-title); letter-spacing: -.045em; }
.dashboard-overview-head p:not(.eyebrow) { margin: 8px 0 0; color: var(--muted); font-size: var(--text-meta); }
.dashboard-period-switcher { display: flex; flex-wrap: wrap; gap: 6px; padding: 5px; border: 0; border-radius: 16px; background: #fff; }
.dashboard-period-switcher a { min-height: 34px; padding: 0 12px; display: inline-flex; align-items: center; border-radius: 11px; color: var(--muted); font-size: var(--text-caption); font-weight: 800; text-decoration: none; }
.dashboard-period-switcher a.active { color: #fff; background: var(--primary); box-shadow: 0 3px 10px rgba(32,112,68,.22); }
.dashboard-stats-top { gap: 12px; }
.dashboard-stat { position: relative; min-height: 144px; padding: 20px; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto 1fr; text-decoration: none; color: inherit; transition: transform .18s ease, box-shadow .18s ease; }
a.dashboard-stat:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(30, 55, 38, .08); }
.dashboard-stat-icon { grid-column: 2; grid-row: 1; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 12px; color: var(--primary-strong); background: rgba(47,133,90,.11); }
.dashboard-stat-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dashboard-stat-warning .dashboard-stat-icon { color: #b7791f; background: rgba(245,158,11,.13); }
.dashboard-stat-accent .dashboard-stat-icon { color: #2563eb; background: rgba(59,130,246,.1); }
.dashboard-stat-danger .dashboard-stat-icon { color: #bf3d36; background: rgba(239,68,68,.1); }
.dashboard-stat-success .dashboard-stat-icon { color: #147a40; background: rgba(34,197,94,.1); }
.dashboard-stat .dashboard-stat-label { grid-column: 1; grid-row: 1; color: var(--muted); font-size: var(--text-meta); }
.dashboard-stat strong { grid-column: 1 / -1; grid-row: 2; align-self: center; margin: 4px 0; }
.dashboard-card-head h2 + p,
.dashboard-production h2 + p { margin: 3px 0 0; color: var(--muted); font-size: var(--text-caption); }
.dashboard-card-link { color: var(--primary-strong); font-size: var(--text-caption); font-weight: 800; text-decoration: none; white-space: nowrap; }
.dashboard-card-link:hover { text-decoration: underline; }
.dashboard-recent-events-card,
.dashboard-attention-card {
  min-height: 0;
  max-height: min(72vh, 860px);
  overflow: hidden;
}

.dashboard-recent-events-card {
  padding-bottom: 26px;
}

.dashboard-event-feed,
.dashboard-attention-list {
  min-height: 0;
  height: 100%;
  overflow: auto;
  padding-right: 4px;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(71, 80, 99, 0.24) transparent;
}
.dashboard-event-feed, .dashboard-attention-list, .dashboard-employee-list { display: grid; gap: 14px; align-content: start; }
.dashboard-event-title { color: var(--text); font-size: var(--text-card-title); line-height: 1.2; font-weight: 700; }
.dashboard-event-divider { width: 100%; margin: 14px 0 18px; border-top: 1px solid rgba(31,41,55,.1); }
.dashboard-event-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; }
.dashboard-event-copy { min-width: 0; }
.dashboard-event-details { margin: 0; }
.dashboard-event-detail-wide { overflow-wrap: anywhere; }
.dashboard-simple-event-row { display: block; padding: 20px; border: 1px solid rgba(31,41,55,.08); border-radius: 18px; background: transparent; color: inherit; text-decoration: none; }
.dashboard-simple-event-row-attention { border-color: rgba(31,41,55,.08); background: transparent; }
a.dashboard-simple-event-row { cursor: pointer; }
a.dashboard-simple-event-row:hover { background: #f3f5f8; }
a.dashboard-simple-event-row-attention:hover { background: #f3f5f8; }
.dashboard-simple-event-row:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.dashboard-simple-event-head { display: block; min-width: 0; }
.dashboard-simple-event-top { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; min-width: 0; }
.dashboard-simple-event-meta { flex: 0 1 auto; color: var(--muted); font-size: var(--text-caption); line-height: 1.3; text-align: right; white-space: nowrap; }
.dashboard-simple-event-meta time { font-weight: 400; }
.dashboard-simple-event-row .dashboard-event-main { margin-top: 18px; }
.dashboard-simple-event-divider { margin: 18px 0 14px; }
.dashboard-simple-event-context { display: flex; align-items: center; flex-wrap: wrap; column-gap: 7px; row-gap: 8px; color: var(--muted); font-size: var(--text-caption); font-weight: 400; }
.dashboard-simple-event-context span + span { position: relative; padding-left: 7px; }
.dashboard-simple-event-context span + span::before { content: ""; position: absolute; left: 0; top: 50%; width: 1px; height: 14px; background: rgba(31,41,55,.16); transform: translateY(-50%); }
.batch-journal-list article.batch-event-highlight { border-color: rgba(47,133,90,.45); background: #edf8ef; transition: background-color .35s ease, border-color .35s ease; }

@media (prefers-reduced-motion: reduce) {
  .batch-journal-list article.batch-event-highlight { transition: none; }
}
.dashboard-inline-empty { min-height: 122px; display: grid; place-items: center; color: var(--muted); font-size: var(--text-meta); text-align: center; }
.dashboard-attention-row, .dashboard-employee-row { padding: 20px; border: 1px solid rgba(31,41,55,.08); border-radius: 18px; color: inherit; background: transparent; text-decoration: none; }
.dashboard-attention-row:hover { background: #f3f5f8; }
.dashboard-attention-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: start; min-width: 0; }
.dashboard-attention-heading-main { display: grid; gap: 4px; min-width: 0; }
.dashboard-attention-title, .dashboard-employee-row strong { font-size: var(--text-card-title); font-weight: 700; }
.dashboard-attention-context { display: flex; align-items: center; flex-wrap: wrap; column-gap: 7px; row-gap: 8px; }
.dashboard-attention-code { color: var(--muted); font-size: var(--text-caption); font-weight: 400; }
.dashboard-attention-stage,
.dashboard-attention-status { position: relative; padding-left: 7px; color: var(--muted); font-size: var(--text-caption); font-weight: 400; }
.dashboard-attention-stage::before,
.dashboard-attention-status::before { content: ""; position: absolute; left: 0; top: 50%; width: 1px; height: 14px; background: rgba(31,41,55,.16); transform: translateY(-50%); }
.dashboard-attention-meta { display: grid; gap: 4px; justify-items: end; color: var(--muted); font-size: var(--text-caption); text-align: right; white-space: nowrap; }
.dashboard-attention-meta time { font-weight: 400; }
.dashboard-attention-divider { width: 100%; margin: 14px 0 18px; border-top: 1px solid rgba(31,41,55,.1); }
.dashboard-attention-details { margin: 0; }
.dashboard-employee-row { display: flex; justify-content: space-between; gap: 16px; }
.dashboard-employee-row > div { min-width: 0; display: grid; gap: 4px; }
.dashboard-employee-row span, .dashboard-employee-row small { color: var(--muted); font-size: var(--text-caption); }
.dashboard-employee-row > div:last-child { text-align: right; }
.dashboard-production { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 20px; border: 1px solid rgba(47,133,90,.16); border-radius: 22px; background: linear-gradient(105deg, #f4faf5, #fff); }
.dashboard-production h2 { margin: 0; font-size: var(--text-section-title); }
.dashboard-production p { color: var(--muted); font-size: var(--text-caption); }
.dashboard-production-list { display: grid; grid-template-columns: repeat(4, minmax(112px, 1fr)); gap: 10px; width: min(660px, 100%); }
.dashboard-production-list article { padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.8); }
.dashboard-production-list span, .dashboard-production-list small { display: block; color: var(--muted); font-size: var(--text-caption); }
.dashboard-production-list strong { display: block; margin-top: 4px; font-size: var(--text-section-title); }
.dashboard-production-list small { display: inline; font-weight: 600; }
.dashboard-gallery-managed { grid-template-columns: repeat(3, minmax(0, 1fr)); }

@media (max-width: 1100px) {
  .dashboard-overview-head, .dashboard-production { align-items: flex-start; flex-direction: column; }
  .dashboard-production-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-layout { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .dashboard-overview-head { align-items: stretch; }
  .dashboard-period-switcher a { flex: 1; justify-content: center; }
  .dashboard-event-main { grid-template-columns: 1fr; }
  .dashboard-simple-event-top { align-items: flex-start; }
  .dashboard-simple-event-meta { white-space: normal; }
  .dashboard-attention-head { gap: 14px; }
  .dashboard-attention-meta { white-space: normal; }
  .dashboard-employee-row > div:last-child { text-align: left; }
  .dashboard-employee-row { flex-direction: column; gap: 8px; }
  .dashboard-production-list { grid-template-columns: 1fr 1fr; }
  .dashboard-gallery-managed { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.cards-stack {
  display: grid;
  gap: 18px;
}

.card {
  border-radius: 26px;
  padding: 20px;
  display: grid;
  gap: 16px;
}

.card h3 {
  margin-top: 8px;
}

.card-meta,
.kv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}

.card-meta div,
.kv-grid div {
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(27, 36, 31, 0.08);
}

.card-meta dt,
.kv-grid span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: var(--text-caption);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.card-meta dd,
.kv-grid strong {
  margin: 0;
  font-weight: 700;
}

.events-stack {
  display: grid;
  gap: 12px;
}

.event {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(27, 36, 31, 0.09);
  background: rgba(255, 255, 255, 0.7);
}

.event p {
  margin: 8px 0 0;
}

.inline-meta {
  margin-top: 8px;
  color: var(--muted);
}

.details-block {
  border-radius: 18px;
  border: 1px solid rgba(27, 36, 31, 0.09);
  background: rgba(255, 255, 255, 0.7);
  padding: 12px 14px;
}

.details-block summary {
  cursor: pointer;
  font-weight: 700;
}

.thumb-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.thumb-grid-tight {
  margin-top: -4px;
}

.thumb {
  width: 108px;
  height: 108px;
  padding: 0;
  border: 1px solid rgba(27, 36, 31, 0.12);
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  cursor: zoom-in;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lightbox {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 60;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(12, 18, 14, 0.74);
}

.lightbox-panel {
  position: relative;
  z-index: 1;
  width: min(94vw, 1120px);
  max-height: min(92vh, 980px);
  margin: 0;
  padding: 20px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 28px 80px rgba(12, 18, 14, 0.24);
  overflow: auto;
}

.lightbox-image {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  max-height: 72vh;
  object-fit: cover;
  background: #fff;
  border-radius: 22px;
}

.lightbox-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  font-size: var(--text-overlay);
  cursor: pointer;
}

.photo-modal-layout {
  display: grid;
  grid-template-columns: minmax(320px, 520px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.photo-modal-media,
.photo-modal-meta {
  min-width: 0;
}

.photo-modal-media {
  display: grid;
  justify-items: start;
}

.photo-modal-navigation {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
}

.photo-modal-nav {
  min-width: 42px;
  height: 42px;
  border: 1px solid rgba(31, 41, 55, 0.12);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
}

.photo-modal-nav:disabled {
  opacity: 0.42;
  cursor: default;
}

.photo-modal-counter {
  color: var(--muted);
  font-size: var(--text-caption);
  font-weight: 600;
}

.photo-modal-meta {
  display: grid;
  gap: 18px;
  align-content: start;
}

.photo-modal-summary h2,
.photo-modal-summary p,
.photo-modal-summary h3 {
  margin: 0;
}

.photo-modal-summary {
  display: grid;
  gap: 10px;
  padding: 18px 20px;
  border: 1px solid rgba(31, 41, 55, 0.08);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.04);
}

.photo-modal-summary-meta {
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.35;
  font-weight: 500;
}

.photo-modal-summary-title {
  color: var(--text);
  font-size: clamp(1.25rem, 1.08rem + 0.45vw, 1.85rem);
  line-height: 1.15;
  font-weight: 700;
}

.photo-modal-summary-subtitle {
  color: var(--muted);
  font-size: var(--text-body);
  line-height: 1.25;
}

.photo-modal-details {
  padding: 18px 20px;
  border: 1px solid rgba(31, 41, 55, 0.08);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.04);
}

.photo-modal-details-title {
  margin: 0 0 18px;
  color: var(--text);
  font-size: clamp(1.2rem, 1.1rem + 0.35vw, 1.55rem);
  line-height: 1.2;
  font-weight: 700;
}

.photo-modal-details-grid {
  display: grid;
  gap: 18px;
  margin: 0;
}

.photo-modal-detail-item {
  display: grid;
  gap: 6px;
}

.photo-modal-details-grid dt {
  color: var(--muted);
  font-size: var(--text-body);
  font-weight: 600;
}

.photo-modal-details-grid dd {
  margin: 0;
  color: var(--text);
  font-size: var(--text-body);
  font-weight: 700;
}

.photo-modal-actions {
  display: flex;
  justify-content: flex-start;
}

.photo-modal-link[hidden] {
  display: none;
}

code {
  padding: 0.1em 0.35em;
  border-radius: 8px;
  background: rgba(34, 98, 69, 0.08);
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 250px minmax(0, 1fr);
  }

  .photo-modal-layout {
    grid-template-columns: 1fr;
  }

  .dashboard-stats,
  .dashboard-grid-primary,
  .dashboard-grid-secondary {
    grid-template-columns: 1fr;
  }

  .dashboard-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report-layout {
    grid-template-columns: 1fr;
  }

  .report-stats-grid,
  .report-meta-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report-cards-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .lightbox-panel {
    width: min(96vw, 1120px);
    max-height: 94vh;
    padding: 16px;
  }

  .lightbox-image {
    max-height: 52vh;
  }

  .photo-modal-summary {
    padding: 16px 18px;
  }

  .photo-modal-details {
    padding: 16px 18px;
  }

  .photo-modal-details-grid {
    gap: 6px;
  }

  .sidebar {
    position: relative;
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(27, 36, 31, 0.08);
  }

  .app-main {
    padding: 18px;
  }

  .app-main-report,
  .app-main-dashboard {
    padding: 18px;
  }

  .app-main-dashboard {
    height: auto;
    overflow: visible;
  }

  .upload-page-top,
  .panel-header,
  .card-header,
  .report-card-top,
  .event-top {
    flex-direction: column;
  }

  .thumb {
    width: 92px;
    height: 92px;
  }

  .upload-page {
    min-height: auto;
    width: 100%;
    padding: 22px 18px 18px;
  }

  .dashboard-page {
    height: auto;
    min-height: auto;
    width: 100%;
    padding: 22px 18px 18px;
    overflow: visible;
  }

  .report-page {
    min-height: auto;
    width: 100%;
    padding: 22px 18px 18px;
  }

  .upload-page-lede {
    margin: 18px 0 18px;
  }

  .file-picker-home {
    min-height: 260px;
  }

  .upload-form-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .dashboard-card-head {
    flex-direction: column;
  }

  .dashboard-meta-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-mini-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-stats {
    grid-template-columns: 1fr;
  }

  .dashboard-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-report-row {
    grid-template-columns: 1fr;
  }

  .dashboard-report-meta {
    justify-content: flex-start;
    text-align: left;
  }

  .dashboard-report-headline {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .dashboard-report-pills {
    justify-content: flex-start;
  }

  .upload-submit {
    width: 100%;
  }

  .report-header-top,
  .report-title-row,
  .report-panel-head,
  .report-card-top,
  .report-side-item {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .report-meta-row,
  .report-stats-grid,
  .report-filters {
    grid-template-columns: 1fr;
  }

  .report-card-meta {
    grid-template-columns: 1fr;
  }

  .report-card-photo {
    width: 100%;
    height: 160px;
  }

  .report-stage-chart {
    width: min(100%, 240px);
  }
}

