@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-Regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-SemiBold.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

:root {
  color: #20232b;
  background: #f5f6fa;
  font-family: "Inter", system-ui, sans-serif;
  font-synthesis: none;
  --ink: #20232b;
  --muted: #686d79;
  --line: #e4e7ee;
  --surface: #ffffff;
  --page: #f5f6fa;
  --primary: #3156d3;
  --primary-dark: #253b90;
  --sidebar: #18213b;
  --normal: #18794e;
  --normal-bg: #edf8f2;
  --warning: #8a5a0a;
  --warning-bg: #fff7e6;
  --danger: #b42318;
  --danger-bg: #fff1f0;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--page);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
}

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

a {
  color: inherit;
}

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 7px;
  background: var(--primary);
  color: #ffffff;
  font-weight: 600;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 16px;
}

.brand small {
  margin-top: 2px;
  color: #747987;
  font-size: 11px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #9caeff;
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 20;
  padding: 10px 14px;
  border-radius: 6px;
  background: #ffffff;
  color: var(--primary-dark);
  font-weight: 600;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Login */

.login-page {
  background: #f0f2fa;
}

.login-main {
  display: grid;
  grid-template-columns: minmax(0, 380px) minmax(360px, 440px);
  gap: 72px;
  align-items: center;
  justify-content: center;
  width: min(100% - 64px, 980px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 48px 0;
}

.login-brand {
  margin-bottom: 48px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.25;
}

.login-intro > p:last-child {
  margin: 16px 0 0;
  color: #5b5f6a;
  font-size: 15px;
  line-height: 1.65;
}

.login-form {
  padding: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 5px 10px rgb(52 60 88 / 8%);
}

.login-panel {
  min-width: 0;
}

.login-point-context {
  margin-bottom: 12px;
  padding: 18px 20px;
  border: 1px solid #d9ddea;
  border-left: 3px solid var(--primary);
  border-radius: 8px;
  background: var(--surface);
}

.login-point-context p,
.login-point-context h2,
.login-point-context span {
  display: block;
}

.login-point-context p {
  margin: 0 0 10px;
  color: #5b5f6a;
  font-size: 13px;
}

.login-point-code {
  color: var(--primary-dark);
  font-size: 13px;
  letter-spacing: 0.04em;
}

.login-point-context h2 {
  margin: 3px 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.login-point-context span {
  color: #5b5f6a;
  font-size: 13px;
  line-height: 1.55;
}

.field-label {
  display: block;
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
}

.field-input {
  width: 100%;
  height: 46px;
  margin: 0 0 20px;
  padding: 5px 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #eff0f6;
  color: var(--ink);
}

.field-input:hover {
  border-color: #d6d9e7;
}

.field-input:focus-visible {
  border-color: var(--primary);
  outline-offset: 1px;
  background: var(--surface);
}

.primary-button {
  width: 100%;
  min-height: 44px;
  margin-top: 8px;
  padding: 10px 20px;
  border: 2px solid transparent;
  border-radius: 6px;
  background: var(--primary);
  color: #ffffff;
  font-weight: 600;
  cursor: pointer;
}

.primary-button:hover {
  background: #4661e0;
}

.form-alert {
  margin: 0 0 24px;
  padding: 12px 14px;
  border: 1px solid #f0c6c6;
  border-radius: 8px;
  background: #fff4f4;
  color: #a32424;
  font-size: 14px;
  line-height: 1.5;
}

/* Authenticated application shell */

.app-page {
  background: var(--page);
}

.app-layout {
  display: flex;
  min-height: 100vh;
}

.app-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  width: 228px;
  height: 100vh;
  flex: 0 0 228px;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px 18px 20px;
  background: var(--sidebar);
  color: #ffffff;
}

.app-brand {
  padding: 0 8px 22px;
  border-bottom: 1px solid rgb(255 255 255 / 10%);
}

.app-brand .brand-mark {
  background: #ffffff;
  color: var(--primary-dark);
}

.app-brand small {
  color: rgb(255 255 255 / 58%);
  line-height: 1.35;
}

.desktop-nav {
  display: grid;
  gap: 4px;
  margin-top: 24px;
}

.desktop-nav a {
  position: relative;
  display: flex;
  min-height: 44px;
  gap: 12px;
  align-items: center;
  padding: 9px 12px;
  border-radius: 6px;
  color: rgb(255 255 255 / 68%);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.desktop-nav a::after {
  position: absolute;
  top: 11px;
  right: -18px;
  width: 3px;
  height: 22px;
  border-radius: 4px 0 0 4px;
  background: #ffffff;
  content: "";
  opacity: 0;
}

.desktop-nav a:hover {
  background: rgb(255 255 255 / 6%);
  color: #ffffff;
}

.desktop-nav a.active {
  background: rgb(255 255 255 / 10%);
  color: #ffffff;
}

.desktop-nav a.active::after {
  opacity: 1;
}

.nav-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: currentcolor;
}

.sidebar-user {
  display: flex;
  min-width: 0;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-top: 1px solid rgb(255 255 255 / 10%);
}

.user-initial {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: rgb(255 255 255 / 12%);
  font-size: 13px;
  font-weight: 600;
}

.user-copy,
.topbar-user-copy {
  min-width: 0;
}

.user-copy strong,
.user-copy small,
.topbar-user-copy strong,
.topbar-user-copy small {
  display: block;
}

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

.user-copy small {
  margin-top: 3px;
  color: rgb(255 255 255 / 55%);
  font-size: 11px;
}

.app-workspace {
  min-width: 0;
  flex: 1;
}

.app-topbar {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: flex-end;
  padding: 10px 32px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.mobile-brand {
  display: none;
  align-items: center;
  gap: 9px;
  text-decoration: none;
}

.mobile-brand .brand-mark {
  width: 34px;
  height: 34px;
}

.topbar-user {
  display: flex;
  min-width: 0;
  gap: 18px;
  align-items: center;
}

.topbar-user-copy {
  text-align: right;
}

.topbar-user-copy strong {
  overflow: hidden;
  max-width: 210px;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-user-copy small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.topbar-user form {
  margin: 0;
}

.logout-button {
  display: inline-flex;
  min-height: 40px;
  gap: 7px;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid #d9dce5;
  border-radius: 6px;
  background: #ffffff;
  color: #474b57;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.logout-button:hover {
  border-color: #b8bdca;
  background: #f7f8fb;
}

.logout-button .nav-icon {
  width: 18px;
  height: 18px;
}

.app-content {
  width: min(100%, 1240px);
  margin: 0 auto;
  padding: 34px 38px 56px;
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 24px;
}

.page-heading h1 {
  font-size: 28px;
}

.page-heading p,
.section-heading p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.operational-summary {
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
}

.operational-summary dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
}

.operational-summary dl > div {
  display: flex;
  min-width: 0;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 20px;
  border-right: 1px solid var(--line);
}

.operational-summary dl > div:last-child {
  border-right: 0;
}

.operational-summary dt {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.operational-summary dd {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  font-weight: 600;
}

.daily-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  margin: 0 0 18px;
  padding: 11px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  font-size: 13px;
}

.daily-summary-label {
  color: var(--ink);
  font-weight: 600;
}

.daily-summary-detail {
  color: var(--muted);
}

.daily-summary-alert {
  color: var(--danger);
  font-weight: 600;
}

.monitoring-section {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.section-heading h2 {
  margin: 0;
  font-size: 16px;
}

.point-count {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
}

.point-group {
  padding: 4px 20px 6px;
}

.point-group + .point-group {
  border-top: 1px solid var(--line);
}

.point-group-title {
  margin: 0;
  padding: 10px 0 2px;
  color: #8b909b;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.point-list {
  display: flex;
  flex-direction: column;
}

.point-row {
  padding: 11px 0;
  border-top: 1px solid #eceef3;
}

.point-row:first-child {
  border-top: 0;
}

.point-row-head {
  display: grid;
  grid-template-columns: 26px 1fr;
  column-gap: 10px;
}

.point-code {
  padding-top: 1px;
  color: #9298a3;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.point-identity {
  min-width: 0;
}

.point-name {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 600;
}

.point-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 3px 12px;
  margin: 2px 0 0;
  font-size: 12px;
}

.point-location {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--muted);
}

.point-range {
  flex: 0 0 auto;
  color: #4d515c;
  font-weight: 600;
  white-space: nowrap;
}

.point-periods {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 8px;
  padding-left: 36px;
}

.period-row {
  display: grid;
  grid-template-columns: 38px 1fr;
  column-gap: 10px;
}

.period-label {
  padding-top: 1px;
  color: #8b909b;
  font-size: 11px;
  font-weight: 600;
}

.period-detail {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.period-value {
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.period-value--below,
.period-value--above {
  color: var(--danger);
}

.period-meta {
  overflow-wrap: anywhere;
  color: #797e89;
  font-size: 11.5px;
}

.period-empty {
  padding-top: 1px;
  color: var(--muted);
  font-size: 12.5px;
}

.status-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: currentcolor;
}

.status--normal {
  background: var(--normal-bg);
  color: var(--normal);
}

.status--below,
.status--above {
  background: var(--danger-bg);
  color: var(--danger);
}

.empty-state {
  padding: 62px 24px 66px;
  text-align: center;
}

.empty-state-icon {
  display: inline-grid;
  width: 46px;
  height: 46px;
  margin-bottom: 14px;
  place-items: center;
  border-radius: 50%;
  background: #f0f2f7;
  color: #747b8c;
}

.empty-state-icon .nav-icon {
  width: 22px;
  height: 22px;
}

.empty-state h2,
.empty-state h3 {
  margin: 0;
  font-size: 16px;
}

.empty-state p {
  max-width: 430px;
  margin: 8px auto 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.placeholder-state {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
}

.text-link {
  display: inline-block;
  margin-top: 18px;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 600;
}

/* Temperature entry */

.entry-column {
  width: min(100%, 620px);
  margin: 0 auto;
}

.entry-heading {
  margin-bottom: 20px;
}

.temperature-form,
.entry-success,
.entry-empty-state {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
}

.temperature-form {
  padding: 26px;
}

.entry-field {
  min-width: 0;
  margin: 0 0 24px;
}

fieldset.entry-field {
  padding: 0;
  border: 0;
}

.entry-label {
  display: block;
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.entry-label span {
  color: var(--muted);
  font-weight: 400;
}

.entry-control {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 10px 13px;
  border: 1px solid #d9dce5;
  border-radius: 7px;
  background: #ffffff;
  color: var(--ink);
}

.entry-control:hover {
  border-color: #b8bdca;
}

.entry-control:focus-visible {
  border-color: var(--primary);
  outline-offset: 1px;
}

.entry-control[aria-invalid="true"] {
  border-color: var(--danger);
}

.entry-textarea {
  min-height: 88px;
  resize: vertical;
  line-height: 1.5;
}

.point-detail {
  display: grid;
  gap: 4px;
  margin-top: 10px;
  padding: 12px 13px;
  border-radius: 7px;
  background: #f6f7fa;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.point-detail[hidden],
.predicted-status[hidden],
.predicted-status p[hidden] {
  display: none;
}

.point-detail strong {
  color: var(--ink);
  font-size: 13px;
}

.fixed-point-context {
  margin: 0 0 24px;
  padding: 16px;
  border: 1px solid #cfd5e3;
  border-radius: 8px;
  background: #f7f8fb;
}

.fixed-point-context > span,
.fixed-point-context p {
  color: var(--muted);
  font-size: 12px;
}

.fixed-point-context h2 {
  margin: 5px 0 3px;
  color: var(--ink);
  font-size: 18px;
}

.fixed-point-context p {
  margin: 0 0 10px;
}

.fixed-point-context > strong {
  font-size: 13px;
}

.slot-conflict-alert {
  border-color: #e6c69a;
  background: #fdf6ec;
  color: #8a5300;
}

.form-alert-hint {
  display: block;
  margin-top: 6px;
  font-weight: 600;
}

.daily-slot-status {
  margin: 0 0 24px;
  padding: 14px 16px;
  border: 1px solid #dfe3ed;
  border-radius: 8px;
  background: #fafbfe;
}

.daily-slot-status[hidden] {
  display: none;
}

.daily-slot-status h2 {
  margin: 0 0 10px;
}

.daily-slot-status ul {
  display: grid;
  margin: 0;
  padding: 0;
  gap: 8px;
  list-style: none;
}

.daily-slot-status li {
  display: flex;
  min-width: 0;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
}

.daily-slot-status li strong {
  color: var(--ink);
  font-size: 13px;
}

.daily-slot-status li span {
  color: var(--muted);
  text-align: right;
}

.daily-slot-status li[data-recorded="true"] span {
  color: var(--normal);
  font-weight: 600;
}

.daily-slot-complete {
  margin: 12px 0 0;
  padding-top: 11px;
  border-top: 1px solid #e4e8f0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
}

.daily-slot-complete[hidden] {
  display: none;
}

.daily-slot-complete-hint {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 400;
}

.server-time-value {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

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

.period-options label {
  position: relative;
  cursor: pointer;
}

.period-options input {
  position: absolute;
  opacity: 0;
}

.period-options span {
  display: grid;
  min-height: 48px;
  place-items: center;
  border: 1px solid #d9dce5;
  border-radius: 7px;
  background: #ffffff;
  font-size: 14px;
  font-weight: 600;
}

.period-options input:checked + span {
  border-color: var(--primary);
  background: #f0f3ff;
  color: var(--primary-dark);
}

.period-options input:focus-visible + span {
  outline: 3px solid #9caeff;
  outline-offset: 3px;
}

.period-options label[data-unavailable="true"] {
  cursor: not-allowed;
}

.period-options input:disabled + span {
  border-color: #e2e5ec;
  background: #f4f5f8;
  color: var(--muted);
}

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

.period-options small[hidden] {
  display: none;
}

.temperature-field {
  padding: 20px;
  border: 1px solid #dfe3ed;
  border-radius: 9px;
  background: #fafbfe;
}

.temperature-control {
  display: flex;
  min-width: 0;
  align-items: center;
  border: 1px solid #cfd4e1;
  border-radius: 8px;
  background: #ffffff;
}

.temperature-control:focus-within {
  border-color: var(--primary);
  outline: 3px solid #9caeff;
  outline-offset: 2px;
}

.temperature-control.has-error {
  border-color: var(--danger);
}

.temperature-control input {
  width: 100%;
  min-width: 0;
  height: 66px;
  padding: 8px 12px 8px 18px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 30px;
  font-weight: 600;
  text-align: center;
}

.temperature-control > span {
  padding-right: 18px;
  color: var(--muted);
  font-size: 19px;
  font-weight: 600;
}

.field-help,
.field-error {
  margin: 7px 0 0;
  font-size: 12px;
  line-height: 1.45;
}

.field-help {
  color: var(--muted);
}

.field-error {
  color: var(--danger);
  font-weight: 600;
}

.predicted-status {
  display: grid;
  gap: 4px;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 7px;
  font-size: 12px;
}

.predicted-status strong {
  font-size: 14px;
}

.predicted-status p {
  margin: 5px 0 0;
  line-height: 1.45;
}

.predicted-status--normal {
  background: var(--normal-bg);
  color: var(--normal);
}

.predicted-status--below,
.predicted-status--above {
  background: var(--danger-bg);
  color: var(--danger);
}

.entry-submit {
  min-height: 50px;
  margin-top: 2px;
}

.entry-success {
  padding: 34px 30px;
  text-align: center;
}

.success-check {
  display: grid;
  width: 44px;
  height: 44px;
  margin: 0 auto 18px;
  place-items: center;
  border-radius: 50%;
  background: var(--normal-bg);
  color: var(--normal);
  font-size: 21px;
  font-weight: 600;
}

.success-code,
.success-range,
.success-time {
  color: var(--muted);
}

.success-code {
  margin: 0 0 5px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.entry-success h2 {
  margin: 0;
  font-size: 18px;
}

.success-temperature {
  margin: 22px 0 10px;
  color: var(--ink);
  font-size: 38px;
  font-weight: 600;
}

.entry-success .status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.success-range,
.success-time {
  margin: 9px 0 0;
  font-size: 13px;
}

.success-time {
  color: var(--ink);
  font-weight: 600;
}

.abnormal-note {
  max-width: 440px;
  margin: 20px auto 0;
  padding: 12px 14px;
  border-radius: 7px;
  background: var(--danger-bg);
  color: var(--danger);
  font-size: 12px;
  line-height: 1.5;
}

.success-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 28px;
}

.success-actions .primary-button,
.secondary-button {
  display: grid;
  min-height: 48px;
  margin: 0;
  place-items: center;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.secondary-button {
  border: 1px solid #cfd4e1;
  background: #ffffff;
  color: #424752;
}

.secondary-button:hover {
  background: #f7f8fb;
}

.entry-empty-state {
  padding: 48px 24px;
}

/* Monthly monitoring */

.monitoring-page-heading {
  margin-bottom: 20px;
}

.monitoring-filters {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 190px auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
}

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

.filter-field label {
  display: block;
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}

.filter-field select,
.filter-field input {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 8px 11px;
  border: 1px solid #d9dce5;
  border-radius: 7px;
  background: #ffffff;
  color: var(--ink);
}

.filter-field select:hover,
.filter-field input:hover {
  border-color: #b8bdca;
}

.filter-field select:focus-visible,
.filter-field input:focus-visible {
  border-color: var(--primary);
  outline-offset: 1px;
}

.filter-submit {
  min-height: 44px;
  padding: 9px 18px;
  border: 1px solid var(--primary);
  border-radius: 6px;
  background: var(--primary);
  color: #ffffff;
  font-weight: 600;
  cursor: pointer;
}

.filter-submit:hover {
  background: #4661e0;
}

.filter-notice,
.archive-notice {
  margin: -6px 0 18px;
  padding: 10px 12px;
  border-radius: 7px;
  font-size: 12px;
  line-height: 1.5;
}

.filter-notice {
  background: var(--warning-bg);
  color: var(--warning);
}

.archive-notice {
  background: #eff1f5;
  color: #555b68;
}

.monitoring-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
}

.monitoring-context-copy {
  min-width: 0;
}

.monitoring-context-copy > span {
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.monitoring-context h2 {
  margin: 5px 0 0;
  font-size: 18px;
}

.monitoring-context p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.configured-range {
  flex: 0 0 auto;
  padding-left: 24px;
  border-left: 1px solid var(--line);
  text-align: right;
}

.configured-range span,
.configured-range strong {
  display: block;
}

.configured-range span {
  color: var(--muted);
  font-size: 11px;
}

.configured-range strong {
  margin-top: 4px;
  font-size: 17px;
}

.monthly-summary dl {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.monthly-summary dl > div {
  display: block;
}

.monthly-summary dd {
  margin-top: 5px;
}

.curve-panel,
.history-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
}

.curve-panel {
  margin-bottom: 24px;
}

.curve-panel-heading {
  border-bottom: 0;
  padding-bottom: 10px;
}

.inline-empty-state {
  display: grid;
  gap: 4px;
  margin: 0 22px 6px;
  padding: 11px 13px;
  border-radius: 7px;
  background: #f6f7fa;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.inline-empty-state strong {
  color: var(--ink);
  font-size: 13px;
}

.chart-container {
  position: relative;
  width: 100%;
  height: 380px;
  padding: 8px 18px 12px;
}

.chart-container canvas {
  max-width: 100%;
}

.chart-help {
  margin: 0;
  padding: 0 22px 18px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.reading-history-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  text-align: left;
}

.reading-history-table th {
  padding: 12px 14px;
  background: #fafbfc;
  color: #777c87;
  font-size: 11px;
  font-weight: 600;
}

.reading-history-table th:nth-child(1) { width: 19%; }
.reading-history-table th:nth-child(2) { width: 10%; }
.reading-history-table th:nth-child(3) { width: 20%; }
.reading-history-table th:nth-child(4) { width: 18%; }
.reading-history-table th:nth-child(5) { width: 25%; }
.reading-history-table th:nth-child(6) { width: 12%; }

.reading-history-table td {
  padding: 14px;
  border-top: 1px solid #eceef3;
  color: #4d515c;
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  vertical-align: top;
}

.reading-history-table tbody tr:first-child td {
  border-top: 0;
}

.reading-history-table tbody tr:hover {
  background: #fcfcfd;
}

.reading-history-table td > strong,
.reading-history-table td > time {
  display: block;
}

.reading-history-table td > strong:first-child {
  color: var(--ink);
  font-weight: 600;
}

.reading-history-table time {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.history-temperature {
  margin-bottom: 6px;
  font-size: 13px;
}

.reading-history-table .status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
}

.history-note {
  white-space: normal;
}

.history-note > span:first-child {
  white-space: pre-wrap;
}

.history-note > span,
.correction-audit span,
.correction-audit time,
.history-effective-label,
.history-chain-label,
.history-action-unavailable {
  display: block;
}

.history-reading--superseded {
  background: #f8fafc;
}

.history-effective-label,
.history-chain-label,
.history-action-unavailable {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.correction-audit {
  margin-top: 8px;
  padding-left: 9px;
  border-left: 2px solid #c8ccd5;
  color: var(--muted);
  font-size: 11px;
}

.correction-audit strong {
  display: block;
  color: var(--ink);
}

.correction-audit .correction-time-change {
  color: var(--ink);
  font-weight: 600;
}

.history-correction-action {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border: 1px solid #c8ccd5;
  border-radius: 6px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
}

.history-correction-action:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.correction-confirmation {
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid #a7d7c5;
  border-radius: 7px;
  background: #f0fdf8;
  color: #126149;
  font-size: 12px;
  font-weight: 600;
}

.correction-context {
  margin-bottom: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.correction-context h2,
.correction-context p {
  margin: 4px 0 0;
}

.correction-context > div > span,
.correction-context dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.correction-context dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
  margin: 16px 0 0;
}

.correction-context dd {
  margin: 3px 0 0;
  font-size: 12px;
  font-weight: 600;
}

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

.history-empty-state,
.monitoring-empty-state {
  padding-top: 48px;
  padding-bottom: 52px;
}

/* Formal monthly report */

.report-page-heading {
  margin-bottom: 20px;
}

.report-filter-error {
  background: var(--danger-bg);
  color: var(--danger);
}

.report-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 18px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
}

.report-identity {
  min-width: 0;
}

.report-identity > span {
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.report-identity h2 {
  margin: 5px 0 0;
  font-size: 19px;
}

.report-identity p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.report-metadata {
  display: flex;
  flex: 0 0 auto;
  gap: 0;
  margin: 0;
}

.report-metadata > div {
  min-width: 126px;
  padding: 2px 18px;
  border-left: 1px solid var(--line);
}

.report-metadata dt {
  color: var(--muted);
  font-size: 10px;
}

.report-metadata dd {
  margin: 5px 0 0;
  font-size: 13px;
  font-weight: 600;
}

.report-summary dl {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.report-table-panel {
  overflow: hidden;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  text-align: left;
}

.report-table th {
  padding: 11px 10px;
  background: #fafbfc;
  color: #777c87;
  font-size: 10px;
  font-weight: 600;
}

.report-table td,
.report-table tbody th {
  padding: 11px 10px;
  border-top: 1px solid #eceef3;
  background: #ffffff;
  color: #4d515c;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.45;
  overflow-wrap: anywhere;
  vertical-align: top;
}

.report-table tbody tr:first-child td,
.report-table tbody tr:first-child th {
  border-top: 0;
}

.report-table tbody tr:hover td,
.report-table tbody tr:hover th {
  background: #fcfcfd;
}

.report-table tbody th {
  color: var(--ink);
  font-weight: 600;
}

.report-table td > strong,
.report-table td > time,
.report-table td > span,
.report-table td > small {
  display: block;
}

.report-table td > strong {
  color: var(--ink);
  font-size: 12px;
}

.report-table td > time,
.report-table td > small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.report-table--refrigerator th:nth-child(1) { width: 7%; }
.report-table--refrigerator th:nth-child(2),
.report-table--refrigerator th:nth-child(4) { width: 13%; }
.report-table--refrigerator th:nth-child(3),
.report-table--refrigerator th:nth-child(5) { width: 16%; }
.report-table--refrigerator th:nth-child(6) { width: 35%; }

.report-table--room th:nth-child(1) { width: 6%; }
.report-table--room th:nth-child(2),
.report-table--room th:nth-child(5) { width: 8%; }
.report-table--room th:nth-child(3),
.report-table--room th:nth-child(6) { width: 11%; }
.report-table--room th:nth-child(4),
.report-table--room th:nth-child(7) { width: 13%; }
.report-table--room th:nth-child(8) { width: 30%; }

.status-text {
  margin-top: 3px;
  font-size: 9px;
  font-weight: 600;
}

.status-text--normal {
  color: var(--normal);
}

.status-text--below,
.status-text--above {
  color: var(--danger);
}

.report-note {
  white-space: normal;
}

.report-curve-panel {
  margin-bottom: 24px;
}

.excel-readiness {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
}

.readiness-label {
  color: var(--normal);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.excel-readiness h2 {
  margin: 5px 0 0;
  font-size: 16px;
}

.excel-readiness p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.report-download-actions {
  display: flex;
  min-width: 0;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.report-download-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  flex: 0 0 auto;
  padding: 0 13px;
  border: 1px solid #cbd0dc;
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
}

.report-download-link:hover {
  background: #f2f4f8;
}

.report-download-link--muted {
  color: var(--muted);
}

.report-download-divider {
  width: 1px;
  height: 20px;
  flex: 0 0 auto;
  background: var(--line);
}

.report-empty-state {
  padding-top: 52px;
  padding-bottom: 56px;
}

/* Admin monitoring points */

.admin-page-heading {
  align-items: center;
}

.admin-create-button,
.admin-edit-link,
.admin-status-button {
  min-height: 42px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

.admin-create-button {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  padding: 9px 16px;
  background: var(--primary);
  color: #ffffff;
  text-decoration: none;
}

.admin-confirmation {
  margin: -6px 0 18px;
  padding: 11px 13px;
  border-radius: 7px;
  background: var(--normal-bg);
  color: var(--normal);
  font-size: 12px;
  font-weight: 600;
}

.admin-points-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
}

.admin-point-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  text-align: left;
}

.admin-point-table th {
  padding: 12px 16px;
  background: #fafbfc;
  color: #777c87;
  font-size: 11px;
  font-weight: 600;
}

.admin-point-table th:nth-child(1) { width: 30%; }
.admin-point-table th:nth-child(2) { width: 27%; }
.admin-point-table th:nth-child(3) { width: 15%; }
.admin-point-table th:nth-child(4) { width: 28%; }

.admin-point-table td {
  padding: 16px;
  border-top: 1px solid var(--line);
  color: #4d515c;
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  vertical-align: middle;
}

.admin-point-table tbody tr:first-child td {
  border-top: 0;
}

.admin-point-table td > strong,
.admin-point-table td > span,
.admin-point-table td > small {
  display: block;
}

.admin-point-table td > strong {
  color: var(--ink);
}

.admin-point-table td > span,
.admin-point-table td > small {
  margin-top: 3px;
  color: var(--muted);
}

.admin-point-table .admin-official-source-label {
  width: fit-content;
  margin-top: 7px;
  padding: 3px 7px;
  border: 1px solid #d8dde7;
  border-radius: 4px;
  background: #f7f8fa;
  color: #555b68;
  font-weight: 600;
}

.admin-point-table .admin-point-status {
  display: inline-flex;
  margin: 0;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.admin-point-status--active {
  background: var(--normal-bg);
  color: var(--normal) !important;
}

.admin-point-status--inactive {
  background: #eff1f5;
  color: #555b68 !important;
}

.admin-point-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-point-actions form {
  margin: 0;
}

.admin-protected-action {
  display: inline-grid;
  min-height: 42px;
  place-items: center;
  padding: 8px 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.admin-edit-link,
.admin-status-button {
  display: inline-grid;
  place-items: center;
  padding: 8px 11px;
  border: 1px solid #cfd4e1;
  background: #ffffff;
  color: #424752;
  cursor: pointer;
  text-decoration: none;
}

.admin-status-button:hover,
.admin-edit-link:hover {
  background: #f7f8fb;
}

.admin-point-form-column {
  width: min(100%, 760px);
  margin: 0 auto;
}

.admin-form-heading {
  margin-bottom: 20px;
}

.admin-point-form {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
}

.admin-official-source-notice {
  margin: 0 0 22px;
  padding: 12px 14px;
  border: 1px solid #d8dde7;
  border-radius: 7px;
  background: #f7f8fa;
  color: #555b68;
  font-size: 12px;
  line-height: 1.55;
}

.admin-official-source-notice strong {
  display: block;
  color: var(--ink);
}

.admin-point-form .entry-control:disabled,
.admin-point-form .entry-control[readonly] {
  background: #f2f3f6;
  color: #555b68;
  cursor: not-allowed;
}

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

.admin-range-field {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-range-field > legend {
  padding: 0 5px;
}

.admin-range-field .entry-field {
  margin-bottom: 0;
}

.admin-form-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 10px;
  margin-top: 26px;
}

.admin-form-actions .primary-button {
  min-height: 48px;
  margin: 0;
}

.admin-password-form {
  margin-top: 20px;
}

.admin-password-heading {
  margin: 0 0 18px;
  font-size: 15px;
}

.admin-password-form .admin-form-actions {
  grid-template-columns: minmax(0, 1fr);
}

.admin-password-form .secondary-button {
  min-height: 48px;
}

/* Printable monitoring-point QR labels */

.qr-page-heading {
  align-items: center;
}

.qr-print-button {
  width: auto;
  min-width: 120px;
}

.qr-label-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.qr-label {
  display: grid;
  min-width: 0;
  justify-items: center;
  padding: 24px;
  border: 1px solid #cfd3dc;
  border-radius: 8px;
  background: #ffffff;
  color: #111111;
  text-align: center;
}

.qr-label header {
  width: 100%;
}

.qr-label h2 {
  margin: 0;
  font-size: 18px;
}

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

.qr-label header strong {
  margin-top: 5px;
  font-size: 14px;
}

.qr-label header span {
  margin-top: 3px;
  color: #424752;
  font-size: 12px;
}

.qr-code {
  width: min(100%, 210px);
  margin: 18px auto 10px;
  color: #000000;
}

.qr-code svg {
  display: block;
  width: 100%;
  height: auto;
  background: #ffffff;
}

.qr-label p {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}

.qr-label small {
  max-width: 100%;
  margin-top: 8px;
  color: #555b66;
  font-size: 9px;
  overflow-wrap: anywhere;
}

.mobile-nav {
  display: none;
}

@media (max-width: 1100px) {
  .app-content {
    padding-right: 28px;
    padding-left: 28px;
  }

  .operational-summary dl > div {
    display: block;
  }

  .operational-summary dd {
    margin-top: 5px;
  }

  .monitoring-filters {
    grid-template-columns: minmax(210px, 1fr) 175px auto;
    gap: 10px;
  }

  .monthly-summary dl > div {
    padding-right: 14px;
    padding-left: 14px;
  }

  .report-header {
    align-items: flex-start;
  }

  .report-metadata {
    display: grid;
  }

  .report-metadata > div {
    min-width: 150px;
    padding-top: 5px;
    padding-bottom: 5px;
  }

  .report-table th,
  .report-table td,
  .report-table tbody th {
    padding-right: 7px;
    padding-left: 7px;
  }
}

@media (max-width: 900px) {
  .app-sidebar {
    display: none;
  }

  .app-topbar {
    justify-content: space-between;
    padding-right: 24px;
    padding-left: 24px;
  }

  .mobile-brand {
    display: inline-flex;
  }

  .app-content {
    padding-bottom: 96px;
  }

  .mobile-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 10;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    min-height: 68px;
    padding: 5px max(10px, env(safe-area-inset-right)) max(5px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
    border-top: 1px solid var(--line);
    background: rgb(255 255 255 / 97%);
  }

  .mobile-nav--admin {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .mobile-nav--staff {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .mobile-nav a {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 56px;
    flex-direction: column;
    gap: 3px;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    color: #747986;
    font-size: 10px;
    font-weight: 600;
    text-decoration: none;
  }

  .mobile-nav a.active {
    background: #f0f3ff;
    color: var(--primary-dark);
  }

  .mobile-nav a.active::before {
    position: absolute;
    top: 2px;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: var(--primary);
    content: "";
  }

  .mobile-nav .nav-icon {
    width: 21px;
    height: 21px;
  }
}

@media (max-width: 760px) {
  .login-main {
    display: block;
    width: min(100% - 40px, 480px);
    padding: 40px 0;
  }

  .login-intro {
    margin-bottom: 28px;
  }

  .login-brand {
    margin-bottom: 32px;
  }

  .app-content {
    padding: 26px 20px 94px;
  }

  .page-heading {
    margin-bottom: 20px;
  }

  .page-heading h1 {
    font-size: 24px;
  }

  .qr-page-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .qr-print-button {
    width: 100%;
  }

  .qr-label-grid {
    grid-template-columns: 1fr;
  }

  .admin-page-heading {
    align-items: stretch;
    flex-direction: column;
    gap: 16px;
  }

  .admin-create-button {
    width: 100%;
  }

  .admin-point-table,
  .admin-point-table tbody,
  .admin-point-table tr,
  .admin-point-table td {
    display: block;
    width: 100%;
  }

  .admin-point-table thead {
    display: none;
  }

  .admin-point-table tr {
    padding: 17px 16px;
    border-top: 1px solid var(--line);
  }

  .admin-point-table tbody tr:first-child {
    border-top: 0;
  }

  .admin-point-table td {
    padding: 0;
    border: 0;
  }

  .admin-point-table td + td {
    margin-top: 15px;
  }

  .admin-point-table td::before {
    display: block;
    margin-bottom: 5px;
    color: #858a95;
    content: attr(data-label);
    font-size: 10px;
  }

  .admin-form-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .operational-summary dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .operational-summary dl > div {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
  }

  .operational-summary dl > div:nth-child(2) {
    border-right: 0;
  }

  .operational-summary dl > div:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .section-heading {
    align-items: flex-start;
    padding: 17px 16px;
  }

  .monitoring-filters {
    grid-template-columns: minmax(0, 1fr) 180px;
  }

  .filter-submit {
    grid-column: 1 / -1;
  }

  .monitoring-context {
    align-items: flex-start;
  }

  .monthly-summary dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .monthly-summary dl > div:nth-child(2n) {
    border-right: 0;
  }

  .monthly-summary dl > div:nth-last-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .monthly-summary dl > div:last-child {
    grid-column: 1 / -1;
    border-right: 0;
    border-bottom: 0;
  }

  .chart-container {
    height: 330px;
    padding-right: 10px;
    padding-left: 10px;
  }

  .reading-history-table,
  .reading-history-table tbody,
  .reading-history-table tr,
  .reading-history-table td {
    display: block;
    width: 100%;
  }

  .reading-history-table thead {
    display: none;
  }

  .reading-history-table tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px;
    padding: 16px;
    border-top: 1px solid var(--line);
  }

  .reading-history-table tbody tr:first-child {
    border-top: 0;
  }

  .reading-history-table td {
    padding: 0;
    border: 0;
  }

  .reading-history-table td::before {
    display: block;
    margin-bottom: 5px;
    color: #858a95;
    content: attr(data-label);
    font-size: 10px;
  }

  .reading-history-table td:first-child,
  .reading-history-table .history-note {
    grid-column: 1 / -1;
  }

  .report-header {
    display: block;
    padding: 18px;
  }

  .report-metadata {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
  }

  .report-metadata > div {
    min-width: 0;
    padding: 2px 12px 2px 0;
    border-left: 0;
  }

  .report-summary dl {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .report-summary dl > div,
  .report-summary dl > div:nth-child(2),
  .report-summary dl > div:nth-last-child(-n + 2) {
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  .report-summary dl > div:last-child {
    border-right: 0;
  }

  .report-table,
  .report-table tbody,
  .report-table tr,
  .report-table td,
  .report-table tbody th {
    display: block;
    width: 100%;
  }

  .report-table thead {
    display: none;
  }

  .report-table tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px 16px;
    padding: 16px;
    border-top: 1px solid var(--line);
  }

  .report-table tbody tr:first-child {
    border-top: 0;
  }

  .report-table td,
  .report-table tbody th {
    padding: 0;
    border: 0;
    background: transparent;
  }

  .report-table td::before,
  .report-table tbody th::before {
    display: block;
    margin-bottom: 5px;
    color: #858a95;
    content: attr(data-label);
    font-size: 9px;
    font-weight: 400;
  }

  .report-table tbody th,
  .report-table .report-note {
    grid-column: 1 / -1;
  }

  .report-table.report-table--refrigerator tbody th,
  .report-table.report-table--room tbody th {
    width: 100%;
    padding-bottom: 8px;
    border-bottom: 1px solid #eceef3;
  }

  .excel-readiness {
    align-items: flex-start;
    flex-direction: column;
  }

  .report-download-actions,
  .report-download-link {
    width: 100%;
  }

  .report-download-divider {
    display: none;
  }
}

@media print {
  @page {
    size: A4 portrait;
    margin: 12mm;
  }

  body.app-page {
    background: #ffffff;
  }

  .skip-link,
  .app-sidebar,
  .app-topbar,
  .mobile-nav,
  .qr-page-heading {
    display: none !important;
  }

  .app-layout,
  .app-workspace {
    display: block;
    width: 100%;
    min-height: 0;
  }

  .app-content {
    width: 100%;
    padding: 0;
  }

  .qr-label-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8mm;
  }

  .qr-label {
    min-height: 118mm;
    padding: 8mm;
    border: 1px solid #000000;
    border-radius: 0;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .qr-code {
    width: 52mm;
  }
}

@media (max-width: 480px) {
  .login-main {
    width: 100%;
    padding: 28px 20px;
  }

  .login-form {
    padding: 24px;
  }

  .login-point-context {
    padding: 16px 18px;
  }

  .admin-point-form {
    padding: 20px 16px;
  }

  .admin-form-actions {
    grid-template-columns: 1fr;
  }

  .app-topbar {
    min-height: 62px;
    padding: 9px 14px;
  }

  .mobile-brand strong {
    font-size: 14px;
  }

  .topbar-user {
    gap: 10px;
  }

  .topbar-user-copy strong {
    max-width: 108px;
    font-size: 11px;
  }

  .topbar-user-copy small {
    font-size: 10px;
  }

  .logout-button {
    min-height: 42px;
    padding: 8px 10px;
  }

  .logout-button span {
    display: none;
  }

  .app-content {
    padding-right: 14px;
    padding-left: 14px;
  }

  .page-heading p {
    font-size: 12px;
  }

  .operational-summary dl > div {
    display: block;
  }

  .operational-summary dt {
    min-height: 34px;
  }

  .operational-summary dd {
    font-size: 19px;
  }

  .temperature-form {
    padding: 20px 16px;
  }

  .correction-context dl {
    grid-template-columns: 1fr;
  }

  .correction-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .entry-field {
    margin-bottom: 21px;
  }

  .temperature-field {
    padding: 16px 13px;
  }

  .temperature-control input {
    height: 70px;
    padding-left: 12px;
    font-size: 34px;
  }

  .entry-success {
    padding: 28px 18px;
  }

  .success-actions {
    grid-template-columns: 1fr;
  }

  .monitoring-filters {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .filter-field--month,
  .filter-submit {
    grid-column: auto;
  }

  .monitoring-context {
    display: block;
    padding: 16px;
  }

  .configured-range {
    margin-top: 14px;
    padding: 13px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
    text-align: left;
  }

  .monthly-summary dt {
    min-height: 34px;
  }

  .curve-panel-heading,
  .history-panel .section-heading {
    display: block;
  }

  .history-panel .point-count {
    display: block;
    margin-top: 8px;
  }

  .inline-empty-state {
    margin-right: 14px;
    margin-left: 14px;
  }

  .chart-container {
    height: 300px;
    padding-right: 4px;
    padding-left: 4px;
  }

  .chart-help {
    padding-right: 16px;
    padding-left: 16px;
  }

  .reading-history-table tr {
    gap: 13px 12px;
    padding: 15px 14px;
  }

  .report-section-heading {
    display: block;
  }

  .report-section-heading .point-count {
    display: block;
    margin-top: 8px;
  }

  .report-summary dl > div {
    padding-right: 10px;
    padding-left: 10px;
  }

  .report-summary dt {
    min-height: 34px;
  }

  .report-table tr {
    gap: 12px;
    padding: 15px 14px;
  }

  .excel-readiness {
    padding: 18px 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }
}
