:root {
  color-scheme: light;
  --bg: #e9e9e6;
  --surface: #fbfbfa;
  --surface-2: #f3f4f2;
  --line: #dedfdb;
  --line-strong: #c8cac5;
  --text: #242833;
  --muted: #6f7580;
  --faint: #9aa0a8;
  --accent: #2f8f7d;
  --accent-dark: #236f62;
  --accent-soft: #dceeea;
  --blue: #3567e8;
  --red: #d94848;
  --gray: #8a8f98;
  --green: #2f8f54;
  --shadow: 0 18px 50px rgba(31, 35, 41, 0.08);
  --radius: 8px;
  --sidebar-width: 260px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0) 280px),
    var(--bg);
}

body.modal-open {
  overflow: hidden;
}

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

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: 34px 18px 24px;
  border-right: 1px solid rgba(255, 255, 255, 0.72);
  background: rgba(246, 247, 246, 0.82);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 0 8px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  color: #fff;
  background: var(--accent);
  font-size: 15px;
  letter-spacing: 0.04em;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-item {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 0 14px;
  border: 0;
  border-radius: var(--radius);
  color: #4c535f;
  background: transparent;
  text-align: left;
  font-weight: 700;
  transition:
    background 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.nav-item:hover,
.nav-item:focus-visible,
.nav-item.is-active {
  color: var(--text);
  background: #fff;
  outline: none;
  box-shadow: 0 10px 28px rgba(31, 35, 41, 0.08);
}

.nav-item:hover {
  transform: translateX(2px);
}

.nav-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 800;
}

.sidebar-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-soft);
}

.workspace {
  min-width: 0;
  padding: 34px clamp(18px, 4vw, 48px) 48px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
  color: var(--text);
}

h1 {
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.05;
}

h2 {
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.08;
}

h3 {
  font-size: 20px;
  line-height: 1.2;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-box {
  width: min(420px, 42vw);
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 34px rgba(31, 35, 41, 0.06);
  color: var(--faint);
}

.search-box:focus-within {
  border-color: var(--accent);
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.view {
  display: none;
  animation: viewIn 220ms ease both;
}

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

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, 0.55fr) minmax(180px, 0.4fr);
  gap: 16px;
  align-items: stretch;
}

.hero-panel,
.accent-panel,
.panel,
.mini-metric {
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow);
}

.hero-panel {
  min-height: 240px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.36fr);
  gap: 24px;
  align-items: end;
  padding: clamp(22px, 4vw, 34px);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(246, 248, 247, 0.78)),
    repeating-linear-gradient(
      90deg,
      rgba(47, 143, 125, 0.08) 0,
      rgba(47, 143, 125, 0.08) 1px,
      transparent 1px,
      transparent 42px
    );
}

.hero-panel p:not(.eyebrow) {
  max-width: 620px;
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.hero-metrics {
  display: grid;
  gap: 10px;
}

.hero-chip {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 8px 24px rgba(31, 35, 41, 0.06);
  font-weight: 800;
}

.hero-chip span {
  color: var(--muted);
  font-weight: 700;
}

.accent-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 240px;
  padding: 22px;
  color: #fff;
  background:
    linear-gradient(145deg, rgba(47, 143, 125, 0.98), rgba(35, 111, 98, 0.98)),
    var(--accent);
}

.accent-panel span,
.accent-panel small {
  color: rgba(255, 255, 255, 0.76);
}

.accent-panel strong {
  font-size: clamp(42px, 6vw, 64px);
  line-height: 0.95;
}

.metric-stack {
  display: grid;
  gap: 16px;
}

.mini-metric {
  min-height: 112px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 20px;
}

.mini-metric span {
  color: var(--muted);
  font-weight: 700;
}

.mini-metric strong {
  font-size: 38px;
  line-height: 1;
}

.panel {
  padding: 22px;
}

