:root {
  color-scheme: light;
  --bg: #ebdccd;
  --ink: #232d19;
  --muted: #695528;
  --line: #cdc3b9;
  --panel: #fffaf4;
  --teal: #3c462d;
  --blue: #876937;
  --green: #3c462d;
  --green-bg: #eef0e8;
  --amber: #876937;
  --amber-bg: #f4ead9;
  --red: #68392c;
  --red-bg: #f3e1d9;
  --forest: #3c462d;
  --dark-forest: #232d19;
  --sand: #ebdccd;
  --dark-sand: #cdc3b9;
  --gold: #876937;
  --redbrown: #68392c;
  --topbar-height: calc(72px + env(safe-area-inset-top));
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Sora, Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}

svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: calc(14px + env(safe-area-inset-top)) 16px 14px;
  background: var(--forest);
  color: var(--sand);
  border-bottom: 1px solid rgba(235, 220, 205, 0.24);
}

.eyebrow,
h1,
h2,
h3,
p {
  margin: 0;
}

.eyebrow {
  color: var(--sand);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

h1 {
  margin-top: 2px;
  font-size: 25px;
  line-height: 1.05;
  font-family: "Clash Display", Sora, Arial, Helvetica, sans-serif;
  font-weight: 900;
}

.brand-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.brand-head img {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(235, 220, 205, 0.18);
}

.icon-button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: var(--dark-forest);
  color: var(--sand);
  text-decoration: none;
}

.icon-button svg {
  width: 23px;
  height: 23px;
}

.icon-button img {
  max-width: 28px;
  max-height: 25px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.icon-button img.wide-logo {
  max-width: 36px;
  max-height: 24px;
}

.icon-button.loading img,
.icon-button.loading svg {
  animation: refresh-pulse 0.9s ease-in-out infinite alternate;
}

.icon-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

@keyframes refresh-pulse {
  from {
    opacity: 0.48;
    transform: scale(0.92);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.account-badge {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 8px;
  background: var(--sand);
  color: var(--dark-forest);
  font-size: 16px;
  font-weight: 950;
  line-height: 1;
}

main {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 12px 10px 32px;
}

.tabs {
  position: sticky;
  top: var(--topbar-height);
  z-index: 29;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  padding: 8px 10px;
  background: rgba(235, 220, 205, 0.94);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 rgba(35, 45, 25, 0.08);
}

.tabs a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  padding: 10px 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf4;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  text-align: center;
  text-decoration: none;
}

.tabs a.active {
  border-color: var(--forest);
  background: var(--forest);
  color: var(--sand);
}

.tab-count {
  display: grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--amber-bg);
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
}

.tabs a.active .tab-count {
  background: var(--sand);
  color: var(--dark-forest);
}

.login-body {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 18px;
}

.login-shell {
  display: grid;
  width: min(420px, 100%);
  padding: 0;
}

.login-panel {
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 14px 32px rgba(35, 45, 25, 0.16);
}

.login-panel img {
  width: 72px;
  height: 72px;
  border-radius: 8px;
}

.login-panel h1 {
  color: var(--ink);
}

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

.login-panel label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.login-panel input {
  min-height: 46px;
  width: 100%;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.login-panel button {
  min-height: 46px;
  margin-top: 6px;
  border: 0;
  border-radius: 8px;
  background: var(--forest);
  color: var(--sand);
  font: inherit;
  font-weight: 950;
}

.login-error {
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--red-bg);
  color: var(--red);
  font-size: 13px;
  font-weight: 850;
}

.tabs .qr-tab svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 12px;
}

.summary div {
  min-width: 0;
  padding: 10px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.summary .attention {
  border-color: #f0bbb7;
  background: var(--red-bg);
}

.summary span {
  display: block;
  overflow: hidden;
  font-size: 18px;
  font-weight: 850;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.summary-action span:first-of-type {
  display: none;
}

.action-panel {
  margin-bottom: 12px;
  overflow: hidden;
  border: 1px solid var(--gold);
  border-radius: 8px;
  background: var(--amber-bg);
}

.action-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(135, 105, 55, 0.28);
}

.action-panel h2 {
  font-size: 18px;
}

.notify-button {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: var(--forest);
  color: var(--sand);
}

.action-list {
  display: grid;
}

.action-item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(135, 105, 55, 0.22);
  color: inherit;
  text-decoration: none;
}

