:root {
  color-scheme: light;
  --bg: #f4f5f6;
  --surface: #ffffff;
  --surface-2: #fafafa;
  --ink: #202020;
  --muted: #707070;
  --line: #dddddd;
  --line-strong: #bdbdbd;
  --brand: #2f2f2f;
  --brand-soft: #f0f0f0;
  --teal: #2f2f2f;
  --teal-dark: #111111;
  --blue: #4a5568;
  --amber: #b7791f;
  --red: #b42318;
  --violet: #525252;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-strong: 0 12px 32px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  font-weight: 750;
  gap: 8px;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
}

button svg {
  height: 17px;
  width: 17px;
}

input,
select,
textarea {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  min-height: 40px;
  outline: none;
  padding: 9px 10px;
  width: 100%;
}

textarea {
  line-height: 1.5;
  min-height: 128px;
  resize: vertical;
}

.check-row {
  align-items: center;
  color: var(--ink);
  display: flex;
  font-size: 13px;
  font-weight: 800;
  gap: 8px;
}

.check-row input {
  min-height: auto;
  width: auto;
}

.error-text {
  color: var(--red);
}

select[multiple] {
  min-height: 96px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(32, 32, 32, 0.1);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: 18px;
  line-height: 1.15;
  margin-bottom: 0;
}

h2 {
  font-size: 26px;
  line-height: 1.2;
  margin-bottom: 0;
}

h3 {
  font-size: 17px;
  line-height: 1.25;
  margin-bottom: 0;
}

table {
  border-collapse: collapse;
  min-width: 680px;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 11px 10px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

td {
  font-size: 14px;
}

.num {
  text-align: right;
  white-space: nowrap;
}

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

.is-hidden {
  display: none !important;
}

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

.login-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: var(--shadow-strong);
  display: grid;
  gap: 16px;
  margin: 0 auto;
  max-width: 420px;
  padding: 28px;
  width: 100%;
}

.login-panel label {
  color: var(--ink);
  display: grid;
  font-size: 13px;
  font-weight: 800;
  gap: 6px;
}

.login-panel .remember-login {
  align-items: center;
  color: var(--subtle);
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  gap: 8px;
  width: fit-content;
}

.remember-login input {
  min-height: auto;
  width: 18px;
}

.login-brand {
  justify-content: center;
  margin-bottom: 18px;
  width: 100%;
}

.brand-logo {
  display: block;
  height: auto;
  object-fit: contain;
}

.login-logo {
  max-height: 320px;
  max-width: 100%;
  width: min(360px, 100%);
}

.sidebar-logo {
  max-width: 180px;
  width: 100%;
}

.login-hints {
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: grid;
  font-size: 12px;
  gap: 4px;
  padding-top: 12px;
}

.sidebar {
  background: #ffffff;
  border-right: 1px solid var(--line);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  padding: 22px 14px;
}

.brand {
  align-items: center;
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
  min-width: 0;
}

.sidebar > .brand {
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  justify-content: center;
  margin-bottom: 18px;
  padding: 2px 0 18px;
}

.brand-mark {
  align-items: center;
  background: var(--ink);
  border-radius: 4px;
  color: #ffffff;
  display: flex;
  font-weight: 900;
  height: 40px;
  justify-content: center;
  width: 40px;
}

.brand p {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 3px;
  text-transform: uppercase;
}

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

.nav-section,
.nav-item {
  background: transparent;
  border-color: transparent;
  color: #555555;
  justify-content: flex-start;
  padding: 0 11px;
  width: 100%;
}

.nav-section {
  min-height: 44px;
}

.nav-item.is-active,
.nav-item:hover,
.nav-section.is-active,
.nav-section:hover {
  background: var(--brand);
  color: #ffffff;
}

.app-shell.role-admin .nav-item {
  display: none;
}

.app-shell.role-admin #signoffCreatePanel {
  display: none;
}

.app-shell.role-master .nav-section {
  display: none;
}

.app-shell.role-master .nav-item[data-view="announcements"] {
  order: 1;
}

.app-shell.role-master .nav-item[data-view="employeeCenter"] {
  order: 2;
}

.app-shell.role-master .nav-item[data-view="dispatchAlerts"] {
  order: 3;
}

.app-shell.role-master .nav-item[data-view="dispatches"] {
  order: 4;
}

.app-shell.role-master .nav-item[data-view="vehicles"] {
  order: 5;
}

.app-shell.role-master .nav-item[data-view="signoffs"] {
  order: 6;
}

