:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --white: #fff;
  --ink: #23272e;
  --muted: #69717d;
  --line: #e6e8ec;
  --green: #242622;
  --soft: #f1f3f6;
  --red: #b6422b;
  --accent: #c64d32;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font:
    14px/1.5 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1,
h2,
h3,
p {
  margin: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: #252622;
  color: white;
  font-size: 12px;
  font-weight: 550;
  cursor: pointer;
  transition: background 0.12s;
}
button:hover {
  background: #42443c;
}
button:active {
  transform: translateY(1px);
}
button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
button.secondary {
  color: var(--ink);
  background: white;
  border-color: #d4d6cd;
}
button.secondary:hover {
  background: #f3f4ed;
}
button.text {
  padding: 5px 0;
  border: 0;
  color: var(--muted);
  background: none;
  min-height: 32px;
  font-size: 11px;
}
button.text:hover {
  color: var(--ink);
  text-decoration: underline;
}
button.danger {
  color: #a83d28;
  background: #fcf1ed;
  border-color: #efd7ce;
}
input,
select,
textarea {
  color: var(--ink);
  background: white;
  width: 100%;
  border: 1px solid #cfd2c8;
  border-radius: 9px;
  padding: 11px;
  min-height: 42px;
  font-size: 13px;
}
textarea {
  resize: vertical;
  min-height: 90px;
}
input[type="checkbox"] {
  width: 17px;
  height: 17px;
  min-height: 0;
  accent-color: var(--ink);
}
label {
  display: block;
  font-size: 12px;
  font-weight: 500;
}
label > input,
label > select,
label > textarea {
  margin-top: 7px;
}
form {
  display: grid;
  gap: 18px;
}
fieldset {
  padding: 0;
  border: 0;
  margin: 0;
  min-width: 0;
}
:focus-visible {
  outline: 2px solid #386d96;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
.icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.muted {
  color: var(--muted);
}
.eyebrow {
  font:
    10px/1.5 ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
  letter-spacing: 0.03em;
  color: var(--muted);
  text-transform: uppercase;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.skip {
  position: fixed;
  top: -100px;
  left: 10px;
  z-index: 100;
  padding: 12px;
  background: white;
}
.skip:focus {
  top: 10px;
}
.brand {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
}
.wordmark {
  font-size: 27px;
  line-height: 1;
  letter-spacing: -0.075em;
  font-weight: 750;
}
.brand-dot {
  color: #e65a3b;
}
.brand-caption {
  font:
    9px/1.2 ui-monospace,
    SFMono-Regular,
    monospace;
  letter-spacing: 0.18em;
  color: #93968e;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 202px;
  padding: 32px 14px 24px;
  background: #1c1e1b;
  color: white;
  z-index: 20;
  display: flex;
  flex-direction: column;
}
.sidebar > .brand {
  margin-left: 13px;
}
.nav-label {
  margin: 45px 13px 12px;
  font:
    9px/1.5 ui-monospace,
    SFMono-Regular,
    monospace;
  color: #91968a;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.nav {
  display: grid;
  gap: 3px;
}
.nav button {
  justify-content: flex-start;
  background: transparent;
  color: #aeb3a7;
  border: 0;
  min-height: 42px;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 400;
  text-align: left;
  gap: 11px;
  border-radius: 9px;
}
.nav .icon {
  width: 16px;
  height: 16px;
  opacity: 0.7;
}
.nav button:hover {
  background: #292d27;
  color: white;
}
.nav button[aria-current="page"] {
  color: white;
  background: #34392f;
  box-shadow: inset 2px 0 #e05b3b;
}
.nav-dot {
  display: none;
}
.sidebar-bottom {
  margin-top: auto;
  padding: 25px 13px 0;
  color: #949b8b;
}
.sidebar-location {
  display: block;
  font:
    9px/1.8 ui-monospace,
    SFMono-Regular,
    monospace;
  letter-spacing: 0.04em;
}
.sidebar-bottom a {
  display: block;
  font-size: 10px;
  margin-top: 13px;
}
.body {
  margin-left: 202px;
}
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  padding: 17px 36px;
  height: 71px;
  border-bottom: 1px solid var(--line);
  background: #fafbf7;
}
.header-title {
  display: flex;
  gap: 14px;
  align-items: center;
  font-size: 11px;
}
.header-company {
  color: var(--muted);
}
.header-divider {
  color: #b7bcb0;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}
.header-person {
  font-size: 11px;
  padding-left: 18px;
  border-left: 1px solid var(--line);
}
.header-person small {
  display: block;
  font-size: 9px;
  color: var(--muted);
}
.avatar {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border: 1px solid #ccd1c1;
  background: #e9ede2;
  border-radius: 10px;
  font-size: 12px;
}
.lang {
  display: inline-flex;
  border: 1px solid #d9ddd0;
  padding: 2px;
  border-radius: 10px;
  gap: 2px;
}
.lang button {
  background: transparent;
  color: var(--muted);
  min-height: 26px;
  padding: 3px 6px;
  font-size: 10px;
  border: 0;
}
.lang button[aria-pressed="true"] {
  background: #e6eadd;
  color: #293020;
}
.main {
  padding: 32px 36px 40px;
  max-width: 1500px;
  margin: 0 auto;
  min-height: calc(100svh - 125px);
}
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
}
.page-head h1 {
  font-size: clamp(28px, 2.6vw, 38px);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.15;
}
.page-head p {
  color: var(--muted);
  font-size: 12px;
  margin-top: 9px;
}
.operations-heading .eyebrow {
  margin: 0 0 12px;
  font-size: 10px;
}
.operations-heading h1 {
  font-size: 39px;
  letter-spacing: -0.05em;
}
.heading-separator {
  margin-inline: 8px;
  color: #bcc1b2;
}
.actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.operations-summary {
  display: flex;
  border-block: 1px solid #cdd1c2;
  margin: 4px 0 28px;
  padding: 20px 0;
}
.operations-summary > div {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 35px;
  border-left: 1px solid #d5dac9;
}
.operations-summary > div:first-child {
  padding-left: 0;
  border-left: 0;
}
.operations-summary > div > span:last-child {
  font-size: 12px;
  color: #737a67;
}
.summary-number {
  font-size: 29px;
  line-height: 1;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}
.attention-number {
  color: var(--accent);
}
.work-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: start;
}
.grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(270px, 1fr);
  gap: 24px;
  align-items: start;
}
.stack {
  display: grid;
  gap: 24px;
  min-width: 0;
}
.panel {
  padding: 22px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 9px;
  min-width: 0;
}
.panel h2 {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.panel h3 {
  font-size: 13px;
  font-weight: 550;
}
.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 18px;
}
.panel-title > .panel-sub {
  margin: 0;
}
.panel-sub {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
  margin-top: 10px;
}
.wide {
  grid-column: 1/-1;
}
.roster-panel {
  padding: 0;
}
.roster-panel > .panel-title {
  padding: 18px 20px;
  margin: 0;
}
.table-wrap {
  overflow-x: auto;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12px;
}
.data-table th {
  font-size: 10px;
  color: #787d70;
  font-weight: 400;
  border-bottom: 1px solid var(--line);
  padding: 11px 12px;
  white-space: nowrap;
  background: #f7f8f4;
}
.data-table td {
  padding: 16px 12px;
  border-bottom: 1px solid #e9ebe2;
  vertical-align: middle;
}
.data-table tr:last-child td {
  border-bottom: 0;
}
.data-table tbody tr:hover {
  background: #fafbf8;
}
.data-table small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 3px;
}
.data-table button {
  font-size: 11px;
  padding: 7px 10px;
}
.roster-table th,
.roster-table td {
  padding-left: 20px;
  padding-right: 20px;
}
.person-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}
.person-cell strong {
  font-size: 12px;
  font-weight: 550;
}
.person-initial {
  width: 33px;
  height: 36px;
  display: grid;
  place-items: center;
  background: #ecede8;
  border: 1px solid #dce0d3;
  font-size: 12px;
  font-weight: 500;
  border-radius: 9px;
  flex-shrink: 0;
}
.duty-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #7c8175;
  font-size: 11px;
  white-space: nowrap;
}
.duty-state::before {
  content: "";
  width: 5px;
  height: 5px;
  background: #c3c8ba;
}
.duty-state.working {
  color: #3a653b;
}
.duty-state.working::before {
  background: #52834c;
}
.row-progress {
  display: grid;
  gap: 5px;
  max-width: 75px;
  font-size: 11px;
}
progress {
  appearance: none;
  width: 100%;
  height: 3px;
  border: 0;
  background: #e8ebe1;
  color: #525e41;
}
progress::-webkit-progress-bar {
  background: #e8ebe1;
}
progress::-webkit-progress-value {
  background: #525e41;
}
progress::-moz-progress-bar {
  background: #525e41;
}
.count-tag {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  margin-left: 6px;
  padding: 0 5px;
  background: #f5e8db;
  color: #a45e23;
  font-size: 10px;
  font-weight: 500;
  border-radius: 2px;
}
.review-panel {
  border-top: 2px solid #c64d32;
}
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  padding: 3px 7px;
  border-radius: 2px;
  background: #eef3e9;
  color: #48653e;
  white-space: nowrap;
}
.badge.warn {
  background: #f7f0df;
  color: #8c6a23;
}
.badge.danger {
  background: #fae9e2;
  color: #a3452d;
}
.task {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.task-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
}
.task-head h3 {
  line-height: 1.5;
}
.task-head p {
  margin: 0 0 4px;
  font-size: 11px;
  color: var(--muted);
}
.task > p {
  margin-top: 9px;
  font-size: 11px;
  color: var(--muted);
}
.task .actions {
  margin-top: 14px;
}
.task .review-note {
  color: var(--red);
  padding: 10px;
  background: #fbefeb;
}
.task-upload {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 9px 12px;
  font-size: 11px;
  border: 1px dashed #c1c8b7;
  border-radius: 9px;
  cursor: pointer;
  font-weight: 400;
}
.task-upload:hover {
  background: #f5f7ef;
}
.task-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  padding: 0;
  opacity: 0;
  overflow: hidden;
  clip-path: inset(50%);
}
.task-upload:focus-within {
  outline: 2px solid #386d96;
  outline-offset: 3px;
}
.completion-count {
  font-size: 11px;
  color: var(--muted);
}
.task-board > .panel-sub {
  margin: -6px 0 18px;
}
.photo-button {
  padding: 0;
  background: none;
  border: 0;
  min-height: 0;
}
.photo-thumb {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 2px;
  cursor: zoom-in;
}
.notice-summary {
  background: #f9faf5;
}
.notice-summary h3 {
  font-size: 13px;
}
.notice-summary > p {
  margin: 10px 0 17px;
  font-size: 12px;
  line-height: 1.75;
  color: #626858;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.notice-summary > small {
  color: var(--muted);
  font-size: 10px;
  display: block;
}
.shift-controls .panel-title {
  margin-bottom: 12px;
}
.shift-clock {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-block: 11px;
  border-bottom: 1px solid var(--line);
}
.shift-clock > span {
  font-size: 32px;
  font-weight: 450;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}
