:root {
  --bg: #fbfaf7;
  --sidebar: #f3f0e9;
  --surface: #fffefb;
  --surface-soft: #f8f6f0;
  --ink: #24211d;
  --muted: #706b63;
  --line: #e5dfd4;
  --line-strong: #d6cfc2;
  --green: #486b5b;
  --green-soft: #e2eee8;
  --amber: #8b651b;
  --amber-soft: #f6ead5;
  --red: #a34236;
  --red-soft: #f5e4df;
  --blue-soft: #e9f0ff;
  --blue: #48559a;
  --shadow: 0 18px 48px rgba(37, 31, 22, .07);
}

* {
  box-sizing: border-box;
  min-width: 0;
}

html {
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
}

h1,
h2,
h3,
p,
span,
strong,
button,
li,
textarea {
  overflow-wrap: anywhere;
}

button,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  border-right: 1px solid var(--line);
  background: var(--sidebar);
}

.brand {
  padding: 26px 28px 30px;
  border-bottom: 1px solid var(--line);
}

.brand-name {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  line-height: 1;
  color: var(--green);
}

.brand-subtitle,
.eyebrow,
.date,
.label {
  letter-spacing: .18em;
  text-transform: uppercase;
}

.brand-subtitle {
  margin-top: 12px;
  color: var(--muted);
  font-size: .77rem;
}

.nav {
  display: grid;
  gap: 4px;
  padding: 22px 16px;
}

.nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 44px;
  border-radius: 8px;
  padding: 0 14px;
  color: #55514b;
  font-weight: 700;
}

.nav a.active,
.nav a:hover {
  background: #e9e3d8;
  color: var(--ink);
}

.nav a.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 4px;
  border-radius: 999px;
  background: var(--green);
}

.sidebar-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 28px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .85rem;
}

.main {
  padding: 34px clamp(24px, 4vw, 70px) 84px;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(320px, 520px) minmax(280px, 1fr);
  gap: 22px;
  align-items: start;
  max-width: 1180px;
  margin: 0 auto 36px;
}

.menu {
  display: none;
}

.date,
.eyebrow,
.label {
  margin: 0;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 850;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 14px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.8rem, 4.2vw, 4.15rem);
  line-height: 1;
  letter-spacing: 0;
  font-weight: 500;
}

h2 {
  margin-bottom: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 3vw, 2.55rem);
  line-height: 1.08;
  font-weight: 500;
}

.subtitle {
  max-width: 430px;
  margin: 0;
  color: var(--muted);
  font-size: 1.12rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 72px;
}

.secondary,
.primary,
.language-toggle {
  min-height: 42px;
  border-radius: 8px;
  padding: 0 16px;
  font-weight: 800;
}

.secondary {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}

.primary {
  border: 1px solid var(--green);
  background: var(--green);
  color: white;
}

.compact {
  min-height: 38px;
  padding: 0 12px;
  font-size: .86rem;
}

.language-toggle {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
}

.freshness {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  padding: 0 18px;
  color: var(--green);
  font-weight: 850;
  box-shadow: var(--shadow);
}

.freshness span,
.source-line-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: currentColor;
}

.site-tree,
.source-check,
.view,
.page-title,
.content-width {
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

.site-tree {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
  color: var(--muted);
  font-weight: 850;
}

.site-tree a {
  color: var(--green);
}

.source-check {
  display: flex;
  gap: 9px;
  align-items: center;
  margin-top: 0;
  margin-bottom: 26px;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.35;
}

.source-check span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  opacity: .65;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.section-title {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 18px;
}

.page-title {
  margin-bottom: 18px;
}

.report-card,
.panel,
.event-card,
.state-card,
.side-panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.report-card {
  padding: clamp(24px, 4vw, 42px);
}

.card-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
  color: var(--muted);
}

.card-meta > div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-summary {
  max-width: 920px;
  margin-bottom: 24px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 3.1vw, 3rem);
  line-height: 1.16;
  font-weight: 500;
}

.chips,
.task-rules {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
}

.chip,
.task-rules span,
.task-rules em {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  padding: 4px 12px;
  color: var(--muted);
  font-style: normal;
  font-weight: 760;
}

.pill,
.money-pill,
.task-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-height: 30px;
  border-radius: 999px;
  padding: 0 14px;
  font-size: .86rem;
  font-weight: 850;
  white-space: normal;
}

.pill::before,
.task-status::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: currentColor;
}

.ok {
  border: 1px solid #bfd8ca;
  background: var(--green-soft);
  color: var(--green);
}

