:root {
  color-scheme: light;
  --ink: #183029;
  --muted: #6f7f78;
  --paper: #f4f7f3;
  --card: #ffffff;
  --line: #dce6df;
  --green: #166b55;
  --green-2: #2c8c6e;
  --green-soft: #e0f2ea;
  --red: #c6534f;
  --red-soft: #fae8e6;
  --blue: #4e7fb4;
  --blue-soft: #e8f0fa;
  --amber: #b97923;
  --shadow: 0 12px 34px rgba(35, 67, 56, 0.08);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--paper);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 95% 2%, rgba(65, 150, 115, 0.12), transparent 28rem),
    var(--paper);
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  color: inherit;
}

.app-shell {
  width: min(100%, 760px);
  min-height: 100vh;
  margin: 0 auto;
  padding: calc(14px + var(--safe-top)) 16px calc(104px + var(--safe-bottom));
}

.topbar,
.brand,
.section-heading,
.chart-heading,
.counter-row,
.list-heading,
.privacy-card {
  display: flex;
  align-items: center;
}

.topbar {
  min-height: 62px;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.settings-button {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(24, 48, 41, 0.13);
  border-radius: 50%;
  padding: 0;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 6px 18px rgba(35, 67, 56, 0.09);
  font-size: 24px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.settings-button:active {
  transform: scale(0.94);
}

.brand {
  min-width: 0;
  gap: 11px;
}

.brand-mark,
.loading-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: white;
  background: linear-gradient(145deg, var(--green-2), var(--green));
  box-shadow: 0 8px 18px rgba(22, 107, 85, 0.22);
  font-size: 20px;
}

.eyebrow {
  margin: 0 0 3px;
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: clamp(18px, 5vw, 22px);
  line-height: 1.1;
  letter-spacing: -0.025em;
}

h2 {
  margin-bottom: 7px;
  font-size: clamp(26px, 8vw, 36px);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

h3 {
  margin-bottom: 0;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.timezone-form {
  display: grid;
  gap: 12px;
}

.timezone-form select {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 42px 0 14px;
  color: var(--ink);
  background: var(--card);
  font-weight: 750;
}

.timezone-hint {
  margin: -2px 0 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

body.settings-open {
  overflow: hidden;
}

.settings-overlay {
  position: fixed;
  z-index: 90;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 18px 12px calc(18px + var(--safe-bottom));
  background: rgba(15, 32, 27, 0.46);
  backdrop-filter: blur(4px);
}

.settings-sheet {
  width: min(100%, 720px);
  border: 1px solid rgba(24, 48, 41, 0.1);
  border-radius: 26px;
  padding: 22px;
  background: var(--card);
  box-shadow: 0 24px 70px rgba(15, 32, 27, 0.24);
}

.settings-sheet-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.settings-sheet-heading h2 {
  margin: 0;
  font-size: 30px;
}

.settings-close-button {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  padding: 0 0 3px;
  color: var(--ink);
  background: var(--paper);
  font-size: 28px;
  line-height: 1;
}

.settings-owner {
  margin-bottom: 18px;
  border-radius: 15px;
  padding: 12px 14px;
  background: var(--green-soft);
}

.settings-owner span,
.settings-owner strong {
  display: block;
}

.settings-owner span {
  margin-bottom: 3px;
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.settings-owner strong {
  font-size: 16px;
}

label > span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.journal-owner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  margin-bottom: 18px;
  border: 2px solid rgba(44, 140, 110, 0.28);
  border-radius: 19px;
  padding: 12px 46px 12px 12px;
  overflow: hidden;
  background: linear-gradient(135deg, #ffffff, #edf8f2);
  box-shadow: 0 8px 24px rgba(35, 67, 56, 0.08);
  cursor: pointer;
}

.owner-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 15px;
  color: white;
  background: linear-gradient(145deg, var(--green-2), var(--green));
  font-size: 16px;
  font-weight: 850;
}

.owner-copy {
  min-width: 0;
}

.owner-copy small,
.owner-copy strong,
.owner-copy em {
  display: block;
}

.owner-copy small {
  margin-bottom: 2px;
  color: var(--green);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.owner-copy strong {
  overflow: hidden;
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.owner-copy em {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
}

.journal-owner select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.owner-chevron {
  position: absolute;
  right: 17px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--green);
  font-size: 25px;
  font-weight: 700;
  pointer-events: none;
}

.view {
  display: none;
  animation: fade-in 180ms ease-out;
}

.view.is-active {
  display: block;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
}

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 142px;
  margin: 0 -16px 18px;
  padding: 24px 22px;
  overflow: hidden;
  color: white;
  background:
    linear-gradient(125deg, rgba(13, 73, 57, 0.97), rgba(42, 130, 98, 0.9)),
    var(--green);
}

.hero .eyebrow {
  color: #bfe6d5;
}

.hero h2 {
  max-width: 360px;
  margin-bottom: 9px;
}

.hero p:last-child {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.78);
}

.hero-pulse {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 82px;
  height: 82px;
  margin-right: -8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  color: #ffd5d2;
  background: rgba(255, 255, 255, 0.09);
  font-size: 34px;
}

.card,
.entry-form {
  border: 1px solid rgba(209, 222, 214, 0.9);
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.entry-form {
  padding: 20px;
}

.section-heading,
.chart-heading,
.list-heading {
  justify-content: space-between;
  gap: 14px;
}

.section-heading {
  margin-bottom: 18px;
}

.section-heading h3 {
  font-size: 21px;
}

.text-button {
  border: 0;
  padding: 8px;
  color: var(--green);
  background: transparent;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.datetime-grid,
.pressure-grid,
.summary-grid {
  display: grid;
}

.datetime-grid {
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
}

input,
textarea,
select {
  border: 1px solid var(--line);
  outline: none;
  transition: border-color 140ms, box-shadow 140ms;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--green-2);
  box-shadow: 0 0 0 3px rgba(44, 140, 110, 0.12);
}

.datetime-grid input,
.wide-field input,
.wide-field textarea {
  width: 100%;
  border-radius: 13px;
  padding: 12px 13px;
  color: var(--ink);
  background: #fbfdfb;
}

.pressure-grid {
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 9px;
  margin: 6px 0 14px;
}

.metric-field {
  min-width: 0;
}

.metric-field > span {
  text-align: center;
}

.metric-field input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 7px 8px;
  color: var(--ink);
  background: #fbfdfb;
  font-size: clamp(34px, 12vw, 48px);
  font-weight: 750;
  line-height: 1;
  text-align: center;
}

.metric-field input::placeholder {
  color: #c4cec8;
}

.metric-field small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.metric-divider {
  padding-bottom: 31px;
  color: #9caaa3;
  font-size: 34px;
  font-weight: 300;
}

.pulse-field {
  display: block;
  margin: 8px auto 0;
  max-width: 220px;
}

.input-with-unit {
  position: relative;
}

.pulse-field input {
  padding-right: 72px;
}

.pulse-field .input-with-unit small {
  position: absolute;
  right: 13px;
  top: 50%;
  margin: 0;
  transform: translateY(-50%);
}

.status-preview {
  margin: 16px 0 2px;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.45;
}

.status-preview[data-status="usual"] {
  color: #155d4b;
  background: var(--green-soft);
}

.status-preview[data-status="high"],
.status-preview[data-status="very_high"] {
  color: #963c39;
  background: var(--red-soft);
}

.status-preview[data-status="low"] {
  color: #315f8f;
  background: var(--blue-soft);
}

.form-divider {
  height: 1px;
  margin: 22px 0;
  background: var(--line);
}

.subheading {
  margin-bottom: 8px;
}

.counter-row {
  justify-content: space-between;
  gap: 14px;
  min-height: 68px;
  border-bottom: 1px solid #edf1ee;
}

.counter-row strong {
  display: block;
  margin-bottom: 3px;
  font-size: 14px;
}

.counter-row small {
  color: var(--muted);
  font-size: 11px;
}

.counter {
  display: grid;
  grid-template-columns: 36px 34px 36px;
  align-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 13px;
  overflow: hidden;
}

.counter button {
  height: 36px;
  border: 0;
  background: #f2f7f4;
  color: var(--green);
  font-size: 22px;
  cursor: pointer;
}

.counter output {
  font-weight: 800;
  text-align: center;
}

.wide-field {
  display: block;
  margin-top: 18px;
}

.wide-field em {
  font-weight: 400;
  font-style: normal;
}

.wide-field textarea {
  min-height: 68px;
  resize: vertical;
}

.primary-button {
  width: 100%;
  min-height: 52px;
  margin-top: 20px;
  border: 0;
  border-radius: 15px;
  padding: 13px 18px;
  color: white;
  background: linear-gradient(135deg, var(--green-2), var(--green));
  box-shadow: 0 9px 20px rgba(22, 107, 85, 0.2);
  font-weight: 800;
  cursor: pointer;
}

.primary-button:disabled {
  opacity: 0.6;
  cursor: wait;
}

.secondary-button {
  min-height: 48px;
  border: 1px solid rgba(44, 140, 110, 0.28);
  border-radius: 14px;
  padding: 11px 14px;
  color: var(--green);
  background: var(--green-soft);
  font-weight: 800;
  cursor: pointer;
}

.secondary-button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.primary-button.compact {
  margin-top: 12px;
}

.medical-note {
  max-width: 580px;
  margin: 16px auto 0;
  padding: 0 12px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}

.page-heading {
  align-items: flex-end;
  margin: 8px 0 20px;
}

.page-heading > p:last-child {
  color: var(--muted);
  line-height: 1.5;
}

.date-filter {
  min-width: 124px;
}

.date-filter input {
  width: 142px;
  border-radius: 12px;
  padding: 9px;
  background: var(--card);
  font-size: 12px;
}

.period-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-bottom: 15px;
  border-radius: 14px;
  padding: 4px;
  background: #e8eee9;
}

.period-tabs button {
  min-height: 39px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.period-tabs button.is-active {
  color: var(--ink);
  background: white;
  box-shadow: 0 3px 10px rgba(34, 61, 52, 0.08);
}

.summary-grid {
  grid-template-columns: 1.35fr 1fr 0.85fr;
  gap: 9px;
  margin-bottom: 14px;
}

.summary-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 17px;
  padding: 14px 12px;
  background: var(--card);
}

.summary-card span,
.summary-card small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.25;
}

.summary-card strong {
  display: block;
  margin: 7px 0 3px;
  font-size: clamp(20px, 6vw, 29px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.chart-card {
  padding: 18px 14px 10px;
}

.chart-heading {
  align-items: flex-start;
  padding: 0 4px 10px;
}

.chart-heading h3 {
  margin-bottom: 4px;
}

.chart-heading p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 11px;
}

.legend {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
}

.legend span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.legend i {
  width: 13px;
  height: 3px;
  border-radius: 2px;
}

.legend-sys {
  background: var(--red);
}

.legend-dia {
  background: var(--blue);
}

.chart-wrap {
  position: relative;
  min-height: 220px;
  overflow: hidden;
}

#pressure-chart {
  display: block;
  width: 100%;
  min-height: 220px;
  overflow: visible;
}

.chart-grid {
  stroke: #e5ece7;
  stroke-width: 1;
}

.chart-label {
  fill: #8a9991;
  font-size: 9px;
}

.chart-threshold {
  stroke: #dca09c;
  stroke-dasharray: 4 4;
  stroke-width: 1;
}

.chart-line-sys,
.chart-line-dia {
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-line-sys {
  stroke: var(--red);
}

.chart-line-dia {
  stroke: var(--blue);
}

.chart-point {
  stroke: white;
  stroke-width: 2;
}

.chart-point.usual {
  fill: var(--green-2);
}

.chart-point.high,
.chart-point.very_high {
  fill: var(--red);
}

.chart-point.low {
  fill: var(--blue);
}

.chart-hit {
  fill: transparent;
  cursor: pointer;
  outline: none;
  pointer-events: all;
  touch-action: manipulation;
}

.chart-hit:focus-visible {
  fill: rgba(44, 140, 110, 0.08);
}

.chart-tooltip {
  position: absolute;
  z-index: 4;
  top: 8px;
  display: grid;
  width: min(220px, calc(100% - 24px));
  transform: translateX(-50%);
  border: 1px solid rgba(22, 107, 85, 0.2);
  border-radius: 14px;
  padding: 11px 13px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 10px 28px rgba(24, 48, 41, 0.18);
  pointer-events: none;
  backdrop-filter: blur(10px);
}

.chart-tooltip::after {
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 10px;
  height: 10px;
  transform: translateX(-50%) rotate(45deg);
  border-right: 1px solid rgba(22, 107, 85, 0.2);
  border-bottom: 1px solid rgba(22, 107, 85, 0.2);
  background: white;
  content: "";
}

.chart-tooltip strong {
  margin-bottom: 3px;
  font-size: 11px;
}

.chart-tooltip span {
  color: var(--muted);
  font-size: 10px;
}

.chart-tooltip b {
  margin: 4px 0 1px;
  font-size: 24px;
  letter-spacing: -0.04em;
}

.chart-tooltip small {
  color: var(--muted);
  font-size: 9px;
}

.chart-tooltip[data-status="high"],
.chart-tooltip[data-status="very_high"] {
  border-color: rgba(198, 83, 79, 0.32);
}

.chart-tooltip[data-status="low"] {
  border-color: rgba(78, 127, 180, 0.32);
}

.empty-state {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  color: var(--muted);
  text-align: center;
}

.empty-state > span {
  margin-bottom: 6px;
  color: var(--green-2);
  font-size: 34px;
}

.empty-state p {
  max-width: 230px;
  margin: 5px 0 0;
  font-size: 12px;
}

.list-heading {
  margin: 22px 2px 10px;
}

.list-title-row {
  display: flex;
  align-items: center;
  gap: 9px;
}

.refresh-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(44, 140, 110, 0.25);
  border-radius: 50%;
  padding: 0;
  color: var(--green);
  background: var(--green-soft);
  font-size: 21px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.refresh-button.is-loading {
  animation: refresh-spin 700ms linear infinite;
}

@keyframes refresh-spin {
  to {
    transform: rotate(360deg);
  }
}

.entries-list,
.access-list {
  display: grid;
  gap: 10px;
}

.entry-card,
.access-card {
  border: 1px solid var(--line);
  border-radius: 17px;
  padding: 15px;
  background: var(--card);
}

.entry-card-top,
.entry-main,
.entry-meta,
.access-card {
  display: flex;
  align-items: center;
}

.entry-card-top {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.entry-card time {
  font-size: 12px;
  font-weight: 750;
}

.status-pill {
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 10px;
  font-weight: 800;
}

.status-pill.usual {
  color: #17624e;
  background: var(--green-soft);
}

.status-pill.high,
.status-pill.very_high {
  color: #9b3e3a;
  background: var(--red-soft);
}

.status-pill.low {
  color: #315f8f;
  background: var(--blue-soft);
}

.entry-main {
  justify-content: space-between;
}

.entry-pressure {
  font-size: 29px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.entry-pressure small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0;
}

.entry-pulse {
  color: var(--red);
  text-align: right;
}

.entry-pulse small {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.entry-pulse strong {
  display: block;
  font-size: clamp(22px, 6.5vw, 28px);
  font-weight: 850;
  line-height: 1;
}

.entry-meta {
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.entry-meta span {
  border-radius: 8px;
  padding: 5px 7px;
  color: var(--muted);
  background: #f2f6f3;
  font-size: 10px;
}

.entry-note {
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.delete-entry,
.revoke-button {
  border: 0;
  padding: 5px;
  color: #a25753;
  background: transparent;
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}

.share-card {
  margin-top: 18px;
  border-radius: 24px;
  padding: 26px 21px;
  color: white;
  background:
    radial-gradient(circle at 95% 5%, rgba(255, 255, 255, 0.16), transparent 10rem),
    linear-gradient(135deg, #1f7b61, #12503f);
  box-shadow: 0 16px 34px rgba(25, 90, 69, 0.18);
}

.share-card h3 {
  margin: 12px 0 8px;
  font-size: 22px;
}

.share-card p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  line-height: 1.55;
}

.share-icon {
  font-size: 30px;
}

.primary-button.light {
  color: var(--green);
  background: white;
  box-shadow: none;
}

.access-card {
  justify-content: space-between;
  gap: 12px;
}

.access-person {
  display: flex;
  align-items: center;
  gap: 10px;
}

.person-avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  color: var(--green);
  background: var(--green-soft);
  font-weight: 850;
}

.access-person strong,
.access-person small {
  display: block;
}

.access-person small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.privacy-card {
  align-items: flex-start;
  gap: 12px;
  margin-top: 22px;
  padding: 17px;
}

.privacy-card > span {
  font-size: 23px;
}

.privacy-card h3 {
  margin-bottom: 5px;
  font-size: 15px;
}

.privacy-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.statistics-heading {
  display: block;
}

.report-period-tabs {
  margin-bottom: 14px;
}

.statistics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.stat-highlight {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 15px;
  background: var(--card);
}

.stat-highlight.attention {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
}

.stat-highlight span,
.stat-highlight small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.stat-highlight strong {
  display: block;
  margin: 7px 0 4px;
  font-size: 28px;
  letter-spacing: -0.04em;
}

.stat-highlight.week {
  background: linear-gradient(145deg, #ffffff, #eaf6f0);
}

.stat-highlight.month {
  background: linear-gradient(145deg, #ffffff, #eef3f9);
}

.stat-highlight.attention strong {
  grid-row: 1 / 3;
  grid-column: 2;
  margin: 0;
  color: var(--red);
  font-size: 34px;
}

.report-card,
.calendar-card {
  margin-bottom: 12px;
  padding: 18px;
}

.report-card-heading {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.report-card-heading h3 {
  margin: 1px 0 4px;
}

.report-card-heading p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.report-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 21px;
  font-weight: 850;
}

.report-icon.mail {
  color: #5a659a;
  background: #edf0fa;
}

.report-icon.calendar {
  color: var(--amber);
  background: #fbf0df;
}

.report-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 16px;
}

.email-field {
  margin-top: 16px;
}

.report-availability {
  margin: 10px 2px 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.report-availability.is-ready {
  color: var(--green);
}

.calendar-controls {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 9px;
  margin-top: 16px;
}

.calendar-controls input {
  min-width: 0;
  border-radius: 13px;
  padding: 11px;
  color: var(--ink);
  background: #fbfdfb;
}

.bottom-nav {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: min(100%, 760px);
  min-height: calc(72px + var(--safe-bottom));
  padding: 7px 18px var(--safe-bottom);
  transform: translateX(-50%);
  border-top: 1px solid rgba(210, 222, 215, 0.9);
  background: rgba(251, 253, 251, 0.94);
  backdrop-filter: blur(18px);
}

.bottom-nav button {
  border: 0;
  border-radius: 13px;
  padding: 6px;
  color: #7d8b84;
  background: transparent;
  cursor: pointer;
}

.bottom-nav button > span,
.bottom-nav button > small {
  display: block;
}

.bottom-nav button > span {
  height: 29px;
  font-size: 23px;
  line-height: 29px;
}

.bottom-nav button > small {
  font-size: 10px;
  font-weight: 750;
}

.bottom-nav button.is-active {
  color: var(--green);
  background: var(--green-soft);
}

.loading-screen {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 13px;
  background: var(--paper);
  transition: opacity 200ms, visibility 200ms;
}

.loading-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.loading-screen span {
  width: 58px;
  height: 3px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--line);
}

.loading-screen span::after {
  display: block;
  width: 45%;
  height: 100%;
  border-radius: inherit;
  background: var(--green-2);
  content: "";
  animation: loading 900ms ease-in-out infinite alternate;
}

@keyframes loading {
  to {
    transform: translateX(125%);
  }
}

.toast {
  position: fixed;
  z-index: 60;
  left: 50%;
  bottom: calc(88px + var(--safe-bottom));
  max-width: calc(100% - 32px);
  transform: translate(-50%, 20px);
  border-radius: 13px;
  padding: 11px 15px;
  opacity: 0;
  visibility: hidden;
  color: white;
  background: #233a33;
  box-shadow: var(--shadow);
  font-size: 13px;
  text-align: center;
  transition: 180ms;
}

.toast.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
  visibility: visible;
}

.is-hidden {
  display: none !important;
}

@media (min-width: 650px) {
  .app-shell {
    padding-right: 24px;
    padding-left: 24px;
  }

  .hero {
    margin-right: 0;
    margin-left: 0;
    border-radius: 24px;
  }

  .entry-form {
    padding: 26px;
  }
}

@media (max-width: 430px) {
  .topbar {
    align-items: flex-start;
  }

  .summary-grid {
    grid-template-columns: 1.2fr 1fr;
  }

  .summary-card:last-child {
    grid-column: 1 / -1;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
  }

  .summary-card:last-child strong {
    margin-left: auto;
    margin-right: 5px;
  }

  .chart-heading {
    display: block;
  }

  .legend {
    flex-direction: row;
    margin-top: 10px;
  }

  .bottom-nav {
    padding-right: 8px;
    padding-left: 8px;
  }

  .bottom-nav button {
    padding-right: 2px;
    padding-left: 2px;
  }

  .calendar-controls {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