.action-item.payment-action {
  grid-template-columns: 22px minmax(0, 1fr) auto;
}

.action-item:last-child {
  border-bottom: 0;
}

.action-item.urgent {
  background: var(--red-bg);
}

.action-item svg {
  color: var(--redbrown);
}

.action-item strong,
.action-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.action-item strong {
  font-size: 14px;
}

.action-item small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.action-workflow {
  margin: 0;
}

.action-workflow .workflow-check {
  min-height: 36px;
  padding: 7px 8px;
  white-space: nowrap;
}

.update-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: -4px 0 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.update-strip span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.update-strip svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  color: var(--gold);
}

.notice {
  margin-bottom: 12px;
  padding: 12px;
  border-left: 4px solid var(--red);
  border-radius: 8px;
  background: var(--red-bg);
  color: #7b2222;
  font-weight: 800;
}

.refresh-status {
  position: fixed;
  left: 50%;
  top: calc(var(--topbar-height) + 54px);
  z-index: 60;
  display: none;
  max-width: min(360px, calc(100vw - 24px));
  padding: 10px 12px;
  border: 1px solid rgba(235, 220, 205, 0.36);
  border-radius: 8px;
  background: var(--dark-forest);
  color: var(--sand);
  box-shadow: 0 10px 24px rgba(35, 45, 25, 0.25);
  font-size: 13px;
  font-weight: 900;
  text-align: center;
  transform: translateX(-50%);
}

.refresh-status.visible {
  display: block;
}

.qr-panel {
  display: grid;
  min-height: calc(100vh - var(--topbar-height) - 96px);
  place-items: center;
  gap: 14px;
  align-content: center;
}

.qr-code-link {
  display: grid;
  width: min(78vh, 88vw, 720px);
  aspect-ratio: 1;
  place-items: center;
  padding: clamp(10px, 2.4vw, 22px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(35, 45, 25, 0.14);
}

.qr-code-link img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.qr-payment-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 8px;
  background: var(--forest);
  color: var(--sand);
  font-weight: 900;
  text-decoration: none;
}

.places {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.place-card {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-left-width: 5px;
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.06);
}

.place-card.within-bundle {
  border-left-color: var(--green);
}

.place-card.payment-due {
  border-left-color: var(--red);
}

.place-card.power-off {
  border-left-color: var(--amber);
}

.place-card.has-alarm {
  border-color: var(--red);
}

.place-head,
.guest-row,
.card-foot,
.stay-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.place-number {
  display: grid;
  grid-template-columns: 17px auto;
  align-items: end;
  gap: 5px;
}

.place-label {
  color: var(--muted);
  font-size: 22px;
  font-weight: 850;
  line-height: 1;
}

h2 {
  font-size: 36px;
  line-height: 0.9;
}

.usage {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 18px auto;
  grid-template-rows: auto auto;
  column-gap: 7px;
  min-width: 148px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--green-bg);
  color: var(--teal);
  text-align: right;
}

.usage svg {
  grid-row: 1 / 3;
  align-self: center;
}

.usage strong {
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
  white-space: nowrap;
}

.usage span {
  font-size: 12px;
  font-weight: 850;
}

.guest-row {
  margin-top: 12px;
  align-items: flex-start;
}

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

.guest-link {
  color: inherit;
  text-decoration: none;
}

.guest-link:hover {
  text-decoration: underline;
}

.guest-row p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.guest-row .linked-booking {
  display: inline-flex;
  width: fit-content;
  margin-top: 6px;
  padding: 4px 7px;
  border-radius: 8px;
  background: var(--green-bg);
  color: var(--green);
  font-size: 11px;
  font-weight: 850;
}

.guest-icons {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  max-width: 44%;
}

.guest-icons span,
.guest-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 34px;
  padding: 5px 7px;
  border-radius: 8px;
  background: var(--amber-bg);
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
}

.guest-icons a {
  background: var(--green-bg);
  color: var(--green);
}

.guest-icons svg {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  color: var(--muted);
}

.guest-icons .equipment {
  max-width: 112px;
  justify-content: flex-start;
}