.sidebar-footer {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.sidebar-footer.is-hidden {
  display: none;
}

.icon-button {
  background: #ffffff;
  border-color: var(--line);
  color: var(--ink);
  min-width: 40px;
  padding: 0;
}

.danger {
  color: var(--red);
}

.workspace {
  min-width: 0;
  padding: 24px;
}

.module-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -6px 0 18px;
}

.module-tab {
  background: #ffffff;
  border-color: var(--line);
  color: var(--ink);
  min-height: 36px;
}

.module-tab.is-active,
.module-tab:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: #ffffff;
}

.sub-tabs {
  margin-bottom: 14px;
}

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

.topbar-title {
  display: grid;
  gap: 8px;
}

.topbar-logo {
  height: auto;
  max-height: 72px;
  max-width: 360px;
  width: min(360px, 56vw);
}

.filter-bar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.filter-bar label {
  color: var(--ink);
  display: grid;
  font-size: 13px;
  font-weight: 800;
  gap: 6px;
  max-width: 220px;
}

.filter-bar input[type="search"] {
  min-width: min(280px, 100%);
}

.inline-check {
  align-items: center;
  color: var(--ink);
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  gap: 6px;
  min-height: 40px;
  white-space: nowrap;
}

.inline-check input {
  min-height: auto;
  width: auto;
}

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

.topbar-actions {
  align-items: center;
  display: flex;
  gap: 10px;
}

.account-menu {
  position: relative;
}

.account-menu-button {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  display: inline-flex;
  gap: 6px;
  min-height: 40px;
  padding: 0 10px;
}

.account-menu-button:hover,
.account-menu-button[aria-expanded="true"] {
  border-color: var(--brand);
}

.account-menu-button .status-pill {
  border: 0;
  min-height: auto;
  padding: 0;
}

.account-menu-button i {
  height: 16px;
  width: 16px;
}

.account-menu-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: var(--shadow-strong);
  display: grid;
  gap: 6px;
  min-width: 170px;
  padding: 8px;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 45;
}

.account-menu-panel.is-hidden {
  display: none;
}

.account-menu-panel button {
  justify-content: flex-start;
  width: 100%;
}

.user-pill {
  background: #ffffff;
  color: var(--ink);
}

.status-pill,
.badge {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  display: inline-flex;
  font-size: 12px;
  font-weight: 750;
  min-height: 28px;
  padding: 0 10px;
  white-space: nowrap;
}

.notification-badge {
  align-items: center;
  background: var(--red);
  border: 2px solid #ffffff;
  border-radius: 999px;
  color: #ffffff;
  display: inline-flex;
  font-size: 11px;
  font-weight: 850;
  justify-content: center;
  line-height: 1;
  min-height: 20px;
  min-width: 20px;
  padding: 0 5px;
}

.nav-section .notification-badge,
.nav-item .notification-badge {
  margin-left: auto;
}

.module-tab .notification-badge {
  margin-left: 2px;
}

.badge.green {
  background: #f1f7f3;
  border-color: #bfd6c5;
  color: #1f6b3a;
}

.badge.amber {
  background: #fff7e6;
  border-color: #f4d18b;
  color: #8a5a12;
}

.badge.red {
  background: #fff1f0;
  border-color: #f4c7c3;
  color: var(--red);
}

.badge.blue {
  background: #f2f4f7;
  border-color: #d5d9df;
  color: var(--blue);
}

.primary {
  background: var(--brand);
  color: #ffffff;
}

.primary:hover {
  background: #000000;
}

.secondary {
  background: #ffffff;
  border-color: var(--brand);
  color: var(--brand);
}

.ghost {
  background: #ffffff;
  border-color: var(--line);
  color: var(--ink);
}

.ghost:hover,
.secondary:hover,
.icon-button:hover {
  background: var(--brand-soft);
  border-color: var(--line-strong);
}

.small {
  min-height: 32px;
  padding: 0 10px;
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

[data-open-record-type] {
  cursor: pointer;
}

tr[data-open-record-type]:hover td,
tr[data-open-record-type]:hover th {
  background: #f1f1f1;
}

.record-detail-view .panel {
  max-width: 1180px;
}

.offline-sync-bar {
  align-items: center;
  background: #fff7e6;
  border: 1px solid #f4c971;
  border-radius: 4px;
  color: #8a5a00;
  display: flex;
  font-size: 13px;
  font-weight: 750;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 10px 12px;
}

.offline-sync-bar button {
  flex: 0 0 auto;
}

.record-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.password-dialog,
.install-dialog {
  align-items: center;
  background: rgba(17, 24, 39, 0.42);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 18px;
  position: fixed;
  z-index: 40;
}

.password-panel,
.install-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: var(--shadow-strong);
  display: grid;
  gap: 12px;
  max-width: 420px;
  padding: 18px;
  width: min(100%, 420px);
}