.shift-clock small {
  font:
    8px/1.5 ui-monospace,
    SFMono-Regular,
    monospace;
  color: var(--muted);
}
.clock-note {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
  margin: 14px 0;
}
.shift-steps {
  display: grid;
  gap: 8px;
}
.step-button {
  justify-content: flex-start;
  padding: 11px;
  font-size: 11px;
  min-height: 43px;
  font-weight: 400;
}
.step-button .icon {
  width: 16px;
  height: 16px;
  color: #777d6b;
}
.clock-submit {
  width: 100%;
  justify-content: space-between;
  margin-top: 10px;
  min-height: 43px;
}
.venue-note {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #7e8573;
  font-size: 9px;
  margin-top: 15px;
}
.venue-note .icon {
  width: 12px;
  height: 12px;
}
.privacy-note {
  color: #838a78;
  font-size: 10px;
  line-height: 1.7;
  padding: 0 3px;
}
.empty {
  padding: 30px 10px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-block: 1px solid #cdd1c2;
  margin-bottom: 25px;
}
.stat {
  padding: 17px 20px;
  border-right: 1px solid #d8dccf;
}
.stat:first-child {
  padding-left: 0;
}
.stat:last-child {
  border: 0;
}
.stat > span {
  font-size: 11px;
  color: var(--muted);
}
.stat strong {
  display: block;
  font-size: 28px;
  margin-top: 5px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.form-row,
.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}
.inline-form {
  margin-top: 20px;
}
.settings-note {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8;
  margin-top: 20px;
}
.check-people {
  display: grid;
  gap: 11px;
  max-height: 230px;
  overflow: auto;
  border: 1px solid var(--line);
  padding: 12px;
}
.check-people label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 400;
}
.check-people input {
  margin: 0;
}
.announcement {
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}
.announcement:first-child {
  padding-top: 0;
}
.announcement:last-child {
  border: 0;
}
.announcement p {
  font-size: 13px;
  line-height: 1.8;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin-top: 10px;
}
.announcement small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 15px;
}
.messages-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.conversation {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: none;
  color: var(--ink);
  padding: 15px 7px;
  font-size: 12px;
}
.conversation:hover,
.conversation.selected {
  background: #f0f3e8;
  color: #364226;
}
.conversation small {
  display: block;
  font-size: 10px;
  margin-top: 6px;
  color: var(--muted);
}
.message-list {
  height: 420px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 5px 5px 22px;
}
.message {
  max-width: 85%;
  align-self: flex-start;
  background: #f0f2eb;
  padding: 13px 15px;
  border-radius: 10px;
}
.message.mine {
  align-self: flex-end;
  background: #e5eadb;
}
.message b {
  font-size: 11px;
}
.message p {
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin-top: 5px;
}
.message time {
  display: block;
  color: var(--muted);
  font-size: 9px;
  margin-top: 8px;
}
.send-form {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}
.send-form textarea {
  min-height: 65px;
  max-height: 180px;
}
.footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 17px 36px;
  color: #8a917d;
  font-size: 9px;
}
.footer > span:last-child {
  display: flex;
  align-items: center;
  gap: 7px;
}
.footer .icon {
  width: 12px;
  height: 12px;
}
.loading {
  display: grid;
  place-content: center;
  gap: 20px;
  min-height: 100svh;
}
.loading .brand {
  font-weight: 700;
  letter-spacing: -0.055em;
  font-size: 28px;
}
.form-error {
  color: var(--red);
  font-size: 12px;
  min-height: 18px;
}
.notice {
  padding: 16px;
  margin-bottom: 20px;
  border-left: 3px solid #b78530;
  background: #f7f1e3;
  color: #72571f;
  font-size: 12px;
}
.pending {
  color: #986f26;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--ink);
  width: min(94vw, 600px);
  max-height: 94svh;
  padding: 22px;
}
dialog::backdrop {
  background: #10170cb3;
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}
.dialog-head h2 {
  font-size: 19px;
  font-weight: 550;
}
.dialog-head button,
#photo-view > button {
  background: none;
  color: var(--muted);
  padding: 0 10px;
  font-size: 24px;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}
