@font-face {
  font-family: 'DM Sans';
  src: url('/app/assets/sans.woff2') format('woff2');
  font-weight: 100 1000;
  font-display: swap;
}

@font-face {
  font-family: 'Playfair Display';
  src: url('/app/assets/serif.woff2') format('woff2');
  font-weight: 400 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  font-family: 'DM Sans', system-ui, sans-serif;
  color: #24372c;
  background: #f8f7f2;
  --forest: #173b30;
  --ink: #24372c;
  --muted: #5b675f;
  --line: #e7e6de;
  --white: #fff;
  --serif: 'Playfair Display', Georgia, serif;
  --green: #216043;
  --green-bg: #e5f1e8;
  --yellow: #735314;
  --yellow-bg: #f8efd6;
  --orange: #894619;
  --orange-bg: #f9e9da;
  --red: #8d3831;
  --red-bg: #f9e8e4;
  --blue: #235a79;
  --blue-bg: #e7eff6;
}

*, *::before, *::after { box-sizing: border-box; }

body, h1, h2, h3, p, ul, dl, dd { margin: 0; }
ul { list-style: none; padding: 0; }
svg { flex-shrink: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
textarea { resize: vertical; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid #92612f; outline-offset: 3px; }

.sr-only, .skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip:focus {
  position: fixed;
  z-index: 2;
  top: .5rem;
  left: .5rem;
  background: var(--white);
  padding: .75rem;
  border-radius: .4rem;
}

#app { display: grid; grid-template-columns: 214px minmax(0, 1fr); min-height: 100vh; }

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  padding: 31px 17px 19px;
  color: #f8f7ea;
  background: linear-gradient(156deg, #18382e, #16362d 64%, #214739);
}

.brand { display: flex; align-items: center; gap: 10px; padding: 0 4px; }
.brand-mark {
  display: grid;
  flex: 0 0 39px;
  height: 39px;
  place-items: center;
  border: 1px solid #adbc9c;
  border-radius: 50%;
  color: #d8d6ab;
}

.brand-name {
  display: block;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 17px;
  white-space: nowrap;
}

.brand-caption { display: block; margin-top: 4px; color: #bdcabb; font-size: 11px; line-height: 1.3; }
.nav { display: grid; gap: 5px; margin-top: 44px; }
.nav a, .reset-button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 11px;
  border-radius: 7px;
  color: #dce5d9;
  font-size: 13px;
  font-weight: 560;
  text-align: left;
}

.nav .nav-current { background: #315245; color: #fff; }
.nav a:hover, .reset-button:hover { background: #3b5b4d; }
.sidebar :focus-visible { outline-color: #dfd2a7; }
.sidebar-footer { display: grid; gap: 10px; margin-top: auto; border-top: 1px solid #47675a; padding-top: 15px; }
.sidebar-local { display: flex; align-items: center; gap: 8px; padding: 0 11px; color: #dce5d9; font-size: 11px; }
.sidebar-local .dot { color: #b2c88b; }
.reset-button { background: transparent; border: 0; }

.topbar {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(22px, 2.7vw, 42px);
  border-bottom: 1px solid var(--line);
  background: #fcfbf7;
}

.topbar time { display: inline-flex; align-items: center; gap: 9px; color: #4f6155; font-size: 13px; font-weight: 610; }
.language {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 9px;
  border: 1px solid #dedfd5;
  border-radius: 8px;
  background: var(--white);
  color: #3d5848;
}

.language select {
  position: absolute;
  inset: 0;
  appearance: none;
  width: 100%;
  border: 0;
  border-radius: inherit;
  padding: 0 21px 0 32px;
  color: var(--ink);
  background: transparent;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.language > svg:last-child { margin-left: 25px; }
main { max-width: 1650px; margin: 0 auto; padding: 28px clamp(22px, 2.7vw, 42px) 40px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 10px 18px; margin-bottom: 24px; }
h1, h2, .room-title h3 { font-family: var(--serif); font-weight: 600; }
h1 { font-size: clamp(34px, 3.3vw, 53px); line-height: 1.13; color: var(--forest); letter-spacing: -.035em; }
.demo-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  margin-bottom: 3px;
  border: 1px solid #e5e4d8;
  border-radius: 20px;
  color: #5b6657;
  background: #f1f0e7;
  font-size: 11px;
  font-weight: 600;
}
.dot { display: inline-block; width: 6px; height: 6px; flex: 0 0 6px; background: currentColor; border-radius: 50%; }
.demo-label .dot { color: #527348; }

.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 26px; }
.metric {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 15px 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink);
  text-align: left;
  box-shadow: 0 2px 5px #23382a05;
}

.metric[aria-pressed="true"], .metric:hover { border-color: #758e7c; }
.metric[aria-pressed="true"] { background: #f1f7f0; }
.metric-icon, .panel-icon { display: grid; flex: 0 0 39px; height: 39px; place-items: center; border-radius: 9px; }
.green { --tone: var(--green); --tone-bg: var(--green-bg); --dot-color: #4a8c63; }
.yellow { --tone: var(--yellow); --tone-bg: var(--yellow-bg); --dot-color: #c39635; }
.orange { --tone: var(--orange); --tone-bg: var(--orange-bg); --dot-color: #c7773b; }
.red { --tone: var(--red); --tone-bg: var(--red-bg); --dot-color: #c56255; }
.blue { --tone: var(--blue); --tone-bg: var(--blue-bg); --dot-color: #5a8ab5; }
.metric-icon, .chip { color: var(--tone); background: var(--tone-bg); }
.metric-data { display: grid; gap: 3px; min-width: 0; }
.metric-label { font-size: 13px; font-weight: 730; }
.metric strong { font-family: var(--serif); font-size: 32px; line-height: 1.1; font-weight: 650; color: var(--forest); }
.metric small { color: var(--muted); font-size: 11px; line-height: 1.4; }
.metric > svg { margin-left: auto; color: #617e6a; }

.columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 252px); gap: 19px; align-items: start; }
.section-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; min-height: 51px; margin-bottom: 13px; }
.section-header h2 { font-size: 29px; line-height: 1.12; }
.section-header p { margin-top: 4px; color: var(--muted); font-size: 12px; }
.filters { display: inline-flex; flex-wrap: wrap; gap: 3px; padding: 3px; border: 1px solid #e7e6dc; border-radius: 9px; background: #eeeee5; }
.filters button { min-height: 34px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: #526357; padding: 5px 10px; font-size: 12px; font-weight: 650; }
.filters button:hover, .filters button[aria-pressed="true"] { background: var(--white); border-color: #e6e7de; color: var(--forest); }

.room-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.room-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: 0 2px 6px #23382a08;
}

.room-photo {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  aspect-ratio: 2.35;
  background: radial-gradient(ellipse at 85% 10%, #e0dfcb, transparent 65%),
    linear-gradient(135deg, #ebede2, #d6ddcf 55%, #cbd7c5);
}
.room-photo img { position: absolute; width: 100%; height: 100%; object-fit: cover; }
.room-code { position: absolute; top: 11px; left: 11px; padding: 4px 8px; border-radius: 5px; background: #fffcf3; color: #314238; font-size: 10px; font-weight: 780; letter-spacing: .07em; }
.photo-placeholder { display: grid; justify-items: center; gap: 6px; color: #3f6250; font-size: 11px; font-weight: 650; }

.compact-mode .page-heading { margin-bottom: 17px; }
.compact-mode .metrics { margin-bottom: 18px; }
.compact-mode .metric { padding-block: 12px; }
.room-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 9px; }
.view-switch button { display: inline-flex; align-items: center; gap: 5px; }
.compact-grid { gap: 10px; }
.compact-room {
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 98px;
  min-width: 0;
  padding: 8px 10px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 2px 6px #23382a08;
}
.compact-heading { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.compact-heading h3 { color: var(--forest); font: 600 20px/1.08 var(--serif); overflow-wrap: anywhere; }
.compact-heading p { margin-top: 3px; color: var(--muted); font-size: 11px; }
.compact-heading button { display: grid; place-items: center; width: 36px; height: 36px; flex-shrink: 0; border-radius: 7px; border: 1px solid var(--line); background: #f5f6ef; color: var(--forest); }
.compact-heading button:hover { background: var(--green-bg); border-color: #758e7c; }
.compact-flags { display: flex; align-items: center; flex-wrap: wrap; gap: 3px 8px; }
.checklist-count { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 11px; font-weight: 650; }
.checklist-warning { display: inline-flex; align-items: center; justify-self: start; gap: 5px; padding: 3px 6px; border-radius: 5px; background: var(--yellow-bg); color: var(--yellow); font-size: 11px; font-weight: 750; }
.rollover-banner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 14px; padding: 7px 12px; margin-bottom: 13px; border: 1px solid #dfe5d9; border-radius: 8px; background: #eef3e9; color: var(--forest); font-size: 13px; }
.rollover-banner p { display: flex; align-items: center; gap: 8px; }
.archived-days { margin-top: 8px; font-size: 11px; color: var(--muted); }

@media (min-width: 1011px) {
  main.compact-mode { padding-top: 22px; }
  .compact-mode .metric { padding-block: 10px; }
  .compact-mode .metric-data {
    flex: 1;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 9px;
  }
  .compact-mode .metric strong { grid-area: 1 / 2 / 3 / 3; }
  .compact-mode .metric small { grid-column: 1; }
  .compact-mode .section-header { min-height: 48px; margin-bottom: 10px; }
  .compact-grid { gap: 8px; }
}

.room-body { flex: 1; display: grid; align-content: start; gap: 9px; min-width: 0; padding: 13px 12px 11px; }
.room-title { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 5px; }
.room-title h3 { font-size: clamp(18px, 1.5vw, 24px); line-height: 1.18; color: #213d30; overflow-wrap: anywhere; }
.occupation { padding: 3px 6px; border: 1px solid #dfded4; border-radius: 5px; color: #534d42; background: #f6f4ed; font-size: 10px; font-weight: 700; }
.occupation-vacant { color: #516351; background: #f0f3ea; border-color: #e1e7db; }
.guest-line, .room-note, .turnover { display: flex; align-items: center; gap: 6px; min-width: 0; }
.guest-line { color: #4f5b52; font-size: 11.5px; font-weight: 560; }
.guest-line span, .room-note span { overflow-wrap: anywhere; }
.stay-dates { display: grid; grid-template-columns: 1fr 1fr; background: #f8f7f2; border-radius: 6px; padding: 7px 9px; }
.stay-dates > div + div { border-left: 1px solid #e5e4d9; padding-left: 9px; }
.stay-dates dt { color: var(--muted); font-size: 10px; }
.stay-dates dd { font-size: 12px; font-weight: 700; margin-top: 2px; }
.room-status { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 8px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border-radius: 5px; font-size: 10.5px; line-height: 1.25; font-weight: 750; }
.chip .dot { background: var(--dot-color); }
.room-note, .turnover { color: var(--muted); font-size: 11px; }
.turnover { color: #71521e; }
.issue-note { color: var(--blue); }
.critical-note { color: var(--red); font-weight: 700; }
.room-footer { display: flex; justify-content: space-between; align-items: center; gap: 4px; padding: 0 11px; border-top: 1px solid #eeeee8; }
.room-footer span, .room-footer button { display: flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 660; }
.room-footer span { color: #536658; }
.room-footer button { min-height: 44px; padding: 4px 0 4px 5px; color: #2c593f; border: 0; background: transparent; text-align: left; }
.room-footer button:hover { text-decoration: underline; }
.room-footer button:focus-visible { outline-offset: 0; }
.empty { display: grid; justify-items: center; gap: 12px; padding: 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); }

.panels { display: grid; gap: 14px; margin-top: 1px; }
.panel { min-width: 0; padding: 15px; border-radius: 11px; border: 1px solid var(--line); background: var(--white); box-shadow: 0 2px 5px #23382a05; }
.panel-heading { display: flex; align-items: center; gap: 9px; }
.panel-heading h2 { font-size: 22px; line-height: 1.12; }
.panel-icon { background: #edf1e9; color: #44634b; flex-basis: 34px; height: 34px; border-radius: 7px; }
.task-progress { margin: 11px 0 6px; }
.task-progress p { font-size: 11.5px; font-weight: 620; color: var(--muted); }
progress { appearance: none; display: block; margin-top: 7px; width: 100%; height: 6px; border: 0; border-radius: 10px; background: #e9ede4; color: #587d5a; }
progress::-webkit-progress-bar { background: #e9ede4; border-radius: 10px; }
progress::-webkit-progress-value { background: #587d5a; border-radius: 10px; }
progress::-moz-progress-bar { background: #587d5a; border-radius: 10px; }
.task-list li + li { border-top: 1px solid #ededE7; }
.task { display: flex; align-items: flex-start; gap: 8px; min-height: 44px; padding: 9px 1px; cursor: pointer; }
.task input, .check-row input { width: 16px; height: 16px; margin: 1px 0 0; flex: 0 0 auto; accent-color: #37684c; cursor: pointer; }
.task strong, .legend strong { display: block; font-size: 12px; line-height: 1.32; font-weight: 730; }
.task small, .legend small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; line-height: 1.3; }
.task:has(input:checked) strong { color: var(--muted); text-decoration: line-through; }
.task:has(input:disabled) { cursor: default; }
.legend ul { display: grid; gap: 11px; margin-top: 14px; }
.legend li { display: flex; align-items: flex-start; gap: 8px; }
.key-dot { margin-top: 4px; width: 9px; height: 9px; flex: 0 0 9px; border-radius: 50%; background: var(--dot-color); }
.last-updated { display: flex; align-items: flex-start; gap: 6px; padding: 0 3px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.last-updated time { font-weight: 720; }
.last-updated small { display: block; font-size: inherit; }
.banner { display: flex; align-items: center; gap: 8px; padding: 12px; margin-bottom: 14px; border-radius: 7px; color: #654411; background: #fbefd3; font-size: 13px; }

dialog {
  width: min(590px, calc(100% - 22px));
  max-height: min(88dvh, 840px);
  padding: 0;
  border: 1px solid #d4dbcd;
  border-radius: 15px;
  background: #fafaf5;
  color: var(--ink);
  box-shadow: 0 14px 58px #172a2755;
  overflow: hidden;
}

dialog::backdrop { background: #142d25a0; }
dialog form { display: flex; flex-direction: column; max-height: min(88dvh, 840px); }
.dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 18px 22px; background: #f0f1e6; border-bottom: 1px solid #e2e5d9; }
.dialog-header h2 { font-size: clamp(23px, 5vw, 31px); color: var(--forest); }
.dialog-header p { margin-bottom: 4px; font-size: 12px; font-weight: 700; color: #506b56; }
.icon-button { display: grid; place-items: center; flex: 0 0 44px; height: 44px; border: 1px solid #dbe0d4; border-radius: 7px; background: var(--white); color: var(--forest); }
.dialog-body { overflow: auto; overscroll-behavior: contain; padding: 20px 22px; }
.dialog-body fieldset { display: grid; gap: 15px; min-width: 0; margin: 0; padding: 0; border: 0; }
.dialog-body label { display: grid; gap: 5px; margin-top: 7px; min-width: 0; font-weight: 650; font-size: 13px; }
.form-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.dialog-body input:not([type="checkbox"]), .dialog-body select, .dialog-body textarea { padding: 8px; width: 100%; min-height: 42px; border: 1px solid #d5dcd2; border-radius: 6px; background: var(--white); color: var(--ink); font-weight: 500; }
.dialog-body input[type="date"] { min-width: 0; }
.dialog-body details { margin-top: 12px; }
.dialog-body summary { padding: 8px 0; color: #325e44; font-size: 13px; font-weight: 750; cursor: pointer; }
.dialog-body summary small { color: var(--muted); padding-left: 4px; }
.form-section { border-top: 1px solid var(--line); padding-top: 13px; }
.form-section > label:first-child { margin-top: 0; }
.form-section h3, .form-section > label:first-child > span { font-family: var(--serif); font-weight: 640; font-size: 20px; }
.dialog-body label.check-row { display: flex; align-items: center; gap: 8px; margin-top: 4px; min-height: 36px; }
.checklist-description { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin: 6px 0; color: var(--muted); font-size: 12px; }
.dialog-footer { padding: 11px 22px; border-top: 1px solid var(--line); background: var(--white); }
.dialog-footer > div { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.form-error { margin: 0 0 8px; color: var(--red); font-size: 13px; font-weight: 660; }
.primary, .secondary { min-height: 44px; padding: 8px 13px; border-radius: 7px; border: 1px solid #dce2d7; background: #fff; color: var(--forest); font-size: 13px; font-weight: 720; }
.primary { border-color: var(--forest); background: var(--forest); color: #fff; }
.primary:hover:enabled { background: #2b543e; }
.secondary:hover { background: #f0f2eb; }

@media (max-width: 1210px) {
  #app { grid-template-columns: 187px minmax(0, 1fr); }
  .sidebar { padding-inline: 12px; }
  .columns { grid-template-columns: minmax(0, 1fr) minmax(205px, 235px); }
  .room-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .compact-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1010px) {
  .columns { grid-template-columns: minmax(0, 1fr); }
  .room-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .panels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

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

@media (max-width: 740px) {
  #app { display: block; }
  .sidebar {
    position: static;
    height: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding: 13px 16px 8px;
  }
  .brand { padding: 0; }
  .sidebar-footer { display: flex; margin: 0; border: 0; padding: 0; grid-column: 2; grid-row: 1; }
  .sidebar-local { display: none; }
  .nav { grid-column: span 2; display: flex; flex-wrap: wrap; margin: 0; }
  .topbar { min-height: 53px; padding: 0 16px; }
  main { padding: 20px 16px 28px; }
  .page-heading { margin-bottom: 16px; }
}

@media (max-width: 510px) {
  .metrics { gap: 6px; margin-bottom: 18px; }
  .metric { gap: 6px; display: grid; padding: 9px 7px; }
  .metric-icon { width: 31px; height: 31px; }
  .metric-icon svg { width: 18px; height: 18px; }
  .metric > svg, .metric small { display: none; }
  .metric-label { font-size: 11px; }
  .metric strong { font-size: 27px; }
  .room-grid, .panels { grid-template-columns: minmax(0, 1fr); }
  .room-grid { gap: 12px; }
  .compact-heading button { width: 44px; height: 44px; }
  .room-title h3 { font-size: 23px; }
  .room-body { padding: 13px; }
  .reset-button { justify-content: flex-end; max-width: 130px; padding-inline: 5px; }
  .dialog-header, .dialog-body, .dialog-footer { padding-inline: 13px; }
  .status-fields { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}

@media (max-width: 350px) {
  .form-pair { grid-template-columns: minmax(0, 1fr); }
  .brand-mark { display: none; }
}

#system-health { display: grid; gap: 15px; max-width: 980px; }
.health-panel { padding: 18px; }
.health-panel h2 { font-size: 24px; }
.health-demo { margin: 5px 0 12px; color: var(--muted); font-size: 12px; }
.health-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 165px), 1fr)); gap: 8px; }
.health-tile { min-width: 0; padding: 9px 11px; border: 1px solid var(--line); border-radius: 7px; background: #faf9f3; }
.health-tile dt { color: var(--muted); font-size: 11px; }
.health-tile dd { margin: 3px 0 0; font-weight: 700; font-size: 13px; }
.health-tile small { display: block; margin-top: 2px; color: var(--muted); font-weight: 500; }
.health-positive { color: var(--green); }
.health-caution { color: var(--yellow); }
.health-controls { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.health-note { margin-top: 10px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.health-success { padding: 10px; border-radius: 7px; color: var(--green); background: var(--green-bg); font-size: 13px; }
.health-errors { padding: 0; list-style: none; margin: 10px 0 0; display: grid; gap: 8px; font-size: 12px; }
.health-errors li { padding: 8px; border-left: 2px solid var(--yellow); overflow-wrap: anywhere; }
.health-errors time, .health-errors p { color: var(--muted); }
.health-errors p { margin: 4px 0 0; }

.ops { display: grid; gap: 14px; }
.ops-toolbar, .ops-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ops-toolbar { justify-content: space-between; }
.ops-toolbar p, .ops-muted { color: var(--muted); font-size: .9rem; overflow-wrap: anywhere; }
.ops-toolbar > div { display: flex; flex-wrap: wrap; gap: 8px; }
.ops button, .ops input:not([type="checkbox"]), .ops select { min-height: 44px; }
:is(.ops-toolbar, .ops-tabs) button[aria-pressed="true"] { background: var(--forest); color: var(--white); }
.ops-panel, .ops-hero { padding: 16px; }
.ops-panel h2 { margin-bottom: 10px; font-family: var(--serif); font-size: 1.35rem; }
.ops-hero { display: grid; gap: 16px; background: var(--green-bg); }
.ops-hero > div > span { color: var(--green); font-weight: 650; }
.ops-hero > div > strong, .ops-progress strong { display: block; font-size: 1.7rem; }
.ops-progress { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 2px 12px; }
.ops-progress progress { grid-column: 1 / -1; width: 100%; accent-color: var(--green); }
.ops-room-grid, .ops-shared { display: grid; align-items: start; gap: 8px; }
.ops-room { border: 1px solid var(--line); border-radius: 8px; overflow-wrap: anywhere; }
.ops-room + .ops-room:not(.ops-room-grid > *) { margin-top: 8px; }
.ops-count { margin-left: 4px; color: var(--muted); font: 600 .9rem 'DM Sans', sans-serif; }
.ops summary { min-height: 46px; padding: 10px 12px; cursor: pointer; font-weight: 650; }
.ops-room > summary > span:first-child { display: inline-grid; vertical-align: middle; }
.ops-room-grid summary > span:last-child { float: right; color: var(--green); }
.ops-room summary small, .ops-checklist small, .ops-reports small { display: block; color: var(--muted); font-size: .8rem; }
.ops-room-body, .ops-room > form { padding: 0 12px 12px; }
.ops-checklist label, .ops-checklist li:has(> [aria-hidden]) {
  display: flex; gap: 10px; min-height: 46px; align-items: center;
}
.ops-checklist input, .ops .check-row input { width: 20px; height: 20px; flex-shrink: 0; accent-color: var(--green); }
.ops-checklist li + li, .ops-reports li + li { border-top: 1px solid var(--line); }
.ops form, .ops label:has(> select, > input:not([type="checkbox"])) { display: grid; gap: 6px; }
.ops form { margin-block: 8px; }
.ops form button { justify-self: start; }
.ops select, .ops input:not([type="checkbox"]) {
  width: 100%; color: var(--ink); border: 1px solid #a4aca5; background: var(--white); border-radius: 6px; padding: 6px 9px;
}
.ops-room-status { margin: 8px 0; }
.ops fieldset { margin: 6px 0; min-width: 0; }
.ops legend { font-weight: 650; }
.ops .check-row { min-height: 44px; }
.ops-counts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ops-reports li { display: grid; padding: 8px 0; overflow-wrap: anywhere; }
.ops [data-ops-error] { color: var(--red); }
@media (min-width: 700px) {
  .ops-hero, .ops-shared, .ops-room-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.ops .ops-skip { margin: 0 0 6px 30px; }

.routine-role { width: min(100%, 340px); font-weight: 650; }
.routine-list, .routine-areas { display: grid; gap: 10px; }
.routine-card { min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 8px; overflow-wrap: anywhere; }
.routine-card > strong, .routine-card h3 { display: block; margin-bottom: 4px; }
.routine-card > p + p { margin-top: 6px; }
.routine-actions, .routine-days { display: flex; flex-wrap: wrap; gap: 6px 10px; }
.routine-actions { margin-block: 6px; }
.routine-condition { font-weight: 700; }
.routine-condition[data-condition="good"] { color: var(--green); }
.routine-condition[data-condition="attention"] { color: var(--orange); }
.routine-condition[data-condition="urgent"] { color: var(--red); }
.routine-template-row { display: grid; grid-template-columns: minmax(0, 1fr) 66px; align-items: center; gap: 8px; }
.routine-priorities { list-style: disc; padding-left: 1.25rem; overflow-wrap: anywhere; }
.ops textarea { border: 1px solid #a4aca5; border-radius: 6px; padding: 8px; width: 100%; }
@media (min-width: 700px) {
  .routine-areas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.daily-execution {
  --bubble-size: clamp(79px, 26vw, 116px);
  --trail-gap: 14px;
  max-width: 740px;
  margin-inline: auto;
  gap: 16px;
}
.daily-toolbar { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 10px; }
.daily-toolbar label { min-width: min(100%, 200px); font-weight: 650; }
.daily-hours { display: flex; flex-wrap: wrap; gap: 5px 8px; align-items: center; color: var(--green); font-weight: 650; }
.daily-hours small { flex-basis: 100%; color: var(--muted); font-weight: 500; }
.daily-progress { display: grid; gap: 8px; padding: 14px 16px; background: #eaf1e8; }
.daily-progress > div { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 3px 12px; }
.daily-progress h2 { font-size: .95rem; }
.daily-progress strong { font-variant-numeric: tabular-nums; color: var(--green); }
.daily-progress progress { width: 100%; height: 10px; accent-color: var(--green); }
.daily-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  row-gap: var(--trail-gap);
  margin: 0;
  padding: 16px 4px;
  list-style: none;
  isolation: isolate;
}
.daily-path { border-radius: 16px; border: 1px solid #e7e5db; background: transparent; }
.daily-step { display: grid; align-items: start; position: relative; min-width: 0; }
.daily-col-1 { grid-column: 1; }
.daily-col-2 { grid-column: 2; }
.daily-col-3 { grid-column: 3; }
.daily-row-1 { grid-row: 1; }
.daily-row-2 { grid-row: 2; }
.daily-row-3 { grid-row: 3; }
.daily-path .daily-step::before {
  content: '';
  position: absolute;
  left: 50%;
  top: calc(var(--bubble-size) / 2);
  z-index: -1;
  pointer-events: none;
}
.daily-path .path-left::before, .daily-path .path-right::before {
  width: 100%;
  border-top: 2px dashed #adb7aa;
  transform: translateY(-1px);
}
.daily-path .path-left::before { left: -50%; }
.daily-path .path-down::before {
  top: calc(var(--bubble-size) + 32px);
  height: calc(100% + var(--trail-gap) - var(--bubble-size) / 2 - 32px);
  border-left: 2px dashed #adb7aa;
}
.daily-bubble {
  display: grid;
  justify-items: center;
  gap: 4px;
  width: 100%;
  min-width: 0;
  padding: 0 3px;
  color: var(--ink);
  text-align: center;
  border: 0;
  background: transparent;
  line-height: 1.15;
  --bubble-border: #52675b;
}
.daily-glyph {
  display: grid;
  place-items: center;
  position: relative;
  width: var(--bubble-size);
  height: var(--bubble-size);
  border-radius: 50%;
  border: 2px solid var(--bubble-border);
  background-color: #FFE69A;
  box-shadow: 0 2px 0 var(--bubble-border);
  margin-bottom: 4px;
}
.daily-art {
  width: calc(var(--bubble-size) - 6px);
  height: calc(var(--bubble-size) - 6px);
  object-fit: contain;
  pointer-events: none;
}
.daily-bubble:hover .daily-glyph { box-shadow: 0 3px 0 var(--bubble-border), 0 0 0 3px #33513b18; }
.daily-bubble:is([data-task-state="done"], [data-task-state="good"]) .daily-glyph {
  background-color: #C1E4B5;
}
.daily-bubble:is([data-task-state="problem"], [data-task-state="attention"], [data-task-state="urgent"]) .daily-glyph {
  background-color: #F6B8B3;
}
.daily-bubble strong { font-size: clamp(.78rem, 3vw, .98rem); overflow-wrap: anywhere; }
.daily-mark {
  position: absolute;
  bottom: 0;
  right: 0;
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: #304b3b;
  color: white;
  box-shadow: 0 0 0 2px #fff;
}
.daily-path .daily-bubble > strong { padding-inline: 3px; }

.daily-report-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.daily-report-tools p { color: #761b19; font-weight: 700; }
.daily-report {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  color: #fff; background: #ae2624; border: 2px solid #801715; border-radius: 10px;
  padding: 6px 16px; font-weight: 750;
}
.daily-report:hover { background: #8d201e; }
.daily-execution .daily-problem-form { margin: 0; border-left: 4px solid #ae2624; }
[data-screen-view="tasks"] > .banner { position: sticky; top: 6px; z-index: 3; }

.daily-links { display: flex; flex-wrap: wrap; gap: 8px; }
.daily-links:empty { display: none; }
.daily-note, .daily-back { justify-self: start; }
.daily-note { padding-left: 12px; border-left: 2px solid #83ae88; overflow-wrap: anywhere; }
.daily-detail-title { font-family: var(--serif); font-size: 1.4rem; }
[data-screen-view="tasks"] .page-heading { max-width: 740px; margin-inline: auto; }
[data-screen-view="tasks"] .page-heading h1 { font-size: clamp(2rem, 6vw, 3rem); }
@media (max-width: 740px) {
  #app:has([data-screen-view="tasks"]) .sidebar { padding-block: 12px; row-gap: 10px; }
  #app:has([data-screen-view="tasks"]) .nav { margin-top: 0; }
}