.guest-icons .equipment-icon,
.row-badges .equipment-icon {
  width: 34px;
  min-width: 34px;
  padding: 5px;
  background: var(--amber-bg);
  color: var(--forest);
}

.guest-icons .equipment-icon svg,
.row-badges .equipment-icon svg {
  width: 18px;
  height: 18px;
  color: currentColor;
}

.badge {
  flex: 0 0 auto;
  min-width: 54px;
  padding: 5px 7px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 850;
  text-align: center;
}

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

.badge.new {
  background: var(--amber-bg);
  color: var(--amber);
}

.history-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.history-row span {
  padding: 5px 7px;
  border-radius: 8px;
  background: var(--amber-bg);
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.history-row .badge {
  min-width: 0;
}

.stay-note {
  display: grid;
  gap: 3px;
  margin-top: 8px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--amber-bg);
  color: var(--ink);
}

.stay-note strong {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.stay-note span {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
  white-space: normal;
}

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

.meter-grid div,
.meter-grid a {
  min-width: 0;
  padding: 8px 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: inherit;
  text-decoration: none;
}

.meter-grid svg {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
}

.meter-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.meter-grid strong {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  font-size: 17px;
  font-weight: 850;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meter-grid .ok {
  background: var(--green-bg);
  border-color: #c8e8d5;
}

.meter-grid .ok svg,
.meter-grid .ok strong {
  color: var(--green);
}

.meter-grid .danger {
  background: var(--red-bg);
  border-color: #f0bbb7;
}

.meter-grid .danger svg,
.meter-grid .danger strong {
  color: var(--red);
}

.stay-line {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.stay-line span {
  min-width: 0;
}

.progress {
  height: 8px;
  margin-top: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--dark-sand);
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--blue));
}

.card-foot {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.live,
.idle {
  font-weight: 850;
}

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

.idle {
  color: var(--muted);
}

.schedule-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.schedule-summary strong {
  display: grid;
  min-width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: var(--sand);
  font-size: 22px;
}

.schedule-summary span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.electricity-panel {
  margin-bottom: 12px;
  overflow: hidden;
  border: 1px solid #f0bbb7;
  border-radius: 8px;
  background: var(--red-bg);
}

.electricity-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  border-bottom: 1px solid #f0bbb7;
}

.electricity-panel h2 {
  font-size: 18px;
}

.electricity-panel header span {
  display: grid;
  min-width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 8px;
  background: var(--redbrown);
  color: var(--sand);
  font-weight: 900;
}

.electricity-list {
  display: grid;
}

.electricity-list div {
  padding: 10px 12px;
  border-bottom: 1px solid #f0bbb7;
}

.electricity-list div:last-child {
  border-bottom: 0;
}

.electricity-list strong,
.electricity-list span {
  display: block;
}

.electricity-list span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

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

.day-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: var(--amber-bg);
}

.day-head h2 {
  font-size: 18px;
  line-height: 1.15;
}

.day-head span {
  display: grid;
  min-width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 8px;
  background: var(--sand);
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
}

.schedule-rows {
  display: grid;
}

.schedule-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
}

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

.schedule-row.payment-due {
  background: var(--red-bg);
}

.schedule-row.priority {
  border-left: 4px solid var(--gold);
}

.row-place {
  display: flex;
  align-items: baseline;
  gap: 3px;
}

.row-place span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 850;
}

.row-place strong {
  font-size: 28px;
  line-height: 1;
}

.row-guest {
  min-width: 0;
}

.row-guest strong,
.row-guest span,
.row-meta strong,
.row-meta span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-guest strong {
  font-size: 15px;
}

.row-guest span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.row-guest .row-detail-secondary {
  display: block;
  max-width: min(100%, calc(100vw - 118px));
  margin-top: 2px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.row-guest .row-detail-linked {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  margin-top: 4px;
  padding: 4px 7px;
  border-radius: 8px;
  background: var(--green-bg);
  color: var(--green);
  font-size: 11px;
  font-weight: 850;
  white-space: normal;
}

.visit-popover-wrap {
  display: inline;
}

.visit-popover-wrap[open] {
  display: block;
  width: 100%;
}

.visit-popover-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--forest);
  font: inherit;
  font-weight: 900;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  cursor: pointer;
  list-style: none;
}