#camera-video,
#camera-preview {
  width: 100%;
  max-height: 58svh;
  object-fit: contain;
  background: #141a0f;
  border-radius: 9px;
}
#camera-video.selfie {
  transform: scaleX(-1);
}
#camera-error {
  color: var(--red);
  font-size: 12px;
  margin-top: 12px;
}
#photo-view img {
  width: 100%;
  max-height: 77svh;
  object-fit: contain;
}
#photo-view > button {
  display: block;
  margin-left: auto;
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  background: #252c1e;
  color: white;
  padding: 13px 20px;
  border-radius: 10px;
  font-size: 12px;
  max-width: 90vw;
}
.login-wrap {
  display: grid;
  grid-template-columns: 46% 54%;
  min-height: 100svh;
}
.login-panel {
  background: #f8f9f4;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 37px 45px 28px;
}
.login-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.login-box {
  width: min(100%, 340px);
  margin: 65px auto;
}
.login-box > .eyebrow {
  color: #7a816e;
  margin-bottom: 18px;
}
.login-box h1 {
  font-size: 43px;
  font-weight: 600;
  letter-spacing: -0.055em;
  margin-bottom: 14px;
}
.login-box > p:not(.eyebrow) {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}
.login-box form {
  margin-top: 32px;
  gap: 23px;
}
.login-box input {
  padding: 14px;
}
.login-submit {
  display: flex;
  justify-content: space-between;
  min-height: 47px;
  margin-top: 4px;
}
.login-note {
  padding-top: 22px;
  margin-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 11px !important;
}
.login-bottom {
  display: flex;
  justify-content: space-between;
  color: #8a927c;
  font:
    9px/1.5 ui-monospace,
    SFMono-Regular,
    monospace;
}
.login-art {
  min-height: 720px;
  background: #151715 url("/assets/images/signature-dish.webp") center / cover
    no-repeat;
  display: flex;
  align-items: flex-end;
  padding: 30px;
}
.login-photo-caption {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  color: #e2e7d8;
  font:
    9px/1.5 ui-monospace,
    SFMono-Regular,
    monospace;
  letter-spacing: 0.04em;
}
@media (min-width: 1600px) {
  .main {
    padding-top: 40px;
  }
  .work-layout {
    grid-template-columns: minmax(0, 1fr) 340px;
  }
}
@media (max-width: 1150px) {
  .sidebar {
    width: 180px;
    padding-inline: 10px;
  }
  .body {
    margin-left: 180px;
  }
  .main {
    padding-inline: 24px;
  }
  .header {
    padding-inline: 24px;
  }
  .work-layout {
    grid-template-columns: minmax(0, 1fr) 270px;
    gap: 18px;
  }
  .stack {
    gap: 18px;
  }
  .panel {
    padding: 18px;
  }
  .roster-panel {
    padding: 0;
  }
  .roster-table th,
  .roster-table td {
    padding-inline: 12px;
  }
  .header-person {
    display: none;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .messages-layout {
    grid-template-columns: 200px minmax(0, 1fr);
  }
}
@media (max-width: 950px) {
  .work-layout {
    grid-template-columns: 1fr;
  }
  .work-layout > .stack:last-child {
    grid-template-columns: 1fr 1fr;
  }
  .privacy-note {
    grid-column: 1/-1;
  }
  .operations-summary > div {
    padding-inline: 20px;
  }
  .operations-summary > div > span:last-child {
    font-size: 10px;
  }
  .login-panel {
    padding-inline: 30px;
  }
}
@media (max-width: 700px) {
  button {
    min-height: 44px;
  }
  input,
  select,
  textarea {
    font-size: 16px;
  }
  .sidebar {
    position: static;
    width: 100%;
    padding: 20px 18px 0;
  }
  .sidebar > .brand {
    margin-left: 0;
    flex-direction: row;
    align-items: baseline;
    gap: 13px;
  }
  .sidebar .wordmark {
    font-size: 25px;
  }
  .brand-caption {
    font-size: 8px;
  }
  .nav-label,
  .sidebar-bottom {
    display: none;
  }
  .nav {
    display: flex;
    overflow-x: auto;
    margin: 20px -18px 0;
    padding: 0 12px 9px;
    gap: 3px;
    scrollbar-width: thin;
    scrollbar-color: #626c52 transparent;
  }
  .nav button {
    flex-shrink: 0;
    padding: 10px;
    min-height: 42px;
    gap: 7px;
    font-size: 11px;
    white-space: nowrap;
  }
  .nav button[aria-current="page"] {
    box-shadow: inset 0 -2px #e05b3b;
  }
  .nav .icon {
    width: 14px;
    height: 14px;
  }
  .body {
    margin-left: 0;
  }
  .header {
    height: 61px;
    padding: 12px 18px;
  }
  .header-company,
  .header-divider,
  .header-person,
  .avatar {
    display: none;
  }
  .header-right {
    gap: 12px;
  }
  .header-title {
    font-size: 11px;
  }
  .lang button {
    min-height: 29px;
  }
  .main {
    padding: 25px 16px 32px;
  }
  .page-head {
    gap: 15px;
    margin-bottom: 22px;
    align-items: flex-start;
  }
  .page-head h1,
  .operations-heading h1 {
    font-size: 30px;
  }
  .operations-heading {
    flex-wrap: wrap;
  }
  .operations-heading > .actions {
    gap: 8px;
  }
  .operations-heading > .actions button {
    font-size: 11px;
  }
  .operations-summary {
    margin-bottom: 20px;
    padding: 15px 0;
  }
  .operations-summary > div {
    display: grid;
    gap: 8px;
    padding-inline: 14px;
    flex: 1;
  }
  .operations-summary > div > span:last-child {
    font-size: 10px;
  }
  .summary-number {
    font-size: 25px;
  }
  .work-layout {
    gap: 18px;
  }
  .work-layout > .stack:last-child {
    grid-template-columns: 1fr;
  }
  .panel {
    padding: 18px;
  }
  .roster-panel {
    padding: 0;
  }
  .roster-panel > .panel-title {
    padding: 13px 14px;
    gap: 8px;
  }
  .panel h2 {
    font-size: 14px;
  }
  .panel-title {
    gap: 12px;
    margin-bottom: 16px;
  }
  .panel-title button.text {
    font-size: 10px;
  }
  .roster-table th,
  .roster-table td {
    padding: 13px 10px;
  }
  .roster-table th {
    font-size: 9px;
    white-space: normal;
  }
  .roster-table td {
    font-size: 11px;
  }
  .person-cell {
    gap: 8px;
  }
  .person-cell strong {
    font-size: 11px;
  }
  .person-initial {
    display: none;
  }
  .data-table small {
    font-size: 9px;
  }
  .duty-state {
    font-size: 10px;
  }
  .task-head {
    flex-wrap: wrap;
    gap: 8px;
  }
  .task h3 {
    font-size: 13px;
  }
  .task .actions button,
  .task-upload {
    min-height: 44px;
    font-size: 11px;
  }
  .review-panel .panel-title {
    flex-wrap: wrap;
  }
  .task-board .panel-title {
    flex-wrap: wrap;
  }
  .shift-clock > span {
    font-size: 35px;
  }
  .shift-clock small {
    font-size: 9px;
  }
  .clock-note {
    max-width: 280px;
  }
  .shift-steps {
    grid-template-columns: 1fr 1fr;
  }
  .step-button {
    padding: 9px;
    font-size: 11px;
  }
  .clock-submit {
    min-height: 46px;
  }
  .stats {
    margin-bottom: 20px;
  }
  .stat {
    padding-inline: 14px;
  }
  .stat > span {
    font-size: 10px;
  }
  .stat strong {
    font-size: 25px;
  }
  .form-row,
  .two-col {
    grid-template-columns: 1fr;
  }
  .messages-layout {
    grid-template-columns: 1fr;
  }
  .conversation-list {
    max-height: 180px;
    overflow: auto;
  }
  .message-list {
    height: 45svh;
  }
  .send-form {
    grid-template-columns: 1fr;
  }
  .footer {
    padding: 16px;
    font-size: 8px;
  }
  .footer > span:last-child {
    display: none;
  }
  .login-wrap {
    grid-template-columns: 1fr;
  }
  .login-panel {
    min-height: 100svh;
    padding: 28px 25px;
  }
  .login-art {
    display: none;
  }
  .login-box {
    margin: 65px auto;
  }
  .login-box h1 {
    font-size: 38px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 950px) {
  .worker-layout > .stack:last-child {
    order: -1;
    grid-template-columns: 1fr;
  }
}

/* Work planning and conversations */
.planning-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}
.planning-layout > *,
.chat-sidebar,
#conversation-area {
  min-width: 0;
}
.job-row {
  padding: 22px 0;
  border-bottom: 1px solid var(--line, #e2e3e0);
}
.job-row:first-child {
  padding-top: 0;
}
.job-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}
.job-description,
.event-row p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.job-meta {
  font-size: 12px;
  line-height: 1.9;
  color: #777;
}
.overdue {
  color: #a43729;
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
}
.weekday {
  text-align: center;
  padding: 12px 0;
  color: #777;
  font-size: 11px;
}
.calendar-cell {
  height: 68px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  padding: 10px;
  border: 1px solid #e8e8e4;
  background: transparent;
  color: #262a27;
  border-radius: 2px;
}
.calendar-cell:hover {
  background: #f5f5f1;
  color: #262a27;
}
.calendar-cell.selected {
  background: #282e29;
  border-color: #282e29;
  color: #fff;
}
.calendar-cell.today > span {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.calendar-cell small {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
}
.calendar-cell i {
  display: block;
  width: 5px;
  height: 5px;
  background: #cb6038;
  border-radius: 50%;
}
.event-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px;
  padding: 20px 0;
  border-top: 1px solid #e8e8e4;
}
.event-row time,
.event-row small {
  font-size: 11px;
  color: #747a75;
  line-height: 1.8;
}
.event-row .actions {
  margin-top: 12px;
}
.calendar-panel .panel-title {
  flex-wrap: wrap;
}
.calendar-panel .actions button {
  font-size: 11px;
  padding: 8px 10px;
}
.messages-layout {
  grid-template-columns: 280px minmax(0, 1fr);
  align-items: start;
  gap: 20px;
}
.chat-sidebar {
  padding: 0;
  overflow: hidden;
}
.new-chat {
  padding: 16px;
  border-bottom: 1px solid #e3e5e0;
}
.new-chat summary {
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.new-chat form {
  padding-top: 18px;
}
.new-chat [hidden] {
  display: none;
}
.new-chat .check-people {
  max-height: 220px;
  overflow: auto;
}
.conversation-list {
  max-height: 620px;
  overflow: auto;
}
.conversation {
  padding: 18px;
  border-radius: 0;
  margin: 0;
  border-bottom: 1px solid #e8e8e4;
  border-left: 3px solid transparent;
}
.conversation.selected {
  border-left-color: #bf5835;
  background: #f0f1ec;
}
.conversation strong {
  display: block;
  font-size: 13px;
}
.conversation small {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.conversation time {
  display: block;
  margin-top: 7px;
  font-size: 10px;
  color: #8a8e88;
}
#conversation-area {
  padding: 0;
  overflow: hidden;
}
.chat-heading {
  padding: 20px 24px;
  border-bottom: 1px solid #e3e5e0;
}
.chat-heading h2 {
  margin: 0 0 5px;
}
.chat-heading small {
  color: #7b807a;
  font-size: 11px;
}
.message-list {
  height: 440px;
  max-height: 55vh;
  padding: 24px;
  background: #fafaf7;
}
.message {
  max-width: 85%;
  width: fit-content;
  margin-bottom: 16px;
}
.message.mine {
  margin-left: auto;
  background: #ecefe6;
}
.message p {
  overflow-wrap: anywhere;
}
.send-form {
  padding: 16px 20px;
  border-top: 1px solid #e3e5e0;
  margin: 0;
  align-items: end;
}
.send-form textarea {
  min-height: 54px;
  height: 70px;
}
.send-form .form-error {
  grid-column: 1/-1;
  margin: 0;
}
@media (max-width: 1100px) {
  .planning-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .event-editor {
    max-width: none;
  }
}
@media (max-width: 700px) {
  .messages-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .conversation-list {
    max-height: 200px;
  }
  .calendar-cell {
    height: 54px;
    padding: 7px;
  }
  .event-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }
  .message-list {
    padding: 16px;
  }
  .send-form {
    padding: 12px;
  }
}