.watch,
.in_progress {
  border: 1px solid #e0c692;
  background: var(--amber-soft);
  color: var(--amber);
}

.alert,
.blocked {
  border: 1px solid #e0b7af;
  background: var(--red-soft);
  color: var(--red);
}

.info,
.open {
  border: 1px solid #c8d5e8;
  background: var(--blue-soft);
  color: var(--blue);
}

.done {
  border: 1px solid var(--line);
  background: #ece8df;
  color: var(--muted);
}

.card-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.card-footer a,
.section-title a {
  color: var(--green);
  font-weight: 850;
}

.today-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.today-report-panel {
  display: grid;
  gap: 16px;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 20px;
}

.today-report-panel h2 {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.25rem;
  font-weight: 850;
}

.today-report-grid {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.today-attention,
.today-next-step {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.today-attention span,
.today-next-step span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.today-attention {
  border-left: 4px solid var(--amber);
  border-top: 0;
  border-radius: 10px;
  background: #fff9ee;
  padding: 12px 14px;
}

.today-attention ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
}

.today-attention li {
  color: var(--ink);
  font-weight: 720;
  line-height: 1.4;
}

.today-next-step p {
  margin: 0;
  color: var(--ink);
  font-weight: 760;
  line-height: 1.45;
}

.panel {
  padding: 22px;
}

.preview-list,
.calendar-list,
.trend-grid,
.state-grid,
.manual-grid {
  display: grid;
  gap: 12px;
}

.calendar-list article {
  display: grid;
  grid-template-columns: minmax(84px, auto) minmax(0, 1fr);
  gap: 14px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.preview-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.preview-list article:first-child,
.calendar-list article:first-child {
  border-top: 0;
  padding-top: 0;
}

.calendar-list strong {
  color: var(--green);
}

small,
.source-note,
.preview-source {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 760;
}

.report-grid,
.inbox-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
}

.structured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.structured-grid div {
  min-height: 86px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  padding: 13px;
}

.structured-grid span {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.structured-grid strong {
  display: block;
  line-height: 1.32;
}

.raw-report {
  margin-top: 28px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
  color: var(--muted);
}

.raw-report strong {
  color: var(--ink);
}

.report-detail-list {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
}

.report-detail-list div {
  display: grid;
  grid-template-columns: minmax(150px, 220px) minmax(0, 1fr);
  gap: 14px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.report-detail-list dt {
  color: var(--ink);
  font-weight: 850;
}

.report-detail-list dd {
  margin: 0;
  line-height: 1.45;
}

.reminder-panel {
  display: grid;
  grid-template-columns: minmax(220px, .8fr) repeat(2, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 24px;
  border: 1px solid #e0c692;
  border-radius: 12px;
  background: #fff9ee;
  padding: 16px;
}

.reminder-panel h3 {
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.reminder-panel p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.4;
}

.reminder-panel label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 850;
}

.reminder-panel textarea {
  width: 100%;
  min-height: 104px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  padding: 12px;
  color: var(--ink);
  line-height: 1.4;
  resize: vertical;
}

.reminder-panel .compact {
  justify-self: start;
}

.source-audit {
  display: grid;
  grid-template-columns: minmax(200px, .5fr) minmax(0, 1fr);
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 18px;
}

.source-audit h3 {
  margin-bottom: 0;
  font-size: 1.05rem;
}

.audit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.audit-grid article {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  padding: 12px;
}

.audit-grid article > span {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  margin-top: 6px;
  border-radius: 50%;
}

.audit-ok {
  background: var(--green);
}

.audit-watch {
  background: var(--amber);
}

.audit-grid strong {
  display: block;
  margin-bottom: 3px;
  font-size: .86rem;
}

.audit-grid p {
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.35;
}

.recent-reports {
  display: grid;
  gap: 10px;
  margin-top: 24px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.recent-reports article {
  display: grid;
  grid-template-columns: minmax(140px, auto) minmax(110px, auto) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  padding: 12px;
}

.full-report-archive {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 22px;
}

.archive-note {
  max-width: 640px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.full-report-list {
  display: grid;
  gap: 12px;
}

.full-form-report {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  overflow: hidden;
}

.full-form-report summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, auto);
  gap: 14px;
  align-items: center;
  cursor: pointer;
  padding: 14px 16px;
}

.full-form-report summary span {
  display: grid;
  gap: 3px;
}

.full-form-report summary strong {
  font-size: 1rem;
}

.full-form-report summary em {
  color: var(--muted);
  font-style: normal;
  font-weight: 760;
}

.full-form-report summary small {
  margin-top: 0;
  text-align: right;
}

.full-form-report summary a {
  color: var(--green);
  font-weight: 900;
}

.full-answer-list {
  display: grid;
  margin: 0;
  border-top: 1px solid var(--line);
}

.full-answer-list div {
  display: grid;
  grid-template-columns: minmax(220px, 34%) minmax(0, 1fr);
  gap: 14px;
  border-top: 1px solid var(--line);
  padding: 12px 16px;
}

.full-answer-list div:first-child {
  border-top: 0;
}

.full-answer-list dt {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 900;
  line-height: 1.35;
}

.full-answer-list dd {
  margin: 0;
  color: var(--ink);
  line-height: 1.45;
  white-space: pre-wrap;
}

.empty-answer {
  color: #9a948b !important;
  font-style: italic;
}

.event-list {
  position: relative;
  display: grid;
  gap: 16px;
  border-left: 2px solid var(--line);
  padding-left: 22px;
}

.event-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  padding: 22px;
}

.event-card::before {
  content: "";
  position: absolute;
  left: -31px;
  top: 28px;
  width: 14px;
  height: 14px;
  border: 3px solid var(--surface);
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 2px var(--line);
}

.event-card h3,
.state-card h3 {
  margin-bottom: 8px;
  font-size: 1.2rem;
}

.event-card p,
.state-card p,
.manual-grid p {
  color: var(--muted);
  line-height: 1.45;
}

.task-board {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.task-rules {
  margin: -8px 0 16px;
  align-items: center;
  color: var(--muted);
  font-size: .85rem;
}

.task-rules strong {
  color: var(--ink);
}

.task-row {
  display: grid;
  grid-template-columns: 96px minmax(170px, 220px) 96px minmax(260px, 1fr) 110px;
  gap: 14px;
  align-items: start;
  border-bottom: 1px solid var(--line);
  padding: 14px 18px;
}

.task-row:last-child {
  border-bottom: 0;
}

.task-header {
  background: var(--surface-soft);
  color: var(--muted);
  font-size: .74rem;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.task-done {
  background: #f1f0ec;
  color: #8c8780;
  opacity: .58;
}

.person-chip {
  --person-bg: #eef1ee;
  --person-fg: #4f5751;
  --person-dot: #7b857d;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  min-height: 28px;
  border: 1px solid color-mix(in srgb, var(--person-dot) 24%, transparent);
  border-radius: 999px;
  background: var(--person-bg);
  color: var(--person-fg);
  padding: 6px 10px;
  font-size: .82rem;
  font-weight: 850;
  line-height: 1.15;
}

.person-chip::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--person-dot);
}

.person-sandra { --person-bg: #edf0ff; --person-fg: #4b5290; --person-dot: #6974c7; }
.person-paola { --person-bg: #e8f6f8; --person-fg: #326a76; --person-dot: #4c95a2; }
.person-natalia { --person-bg: #e9f1ff; --person-fg: #2f5596; --person-dot: #4f7fcb; }
.person-mom { --person-bg: #f7eaf4; --person-fg: #7c3f72; --person-dot: #b45aa4; }
.person-ronald { --person-bg: #e8f3ee; --person-fg: #356a51; --person-dot: #4a8b6b; }
.person-sebastian { --person-bg: #fff0df; --person-fg: #8a5621; --person-dot: #c77a2b; }
.person-yolima { --person-bg: #f6eddc; --person-fg: #735a2a; --person-dot: #aa8440; }
.person-pending { --person-bg: #efeee9; --person-fg: #5f5a52; --person-dot: #8f887d; }

.task-main h3 {
  margin-bottom: 6px;
  font-size: 1.05rem;
}

.task-bullets {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.35;
}

.task-area strong,
.task-date strong {
  display: block;
  margin-bottom: 4px;
}

.task-area em,
.task-date em {
  display: block;
  color: var(--muted);
  font-style: normal;
  font-size: .78rem;
}

.state-grid,
.manual-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.state-card,
.manual-grid article {
  padding: 20px;
}

.inbox-grid textarea {
  min-height: 330px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 18px;
  color: var(--muted);
  resize: vertical;
}

.inbox-compose {
  display: grid;
  gap: 10px;
}

.inbox-compose label {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.inbox-compose p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.inbox-results,
.inbox-history {
  min-width: 0;
}

.inbox-draft {
  display: grid;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 20px;
}

.inbox-draft h3,
.inbox-draft h4,
.inbox-draft p,
.inbox-draft ul {
  margin: 0;
}

.draft-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.draft-meta span {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface-soft);
  padding: 7px 10px;
  color: var(--green);
  font-weight: 850;
}

.draft-group {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.draft-group h4 {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.draft-group ul {
  padding-left: 20px;
  color: var(--ink);
  line-height: 1.45;
}

.draft-group p {
  color: var(--muted);
}

.inbox-draft details {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.inbox-draft summary {
  cursor: pointer;
  color: var(--green);
  font-weight: 850;
}

.inbox-draft pre {
  max-height: 220px;
  overflow: auto;
  white-space: pre-wrap;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  padding: 12px;
  color: var(--muted);
  font-family: inherit;
  line-height: 1.45;
}

.shared-notes-panel,
.inbox-history {
  margin-top: 28px;
}

.draft-list {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  overflow: hidden;
}

.draft-list article {
  display: grid;
  gap: 5px;
  border-top: 1px solid var(--line);
  padding: 14px 18px;
}

.draft-list article:first-child {
  border-top: 0;
}

.nurse-body {
  background: var(--bg);
}

.nurse-page {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 34px 0 70px;
}

.nurse-loading,
.nurse-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: clamp(22px, 4vw, 34px);
}

.nurse-loading {
  width: min(100%, 520px);
  margin: 12vh auto 0;
}

.nurse-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.nurse-hero h1 {
  color: var(--green);
}

.nurse-link {
  flex: 0 0 auto;
}

.nurse-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nurse-headline {
  margin-bottom: 18px;
}

.nurse-top-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
}

.latest-report-card {
  overflow: visible;
}

.report-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 22px;
}

.report-date {
  margin-bottom: 6px;
  text-transform: capitalize;
}

.report-time {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
  font-weight: 760;
}

.report-person {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.nurse-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, .8fr);
  gap: 18px;
}

.nurse-grid > div {
  display: grid;
  gap: 18px;
  align-content: start;
}

.nurse-report-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.nurse-report-list div {
  display: grid;
  grid-template-columns: minmax(150px, 220px) minmax(0, 1fr);
  gap: 14px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.nurse-report-list div:first-child {
  border-top: 0;
  padding-top: 0;
}

.nurse-report-list dt {
  color: var(--muted);
  font-weight: 850;
}

.nurse-report-list dd {
  margin: 0;
  color: var(--ink);
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.nurse-recent-list {
  display: grid;
  gap: 10px;
}

.nurse-recent-list article {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  padding: 12px;
}

.recent-report-detail {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  overflow: hidden;
}

.recent-report-detail summary {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
  padding: 14px;
  cursor: pointer;
  list-style: none;
}

.recent-report-detail summary::-webkit-details-marker {
  display: none;
}

.recent-report-detail summary::after {
  content: "+";
  grid-column: 2;
  grid-row: 1;
  color: var(--green);
  font-size: 1.25rem;
  font-weight: 900;
}

.recent-report-detail[open] summary::after {
  content: "-";
}

.recent-date {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.28rem, 2vw, 1.65rem);
  line-height: 1.05;
  text-transform: capitalize;
}

.recent-report-detail small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.35;
}

.compact-report-list {
  border-top: 1px solid var(--line);
  padding: 14px;
}

.nurse-recent-list p,
.nurse-card p {
  color: var(--muted);
  line-height: 1.45;
}

.activity-planner {
  margin-bottom: 18px;
}

.activity-section {
  margin-top: 22px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.activity-section:first-of-type {
  margin-top: 18px;
}

.activity-section h3 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 1.05rem;
}

.activity-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
}

.activity-chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  padding: 0 12px;
  color: var(--muted);
  font-weight: 760;
}

.activity-chip.done {
  border-color: #bfd8cb;
  background: var(--green-soft);
  color: var(--green);
}

.activity-matrix-wrap,
.activity-month-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.activity-matrix,
.activity-month-table {
  width: 100%;
  border-collapse: collapse;
}

.activity-matrix {
  min-width: 980px;
}

.activity-month-table {
  min-width: 760px;
}

.activity-matrix th,
.activity-matrix td,
.activity-month-table th,
.activity-month-table td {
  border-bottom: 1px solid var(--line);
  padding: 10px;
  text-align: left;
  vertical-align: top;
}

.activity-matrix th,
.activity-month-table th {
  color: var(--muted);
  font-size: .76rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.activity-matrix thead th:not(:first-child) {
  color: var(--ink);
  font-size: .86rem;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: none;
}

.activity-matrix tbody th {
  width: 210px;
  color: var(--ink);
  font-size: .95rem;
  letter-spacing: 0;
  text-transform: none;
}

.activity-matrix td {
  min-width: 92px;
  color: var(--muted);
}

.activity-matrix td.done {
  background: var(--green-soft);
  color: var(--green);
  font-weight: 850;
}

.activity-matrix td span {
  display: block;
  font-size: 1.05rem;
}

.activity-matrix td small {
  display: block;
  margin-top: 2px;
  font-size: .72rem;
  line-height: 1.25;
}

.activity-month-table td:first-child {
  color: var(--ink);
  font-weight: 760;
}

.trend-overview {
  align-self: stretch;
}

.trend-metrics {
  display: grid;
  gap: 12px;
}

.trend-metric {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.trend-metric:first-child {
  border-top: 0;
  padding-top: 0;
}

.trend-metric h3 {
  margin: 0 0 8px;
  font-size: .86rem;
  color: var(--muted);
  font-weight: 900;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.trend-empty {
  margin: 0;
  color: var(--muted);
  font-weight: 760;
}

.trend-bar-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
  color: var(--ink);
  font-weight: 760;
}

.trend-bar-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.trend-bar-row strong {
  color: var(--muted);
  font-size: .9rem;
}

.trend-bar {
  grid-column: 1 / -1;
  height: 7px;
  border-radius: 999px;
  background: var(--surface-soft);
  overflow: hidden;
}

.trend-bar i {
  display: block;
  height: 100%;
  min-width: 7px;
  border-radius: inherit;
  background: var(--green);
}

.analytics-frame {
  width: 100%;
  min-height: 520px;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
}

.analytics-link {
  min-width: max-content;
  color: #fff;
}

.analytics-placeholder {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  padding: 18px;
}

.analytics-placeholder p {
  margin: 0;
}

.mobile-nav {
  display: none;
}

.column-label {
  display: none;
}

@media (max-width: 980px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .main {
    padding: 20px 16px 92px;
  }

  .topbar {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 30px;
  }

  .menu {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
  }

  h1 {
    font-size: 2.55rem;
  }

  .actions {
    justify-content: flex-start;
    padding-top: 0;
  }

  .section-title,
  .card-meta,
  .card-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .today-grid {
    grid-template-columns: 1fr;
  }

  .nurse-page {
    width: min(100% - 28px, 1180px);
    padding-top: 22px;
  }

  .nurse-hero,
  .nurse-top-grid,
  .nurse-grid {
    grid-template-columns: 1fr;
  }

  .nurse-hero {
    display: grid;
  }

  .report-hero {
    display: grid;
  }

  .report-person {
    justify-content: flex-start;
  }

  .event-card {
    grid-template-columns: 1fr;
  }

  .reminder-panel {
    grid-template-columns: 1fr;
  }

  .source-audit {
    grid-template-columns: 1fr;
  }

  .full-form-report summary,
  .full-answer-list div {
    grid-template-columns: 1fr;
  }

  .full-form-report summary small {
    text-align: left;
  }

  .mobile-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    padding: 8px;
    border-top: 1px solid var(--line);
    background: rgba(251, 250, 247, .92);
    backdrop-filter: blur(18px);
  }

  .mobile-nav a {
    display: grid;
    gap: 3px;
    place-items: center;
    min-height: 50px;
    border-radius: 8px;
    color: var(--muted);
    font-weight: 800;
  }

  .mobile-nav a span {
    font-size: 1.05rem;
    line-height: 1;
  }

  .mobile-nav a em {
    font-style: normal;
    font-size: .72rem;
    line-height: 1.1;
  }

  .mobile-nav a.active {
    border: 1px solid var(--green);
    background: var(--green-soft);
    color: var(--ink);
  }
}

@media (max-width: 760px) {
  .task-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .task-header {
    display: none;
  }

  .column-label {
    display: block;
    margin-bottom: 3px;
    color: var(--muted);
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
  }
}

@media (max-width: 540px) {
  .preview-list article,
  .calendar-list article,
  .report-detail-list div,
  .recent-reports article,
  .nurse-report-list div,
  .recent-report-detail summary {
    grid-template-columns: 1fr;
  }

  .recent-report-detail summary::after {
    grid-column: 1;
    grid-row: auto;
  }

  .freshness {
    width: 100%;
    justify-content: center;
  }
}