.install-panel {
  max-width: 460px;
  width: min(100%, 460px);
}

.install-steps {
  display: grid;
  gap: 10px;
}

.install-step {
  align-items: flex-start;
  background: var(--muted);
  border: 1px solid var(--line);
  border-radius: 4px;
  display: grid;
  gap: 2px;
  grid-template-columns: 28px 1fr;
  padding: 10px;
}

.install-step strong {
  color: var(--ink);
  font-size: 14px;
}

.install-step span {
  color: var(--subtle);
  font-size: 13px;
  line-height: 1.45;
}

.install-step-index {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  display: inline-flex;
  font-size: 12px;
  font-weight: 850;
  height: 22px;
  justify-content: center;
  width: 22px;
}

.metrics {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  margin-bottom: 16px;
}

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

.profit-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 8px;
  min-height: 88px;
  padding: 14px;
}

.profit-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.profit-card strong {
  font-size: 22px;
  line-height: 1;
}

.profit-card .profit {
  color: #1f6b3a;
}

.profit-card .loss {
  color: var(--red);
}

.metric {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: var(--shadow);
  color: inherit;
  cursor: pointer;
  min-height: 118px;
  padding: 16px;
  text-align: left;
  width: 100%;
}

.metric:hover,
.metric.is-active {
  border-color: var(--brand);
  box-shadow: inset 3px 0 0 var(--brand), var(--shadow);
}

.metric .icon {
  align-items: center;
  border-radius: 4px;
  display: flex;
  height: 34px;
  justify-content: center;
  margin-bottom: 12px;
  width: 34px;
}

.metric strong {
  display: block;
  font-size: 24px;
  line-height: 1;
  margin-bottom: 7px;
}

.metric span {
  color: var(--muted);
  font-size: 13px;
}

.split-grid,
.work-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.master-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 760px);
}

.dashboard-detail-grid {
  grid-template-columns: minmax(0, 900px);
}

.dashboard-section.is-hidden,
.master-section.is-hidden {
  display: none;
}

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

.employee-hero {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.employee-directory-panel {
  grid-column: 1 / -1;
}

.employee-detail-page {
  grid-column: 1 / -1;
}

.detail-control-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 12px;
}

.detail-control-grid > div {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 10px;
}

.detail-control-grid strong {
  font-size: 14px;
}