.mobile-nav,
.mobile-chat-back {
  display: none;
}
@media (max-width: 700px) {
  .sidebar {
    display: none;
  }
  .body {
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
  }
  .header {
    padding-top: calc(10px + env(safe-area-inset-top));
    height: auto;
    min-height: 60px;
  }
  .header-title {
    font-size: 13px;
    font-weight: 600;
  }
  .mobile-nav {
    position: fixed;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 5px 5px calc(5px + env(safe-area-inset-bottom));
    background: #fff;
    border-top: 1px solid #dedfd9;
    box-shadow: 0 -4px 20px #00000004;
  }
  .mobile-nav > button,
  .mobile-more > summary {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    color: #777d75;
    background: transparent;
    border: 0;
    padding: 7px 1px;
    min-height: 58px;
    font-size: 9px;
    font-weight: 500;
    line-height: 1.2;
    border-radius: 9px;
    text-align: center;
    cursor: pointer;
  }
  .mobile-nav .icon {
    width: 21px;
    height: 21px;
  }
  .mobile-nav > button[aria-current] {
    color: #b14b2b;
    background: #f9f0e9;
    box-shadow: none;
  }
  .mobile-more > summary {
    list-style: none;
  }
  .mobile-more > summary::-webkit-details-marker {
    display: none;
  }
  .mobile-more[open] > summary {
    color: #b14b2b;
  }
  .mobile-menu {
    position: absolute;
    bottom: calc(100% + 8px);
    right: 10px;
    left: 10px;
    background: #fff;
    padding: 12px;
    border: 1px solid #dedfd9;
    box-shadow: 0 -8px 35px #0002;
    border-radius: 8px;
    max-height: 65dvh;
    overflow: auto;
  }
  .mobile-menu > p {
    padding: 4px 10px 14px;
    margin: 0;
    font-weight: 600;
  }
  .mobile-menu small {
    display: block;
    color: #777;
    font-size: 11px;
    margin-top: 4px;
  }
  .mobile-menu > button {
    display: flex;
    gap: 12px;
    align-items: center;
    width: 100%;
    background: transparent;
    color: #30352f;
    border: 0;
    border-top: 1px solid #f0f1ec;
    padding: 14px 10px;
    text-align: left;
  }
  .main {
    padding: 20px 14px 24px;
  }
  .page-head h1,
  .operations-heading h1 {
    font-size: 27px;
  }
  .worker-layout .shift-controls {
    border-top: 3px solid #bc5733;
  }
  .shift-controls .step-button,
  .clock-submit,
  .task-upload,
  .task .actions button {
    min-height: 50px;
  }
  .task .actions {
    gap: 10px;
  }
  .job-row .actions button {
    min-height: 48px;
    flex-grow: 1;
  }
  .job-row .task-head h2 {
    font-size: 16px;
  }
  .job-meta {
    font-size: 13px;
  }
  .job-description {
    font-size: 14px;
  }
  .mobile-chat-back {
    display: inline-flex;
    margin-bottom: 12px;
  }
  .messages-layout[data-thread-open="true"] .chat-sidebar {
    display: none;
  }
  .messages-layout[data-thread-open="false"] #conversation-area {
    display: none;
  }
  .messages-layout .conversation-list {
    max-height: none;
  }
  .messages-layout .conversation {
    min-height: 85px;
  }
  .messages-layout .conversation strong {
    font-size: 15px;
  }
  .messages-layout[data-thread-open="true"] #conversation-area {
    display: flex;
    flex-direction: column;
    height: calc(100dvh - 175px - env(safe-area-inset-bottom));
    min-height: 320px;
  }
  body:has(.messages-layout[data-thread-open="true"]) .page-head {
    display: none;
  }
  .chat-heading {
    padding: 12px 16px;
    flex-shrink: 0;
  }
  .message-list {
    min-height: 0;
    height: auto;
    max-height: none;
    flex: 1;
    gap: 12px;
  }
  .message {
    flex-shrink: 0;
  }
  .message p {
    font-size: 15px;
  }
  .send-form {
    grid-template-columns: minmax(0, 1fr) auto;
    flex-shrink: 0;
    gap: 8px;
  }
  .send-form textarea {
    height: 48px;
    min-height: 48px;
    padding: 12px;
  }
  .send-form button {
    min-height: 48px;
    padding-inline: 12px;
  }
  #toast {
    bottom: calc(90px + env(safe-area-inset-bottom));
  }
}

