:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --panel: #ffffff;
  --panel-soft: #f8fafb;
  --ink: #17202a;
  --muted: #667486;
  --line: #dde3ea;
  --line-strong: #c7d0da;
  --nav: #121922;
  --nav-soft: #1b2633;
  --accent: #d9862e;
  --accent-strong: #b8671f;
  --accent-soft: #fff3e7;
  --accent-line: #efc08f;
  --green: #16845b;
  --blue: #2563eb;
  --danger: #b42318;
  --shadow: 0 12px 28px rgb(20 32 44 / 0.08);
  --radius: 8px;
  --mobile-nav-height: 64px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

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

.login-panel {
  width: min(420px, 100%);
  display: grid;
  gap: 18px;
  padding: 28px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 30px;
  line-height: 1.1;
}

h2 {
  font-size: 18px;
}

h3 {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}

.login-panel button,
.queue-row,
.nav-item,
.metric {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
}

.login-panel button {
  min-height: 44px;
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  font-weight: 800;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 252px 1fr;
}

.side-nav {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  border-right: 1px solid rgb(255 255 255 / 0.08);
  background: var(--nav);
  color: #eff5f6;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  margin-bottom: 14px;
  padding: 6px 8px 18px;
  font-weight: 900;
}

.brand img {
  display: block;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  object-position: left center;
  box-shadow: 0 8px 18px rgb(0 0 0 / 0.28);
}

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

.brand strong {
  color: #ffffff;
  font-size: 15px;
}

.brand small {
  color: #9fb0c2;
  font-size: 12px;
}

.nav-item {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 12px;
  border-color: transparent;
  background: transparent;
  color: #d8e0e7;
  text-align: left;
}

.nav-item:hover,
.nav-item.is-active {
  border-color: transparent;
  background: var(--nav-soft);
  box-shadow: inset 3px 0 0 var(--accent);
  color: #ffffff;
}

.nav-item strong,
.nav-item small {
  display: block;
}

.nav-item small {
  margin-top: 2px;
  color: #9fb0c2;
  font-size: 12px;
}

.bottom-nav {
  display: none;
}

.workspace {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 22px;
  padding: 26px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding-bottom: 0;
  border-bottom: 0;
}

.system-state {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.system-state span {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.view-content {
  display: grid;
  gap: 24px;
}

.section-band {
  display: grid;
  gap: 14px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}

.metric {
  min-height: 104px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 18px;
  text-align: left;
  box-shadow: var(--shadow);
}

.metric[data-tone="accent"] {
  border-color: rgb(216 120 40 / 0.32);
  background: var(--accent-soft);
}

.metric[data-tone="warning"] {
  border-color: rgb(183 121 31 / 0.32);
  background: #fff8e7;
}

.metric-value {
  font-size: 28px;
  font-weight: 900;
}

.metric-label {
  font-weight: 800;
  overflow-wrap: anywhere;
}

.metric-source {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.queue-list {
  display: grid;
  gap: 8px;
}

.queue-row {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  text-align: left;
}

.queue-row span strong,
.queue-row span small {
  display: block;
}

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

.queue-row b {
  color: var(--accent-strong);
  font-size: 14px;
}

.queue-row[data-tone="accent"] {
  border-color: rgb(216 120 40 / 0.28);
}

.queue-row[data-tone="warning"] {
  border-color: rgb(183 121 31 / 0.32);
  background: #fffdf6;
}

.employee-import-panel {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.employee-import-head,
.employee-import-summary,
.employee-import-grid {
  display: grid;
  gap: 12px;
}

.employee-import-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.employee-import-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.preview-mode {
  align-self: start;
  padding: 6px 10px;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
}

.employee-import-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 4px;
}

.employee-import-summary article {
  min-height: 74px;
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-soft);
}

.employee-import-summary span,
.employee-preview-row small,
.employee-import-grid p,
.employee-import-empty span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.employee-import-summary strong {
  font-size: 24px;
}

.employee-import-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  margin-top: 14px;
}

.employee-import-grid section,
.employee-preview-section {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.preview-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preview-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.preview-chip b {
  color: var(--ink);
}

.preview-warning {
  color: var(--danger);
}

.preview-ok {
  color: var(--green);
}

.employee-preview-section {
  margin-top: 14px;
}

.employee-preview-table,
.employee-list-preview {
  display: grid;
  gap: 6px;
}

.employee-preview-table div,
.employee-preview-row {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.2fr);
  gap: 10px;
  align-items: center;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-soft);
}