.detail-subtables {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.subtable-panel {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 14px;
}

.dispatch-calendar-panel {
  grid-column: 1 / -1;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: var(--shadow);
  min-width: 0;
  padding: 16px;
}

.panel-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.status-select {
  appearance: none;
  background: #ffffff;
  border-color: var(--line);
  border-radius: 4px;
  color: var(--ink);
  cursor: pointer;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 750;
  min-height: 28px;
  padding: 0 28px 0 12px;
  text-align: center;
  width: auto;
}

.status-select.blue {
  background: #f2f4f7;
  border-color: #d5d9df;
  color: var(--blue);
}

.status-select.amber {
  background: #fff7e6;
  border-color: #f4d18b;
  color: #8a5a12;
}

.status-select.green {
  background: #f1f7f3;
  border-color: #bfd6c5;
  color: #1f6b3a;
}

.status-select.red {
  background: #fff0ee;
  border-color: #f2b8b1;
  color: var(--red);
}

.table-wrap {
  overflow-x: auto;
}

.compact-form,
.stack-form {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

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

.compact-form button {
  grid-column: 1 / -1;
}

.copy-row {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.dispatch-calendar {
  overflow-x: auto;
}

.calendar-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(7, minmax(128px, 1fr));
  min-width: 900px;
}

.calendar-weekday {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  padding: 0 4px;
  text-align: center;
}

.calendar-day {
  align-content: start;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  display: grid;
  gap: 7px;
  min-height: 136px;
  padding: 10px;
}

.calendar-day.is-blank {
  background: transparent;
  border-color: transparent;
}

.calendar-day.is-today {
  border-color: var(--brand);
  box-shadow: inset 0 0 0 2px rgba(32, 32, 32, 0.1);
}

.calendar-day.is-selected {
  border-color: var(--brand);
  box-shadow: inset 3px 0 0 var(--brand);
}

.calendar-day.has-events {
  background: #fbfcfd;
}

.calendar-day.has-conflict {
  border-color: #efb3ad;
  box-shadow: inset 3px 0 0 var(--red);
}

.calendar-day-head {
  align-items: center;
  display: flex;
  gap: 6px;
  justify-content: space-between;
  min-height: 28px;
}

.calendar-day-head strong {
  font-size: 14px;
}

.calendar-event {
  align-items: flex-start;
  background: #ffffff;
  border-color: var(--line);
  color: inherit;
  display: grid;
  gap: 2px;
  justify-content: stretch;
  min-height: 0;
  padding: 8px;
  text-align: left;
  width: 100%;
}

.calendar-event:hover {
  border-color: var(--brand);
  box-shadow: inset 3px 0 0 var(--brand);
}

.calendar-event.request {
  border-left: 4px solid var(--amber);
}

.calendar-event.internal {
  border-left: 4px solid var(--brand);
}

.calendar-event strong {
  font-size: 12px;
  line-height: 1.2;
}

.calendar-event span {
  color: var(--muted);
  display: block;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.calendar-more {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

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

.conflict-card {
  background: var(--surface-2);
  border: 1px solid #f4d18b;
  border-radius: 4px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.conflict-card-head {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.conflict-card-head strong {
  display: block;
  font-size: 15px;
}

.conflict-card-head span {
  color: var(--muted);
  font-size: 12px;
}

.public-page {
  background: var(--bg);
}

.public-shell {
  margin: 0 auto;
  max-width: 840px;
  min-height: 100vh;
  padding: 28px 16px;
}

.public-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: var(--shadow-strong);
  padding: 24px;
}

.public-brand {
  justify-content: center;
  margin-bottom: 18px;
}

.public-head {
  margin-bottom: 20px;
  text-align: center;
}

.public-items {
  display: grid;
  gap: 12px;
}

.public-contract {
  border: 1px solid var(--line);
  border-radius: 4px;
  display: grid;
  gap: 10px;
  padding: 14px;
}

.public-line {
  align-items: flex-start;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  grid-template-columns: 22px minmax(0, 1fr);
  padding-top: 12px;
}

.public-line input[type="checkbox"] {
  margin-top: 4px;
  min-height: auto;
  width: 18px;
}

.public-line strong,
.public-line span {
  display: block;
}

.public-line span {
  color: var(--muted);
  font-size: 13px;
  margin: 3px 0 8px;
}

.stack-form label {
  color: var(--ink);
  display: grid;
  font-size: 13px;
  font-weight: 800;
  gap: 6px;
}

.date-row,
.line-builder {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 100px auto;
}

.date-row {
  grid-template-columns: 1fr 1fr;
}

.signoff-builder {
  grid-template-columns: minmax(0, 1fr) 90px;
}

#signoffNote,
#signoffEmployee,
#signoffWorkerLock,
#signoffPhoto,
#addSignoffLine {
  grid-column: 1 / -1;
}

.list,
.line-list,
.preview-box {
  display: grid;
  gap: 8px;
}

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

.permission-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  display: grid;
  gap: 12px;
  padding: 12px;
}

.permission-card-head {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) 150px;
}

.permission-card-head strong {
  display: block;
  font-size: 14px;
}

.permission-card-head span {
  color: var(--muted);
  font-size: 12px;
}

.permission-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.permission-toggle {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  display: flex;
  font-size: 13px;
  font-weight: 750;
  gap: 8px;
  min-height: 40px;
  padding: 0 10px;
}

.permission-toggle input {
  min-height: auto;
  width: auto;
}

.inline-toggle {
  display: inline-flex;
  width: fit-content;
}

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

.align-end {
  align-items: end;
}

.locked-worker {
  align-items: center;
  background: #f2f2f2;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  gap: 8px;
  min-height: 40px;
  padding: 0 12px;
}

.locked-worker svg {
  height: 17px;
  width: 17px;
}

.signature-block,
.drawing-annotation-block {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-2);
  padding: 12px;
}

.drawing-canvas-wrap {
  display: grid;
  gap: 8px;
}

.drawing-canvas {
  background: #ffffff;
  border: 1px dashed #9a9a9a;
  border-radius: 4px;
  display: block;
  min-height: 260px;
  touch-action: none;
  width: 100%;
}

.signature-canvas {
  background: #ffffff;
  border: 1px dashed #9a9a9a;
  border-radius: 4px;
  display: block;
  height: 180px;
  touch-action: none;
  width: 100%;
}

.photo-thumb {
  border: 1px solid var(--line);
  border-radius: 4px;
  height: 54px;
  object-fit: cover;
  width: 72px;
}

.list-item,
.line-item,
.preview-item,
.record-button {
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  color: inherit;
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(0, 1fr) auto;
  justify-content: stretch;
  min-height: 52px;
  padding: 10px 12px;
  text-align: left;
  width: 100%;
}

.list-item strong,
.line-item strong,
.preview-item strong,
.record-button strong {
  display: block;
  font-size: 14px;
  line-height: 1.25;
}

.list-item span,
.line-item span,
.preview-item span,
.record-button span,
.muted {
  color: var(--muted);
  font-size: 12px;
}

.record-button:hover,
.record-button.is-selected {
  background: #f1f1f1;
  border-color: var(--brand);
  box-shadow: inset 3px 0 0 var(--brand);
}

.sub-list {
  color: var(--muted);
  display: grid;
  font-size: 12px;
  gap: 3px;
  margin-top: 5px;
}

.announcement-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  display: grid;
  gap: 10px;
  padding: 14px;
}