.focused-shift {
  width: 100%;
  max-width: 520px;
}
.shift-start {
  color: var(--muted);
  font-size: 12px;
  margin: 0 0 22px;
}
.shift-cancel {
  width: 100%;
  margin-top: 8px;
}
.focused-shift .shift-controls {
  border-top: 3px solid #bc5733;
}
.roster-footer {
  padding: 18px 24px;
  border-top: 1px solid var(--line);
}
.roster-footer button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
@media (max-width: 700px) {
  .focused-shift {
    max-width: none;
  }
  .focused-shift .page-head {
    margin-bottom: 24px;
  }
}
.place-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.place-row:first-child {
  padding-top: 0;
}
.place-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.place-row h2 {
  margin-bottom: 6px;
}
.place-row small {
  color: var(--muted);
}
.place-editor {
  max-width: 700px;
}
#place-map {
  height: 300px;
  width: 100%;
  border: 1px solid var(--line);
  z-index: 0;
}
#map-selection {
  margin: 0;
}
.map-coordinates summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
}
.map-coordinates .form-row {
  margin-top: 12px;
}
.leaflet-control-attribution {
  font-size: 10px;
}
.leaflet-container {
  font-family: inherit;
}
@media (max-width: 700px) {
  #place-map {
    height: 280px;
  }
  .leaflet-touch .leaflet-bar a {
    width: 40px;
    height: 40px;
    line-height: 40px;
  }
}