.employee-preview-table span,
.employee-preview-row span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.employee-preview-row {
  grid-template-columns: minmax(180px, 1.2fr) minmax(160px, 0.9fr) minmax(70px, 0.4fr) minmax(150px, 0.8fr);
}

.employee-import-loading,
.employee-import-empty {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 7px;
  background: var(--panel-soft);
}

.time-review-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.time-review-head,
.time-review-toolbar,
.time-review-summary,
.time-review-overview {
  display: grid;
  gap: 12px;
}

.time-review-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.time-review-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.time-review-toolbar {
  grid-template-columns: minmax(190px, 0.7fr) minmax(260px, 1fr) minmax(190px, 0.35fr) minmax(150px, 0.25fr);
}

.time-review-toolbar input,
.time-review-toolbar select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
}

.time-review-overview {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.36fr);
}

.time-review-checklist,
.time-review-meta {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.time-review-checklist {
  border-color: #c8d7c5;
  background: #f7fbf6;
}

.time-review-kicker {
  display: block;
  margin-bottom: 4px;
  color: #637163;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.time-review-checklist h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.time-review-checklist ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: #243224;
  font-size: 13px;
  font-weight: 750;
}

.time-review-meta {
  display: grid;
  align-content: start;
  gap: 12px;
}

.time-review-meta dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.time-review-meta div {
  display: grid;
  gap: 2px;
}

.time-review-meta dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.time-review-meta dd {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.time-review-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.time-review-summary article {
  min-height: 76px;
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-soft);
}

.time-review-summary span,
.time-entry-row small,
.time-entry-row p span,
.time-employee-list small,
.time-review-count span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.time-review-summary strong {
  font-size: 20px;
}

.time-absence-notice {
  display: grid;
  gap: 3px;
  padding: 12px 14px;
  border: 1px solid #e6d5ad;
  border-radius: 7px;
  background: #fff8e8;
}

.time-absence-notice span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.absence-preview-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.absence-preview-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.absence-preview-head h3 {
  margin: 2px 0;
  font-size: 18px;
}

.absence-preview-head p,
.absence-preview-note span,
.absence-preview-more {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.absence-preview-counts {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.absence-preview-counts span {
  padding: 6px 8px;
  border: 1px solid #d8dde5;
  border-radius: 999px;
  background: #f7f9fc;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.absence-preview-note {
  display: flex;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid #dce4ef;
  border-radius: 7px;
  background: #f8fbff;
  font-size: 12px;
}

.absence-preview-table {
  display: grid;
  gap: 6px;
  max-height: 310px;
  overflow: auto;
  padding-right: 2px;
}

.absence-preview-table article {
  display: grid;
  grid-template-columns: minmax(130px, 0.9fr) 86px 86px minmax(180px, 1.4fr) 105px;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  font-size: 12px;
  font-weight: 750;
}

.absence-preview-table article.needs-review {
  border-color: #e7b46b;
  background: #fff8eb;
}

.absence-preview-table small {
  color: var(--muted);
  font-weight: 800;
}

.time-review-workspace {
  display: grid;
  grid-template-columns: minmax(260px, 0.34fr) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.time-employee-list,
.time-month-panel {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.time-section-title,
.time-month-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.time-section-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.time-employee-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.time-employee-grid button {
  display: grid;
  gap: 2px;
  min-height: 52px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.time-employee-grid button:hover,
.time-employee-grid button.is-active {
  border-color: #d8893a;
  background: #fff8ed;
}

.time-employee-grid strong,
.time-employee-grid small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.time-month-panel {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-soft);
}

.time-month-head {
  padding: 2px 0 6px;
}

.time-month-head h3 {
  margin: 0;
  font-size: 20px;
}

.time-month-head dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(116px, 1fr));
  gap: 8px;
  margin: 0;
}

.time-month-head dl div {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.time-month-head dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.time-month-head dd {
  margin: 0;
  font-size: 14px;
  font-weight: 850;
}

.time-payroll-note {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid #d5dce6;
  border-radius: 7px;
  background: #f7f9fc;
}

.time-payroll-note span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.time-absence-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.time-absence-strip span {
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.time-review-count {
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding-top: 2px;
}

.time-review-count strong {
  font-size: 20px;
}

.time-entry-list {
  display: grid;
  gap: 6px;
}

.time-month-day {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  overflow: hidden;
}

.time-month-day.is-empty {
  background: #fafafa;
}

.time-month-day.is-saturday {
  border-color: #e7b46b;
  background: #fff7ea;
}

.time-month-day.is-sunday {
  border-color: #e19b9b;
  background: #fff0f0;
}

.time-month-date {
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 10px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.58);
}

.time-month-date strong {
  font-size: 13px;
}

.time-month-date small,
.time-empty-day {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.time-month-day-entries {
  display: grid;
  gap: 6px;
  align-content: center;
  min-width: 0;
  padding: 6px;
}

.time-absence-day {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.time-absence-day span {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 12px;
  font-weight: 850;
}

.time-absence-day .is-vacation {
  border-color: #b7d5b2;
  background: #eef9ed;
  color: #2f6f33;
}

.time-absence-day .is-sick {
  border-color: #e1b5b5;
  background: #fff0f0;
  color: #9f3232;
}

.time-absence-day .is-holiday,
.time-absence-day .is-public_holiday {
  border-color: #e6d5ad;
  background: #fff8e8;
  color: #8a5d15;
}

.time-absence-day .is-unpaid,
.time-absence-day .is-unpaid_vacation {
  border-color: #c8cfd8;
  background: #f3f5f7;
  color: #4b5563;
}

.time-empty-day {
  padding: 8px 0;
}

.time-date-head {
  position: sticky;
  top: 0;
  z-index: 1;
  margin-top: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #eef2f5;
  color: #334155;
}

.time-entry-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.1fr) 140px 90px minmax(180px, 1.2fr);
  gap: 12px;
  align-items: center;
  min-height: 62px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.time-month-day .time-entry-row {
  grid-template-columns: 142px 86px minmax(0, 1fr);
  min-height: 44px;
  padding: 8px 10px;
}

.time-pause-adjustment {
  padding: 5px 8px;
  border: 1px solid #ead4a6;
  border-radius: 6px;
  background: #fff8e8;
  color: #7c5518;
  font-size: 11px;
  font-weight: 750;
}

.time-pause-adjustment.is-ok {
  border-color: #d8dde5;
  background: #f7f9fc;
  color: #64748b;
}

.time-entry-row > span,
.time-entry-person {
  display: grid;
  gap: 2px;
}

.time-entry-row strong {
  font-size: 13px;
}

.time-entry-row p {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.jobs-workspace {
  display: grid;
  grid-template-columns: minmax(430px, 0.48fr) minmax(0, 1fr);
  gap: 12px;
  min-height: 420px;
}

.job-list-panel,
.job-detail {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.list-toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.list-toolbar input,
.list-toolbar select,
.list-toolbar button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
}

.list-toolbar input {
  min-width: 0;
}

.list-toolbar select {
  max-width: 128px;
  padding: 0 8px;
}

.list-toolbar button {
  padding: 0 12px;
  border-color: #2f6f9f;
  background: #1f6f9f;
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.job-list {
  display: grid;
  gap: 10px;
}

.job-card {
  min-height: 74px;
  display: grid;
  grid-template-columns: 11px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--ink);
  text-align: left;
}

.job-card:hover,
.job-card.is-active {
  border-color: var(--accent);
}

.job-card strong,
.job-card small {
  display: block;
}

.job-card strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-card small {
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-card b {
  grid-column: 2;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.status-dot {
  width: 11px;
  height: 11px;
  margin-top: 4px;
  border-radius: 50%;
  background: #f5d949;
}

.status-dot[data-tone="neutral"] {
  background: #9aa8b5;
}

.status-dot[data-tone="accent"] {
  background: var(--accent);
}

.status-dot[data-tone="warning"] {
  background: #f5d949;
}

.detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.detail-head-actions {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.detail-head-actions > button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.detail-head h2 {
  font-size: 20px;
  line-height: 1.25;
}

.detail-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.status-card {
  display: grid;
  gap: 8px;
  min-width: 168px;
  min-height: 64px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
  color: var(--muted);
  cursor: pointer;
}

.status-card > span:first-child {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

.status-select-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-select-wrap i {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #f5d949;
  box-shadow: 0 0 0 4px rgb(245 217 73 / 0.2);
}

.status-card[data-tone="neutral"] .status-select-wrap i {
  background: #9aa8b5;
  box-shadow: 0 0 0 4px rgb(154 168 181 / 0.2);
}

.status-card[data-tone="accent"] .status-select-wrap i {
  background: var(--accent);
  box-shadow: 0 0 0 4px rgb(216 134 46 / 0.2);
}

.status-card[data-tone="warning"] {
  border-color: #ead47a;
  background: #fffbea;
}

.status-card select {
  width: 100%;
  min-height: 34px;
  padding: 0 28px 0 0;
  border: 1px solid var(--line);
  border-width: 0 0 1px;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
}

.fact-list span {
  display: grid;
  gap: 8px;
  min-height: 92px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.fact-list strong {
  color: var(--ink);
  font-size: 17px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.address-panel {
  display: grid;
  gap: 12px;
}

.address-list {
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  overflow: hidden;
}

.address-row {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 58px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

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

.address-row.is-primary {
  background: var(--panel-soft);
}

.address-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

.address-row strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.maps-link {
  width: 34px;
  height: 34px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--accent-line);
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.maps-link svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.live-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 76px;
  padding: 14px;
  border: 1px solid #d9e3ec;
  border-radius: var(--radius);
  background: #f7fbff;
}

.live-panel.is-active {
  border-color: #8fd4b5;
  background: #effcf5;
}

.live-state {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.live-state span,
.provider-info h3,
.planning-access h3 {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

.live-state strong {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.live-state i {
  width: 11px;
  height: 11px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #9aa8b5;
  box-shadow: 0 0 0 4px rgb(154 168 181 / 0.16);
}

.live-panel.is-active .live-state i {
  background: #16a085;
  box-shadow: 0 0 0 4px rgb(22 160 133 / 0.18);
}

.live-panel button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid #2f6f9f;
  border-radius: 7px;
  background: #1f6f9f;
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.live-panel.is-active button {
  border-color: #0e806b;
  background: #117865;
}

.provider-info {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.provider-info p {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.55;
}

.provider-info div {
  color: var(--ink);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.55;
}

.provider-info div p,
.provider-info div ul {
  margin: 0 0 10px;
}

.job-create-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.job-create-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 22px;
}

.job-create-head button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.job-create-head [data-job-create-save] {
  border-color: #2f6f9f;
  background: #1f6f9f;
  color: #ffffff;
}

.job-create-form {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.job-create-form label,
.rich-description {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.job-create-form label > span,
.rich-description > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.job-create-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.job-create-form input {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  color: var(--ink);
  font-size: 14px;
}

.job-create-status {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-soft);
  color: var(--ink);
  font-size: 14px;
}

.job-create-status select {
  width: 100%;
  min-height: 34px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.job-create-status i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #9aa8b5;
  box-shadow: 0 0 0 4px rgb(154 168 181 / 0.18);
}

.rich-description {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
}

.rich-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.rich-toolbar button {
  min-width: 34px;
  min-height: 32px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.rich-toolbar [data-rich-color="#b42318"] {
  color: #b42318;
}

.rich-editor {
  min-height: 170px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
  outline: none;
  overflow: auto;
}

.rich-editor:focus {
  border-color: #1f6f9f;
  box-shadow: 0 0 0 3px rgb(31 111 159 / 0.14);
}

.job-create-note {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.planning-access {
  display: grid;
  gap: 6px;
  padding: 12px 0 0;
  border-top: 1px solid var(--line);
}

.planning-access p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.job-tabs {
  display: flex;
  gap: 8px;
  margin-top: 18px;
  padding: 0 0 6px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: thin;
}

.job-tab {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 7px 7px 0 0;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.job-tab:hover,
.job-tab.is-active {
  border-color: var(--accent-line);
  border-bottom-color: var(--panel);
  background: #ffffff;
  color: var(--accent-strong);
  box-shadow: inset 0 -4px 0 var(--accent);
}

.job-tab-content {
  margin-top: 18px;
}

.job-tab-panel {
  display: grid;
  gap: 10px;
  min-height: 188px;
  align-content: start;
}

.fact-list,
.compact-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.compact-row {
  display: grid;
  gap: 4px;
  min-height: 54px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-soft);
}

.compact-row strong,
.compact-row small {
  display: block;
  overflow-wrap: anywhere;
}

.compact-row strong {
  font-size: 12px;
}

.compact-row small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.empty-state {
  margin: 0;
  padding: 14px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.files-panel {
  gap: 14px;
}

.files-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.files-head h3,
.files-head p,
.template-panel h4,
.template-panel p {
  margin: 0;
}

.files-head p,
.template-panel p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.files-head button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid #2f6f9f;
  border-radius: 7px;
  background: #1f6f9f;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.files-head button:disabled {
  border-color: var(--line);
  background: var(--panel-soft);
  color: var(--muted);
}

.files-toolbar input {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  color: var(--ink);
  font-size: 14px;
}

.files-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.files-head-actions [data-file-template-jump] {
  background: #ffffff;
  color: var(--muted);
}

.file-action-note {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.files-layout {
  display: grid;
  gap: 14px;
  align-items: start;
}

.file-list {
  display: grid;
  gap: 8px;
}

.file-row {
  display: grid;
  grid-template-columns: auto 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 62px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
}

.file-row input {
  width: 16px;
  height: 16px;
}

.file-row span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.file-row strong,
.file-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.file-row small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.file-thumb {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-soft);
}

.file-thumb.is-pdf {
  color: #9f2f2f;
  font-size: 10px;
  font-weight: 900;
}

.file-thumb.is-image {
  background:
    linear-gradient(135deg, rgb(255 255 255 / 0.18), rgb(255 255 255 / 0) 42%),
    linear-gradient(145deg, #7c6b55, #2f3d34);
}

.file-thumb.is-image[data-tone="stone"] {
  background:
    linear-gradient(135deg, rgb(255 255 255 / 0.16), rgb(255 255 255 / 0) 42%),
    linear-gradient(145deg, #9a8d7e, #38404a);
}

.file-thumb.is-image[data-tone="asphalt"] {
  background:
    linear-gradient(135deg, rgb(255 255 255 / 0.14), rgb(255 255 255 / 0) 42%),
    linear-gradient(145deg, #616a72, #1e2933);
}

.template-panel {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
  scroll-margin-top: 18px;
}

.template-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
}

.template-panel button {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  color: var(--ink);
  text-align: left;
}

.template-panel strong {
  font-size: 12px;
}

.template-panel small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.3;
}

.planning-board {
  --planning-member-width: 150px;
  --planning-day-width: 1728px;
  --planning-grid-width: calc(var(--planning-member-width) + var(--planning-day-width));
  display: grid;
  gap: 12px;
  min-width: 0;
}

.planning-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.planning-job-tray {
  display: grid;
  gap: 8px;
  max-height: 680px;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.planning-job-tray h3 {
  font-size: 15px;
}

.planning-job-tray small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.planning-job-source {
  display: grid;
  gap: 4px;
  min-height: 76px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-soft);
  color: var(--ink);
  text-align: left;
  cursor: grab;
}

.planning-job-source strong,
.planning-job-source span,
.planning-job-source small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.planning-job-source strong {
  font-size: 12px;
}

.planning-job-source span {
  font-size: 13px;
  font-weight: 700;
}

.planning-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.planning-date,
.planning-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.planning-date button,
.planning-actions button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.planning-actions button:last-child,
.planning-actions [data-planning-save] {
  border-color: #2f6f9f;
  background: #1f6f9f;
  color: #ffffff;
}

.planning-date select {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.planning-grid-shell {
  position: relative;
  min-width: 1040px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.planning-rows {
  position: relative;
}

.planning-hours {
  position: sticky;
  top: 0;
  z-index: 4;
  display: grid;
  grid-template-columns: var(--planning-member-width) repeat(24, 72px);
  width: var(--planning-grid-width);
  min-height: 38px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.planning-hours span,
.planning-hours b {
  display: flex;
  align-items: center;
  padding: 0 8px;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.planning-hours span {
  position: sticky;
  left: 0;
  z-index: 8;
  background: #ffffff;
}

.planning-team-row {
  position: relative;
  width: var(--planning-grid-width);
  box-sizing: border-box;
  min-height: 30px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border-bottom: 1px solid var(--line);
  background: #eef3f7;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.planning-team-row span {
  position: sticky;
  left: 0;
  z-index: 7;
  display: flex;
  align-items: center;
  width: var(--planning-member-width);
  align-self: stretch;
  background: #eef3f7;
}

.planning-team-row::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  z-index: 6;
  height: 1px;
  background: var(--line);
  pointer-events: none;
}

.planning-row {
  position: relative;
  width: var(--planning-grid-width);
  display: grid;
  grid-template-columns: var(--planning-member-width) var(--planning-day-width);
  min-height: 58px;
}

.planning-row::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  z-index: 6;
  height: 1px;
  background: var(--line);
  pointer-events: none;
}

.planning-member {
  position: sticky;
  left: 0;
  z-index: 7;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #ffffff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.planning-lane {
  position: relative;
  display: grid;
  grid-template-columns: repeat(24, 72px);
  min-height: 58px;
  border-bottom: 1px solid var(--line);
  background: #fbf6ec;
  touch-action: none;
}

.planning-cell {
  border-right: 1px solid #d5dbe3;
}

.planning-bubble {
  position: absolute;
  z-index: 3;
  top: 7px;
  bottom: 7px;
  display: grid;
  align-content: center;
  gap: 2px;
  min-width: 96px;
  padding: 5px 28px 5px 9px;
  border: 1px solid var(--line);
  border-left: 4px solid #3478f6;
  border-radius: 5px;
  background: #ffffff;
  overflow: hidden;
  cursor: grab;
  box-shadow: 0 3px 8px rgb(20 32 44 / 0.08);
  user-select: none;
}

.planning-bubble:active {
  cursor: grabbing;
}

.planning-bubble.is-selected {
  border-color: #1f6f9f;
  box-shadow: 0 0 0 2px rgb(31 111 159 / 0.16), 0 7px 18px rgb(20 32 44 / 0.12);
}

.planning-bubble.is-dragging {
  z-index: 20;
  opacity: 0.88;
  cursor: grabbing;
  pointer-events: none;
}

.planning-bubble.is-resizing {
  z-index: 20;
  cursor: ew-resize;
}

.planning-bubble-delete {
  position: absolute;
  top: 4px;
  right: 5px;
  z-index: 2;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border: 1px solid rgb(148 163 184 / 0.45);
  border-radius: 50%;
  background: rgb(255 255 255 / 0.82);
  color: var(--muted);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.planning-bubble-delete:hover {
  border-color: rgb(191 74 74 / 0.45);
  color: #b42318;
}

.planning-bubble-resize {
  position: absolute;
  top: 24px;
  right: 0;
  bottom: 0;
  z-index: 1;
  width: 18px;
  cursor: ew-resize;
}

.planning-bubble-resize::before,
.planning-bubble-resize::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 5px;
  height: 5px;
  border-top: 1.5px solid #94a3b8;
  border-right: 1.5px solid #94a3b8;
}

.planning-bubble-resize::before {
  right: 8px;
  transform: translateY(-50%) rotate(-135deg);
}

.planning-bubble-resize::after {
  right: 3px;
  transform: translateY(-50%) rotate(45deg);
}

.planning-now-line {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 2;
  width: 2px;
  background: #e23b3b;
  pointer-events: none;
}

.planning-now-line::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 50%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #e23b3b;
  transform: translateX(-50%);
  box-shadow: 0 0 0 3px rgb(226 59 59 / 0.16);
}

.planning-drag-hint {
  position: fixed;
  z-index: 100;
  min-width: 86px;
  padding: 5px 8px;
  border-radius: 6px;
  background: #111827;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  pointer-events: none;
  box-shadow: 0 8px 18px rgb(17 24 39 / 0.24);
}

.planning-selection {
  position: absolute;
  top: 7px;
  bottom: 7px;
  z-index: 6;
  border: 1px dashed #1f6f9f;
  border-radius: 5px;
  background: rgb(31 111 159 / 0.14);
  pointer-events: none;
}

.planning-bubble[data-tone="green"] {
  border-left-color: #16a085;
}

.planning-bubble[data-tone="violet"] {
  border-left-color: #665191;
}

.planning-bubble[data-tone="yellow"] {
  border-left-color: #e4b645;
}

.planning-bubble[data-tone="orange"] {
  border-left-color: var(--accent);
}

.planning-bubble span,
.planning-bubble strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.planning-bubble span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.planning-bubble strong {
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
}

.planning-create-panel {
  position: absolute;
  left: var(--editor-left, 162px);
  top: var(--editor-top, 54px);
  z-index: 30;
  width: 300px;
  max-width: calc(100% - 24px);
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 14px 34px rgb(20 32 44 / 0.18);
}

.planning-create-panel > button {
  justify-self: end;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 18px;
}

.planning-create-panel label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.planning-create-panel select {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
}

.planning-create-panel h4 {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.planning-create-panel.is-info {
  width: 340px;
}

.planning-info-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.planning-info-head span {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-soft);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.planning-info-head b {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.planning-doc-scroll {
  max-height: 132px;
  overflow: auto;
  padding-right: 4px;
}

.planning-doc-scroll p {
  display: grid;
  gap: 2px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.planning-doc-scroll p:last-child {
  border-bottom: 0;
}

.planning-doc-scroll strong {
  color: var(--ink);
  font-size: 12px;
}

.planning-doc-scroll small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.planning-create-panel p,
.appointment-composer p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

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

.appointments-head button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #2f6f9f;
  border-radius: 6px;
  background: #1f6f9f;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.appointment-composer {
  display: grid;
  gap: 5px;
  padding: 10px 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 7px;
  background: var(--panel-soft);
}

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

.appointment-list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.appointment-row {
  display: grid;
  grid-template-columns: 92px 120px minmax(0, 1fr) 30px;
  gap: 12px;
  align-items: center;
  min-height: 68px;
  padding: 12px 8px;
  border-bottom: 1px solid var(--line);
}

.appointment-onsite {
  grid-column: 3 / 4;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-top: -6px;
  padding: 0;
  border: 0;
  background: transparent;
}

.appointment-row .appointment-onsite b {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
}

.appointment-row .appointment-onsite span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}

.appointment-row .appointment-onsite strong {
  margin-left: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
}

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

.appointment-row strong,
.appointment-row small,
.appointment-row span,
.appointment-row p {
  margin: 0;
}

.appointment-row strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.appointment-row small,
.appointment-row p {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.appointment-row > span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.appointment-row button {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
}

.appointment-badge {
  display: inline-flex;
  margin-bottom: 5px;
  padding: 2px 7px;
  border-radius: 4px;
  background: #1f2937;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
}

@media (max-width: 860px) {
  body {
    min-height: 100svh;
  }

  .app-shell {
    grid-template-columns: 1fr;
    height: 100svh;
    min-height: 100svh;
    overflow: hidden;
  }

  .side-nav {
    display: none;
  }

  .bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    height: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom));
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    border-top: 1px solid rgb(18 25 34 / 0.12);
    background: #ffffff;
    box-shadow: 0 -10px 28px rgb(20 32 44 / 0.12);
  }

  .bottom-nav-item {
    min-width: 0;
    min-height: 52px;
    padding: 0 4px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #5e6d7d;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
  }

  .bottom-nav-item.is-active {
    background: var(--accent-soft);
    color: var(--accent-strong);
    box-shadow: inset 0 -3px 0 var(--accent);
  }

  .workspace {
    height: calc(100svh - var(--mobile-nav-height) - env(safe-area-inset-bottom));
    min-height: 0;
    overflow-y: auto;
    padding: 22px 18px 24px;
  }

  .metric-grid {
    grid-template-columns: 1fr;
  }

  .employee-import-head,
  .employee-import-grid,
  .employee-import-summary,
  .time-review-head,
  .time-review-toolbar,
  .time-review-summary,
  .time-review-overview,
  .time-review-workspace,
  .time-month-head,
  .time-entry-row,
  .employee-preview-table div,
  .employee-preview-row {
    grid-template-columns: 1fr;
  }

  .time-entry-row {
    align-items: start;
  }

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

  .jobs-workspace {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .planning-layout {
    grid-template-columns: 1fr;
  }

  .planning-job-tray {
    max-height: 220px;
  }

  .planning-toolbar,
  .planning-date,
  .planning-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .list-toolbar {
    flex-direction: column;
  }

  .list-toolbar select {
    max-width: none;
  }

  .address-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .job-create-head,
  .job-create-grid {
    grid-template-columns: 1fr;
  }

  .job-create-head button {
    width: 100%;
  }

  .files-head,
  .files-layout {
    grid-template-columns: 1fr;
  }

  .files-head {
    display: grid;
  }

  .files-head button {
    width: 100%;
  }

  .address-row .maps-link {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    justify-self: end;
    min-height: 32px;
  }

  .appointment-onsite {
    grid-column: 1 / -1;
    margin-top: -2px;
  }
}

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

  .workspace {
    padding: 18px 14px 24px;
  }

  h1 {
    font-size: 26px;
  }

  .login-screen {
    min-height: 100svh;
    padding: 16px;
  }

  .login-panel {
    padding: 22px;
  }

  .system-state {
    justify-content: flex-start;
  }

  .detail-head {
    grid-template-columns: 1fr;
  }

  .live-panel {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .live-panel button {
    width: 100%;
  }

  .detail-head {
    display: grid;
  }

  .job-tabs {
    gap: 0;
  }

  .job-tab {
    flex: 1 1 0;
    min-width: 0;
    padding: 0 1px;
    font-size: 10px;
  }
}