.visit-popover-button::-webkit-details-marker {
  display: none;
}

.visit-popover {
  display: none;
  width: 100%;
  max-width: min(100%, calc(100vw - 118px));
  margin-top: 7px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--green-bg);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  text-align: left;
  white-space: normal;
  overflow: visible;
  overflow-wrap: anywhere;
}

.visit-popover-wrap[open] .visit-popover {
  display: block;
}

.row-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}

.row-badges span,
.row-badges a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 28px;
  padding: 5px 7px;
  border-radius: 8px;
  background: var(--amber-bg);
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
}

.row-badges a {
  background: var(--green-bg);
  color: var(--green);
}

.row-badges .time-badge {
  background: var(--forest);
  color: var(--sand);
}

.row-badges .linked-badge {
  background: var(--green-bg);
  color: var(--green);
}

.row-badges svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.workflow-box {
  display: grid;
  gap: 7px;
  margin-top: 9px;
}

.workflow-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  font-size: 12px;
  font-weight: 850;
}

.workflow-check.payment {
  border-color: #f0bbb7;
  background: var(--red-bg);
}

.workflow-check.departure-done {
  border-color: #a8c7a5;
  background: var(--green-bg);
}

.workflow-check input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  accent-color: var(--forest);
}

.workflow-check span {
  margin: 0;
  white-space: normal;
}

.workflow-check small {
  margin-left: auto;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--forest);
  color: var(--sand);
  font-size: 11px;
  font-weight: 900;
}

.workflow-box textarea {
  width: 100%;
  min-height: 54px;
  resize: vertical;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  line-height: 1.35;
}

.workflow-box.saving {
  opacity: 0.72;
}

.workflow-box.saved textarea,
.workflow-box.saved .workflow-check {
  border-color: #a8c7a5;
}

.workflow-box.save-error textarea,
.workflow-box.save-error .workflow-check {
  border-color: var(--red);
}

.row-meta {
  min-width: 72px;
  text-align: right;
}

.row-meta strong {
  font-size: 15px;
}

.row-meta span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.empty-day {
  padding: 18px 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  text-align: center;
}

.mail-panel,
.mail-table-panel {
  margin-bottom: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.mail-panel header,
.mail-table-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: var(--amber-bg);
}

.mail-panel h2,
.mail-table-panel h2 {
  font-size: 20px;
  line-height: 1.1;
}

.mail-panel p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.mail-panel form {
  display: flex;
  gap: 7px;
}

.mail-panel input,
.mail-panel button,
.mail-output button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 850;
}

.mail-panel input {
  padding: 0 9px;
}

.mail-panel button,
.mail-output button {
  padding: 0 12px;
  background: var(--forest);
  color: var(--sand);
}

.mail-output {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.mail-output label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.mail-output textarea {
  width: 100%;
  min-height: 130px;
  resize: vertical;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf4;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  line-height: 1.45;
}

.mail-output button {
  justify-self: start;
}

.mail-table {
  display: grid;
}

.mail-row {
  display: grid;
  grid-template-columns: 70px minmax(160px, 1.2fr) 120px 140px minmax(220px, 1.4fr);
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

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

.mail-row strong {
  font-size: 18px;
}

.mail-row span {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-weight: 800;
}

.mail-row span:nth-child(2) {
  color: var(--ink);
}

.mail-row.missing-email {
  background: var(--red-bg);
}

@media (max-width: 380px) {
  .summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .meter-grid strong {
    font-size: 15px;
  }

  .schedule-row {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .row-meta {
    grid-column: 2;
    text-align: left;
  }
}

@media (max-width: 520px) {
  .tabs {
    grid-template-columns: repeat(4, 1fr);
  }

  .tabs .desktop-tab {
    display: none;
  }

  .tabs a {
    font-size: 12px;
  }

  .row-guest .row-detail-secondary {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }

  .mail-panel header {
    align-items: stretch;
    flex-direction: column;
  }

  .mail-panel form {
    display: grid;
    grid-template-columns: 1fr auto;
  }

  .mail-row {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .mail-row span {
    grid-column: 2;
  }
}

@media (min-width: 680px) {
  main {
    padding-inline: 18px;
  }

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

@media (min-width: 1020px) {
  .places {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