/* Workspace shell and focused staff tools. */
button {
  min-height: 44px;
  font-size: 13px;
}
input,
select,
textarea {
  border-color: #d9dde4;
  min-height: 46px;
}
label {
  font-size: 13px;
}
button.secondary {
  border-color: #dfe3e9;
}
button.secondary:hover {
  background: #f4f6f8;
}
button.text {
  font-size: 12px;
}
.eyebrow {
  font-family: inherit;
  text-transform: none;
  font-size: 12px;
  letter-spacing: 0;
}
.sidebar {
  width: 236px;
  height: 100dvh;
  padding: 30px 16px 20px;
  background: white;
  color: var(--ink);
  border-right: 1px solid var(--line);
  transition:
    transform 180ms ease,
    visibility 180ms;
}
.sidebar .brand-caption {
  color: var(--muted);
}
.nav-label {
  margin-top: 32px;
  color: #88909b;
  font-family: inherit;
  font-size: 11px;
  line-height: 1.5;
  text-transform: none;
}
.nav {
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  padding-bottom: 12px;
}
.nav button {
  flex-shrink: 0;
  min-height: 44px;
  color: #626b77;
  font-size: 13px;
  font-weight: 500;
  border-radius: 10px;
}
.nav .icon {
  width: 18px;
  height: 18px;
  opacity: 0.85;
}
.nav button:hover {
  background: #f4f5f7;
  color: var(--ink);
}
.nav button[aria-current="page"] {
  background: #fcf0e9;
  color: #a34429;
  box-shadow: none;
}
.sidebar-bottom {
  flex-shrink: 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.sidebar-location {
  font-family: inherit;
  font-size: 10px;
}
.body {
  margin-left: 236px;
  transition: margin-left 180ms ease;
}
.sidebar-hidden .sidebar {
  transform: translateX(-100%);
  visibility: hidden;
}
.sidebar-hidden .body {
  margin-left: 0;
}
.header {
  background: #fff;
  padding-inline: 28px;
}
.header-title {
  gap: 12px;
  font-size: 13px;
  min-width: 0;
}
.header-person {
  font-size: 12px;
}
.header-person small {
  font-size: 11px;
}
.sidebar-toggle {
  width: 40px;
  min-height: 40px;
  padding: 0;
  background: transparent;
  color: #66707d;
  border: 1px solid var(--line);
}
.sidebar-toggle:hover {
  background: #f3f5f7;
}
.avatar {
  padding: 0;
  width: 38px;
  height: 38px;
  min-height: 38px;
  border: 0;
  border-radius: 50%;
  background: #eef0f4;
  color: #4d5869;
}
.avatar:hover {
  background: #e2e6ed;
}
.panel {
  border-radius: 16px;
  box-shadow: 0 3px 12px #1a283003;
}
.page-head h1 {
  letter-spacing: -0.035em;
  font-weight: 650;
}
.page-head p,
.panel-sub {
  font-size: 13px;
}
.badge {
  border-radius: 20px;
}
.focused-shift .shift-controls {
  border-top: 1px solid var(--line);
}
.focused-shift .shift-time {
  letter-spacing: -0.055em;
}
.profile-panel,
.settings-layout {
  max-width: 560px;
}
.profile-identity {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}
.profile-identity h2 {
  font-size: 20px;
}
.profile-identity p,
.person-details p,
.template-row p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}
.profile-avatar,
.directory-avatar {
  display: grid;
  place-items: center;
  background: #edf0f5;
  color: #566376;
  border-radius: 50%;
  flex-shrink: 0;
}
.profile-avatar {
  width: 60px;
  height: 60px;
  font-size: 23px;
}
.directory-avatar {
  width: 42px;
  height: 42px;
  font-size: 16px;
}
.toggle-field {
  display: flex;
  align-items: center;
  gap: 10px;
}
.toggle-field input {
  margin: 0;
  flex-shrink: 0;
}
.profile-account {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  margin-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.profile-panel .panel-sub {
  margin: -8px 0 0;
}
.directory-panel,
.template-panel {
  max-width: 900px;
}
.directory-filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding-bottom: 20px;
}
.person-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.person-details {
  min-width: 0;
  flex: 1;
  overflow-wrap: anywhere;
}
.phone-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  color: #375475;
}
.phone-link:hover {
  text-decoration: underline;
}
.phone-private {
  color: var(--muted);
  font-size: 12px;
}
.template-filter {
  max-width: 260px;
  margin-bottom: 20px;
}
.template-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.template-row > div:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}
.template-row .actions {
  flex-shrink: 0;
  gap: 16px;
}
.template-row h2 {
  line-height: 1.5;
}
@media (max-width: 950px) and (min-width: 701px) {
  .header-company,
  .header-divider {
    display: none;
  }
  .header {
    padding-inline: 20px;
  }
}
@media (max-width: 700px) {
  .body {
    margin-left: 0;
  }
  .sidebar-toggle {
    display: none;
  }
  .header {
    padding-inline: 16px;
    gap: 8px;
  }
  .header-title {
    font-size: 12px;
  }
  .header-right {
    gap: 8px;
    flex-shrink: 0;
  }
  .header .avatar {
    display: grid;
    width: 34px;
    height: 34px;
    min-height: 34px;
  }
  .header .text {
    font-size: 10px;
  }
  .main {
    padding: 28px 18px;
  }
  .page-head h1 {
    font-size: 28px;
  }
  .page-head {
    flex-wrap: wrap;
  }
  .panel {
    padding: 22px 18px;
    border-radius: 16px;
  }
  .roster-panel {
    padding: 0;
  }
  input,
  select,
  textarea {
    font-size: 16px;
  }
  .mobile-nav {
    padding-inline: 8px;
    gap: 3px;
  }
  .mobile-nav > button,
  .mobile-more > summary {
    font-size: 10px;
    border-radius: 12px;
  }
  .mobile-menu {
    border-radius: 16px;
  }
  .directory-filters {
    gap: 12px;
  }
  .person-row {
    flex-wrap: wrap;
    gap: 10px 12px;
  }
  .person-details {
    flex-basis: calc(100% - 56px);
  }
  .phone-link,
  .phone-private {
    margin-left: 54px;
  }
  .phone-link {
    min-height: 32px;
  }
  .template-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .sidebar,
  .body {
    transition: none;
  }
}

@media (max-width: 700px) {
  .body {
    transition: none;
  }
}