.wide-panel {
  grid-column: span 2;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(310px, 0.42fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.form-panel {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 8px;
  color: #4f5661;
  font-size: 13px;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 13px;
  color: var(--text);
  background: #fff;
  outline: none;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease;
}

textarea {
  min-height: 96px;
  padding-top: 12px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.primary-button,
.ghost-button,
.icon-button {
  min-height: 44px;
  border: 0;
  border-radius: var(--radius);
  font-weight: 800;
  transition:
    transform 150ms ease,
    box-shadow 150ms ease,
    background 150ms ease;
}

.primary-button {
  padding: 0 18px;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 12px 28px rgba(47, 143, 125, 0.22);
}

.primary-button.small-action {
  min-height: 38px;
  padding: 0 14px;
  font-size: 13px;
  white-space: nowrap;
}

.primary-button:hover,
.ghost-button:hover,
.icon-button:hover {
  transform: translateY(-1px);
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  box-shadow: none;
  transform: none;
}

.ghost-button {
  padding: 0 16px;
  color: var(--text);
  background: #fff;
  box-shadow: 0 10px 28px rgba(31, 35, 41, 0.07);
}

.ghost-button.small {
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
}

.count-pill {
  min-width: 32px;
  display: inline-grid;
  place-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  font-size: 13px;
  font-weight: 900;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th,
td {
  padding: 15px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

td {
  color: #414853;
  font-size: 14px;
}

.person-cell,
.person-card-main,
.compact-person {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.avatar {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #fff;
  background: var(--accent);
  font-size: 13px;
  font-weight: 900;
}

.identity {
  min-width: 0;
}

.identity strong,
.record-card strong,
.entry-text strong {
  display: block;
  color: var(--text);
  font-size: 15px;
  line-height: 1.25;
}

.identity span,
.record-card span,
.entry-text span,
.empty-state span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.status-badge,
.tag {
  display: inline-flex;
  align-items: center;
  width: max-content;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  color: #4f5661;
  background: var(--surface-2);
  font-size: 12px;
  font-weight: 850;
}

.status-badge.is-active,
.tag.is-accent {
  color: var(--accent-dark);
  background: var(--accent-soft);
}

.row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.icon-button {
  min-width: 38px;
  min-height: 36px;
  padding: 0 10px;
  color: #49515c;
  background: var(--surface-2);
}

.icon-button.is-danger {
  color: var(--red);
  background: #fae6e6;
}

.record-list,
.compact-list,
.entry-list,
.person-cards {
  display: grid;
  gap: 12px;
}

.record-card,
.person-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  transition:
    border-color 150ms ease,
    transform 150ms ease,
    box-shadow 150ms ease;
}

.record-card:hover,
.person-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(31, 35, 41, 0.08);
}

.record-card-top,
.record-card-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.record-card-meta {
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.compact-list {
  gap: 10px;
}

.compact-person {
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.compact-person:last-child {
  border-bottom: 0;
}

.color-bars {
  display: grid;
  gap: 14px;
}

.bar-row {
  display: grid;
  grid-template-columns: 98px minmax(0, 1fr) 42px;
  gap: 12px;
  align-items: center;
}

.bar-label {
  color: #424954;
  font-weight: 850;
}

.bar-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-2);
}

.bar-fill {
  height: 100%;
  min-width: 4px;
  border-radius: inherit;
  transition: width 220ms ease;
}

.bar-value {
  color: var(--muted);
  font-weight: 900;
  text-align: right;
}

.heatmap {
  display: grid;
  grid-template-columns: repeat(7, minmax(26px, 1fr));
  gap: 8px;
}

.heat-cell {
  aspect-ratio: 1;
  border-radius: 7px;
  background: var(--surface-2);
}

.heat-cell[data-level="1"] {
  background: #dceeea;
}

.heat-cell[data-level="2"] {
  background: #a8d5ca;
}

.heat-cell[data-level="3"] {
  background: #68b6a6;
}

.heat-cell[data-level="4"] {
  background: #2f8f7d;
}

.blank-layout {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.people-index {
  position: sticky;
  top: 24px;
}

.person-cards {
  align-content: start;
  padding-right: 4px;
}

.person-card {
  min-height: 76px;
  padding: 12px 14px;
  border-color: transparent;
  background: #fff;
  text-align: left;
}

button.person-card {
  width: 100%;
}

.person-card.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.side-indicators {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.sheet-main {
  display: grid;
  gap: 16px;
}

.sheet-summary {
  display: block;
}

.sheet-summary p:not(.eyebrow) {
  margin: 10px 0 0;
  color: var(--muted);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.summary-item {
  display: grid;
  gap: 7px;
  min-height: 86px;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--surface-2);
}

.summary-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.summary-item strong {
  font-size: 30px;
  line-height: 1;
}

.monthly-panel {
  overflow: hidden;
}

.monthly-content {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.monthly-chart {
  overflow-x: auto;
}

.monthly-header,
.monthly-row {
  display: grid;
  grid-template-columns: 70px repeat(12, 45px);
  gap: 5px;
  align-items: end;
  min-width: 670px;
}

.monthly-header {
  margin-bottom: 8px;
  align-items: center;
}

.monthly-header strong {
  position: relative;
  color: #2f3540;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.monthly-header strong + strong::before {
  content: "";
  position: absolute;
  top: -6px;
  bottom: -6px;
  left: -3px;
  width: 2px;
  border-radius: 999px;
  background: rgba(188, 191, 188, 0.9);
}

.monthly-row {
  padding: 6px 0;
  border-top: 1px solid rgba(222, 223, 219, 0.64);
}

.monthly-header + .monthly-row {
  border-top: 0;
}

.monthly-label {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  min-height: 70px;
  border-radius: 7px;
  background: var(--surface-2);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
}

.monthly-label span,
.monthly-label strong {
  display: block;
}

.monthly-column {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 20px);
  grid-template-rows: repeat(var(--month-levels, 3), 20px);
  justify-content: center;
  gap: 5px;
}

.monthly-column + .monthly-column::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -3px;
  width: 2px;
  border-radius: 999px;
  background: rgba(188, 191, 188, 0.9);
}

.monthly-cell {
  display: block;
  width: 20px;
  height: 20px;
  aspect-ratio: 1;
  border-radius: 5px;
  background: #f0f1f0;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.7),
    0 4px 10px rgba(31, 35, 41, 0.04);
}

.monthly-cell.color-green[data-intensity="1"],
.monthly-cell.color-blue[data-intensity="1"],
.monthly-cell.color-red[data-intensity="1"],
.monthly-cell.color-gray[data-intensity="1"] {
  opacity: 0.52;
}

.monthly-cell.color-green[data-intensity="2"],
.monthly-cell.color-blue[data-intensity="2"],
.monthly-cell.color-red[data-intensity="2"],
.monthly-cell.color-gray[data-intensity="2"] {
  opacity: 0.68;
}

.monthly-cell.color-green[data-intensity="3"],
.monthly-cell.color-blue[data-intensity="3"],
.monthly-cell.color-red[data-intensity="3"],
.monthly-cell.color-gray[data-intensity="3"] {
  opacity: 0.84;
}

.monthly-cell.color-green[data-intensity="4"],
.monthly-cell.color-blue[data-intensity="4"],
.monthly-cell.color-red[data-intensity="4"],
.monthly-cell.color-gray[data-intensity="4"] {
  opacity: 1;
}

.entries-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.entries-table {
  min-width: 680px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}

.entries-table th,
.entries-table td {
  height: 64px;
  padding: 0 16px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
  vertical-align: middle;
}

.entries-table th:last-child,
.entries-table td:last-child {
  border-right: 0;
}

.entries-table tr:last-child td {
  border-bottom: 0;
}

.entries-table th {
  height: 48px;
  color: #5f6670;
  background: rgba(247, 248, 247, 0.86);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.entries-table th:nth-child(1),
.entries-table td:nth-child(1) {
  width: 132px;
}

.entries-table th:nth-child(2),
.entries-table td:nth-child(2) {
  width: 390px;
}

.entries-table th:nth-child(3),
.entries-table td:nth-child(3) {
  width: 150px;
  text-align: center;
}

.entries-table tbody tr {
  transition:
    background 150ms ease,
    box-shadow 150ms ease;
}

.entries-table tbody tr:hover td {
  background: #fbfcfb;
}

.entry-date-cell {
  color: #424954;
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.entry-line-cell {
  color: #2f3540;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.entry-line-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.entry-line-content span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entry-line-content .icon-button {
  flex: 0 0 auto;
  min-width: 78px;
  min-height: 32px;
  font-size: 12px;
}

.entry-color-cell {
  text-align: center;
}

.entry-color-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 7px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.6),
    0 8px 18px rgba(31, 35, 41, 0.1);
}

.app-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 22px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.app-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(24, 28, 34, 0.34);
  backdrop-filter: blur(10px);
}

.modal-panel {
  position: relative;
  width: min(560px, 100%);
  max-height: min(720px, calc(100svh - 44px));
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 26px 80px rgba(31, 35, 41, 0.22);
  transform: translateY(10px) scale(0.98);
  transition: transform 180ms ease;
}

.app-modal.is-open .modal-panel {
  transform: translateY(0) scale(1);
}

.modal-panel .form-panel {
  padding: 24px;
}

.modal-heading,
.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.modal-heading {
  margin-bottom: 6px;
}

.modal-actions {
  justify-content: flex-end;
  margin-top: 4px;
}

.empty-state {
  display: grid;
  gap: 6px;
  padding: 22px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.56);
}

.color-red {
  background: var(--red);
}

.color-blue {
  background: var(--blue);
}

.color-gray {
  background: var(--gray);
}

.color-green {
  background: var(--green);
}

.text-red {
  color: var(--red);
}

.text-blue {
  color: var(--blue);
}

.text-gray {
  color: var(--gray);
}

.text-green {
  color: var(--green);
}

@keyframes viewIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1120px) {
  .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-panel,
  .wide-panel {
    grid-column: 1 / -1;
  }

  .metric-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  .sidebar {
    position: static;
    min-height: auto;
    padding: 18px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.72);
  }

  .nav-list {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .nav-item {
    flex: 0 0 auto;
    width: auto;
    min-width: 148px;
  }

  .sidebar-foot {
    display: none;
  }

  .workspace {
    padding: 22px 16px 34px;
  }

  .topbar,
  .topbar-actions,
  .hero-panel,
  .section-grid,
  .blank-layout,
  .sheet-summary {
    grid-template-columns: 1fr;
  }

  .topbar,
  .topbar-actions {
    display: grid;
    align-items: stretch;
  }

  .search-box {
    width: 100%;
  }

  .people-index {
    position: static;
  }
}

@media (max-width: 680px) {
  .dashboard-grid,
  .metric-stack,
  .form-row,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .panel,
  .hero-panel,
  .accent-panel {
    padding: 18px;
  }

  .record-card-top,
  .record-card-meta,
  .panel-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .panel-actions {
    width: 100%;
    justify-content: space-between;
  }

  .primary-button.small-action {
    flex: 1 1 auto;
  }

  .monthly-content {
    grid-template-columns: 1fr;
  }

  .side-indicators {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-modal {
    padding: 12px;
  }

  .modal-panel .form-panel {
    padding: 18px;
  }

  .modal-heading,
  .modal-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .entries-table {
    min-width: 620px;
  }

  .entries-table th,
  .entries-table td {
    height: 58px;
    padding: 0 12px;
  }

  .entries-table th:nth-child(2),
  .entries-table td:nth-child(2) {
    width: 310px;
  }
}