.announcement-card-head {
  align-items: flex-start;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.announcement-card strong {
  display: block;
  font-size: 15px;
  line-height: 1.3;
}

.announcement-card span {
  color: var(--muted);
  font-size: 12px;
}

.announcement-card p {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
  margin: 0;
}

.empty {
  color: var(--muted);
  padding: 12px 0;
}

.toast {
  background: var(--brand);
  border-radius: 4px;
  bottom: 18px;
  box-shadow: var(--shadow);
  color: #ffffff;
  font-size: 14px;
  left: 50%;
  opacity: 0;
  padding: 11px 14px;
  pointer-events: none;
  position: fixed;
  transform: translate(-50%, 12px);
  transition: 180ms ease;
  z-index: 10;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .brand div:last-child,
  .nav-section span,
  .nav-item span {
    display: none;
  }

  .nav-section,
  .nav-item {
    justify-content: center;
    padding: 0;
  }

  .nav-section .notification-badge,
  .nav-item .notification-badge {
    display: inline-flex;
    margin-left: -6px;
    margin-top: -22px;
  }

  .metrics,
  .profit-summary,
  .split-grid,
  .work-grid,
  .master-grid,
  .profile-grid {
    grid-template-columns: 1fr;
  }

  .calendar-grid {
    grid-template-columns: repeat(7, minmax(116px, 1fr));
    min-width: 820px;
  }
}

@media (max-width: 680px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    align-items: center;
    bottom: 0;
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) auto;
    left: 0;
    padding: 8px;
    position: fixed;
    right: 0;
    z-index: 9;
  }

  .sidebar > .brand {
    display: none;
  }

  .sidebar-footer {
    display: flex;
    margin-top: 0;
  }

  .nav-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
  }

  .nav-section,
  .nav-item {
    flex: 0 0 52px;
    min-height: 46px;
  }

  .app-shell.role-admin .nav-list {
    display: grid;
    gap: 6px;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    overflow: visible;
    width: 100%;
  }

  .app-shell.role-admin .nav-section {
    flex: initial;
    width: 100%;
  }

  .app-shell.role-master .sidebar {
    display: block;
  }

  .app-shell.role-master .nav-list {
    display: grid;
    gap: 6px;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    overflow: visible;
    width: 100%;
  }

  .app-shell.role-master .nav-item {
    flex: initial;
    min-height: 48px;
    width: 100%;
  }

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

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

  .topbar-actions,
  .compact-form,
  .copy-row,
  .date-row,
  .line-builder,
  .signoff-builder {
    grid-template-columns: 1fr;
    display: grid;
  }

  .account-menu,
  .account-menu-button {
    width: 100%;
  }

  .account-menu-button {
    justify-content: center;
  }

  .account-menu-panel {
    margin-top: 8px;
    position: static;
  }

  .public-panel {
    padding: 18px;
  }

  .status-pill {
    justify-content: center;
  }

  .permission-card-head,
  .permission-grid {
    grid-template-columns: 1fr;
  }

  .dispatch-calendar {
    overflow: visible;
  }

  .calendar-grid {
    grid-template-columns: 1fr;
    min-width: 0;
  }

  .calendar-weekday,
  .calendar-day.is-blank {
    display: none;
  }

  .calendar-day {
    min-height: 0;
  }

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