@import url('./tokens.css');

* { box-sizing: border-box; }
html { background: var(--color-bg); }
body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom));
}
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }

.app {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 18px 40px;
}

.topbar {
  min-height: 88px;
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
  gap: 12px;
  padding-top: max(14px, env(safe-area-inset-top));
}

.profile-avatar,
.icon-button {
  width: 44px;
  height: 44px;
  border: 0;
  cursor: pointer;
}

.profile-avatar {
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--color-brand-soft);
  color: var(--color-brand);
  font-weight: 700;
  font-size: 16px;
}

.icon-button {
  background: transparent;
  color: var(--color-text);
  font-size: 26px;
}

.menu-button {
  justify-self: end;
}

.header-identity {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.15;
}

.header-identity strong {
  font-size: 20px;
  letter-spacing: -0.02em;
}

.header-identity span {
  margin-top: 4px;
  color: var(--color-muted);
  font-size: 14px;
}

.summary-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 12px;
  margin-bottom: 22px;
}

.summary-card {
  padding: 18px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-summary);
  background: var(--color-surface);
}

.occupancy-card,
.staff-card { min-height: 132px; }

.eyebrow {
  margin: 0 0 10px;
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 600;
}

.summary-value {
  display: block;
  margin-bottom: 6px;
  font-size: 36px;
  line-height: 1;
  letter-spacing: -0.04em;
}
.summary-card > span { color: var(--color-muted); font-size: 14px; }

.staff-shift {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 10px;
  align-items: start;
  margin-top: 7px;
  font-size: 13px;
  line-height: 1.35;
}
.staff-shift span { color: var(--color-muted); }
.staff-shift strong { font-weight: 600; }

.section-block { margin-bottom: 20px; }
.housekeeping-section { margin-top: 4px; }

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
  padding: 0 2px;
}
.section-heading h2 { margin: 0; font-size: 24px; letter-spacing: -0.02em; }
.section-heading > span { color: var(--color-muted); font-size: 13px; white-space: nowrap; }

.room-card {
  margin-bottom: 10px;
  padding: 18px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
}
.room-card-compact { padding: 16px 18px; }
.room-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.room-title-row h3 { margin: 0; font-size: 24px; letter-spacing: -0.02em; }

.priority-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.priority-chip.urgent { background: var(--color-urgent-soft); color: var(--color-urgent); }
.priority-chip.today { background: var(--color-surface-soft); color: #666a6d; }

.room-reason,
.room-status { margin: 0; line-height: 1.4; }
.room-reason { font-size: 15px; }
.room-status { margin-top: 3px; color: var(--color-muted); font-size: 14px; }

.clean-button {
  width: 100%;
  min-height: 52px;
  margin-top: 16px;
  border: 0;
  border-radius: var(--radius-control);
  background: var(--color-brand);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
}
.room-select-button {
  width: 100%;
  min-height: 40px;
  margin-top: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  cursor: pointer;
}
.room-select-button span:last-child { font-size: 26px; line-height: 1; color: #9a9da0; }

.info-card {
  padding: 20px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
}
.info-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.info-heading h2 { margin: 0; font-size: 20px; letter-spacing: -0.02em; }
.info-heading strong { font-size: 16px; }
.simple-list { display: grid; gap: 4px; }
.simple-list > div {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--color-border);
  font-size: 14px;
}
.simple-list > div:first-child { border-top: 0; }
.simple-list strong { font-size: 14px; font-weight: 600; text-align: right; }
.completed-card { margin-bottom: 20px; }

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  width: 100%;
  max-width: var(--content-max);
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 8px 12px max(10px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(18px);
  z-index: 20;
}
.bottom-nav a {
  min-height: 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  border-radius: 16px;
  color: var(--color-muted);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
}
.bottom-nav a.active { color: var(--color-brand); }
.nav-icon { font-size: 20px; }

@media (max-width: 420px) {
  .app { padding-left: 14px; padding-right: 14px; }
  .summary-grid { grid-template-columns: 1fr; }
  .occupancy-card,
  .staff-card { min-height: auto; }
}
