:root {
  color-scheme: light;
  --bg: #eef2f5;
  --surface: #ffffff;
  --surface-2: #f6f8fa;
  --ink: #172431;
  --muted: #64717e;
  --line: #d9e1e8;
  --line-strong: #b8c4cf;
  --brand: #2b7851;
  --brand-strong: #205f40;
  --brand-soft: #e5f1ea;
  --app-primary: #053265;
  --app-primary-strong: #00367d;
  --app-blue-dark: #021f44;
  --app-blue-mid: #073b7b;
  --app-blue-glow: #0d5eb3;
  --accent: #bb6b28;
  --accent-soft: #f7e7d8;
  --danger: #b3261e;
  --warn: #8a5a00;
  --ok: #236a37;
  --shadow: 0 16px 38px rgba(2, 31, 68, 0.10);
  --radius: 8px;
  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);
}

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

button {
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 0 14px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

a.button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 0 14px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

a.button:hover {
  border-color: var(--app-blue-glow);
  background: #f6f9fc;
}

a.button.primary {
  background: var(--app-primary);
  border-color: var(--app-primary);
  color: #fff;
  box-shadow: 0 8px 18px rgba(5, 50, 101, 0.18);
}

a.button.primary:hover {
  background: var(--app-primary-strong);
  border-color: var(--app-primary-strong);
}

button:hover {
  border-color: var(--app-blue-glow);
  background: #f6f9fc;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(13, 94, 179, 0.26);
  outline-offset: 2px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

button.primary {
  background: var(--app-primary);
  border-color: var(--app-primary);
  color: #fff;
  box-shadow: 0 8px 18px rgba(5, 50, 101, 0.18);
}

button.primary:hover {
  background: var(--app-primary-strong);
  border-color: var(--app-primary-strong);
}

button.danger {
  color: var(--danger);
  border-color: rgba(179, 38, 30, 0.35);
}

button.icon {
  width: 40px;
  padding: 0;
  display: inline-grid;
  place-items: center;
}

a {
  color: var(--app-primary-strong);
  font-weight: 700;
}

.app-shell {
  min-height: 100vh;
}

.boot-screen,
.auth-screen,
.status-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.boot-screen {
  grid-template-columns: auto 1fr;
  gap: 18px;
  max-width: 520px;
  margin: 0 auto;
}

.boot-screen img {
  width: 82px;
  height: 82px;
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.boot-screen h1,
.auth-panel h1,
.status-panel h1 {
  margin: 0 0 6px;
  font-size: 2rem;
  letter-spacing: 0;
}

.boot-screen p,
.auth-panel p,
.status-panel p,
.muted {
  color: var(--muted);
}

.auth-panel,
.status-panel {
  width: min(100%, 460px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--app-primary);
}

.auth-panel.register {
  width: min(100%, 620px);
}

.auth-screen {
  grid-template-columns: minmax(340px, 0.85fr) minmax(460px, 1fr);
  gap: 0;
  padding: 0;
  background: var(--app-blue-dark);
}

.auth-visual {
  align-self: stretch;
  display: grid;
  place-items: center;
  min-width: 0;
  overflow: hidden;
  background: #0b6b97;
}

.auth-visual img {
  width: 100%;
  height: 100%;
  min-height: 100vh;
  object-fit: cover;
  object-position: left center;
}

.auth-panel {
  justify-self: center;
  margin: 28px;
}

.auth-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  counter-reset: auth-step;
}

.auth-steps li {
  counter-increment: auth-step;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
}

.auth-steps li::before {
  content: counter(auth-step);
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: #fff;
}

.auth-steps li.active {
  color: var(--app-primary);
}

.auth-steps li.active::before {
  border-color: var(--app-primary);
  background: var(--app-primary);
  color: #fff;
}

.auth-forgot-password {
  justify-self: end;
  min-height: auto;
  margin-top: -7px;
  padding: 2px 0;
}

@media (max-width: 900px) {
  .auth-screen {
    grid-template-columns: 1fr;
    padding: 20px;
    background: var(--page);
  }

  .auth-visual {
    display: none;
  }

  .auth-panel {
    margin: 0;
  }
}

.auth-brand {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 22px;
}

.auth-brand img {
  width: 58px;
  height: 58px;
  border-radius: 14px;
}

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

.field-grid.single {
  grid-template-columns: 1fr;
}

.field-span-all {
  grid-column: 1 / -1;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}

legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

[hidden] {
  display: none !important;
}

input,
textarea,
select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 9px 10px;
  background: #fff;
  color: var(--ink);
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

input:hover,
textarea:hover,
select:hover {
  border-color: #8999a8;
}

input[type="file"] {
  padding: 6px;
  background: var(--surface-2);
}

input[type="file"]::file-selector-button {
  min-height: 30px;
  margin-right: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 0 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.password-field {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.password-field button {
  min-height: 40px;
}

.password-rules {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.password-rules span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.password-rules span.ok {
  border-color: rgba(35, 106, 55, 0.35);
  color: var(--ok);
  background: rgba(35, 106, 55, 0.08);
}

.auth-notice,
.company-enrollment-intro {
  display: grid;
  gap: 4px;
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid rgba(5, 50, 101, 0.22);
  border-left: 4px solid var(--app-blue-glow);
  border-radius: 7px;
  background: #eef5fb;
  color: var(--ink);
}

.auth-notice span,
.company-enrollment-intro span,
.field-help,
.auth-legal {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.auth-notice.error {
  border-color: rgba(179, 38, 30, 0.28);
  border-left-color: var(--danger);
  background: #fff1f0;
}

.auth-section {
  padding: 14px;
}

.auth-section legend {
  color: var(--app-primary);
  font-size: 0.88rem;
}

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

.choice-option {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  min-height: 82px;
  padding: 11px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
  cursor: pointer;
}

.choice-option:has(input:checked) {
  border-color: var(--app-blue-glow);
  box-shadow: 0 0 0 2px rgba(28, 111, 181, 0.12);
  background: #f1f7fc;
}

.choice-option input {
  width: 18px;
  min-height: 18px;
  margin-top: 2px;
}

.choice-option span {
  display: grid;
  gap: 4px;
}

.choice-option small {
  color: var(--muted);
  font-weight: 500;
  line-height: 1.35;
}

.field-help,
.auth-legal {
  margin: -4px 0 4px;
}

.auth-legal {
  margin: 16px 0 0;
  text-align: center;
}

.auth-progress-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(2, 20, 43, 0.62);
  backdrop-filter: blur(5px);
}

.auth-progress-panel {
  width: min(100%, 410px);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 22px;
  border-top: 4px solid var(--app-blue-glow);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.auth-progress-panel strong {
  display: block;
  color: var(--app-primary);
  font-size: 1.05rem;
}

.auth-progress-panel p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

textarea {
  min-height: 108px;
  resize: vertical;
}

.signature-canvas {
  width: 100%;
  height: 180px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  touch-action: none;
}

.scanner-preview {
  grid-column: 1 / -1;
  display: none;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #111827;
  aspect-ratio: 16 / 9;
}

.scanner-preview.active {
  display: block;
}

.scanner-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-weight: 700;
}

.checkbox-row input {
  width: 18px;
  min-height: 18px;
}

.button-row,
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.button-row {
  margin-top: 14px;
}

.filter-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  padding: 0 18px 16px;
}

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

.workspace.jobs-mode {
  grid-template-columns: 1fr;
}

.workspace.jobs-mode .main {
  width: min(1480px, 100%);
  margin: 0 auto;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 18px 14px 14px;
  border-right: 1px solid rgba(255, 255, 255, 0.10);
  background:
    linear-gradient(158deg, rgba(255, 255, 255, 0.09) 0%, transparent 30%),
    linear-gradient(180deg, var(--app-blue-dark) 0%, var(--app-primary) 62%, #042b57 100%);
  color: #fff;
  overflow: auto;
}

.brand {
  display: grid;
  grid-template-columns: 48px 1fr;
  align-items: center;
  gap: 12px;
  padding: 6px 6px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.brand img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
}

.brand strong {
  display: block;
  font-size: 1rem;
}

.brand span {
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.82rem;
}

.nav-list {
  display: grid;
  align-content: start;
  gap: 16px;
  margin: 10px 0 18px;
  flex: 1;
}

.nav-group {
  display: grid;
  gap: 4px;
}

.nav-group-label {
  padding: 0 10px 4px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.nav-list button {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  justify-content: start;
  width: 100%;
  border-color: transparent;
  background: transparent;
  color: rgba(255, 255, 255, 0.80);
  text-align: left;
  font-weight: 800;
}

.nav-list button:hover {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.nav-marker {
  width: 7px;
  height: 7px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
}

.nav-list button.active {
  background: #fff;
  border-color: #fff;
  color: var(--app-primary);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.nav-list button.active .nav-marker {
  border-color: var(--app-primary);
  background: var(--app-primary);
}

.workspace-project-card {
  display: grid;
  gap: 6px;
  margin: 12px 0 16px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
}

.workspace-project-card strong {
  color: #fff;
}

.workspace-project-card small {
  color: rgba(255, 255, 255, 0.66);
  line-height: 1.35;
}

.workspace-project-card .eyebrow {
  color: rgba(255, 255, 255, 0.52);
}

.workspace-project-card button {
  min-height: 34px;
  padding-inline: 10px;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 0.78rem;
}

.workspace-project-card button:hover {
  background: rgba(255, 255, 255, 0.16);
}

.sidebar-account {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 12px 8px 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.sidebar-account-avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  overflow: hidden;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.sidebar-account strong,
.sidebar-account div > span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-account-avatar img,
.sidebar-account-initials {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.sidebar-account-avatar img {
  z-index: 1;
  display: block;
  object-fit: cover;
}

.sidebar-account-initials {
  display: grid;
  place-items: center;
  line-height: 1;
}

.sidebar-account-avatar.has-image .sidebar-account-initials {
  opacity: 0;
}

.sidebar-account strong {
  font-size: 0.82rem;
}

.sidebar-account div > span {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.72rem;
}

.sidebar-account-menu {
  position: relative;
  margin-top: auto;
}

.sidebar-account-menu > summary {
  cursor: pointer;
  list-style: none;
}

.sidebar-account-menu > summary::-webkit-details-marker {
  display: none;
}

.sidebar-account-popover {
  position: absolute;
  z-index: 40;
  right: 0;
  bottom: calc(100% + 8px);
  display: grid;
  width: 170px;
  padding: 6px;
  border: 1px solid rgba(5, 50, 101, 0.16);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(2, 31, 68, 0.24);
}

.sidebar-account-popover button {
  justify-content: flex-start;
  border-color: transparent;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.sidebar-account-popover button:hover {
  background: #edf5fd;
}

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

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 20;
  margin: 0 -24px 18px;
  padding: 15px 24px 13px;
  border-bottom: 1px solid var(--line);
  background: rgba(238, 242, 245, 0.94);
  backdrop-filter: blur(16px);
}

.topbar h1,
.section-title h2 {
  margin: 0;
  font-size: 1.45rem;
  letter-spacing: 0;
}

.section-title p {
  margin: 4px 0 0;
  color: var(--muted);
}

.section-title .eyebrow {
  display: block;
  margin-bottom: 2px;
  color: var(--app-primary);
}

.mobile-tabs {
  display: none;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 10px;
  scrollbar-width: thin;
}

.mobile-tabs button {
  white-space: nowrap;
}

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

.attendance-stats {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px;
  border-top: 3px solid rgba(5, 50, 101, 0.26);
  box-shadow: 0 4px 14px rgba(2, 31, 68, 0.04);
}

.stat span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.stat strong {
  display: block;
  margin-top: 5px;
  font-size: 1.5rem;
  color: var(--app-primary);
  overflow-wrap: anywhere;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
  align-items: start;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 6px 20px rgba(2, 31, 68, 0.055);
  overflow: hidden;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  box-shadow: inset 3px 0 0 rgba(5, 50, 101, 0.72);
}

.panel-header h2,
.panel-header h3 {
  margin: 0;
  font-size: 1rem;
}

.panel-subtitle {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.segmented-control {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--page);
}

.segmented-control button {
  min-height: 32px;
  border: 0;
  background: transparent;
}

.segmented-control button.active {
  background: var(--app-primary);
  color: #fff;
}

.task-calendar-view {
  display: grid;
  gap: 14px;
}

.view-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.view-heading h3 {
  margin: 0;
}

.control-disclosure {
  border: 1px solid var(--line);
  border-radius: 6px;
}

.control-disclosure > summary {
  padding: 10px 12px;
  color: var(--app-primary);
  font-weight: 850;
  cursor: pointer;
}

.control-disclosure-body {
  display: grid;
  gap: 10px;
  padding: 0 12px 12px;
}

.panel-body {
  padding: 16px;
}

.day-review-panel {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.day-review-panel .panel-body {
  padding-bottom: 10px;
}

.day-review-panel .stats {
  margin-bottom: 8px;
}

.day-review-panel .summary-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.day-review-toggle {
  display: none;
}

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

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

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

th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

thead {
  background: #f3f6f9;
}

tbody tr:nth-child(even) {
  background: rgba(246, 248, 250, 0.62);
}

tbody tr:hover {
  background: #eef4fa;
}

tr.selectable {
  cursor: pointer;
}

tr.selectable:hover {
  background: var(--surface-2);
}

.badge {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 999px;
  padding: 2px 9px;
  background: #e8f0f8;
  color: var(--app-primary);
  font-size: 0.78rem;
  font-weight: 800;
}

.badge.warn {
  background: #fff3d6;
  color: var(--warn);
}

.badge.danger {
  background: #fde8e5;
  color: var(--danger);
}

.badge.ok {
  background: #e3f2e6;
  color: var(--ok);
}

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

.item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 11px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(2, 31, 68, 0.035);
}

.item h3 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.item p {
  margin: 0;
  color: var(--muted);
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 0;
}

.meta-line span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.meta-line span + span {
  margin-left: 8px;
  padding-left: 8px;
  border-left: 1px solid currentColor;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 8px;
}

.media-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.media-tile {
  display: grid;
  gap: 6px;
}

.media-tile > a {
  position: relative;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface-2);
}

.media-tile.media-loading img,
.report-card-photo.media-loading img {
  opacity: 0;
}

.media-tile.media-load-error > a::after,
.report-card-photo.media-load-error::after {
  content: "Photo unavailable";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 12px;
  color: rgba(5, 50, 101, 0.62);
  background: var(--surface-2);
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
}

.media-tile button {
  width: 100%;
}

body.compact-mode .main {
  padding: 14px;
}

body.compact-mode .panel-header,
body.compact-mode .panel-body,
body.compact-mode .stat,
body.compact-mode .item,
body.compact-mode th,
body.compact-mode td {
  padding-block: 8px;
}

body.reduce-motion *,
body.reduce-motion *::before,
body.reduce-motion *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  scroll-behavior: auto !important;
  transition-duration: 0.01ms !important;
}

body.hide-media-previews .media-grid,
body.hide-media-previews .drawing-preview {
  display: none;
}

.qr-card {
  display: inline-grid;
  place-items: center;
  padding: 10px;
  margin: 8px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.qr-canvas {
  width: 100%;
  max-width: 168px;
  height: auto;
}

.schedule-preview {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--surface);
}

.schedule-preview p {
  margin: 0 0 8px;
}

.eyebrow {
  color: var(--app-primary-strong);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.jobs-company-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 14px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.12) 0%, transparent 28%),
    linear-gradient(22deg, rgba(13, 94, 179, 0.38) 0%, transparent 42%),
    linear-gradient(135deg, var(--app-blue-dark), var(--app-primary-strong) 54%, var(--app-blue-mid));
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 14px 30px rgba(5, 50, 101, 0.20);
}

.jobs-company-banner .eyebrow {
  color: rgba(255, 255, 255, 0.72);
}

.company-identity {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-width: 0;
}

.company-identity img,
.company-logo-fallback {
  width: 64px;
  height: 64px;
  border: 1px solid rgba(5, 50, 101, 0.16);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(5, 50, 101, 0.10);
}

.company-identity img {
  object-fit: contain;
  display: block;
  padding: 6px;
}

.company-logo-fallback {
  display: grid;
  place-items: center;
  background: var(--app-primary);
  color: #fff;
  font-size: 1.2rem;
  font-weight: 900;
}

.jobs-company-banner .company-logo-fallback {
  background: #fff;
  color: var(--app-primary);
}

.company-identity h2 {
  margin: 3px 0 0;
  color: #fff;
  font-size: 1.45rem;
  line-height: 1.15;
}

.company-contact-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 9px;
}

.company-contact-summary span {
  display: grid;
  gap: 1px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.82rem;
  line-height: 1.3;
}

.company-contact-summary strong {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.66rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

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

.jobs-company-actions button {
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.10);
  color: #fff;
}

.jobs-company-actions button.primary {
  border-color: #fff;
  background: #fff;
  color: var(--app-primary);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
}

.job-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.job-stats .stat {
  border-top: 3px solid rgba(5, 50, 101, 0.24);
}

.job-stats .stat strong {
  color: var(--app-primary);
}

.reports-workspace-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 18px;
  align-items: stretch;
  margin-bottom: 14px;
  min-height: 132px;
  overflow: hidden;
  border: 1px solid rgba(5, 50, 101, 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.11) 0%, transparent 30%),
    linear-gradient(25deg, rgba(13, 94, 179, 0.36), transparent 42%),
    linear-gradient(135deg, var(--app-blue-dark), var(--app-primary-strong) 52%, var(--app-blue-mid));
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 14px 30px rgba(5, 50, 101, 0.18);
}

.reports-banner-copy {
  display: grid;
  align-content: center;
  padding: 18px;
}

.reports-workspace-banner .eyebrow {
  color: rgba(255, 255, 255, 0.72);
}

.reports-workspace-banner h2 {
  margin: 4px 0 6px;
  color: #fff;
  font-size: 1.42rem;
  line-height: 1.16;
}

.reports-workspace-banner p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
}

.reports-workspace-banner img {
  width: 100%;
  height: 100%;
  min-height: 132px;
  object-fit: cover;
  display: block;
}

.reports-stats .stat {
  border-top: 3px solid rgba(5, 50, 101, 0.24);
}

.reports-stats .stat strong {
  color: var(--app-primary);
}

.reports-layout {
  grid-template-columns: minmax(0, 1fr) 380px;
}

.reports-main-panel .panel-header,
.reports-side-panel .panel-header {
  border-bottom-color: rgba(5, 50, 101, 0.14);
  background: linear-gradient(180deg, #fff 0%, #f3f7fb 100%);
}

.reports-main-panel .panel-header h2,
.reports-side-panel .panel-header h3 {
  color: var(--app-primary);
}

.reports-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 14px;
}

.report-card {
  display: grid;
  align-content: start;
  gap: 10px;
  border: 1px solid rgba(5, 50, 101, 0.13);
  border-radius: var(--radius);
  padding: 10px;
  background: #fff;
  box-shadow: 0 7px 18px rgba(5, 50, 101, 0.06);
}

.report-card-photo {
  position: relative;
  min-height: 154px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid rgba(5, 50, 101, 0.10);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(5, 50, 101, 0.16), rgba(31, 111, 72, 0.10)),
    var(--surface-2);
}

.report-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: absolute;
  inset: 0;
}

.report-card-photo.empty {
  display: grid;
  place-items: center;
}

.report-card-photo span {
  color: rgba(5, 50, 101, 0.38);
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.report-card-body {
  display: grid;
  gap: 10px;
  padding: 0 3px 2px;
}

.report-card-top {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.report-card h3 {
  margin: 0;
  color: var(--app-primary);
  font-size: 1.04rem;
  line-height: 1.2;
}

.report-card p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.35;
}

.report-linked-context {
  padding: 7px 9px;
  border-left: 3px solid var(--app-primary);
  border-radius: 6px;
  background: #f3f7fb;
  color: var(--app-primary);
  font-size: 0.82rem;
  font-weight: 800;
}

.report-card-preview {
  min-height: 3.7em;
}

.report-card-meta {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
}

.report-card-meta div {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
}

.report-card-meta span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.report-card-meta strong {
  min-width: 0;
  color: var(--ink);
  font-size: 0.86rem;
  line-height: 1.25;
}

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

.project-toolbar {
  align-items: flex-start;
}

.project-toolbar p {
  margin: 4px 0 0;
}

.job-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 14px;
}

.job-card {
  display: grid;
  gap: 12px;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(23, 32, 26, 0.04);
}

.job-card.selected {
  border-color: rgba(5, 50, 101, 0.52);
  box-shadow: 0 8px 24px rgba(5, 50, 101, 0.13);
}

.job-card-main {
  display: grid;
  gap: 10px;
  cursor: pointer;
}

.job-card-top {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.job-card h3 {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.2;
}

.job-card p {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.35;
}

.job-meta {
  display: grid;
  gap: 5px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.job-photo-cover {
  position: relative;
  min-height: 190px;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid rgba(0, 0, 0, 0.08);
  background:
    linear-gradient(135deg, rgba(5, 50, 101, 0.82), rgba(20, 82, 51, 0.72)),
    var(--app-primary);
  color: #fff;
  box-shadow: 0 10px 24px rgba(5, 50, 101, 0.14);
}

.job-photo-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: absolute;
  inset: 0;
  transform: none;
}

.job-photo-cover.empty {
  display: grid;
  min-height: 84px;
  aspect-ratio: auto;
  background: var(--app-primary);
}

.job-photo-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.34);
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.job-card-details {
  display: grid;
  gap: 10px;
  padding: 0 3px 2px;
}

.job-card-title-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.job-meta-list {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
}

.job-meta-list div {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
}

.job-meta-list span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.job-meta-list strong {
  min-width: 0;
  color: var(--ink);
  font-size: 0.86rem;
  line-height: 1.25;
}

.subsection-title {
  margin: 18px 0 8px;
  font-size: 0.95rem;
}

.mini-photo-strip {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
}

.mini-photo-strip a,
.mini-photo-strip span {
  width: 42px;
  height: 42px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
}

.mini-photo-strip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mini-photo-strip span {
  display: grid;
  place-items: center;
  color: var(--brand-strong);
  font-size: 0.78rem;
  font-weight: 900;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  gap: 12px;
  align-items: start;
}

.detail-section {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.detail-section h3 {
  margin: 0;
  font-size: 1rem;
}

.detail-list {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 6px 10px;
  margin: 0;
}

.detail-list dt {
  color: var(--muted);
  font-weight: 800;
}

.detail-list dd {
  margin: 0;
}

.report-language-viewer {
  display: grid;
  gap: 10px;
  padding-top: 4px;
}

.segmented-control {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(82px, 1fr));
  width: fit-content;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid rgba(5, 50, 101, 0.22);
  border-radius: 7px;
  background: #eef3f8;
}

.segmented-control button {
  min-height: 36px;
  border: 0;
  border-right: 1px solid rgba(5, 50, 101, 0.16);
  border-radius: 0;
  background: transparent;
  color: var(--app-primary);
  box-shadow: none;
}

.segmented-control button:last-child {
  border-right: 0;
}

.segmented-control button.active {
  background: var(--app-primary);
  color: #fff;
}

.report-language-content {
  min-height: 112px;
  padding: 14px 16px;
  border-left: 4px solid var(--app-primary);
  border-radius: 6px;
  background: #f3f7fb;
}

.report-language-content .eyebrow {
  color: var(--app-primary);
}

.report-language-content p {
  margin: 7px 0 5px;
  color: var(--ink);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.comment {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  background: var(--surface-2);
}

.comment p {
  margin: 0;
}

.comment-form {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

.attendance-dashboard {
  display: grid;
  gap: 12px;
}

.attendance-roster,
.attendance-side {
  display: grid;
  gap: 12px;
}

.attendance-group {
  display: grid;
  gap: 8px;
}

.attendance-group h3,
.attendance-side h3 {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.attendance-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.attendance-row .icon {
  font-size: 0.75rem;
}

.requirement-row,
.summary-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.summary-list {
  display: grid;
}

.summary-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 10px;
  background: var(--surface-2);
}

.summary-list span {
  color: var(--muted);
  font-weight: 700;
}

.notice {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 10px;
  background: #f4f7f4;
  color: var(--muted);
  font-weight: 700;
}

.empty {
  padding: 26px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
  background: var(--surface-2);
}

.list > .empty,
.task-column .empty,
.media-grid > .empty,
.drawing-set-grid > .empty,
.toolbox-template-grid > .empty {
  min-height: 68px;
  padding: 14px;
}

.media-grid > .empty,
.drawing-set-grid > .empty,
.toolbox-template-grid > .empty {
  grid-column: 1 / -1;
}

.dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(23, 32, 26, 0.42);
}

.dialog {
  width: min(100%, 760px);
  max-height: min(90vh, 900px);
  overflow: auto;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.dialog-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.dialog-header h2 {
  margin: 0;
  font-size: 1.15rem;
}

.dialog-body {
  padding: 14px;
}

.toast-region {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 80;
  display: grid;
  gap: 8px;
}

.toast {
  width: min(360px, calc(100vw - 32px));
  border-radius: var(--radius);
  padding: 11px 13px;
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow);
}

.toast.error {
  background: var(--danger);
}

.toast.ok {
  background: var(--brand-strong);
}

.split-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.print-area {
  display: none;
}

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

.task-board .item {
  content-visibility: auto;
  contain-intrinsic-size: 190px;
}

.punch-hierarchy {
  display: grid;
  gap: 12px;
}

.punch-section-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.punch-section-header,
.punch-room-card {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.punch-section-header h3,
.punch-section-header p {
  margin: 0;
}

.punch-section-header p {
  color: var(--muted);
  margin-top: 4px;
}

.task-calendar-panel {
  margin-top: 14px;
}

.task-calendar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  padding: 0 18px 18px;
}

.calendar-day {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.calendar-day h4 {
  margin: 0 0 8px;
  font-size: 0.92rem;
}

.calendar-day button {
  width: 100%;
  justify-content: flex-start;
}

.drawing-sheet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.drawing-sheet-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.drawing-preview {
  position: relative;
  min-height: 160px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
  cursor: crosshair;
}

.drawing-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.drawing-pin {
  position: absolute;
  width: 18px;
  height: 18px;
  transform: translate(-50%, -50%);
  border: 3px solid #2563eb;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 1px 6px rgba(15, 23, 42, 0.28);
}

.drawing-viewer {
  position: relative;
  width: 100%;
  min-height: min(72vh, 860px);
  max-height: 78vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f172a;
  cursor: crosshair;
}

.drawing-sheet-stage {
  position: relative;
  width: 100%;
  min-height: 1px;
  background: #fff;
}

.drawing-sheet-stage > img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  display: block;
  background: #fff;
}

.drawing-markup {
  position: absolute;
  transform: translate(-50%, -50%) rotate(var(--markup-rotation, 0deg));
  pointer-events: auto;
  color: var(--markup-color, #2563eb);
  cursor: move;
}

.drawing-work-pin {
  position: absolute;
  z-index: 3;
  width: 28px;
  height: 28px;
  padding: 0;
  transform: translate(-50%, -50%);
  border: 3px solid #fff;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.38);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
}

.drawing-work-pin:hover,
.drawing-work-pin:focus-visible {
  background: #b91c1c;
  transform: translate(-50%, -50%) scale(1.08);
}

.drawing-markup-cloud {
  border: 3px dashed var(--markup-color, #2563eb);
  border-radius: 999px;
  background: color-mix(in srgb, var(--markup-color, #2563eb) 12%, transparent);
}

.drawing-markup-arrow::before {
  content: "";
  position: absolute;
  left: 0;
  right: 14px;
  top: 50%;
  border-top: 4px solid var(--markup-color, #dc2626);
}

.drawing-markup-arrow::after {
  content: "";
  position: absolute;
  right: 2px;
  top: calc(50% - 8px);
  width: 16px;
  height: 16px;
  border-top: 4px solid var(--markup-color, #dc2626);
  border-right: 4px solid var(--markup-color, #dc2626);
  transform: rotate(45deg);
}

.drawing-markup-highlight {
  background: color-mix(in srgb, var(--markup-color, #facc15) 42%, transparent);
  border: 1px solid color-mix(in srgb, var(--markup-color, #facc15) 70%, #fff);
  border-radius: 4px;
}

.drawing-markup-text {
  min-width: 80px;
  min-height: 28px;
  padding: 4px 6px;
  border: 2px solid var(--markup-color, #2563eb);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  font-size: 0.78rem;
  line-height: 1.2;
  overflow: hidden;
}

.drawing-markup-resize {
  position: absolute;
  right: -7px;
  bottom: -7px;
  width: 14px;
  height: 14px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--markup-color, #2563eb);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.3);
  cursor: nwse-resize;
  pointer-events: auto;
}

.drawing-compare {
  position: relative;
  width: 100%;
  min-height: min(72vh, 780px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.drawing-compare img {
  width: 100%;
  height: auto;
  display: block;
}

.drawing-compare-current {
  position: absolute;
  inset: 0;
  mix-blend-mode: multiply;
  opacity: 0.62;
  filter: sepia(1) saturate(3) hue-rotate(330deg);
}

.drawing-compare-prior {
  filter: sepia(1) saturate(2.2) hue-rotate(165deg);
  opacity: 0.78;
}

/* Cohesive desktop workspace */
.screen {
  display: grid;
  gap: 16px;
}

.screen > * {
  min-width: 0;
}

.screen-jobs {
  padding-top: 18px;
}

.screen > .stats,
.screen > .jobs-company-banner,
.screen > .reports-workspace-banner,
.screen > .task-calendar-panel {
  margin: 0;
}

.filter-bar {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: #f7f9fb;
}

.filter-bar .badge {
  justify-self: start;
  align-self: center;
}

.toolbar button,
.split-actions button,
.button-row button {
  white-space: nowrap;
}

.panel > .stats {
  margin: 0;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: #f7f9fb;
}

.panel > .stats .stat,
.settings-grid .stats .stat,
.screen-users .panel > .stats .stat {
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  padding: 4px 14px 4px 0;
  background: transparent;
  box-shadow: none;
}

.panel > .stats .stat:last-child,
.settings-grid .stats .stat:last-child,
.screen-users .panel > .stats .stat:last-child {
  border-right: 0;
}

.panel > .stats .stat strong,
.settings-grid .stats .stat strong {
  font-size: 1.25rem;
}

.item {
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.item:hover {
  border-color: #c3d0dc;
  box-shadow: 0 7px 20px rgba(2, 31, 68, 0.07);
}

.drilldown-card,
.drilldown-row {
  cursor: pointer;
}

.drilldown-card:focus-visible,
.drilldown-row:focus-visible {
  outline: 3px solid rgba(13, 94, 179, 0.28);
  outline-offset: 2px;
}

.drilldown-card:hover > h3,
.drilldown-card:hover .drawing-set-body h3,
.drilldown-card:hover .report-card-body h3,
.drilldown-card:hover .task-card-heading h3 {
  color: var(--app-blue-glow);
}

.drilldown-row:focus-visible {
  position: relative;
  z-index: 1;
  background: #eef4fa;
}

.empty {
  min-height: 92px;
  display: grid;
  place-items: center;
  padding: 24px;
  border-color: #c8d2dc;
  background: #f7f9fb;
  line-height: 1.45;
}

.notice {
  border-left: 4px solid var(--app-primary);
  background: #eef4fa;
}

.notice.warn {
  border-left-color: #c47a16;
  background: #fff8e8;
}

.notice.error,
.notice.danger {
  border-left-color: var(--danger);
  background: #fff1ef;
}

.jobs-company-banner,
.reports-workspace-banner {
  border-radius: 8px;
}

.job-card,
.report-card,
.drawing-sheet-card,
.calendar-day,
.punch-section-card {
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.job-card:hover,
.report-card:hover,
.drawing-sheet-card:hover,
.calendar-day:hover {
  border-color: rgba(5, 50, 101, 0.30);
  box-shadow: 0 10px 26px rgba(2, 31, 68, 0.10);
  transform: translateY(-1px);
}

.job-card-title-row,
.report-card-top,
.task-card-heading {
  align-items: flex-start;
}

.job-card .button-row,
.report-card .button-row,
.task-card-actions {
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.report-card-preview {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.users-side-stack {
  display: grid;
  gap: 16px;
}

.users-side-stack .panel-body {
  max-height: 420px;
  overflow: auto;
}

.uploads-layout {
  grid-template-columns: minmax(0, 1fr) 380px;
}

.uploads-main-panel td:last-child {
  min-width: 190px;
}

.screen-users .content-grid {
  grid-template-columns: minmax(0, 1fr) 390px;
}

.screen-users .panel > .stats {
  grid-template-columns: repeat(5, minmax(100px, 1fr));
}

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

.settings-section-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 112px;
  padding: 20px 22px;
  border-radius: var(--radius);
  background: var(--app-blue-dark);
  color: #fff;
  box-shadow: 0 10px 24px rgba(2, 31, 68, 0.14);
}

.settings-section-intro .eyebrow {
  color: #a9d5ff;
}

.settings-section-intro h2 {
  margin: 3px 0 4px;
  font-size: 1.35rem;
}

.settings-section-intro p {
  max-width: 680px;
  margin: 0;
  color: #d9e9f8;
}

.settings-intro-status {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.settings-section-intro .badge {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.settings-page .panel-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.settings-form-layout {
  display: grid;
  gap: 14px;
}

.settings-form-layout fieldset {
  padding: 14px;
}

.settings-form-layout fieldset + fieldset {
  margin-top: 0;
}

.settings-account-overview {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin-bottom: 16px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.settings-account-avatar {
  width: 80px;
  height: 80px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--app-primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(2, 31, 68, 0.16);
  font-size: 1.3rem;
  font-weight: 900;
}

.settings-account-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.settings-account-overview .detail-list {
  margin: 0;
}

.settings-switch-list,
.settings-dependent-switches {
  display: grid;
  gap: 10px;
}

.settings-dependent-switches {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.settings-dependent-switches.is-disabled {
  opacity: 0.56;
}

.settings-master-switch {
  color: var(--app-primary);
}

.settings-account-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 14px;
  align-items: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.settings-account-actions > div:first-child {
  display: grid;
  gap: 3px;
}

.settings-account-actions > div:first-child span {
  color: var(--muted);
  font-size: 0.82rem;
}

.settings-account-actions .button-row,
.settings-account-actions .field-help {
  grid-column: 1 / -1;
}

.settings-danger-zone {
  border-color: rgba(179, 38, 30, 0.3);
}

.settings-danger-zone .panel-header {
  box-shadow: inset 3px 0 0 var(--danger);
}

.settings-copy-value {
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86rem;
}

.seat-usage {
  display: grid;
  gap: 8px;
  margin: 12px 0 16px;
}

.seat-usage > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.seat-usage-track {
  height: 10px;
  overflow: hidden;
  border-radius: 5px;
  background: var(--line);
}

.seat-usage-track span {
  display: block;
  height: 100%;
  background: var(--app-blue-glow);
}

.settings-translation .translation-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 0 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.settings-translation .translation-usage {
  margin-bottom: 10px;
}

.settings-subscription,
.settings-support {
  grid-column: 1 / -1;
}

.settings-wide {
  grid-column: 1 / -1;
}

.settings-grid .panel-body > .muted:last-child {
  margin-bottom: 0;
}

.settings-image-preview {
  grid-column: 1 / -1;
  width: 112px;
  height: 112px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.settings-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
}

.settings-image-preview.profile {
  border-radius: 50%;
}

.settings-image-preview.profile img {
  object-fit: cover;
  padding: 0;
}

.settings-account .field-grid.single {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.settings-account .settings-image-preview {
  grid-column: 1 / -1;
}

.settings-subscription .stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 10px;
}

.settings-support .button-row a {
  min-height: 40px;
  padding: 0 14px;
}

.task-board {
  gap: 12px;
  padding: 14px;
  background: #f4f7f9;
}

.task-column {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.66);
}

.task-column-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 36px;
  margin-bottom: 8px;
  padding: 0 2px 8px;
  border-bottom: 2px solid #cbd6e0;
}

.task-column-heading h3 {
  margin: 0;
  font-size: 0.94rem;
}

.task-column-inProgress .task-column-heading {
  border-bottom-color: #d3912e;
}

.task-column-complete .task-column-heading {
  border-bottom-color: var(--brand);
}

.task-card {
  padding: 12px;
}

.task-card-heading {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.task-card-heading h3 {
  min-width: 0;
  margin: 2px 0 0;
}

.task-card-notes {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 8px !important;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.task-card-meta {
  display: grid;
  gap: 6px;
  margin: 12px 0 0;
  padding: 9px;
  border-radius: 6px;
  background: #f6f8fa;
}

.task-card-meta div {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 8px;
}

.task-card-meta dt {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.task-card-meta dd {
  min-width: 0;
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
}

.task-card-actions select {
  min-width: 126px;
  flex: 1 1 126px;
}

.task-status-inProgress {
  background: #fff3d6;
  color: #805000;
}

.task-status-complete {
  background: #e3f2e6;
  color: var(--ok);
}

.punch-section-card {
  padding: 0;
  overflow: hidden;
  border-color: #cdd8e2;
}

.punch-section-header {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  background: #eef4fa;
}

.punch-section-card > .list {
  padding: 10px;
  background: #f8fafb;
}

.punch-room-card {
  align-items: center;
}

.screen-punch .content-grid,
.screen-attendance .content-grid,
.screen-inventory .content-grid,
.screen-toolbox .content-grid {
  grid-template-columns: minmax(0, 1fr) 370px;
}

.attendance-group + .attendance-group {
  margin-top: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.attendance-group > h3 {
  color: var(--app-primary);
  font-size: 0.76rem;
  text-transform: uppercase;
}

.attendance-row {
  align-items: center;
  padding: 12px;
}

.attendance-row .icon {
  border-radius: 6px;
  border-color: #c7d3df;
  background: #f3f6f9;
  color: var(--app-primary);
}

.attendance-toggle {
  font-size: 1.1rem !important;
}

.attendance-toggle.on {
  border-color: rgba(35, 106, 55, 0.34);
  background: #e3f2e6;
  color: var(--ok);
}

.summary-list div {
  border-color: #dce3e9;
  background: #f7f9fb;
}

.drawing-sheet-card {
  padding: 12px;
  border-color: #cdd7e1;
}

.drawing-sheet-card h3 {
  color: var(--app-primary);
}

.toolbox-template-grid,
.drawing-set-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 14px;
}

.toolbox-template-card {
  display: grid;
  align-content: start;
  min-height: 176px;
  padding: 14px;
  border-top: 3px solid rgba(5, 50, 101, 0.42);
}

.toolbox-template-card h3 {
  color: var(--app-primary);
}

.toolbox-template-card .button-row {
  align-self: end;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.drawing-set-card {
  display: grid;
  align-content: start;
  overflow: hidden;
  border: 1px solid rgba(5, 50, 101, 0.16);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 7px 18px rgba(5, 50, 101, 0.06);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.drawing-set-card:hover {
  border-color: rgba(5, 50, 101, 0.32);
  box-shadow: 0 10px 26px rgba(2, 31, 68, 0.10);
  transform: translateY(-1px);
}

.drawing-set-cover {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #eef2f5;
}

.drawing-set-cover.empty {
  min-height: 84px;
  aspect-ratio: auto;
}

.drawing-set-cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

.drawing-set-cover span {
  color: rgba(5, 50, 101, 0.42);
  font-size: 1rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.drawing-set-body {
  display: grid;
  gap: 10px;
  padding: 13px;
}

.drawing-set-body h3,
.drawing-set-body p {
  margin: 0;
}

.drawing-set-body h3 {
  color: var(--app-primary);
  font-size: 1.04rem;
}

.drawing-set-body p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.84rem;
}

.drawing-set-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.drawing-set-body .button-row {
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.dialog-backdrop {
  background: rgba(2, 20, 43, 0.58);
  backdrop-filter: blur(4px);
}

.dialog {
  border-top: 4px solid var(--app-primary);
}

.dialog-header {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
}

.dialog-close {
  flex: 0 0 40px;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  font-size: 1.45rem;
  font-weight: 500;
  line-height: 1;
}

.dialog-close:hover {
  border-color: var(--line);
  background: var(--surface-2);
  color: var(--ink);
}

.project-toolbar .toolbar input[type="search"] {
  min-width: min(280px, 42vw);
}

.toast {
  border-left: 4px solid var(--app-blue-glow);
  background: var(--app-blue-dark);
}

.auth-screen {
  background:
    linear-gradient(90deg, var(--app-primary) 0%, var(--app-primary) 34%, var(--bg) 34%, var(--bg) 100%);
}

.auth-panel {
  margin-left: 22%;
}

.auth-brand img {
  box-shadow: 0 9px 22px rgba(2, 31, 68, 0.20);
}

.auth-actions .primary {
  min-width: 110px;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

button.sidebar-account {
  width: 100%;
  min-height: 0;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0;
  background: transparent;
  color: #fff;
  text-align: left;
}

button.sidebar-account:hover {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
}

.mobile-tabs select {
  width: 100%;
  min-height: 44px;
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-weight: 800;
}

.workspace-loading {
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
}

.workspace-loading p {
  margin: 5px 0 0;
  color: var(--muted);
}

.loading-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(5, 50, 101, 0.18);
  border-top-color: var(--app-blue-glow);
  border-radius: 50%;
  animation: loading-spin 800ms linear infinite;
}

@keyframes loading-spin {
  to { transform: rotate(360deg); }
}

.actionable-empty {
  gap: 8px;
}

.actionable-empty strong,
.actionable-empty span {
  display: block;
}

.actionable-empty button {
  margin-top: 8px;
  justify-self: center;
}

.job-signal-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.action-menu {
  position: relative;
  flex: 0 0 auto;
}

.action-menu > summary {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: 900;
  list-style: none;
}

.action-menu.labeled > summary {
  width: auto;
  min-width: 40px;
  padding: 0 12px;
  font-size: 0.82rem;
  white-space: nowrap;
}

.action-menu > summary::-webkit-details-marker {
  display: none;
}

.action-menu > summary:hover,
.action-menu[open] > summary {
  border-color: var(--app-blue-glow);
  background: var(--surface-2);
}

.action-menu-popover {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 45;
  width: max-content;
  min-width: 190px;
  display: grid;
  gap: 5px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.action-menu-popover button {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
}

.panel:has(.action-menu[open]),
.table-wrap:has(.action-menu[open]) {
  overflow: visible;
}

.table-primary-link {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--app-primary-strong);
  text-align: left;
  box-shadow: none;
}

.table-primary-link:hover {
  border-color: transparent;
  background: transparent;
  color: var(--app-blue-glow);
  text-decoration: underline;
}

.card-title-button {
  min-height: 0;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  box-shadow: none;
  font: inherit;
  line-height: inherit;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
}

.card-title-button:hover {
  border-color: transparent;
  background: transparent;
  color: var(--app-primary-strong);
  text-decoration: underline;
}

.text-button {
  min-height: 0;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--app-primary-strong);
  box-shadow: none;
  font-weight: 800;
}

.text-button:hover {
  border-color: transparent;
  background: transparent;
  color: var(--app-blue-glow);
  text-decoration: underline;
}

.task-title-with-select {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.task-select {
  flex: 0 0 auto;
  padding-top: 2px;
}

.task-select input {
  width: 18px;
  min-height: 18px;
}

.advanced-fields {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  background: var(--surface-2);
}

.advanced-fields summary {
  cursor: pointer;
  color: var(--app-primary);
  font-weight: 800;
}

.advanced-fields .field-grid {
  margin-top: 12px;
}

.settings-page {
  display: grid;
  gap: 14px;
}

.settings-section-nav {
  position: sticky;
  top: 94px;
  z-index: 15;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 5px 18px rgba(2, 31, 68, 0.06);
  backdrop-filter: blur(14px);
}

@media (min-width: 1061px) {
  .tab-settings .settings-section-nav {
    display: none;
  }
}

@media (min-width: 1061px) and (max-width: 1480px) {
  .reports-layout,
  .uploads-layout,
  .screen-users .content-grid,
  .screen-punch .content-grid,
  .screen-attendance .content-grid,
  .screen-inventory .content-grid,
  .screen-toolbox .content-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .users-side-stack {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.toolbox-due-notice {
  margin: 0 16px 16px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.panel-disclosure + .panel-disclosure {
  border-top: 1px solid var(--line);
}

.panel-disclosure > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
  list-style: none;
  box-shadow: inset 3px 0 0 rgba(5, 50, 101, 0.72);
}

.panel-disclosure > summary::-webkit-details-marker {
  display: none;
}

.panel-disclosure > summary::after {
  content: "+";
  color: var(--app-primary);
  font-size: 1.2rem;
}

.panel-disclosure[open] > summary::after {
  content: "−";
}

.panel-disclosure > summary .badge {
  margin-left: auto;
}

.toast.warn {
  border-left-color: #f0ad32;
  background: #5d3d00;
}

.is-busy {
  cursor: wait !important;
  opacity: 0.72;
}

body.reduce-motion .loading-spinner {
  animation: none;
  border-top-color: var(--app-primary);
}

@media (max-width: 1060px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    display: grid;
    grid-template-columns: minmax(220px, 0.8fr) minmax(300px, 1.5fr) minmax(180px, 0.7fr);
    align-items: center;
    gap: 14px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .sidebar .brand {
    padding: 4px;
    border-bottom: 0;
  }

  .sidebar .workspace-project-card {
    margin: 0;
  }

  .nav-list {
    display: none;
  }

  .sidebar-account {
    display: grid;
    border-top: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.14);
  }

  .sidebar-account-menu {
    margin-top: 0;
  }

  .sidebar-account-popover {
    top: calc(100% + 8px);
    bottom: auto;
  }

  .mobile-tabs {
    display: block;
  }

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

  .uploads-layout,
  .screen-users .content-grid,
  .screen-punch .content-grid,
  .screen-attendance .content-grid,
  .screen-inventory .content-grid,
  .screen-toolbox .content-grid {
    grid-template-columns: 1fr;
  }

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

  .settings-wide {
    grid-column: auto;
  }

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

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

@media (max-width: 720px) {
  .sidebar {
    position: sticky;
    top: 0;
    z-index: 35;
    display: flex;
    flex-direction: row;
    align-items: center;
    min-height: 58px;
    padding: 8px 12px;
  }

  .sidebar .workspace-project-card {
    display: none;
  }

  .sidebar-account {
    grid-template-columns: 34px;
    padding: 0;
    border-left: 0;
    border-top: 0;
  }

  .sidebar-account > div {
    display: none;
  }

  .sidebar-account-popover {
    right: 0;
  }

  .sidebar .brand {
    min-width: 0;
    flex: 1 1 auto;
  }

  .sidebar .brand img {
    width: 34px;
    height: 34px;
  }

  .sidebar .brand strong {
    font-size: 0.86rem;
  }

  .sidebar .brand span {
    display: none;
  }

  .main {
    padding: 0 14px 28px;
  }

  .topbar {
    align-items: center;
    flex-direction: row;
    margin: 0 -14px 14px;
    padding: 9px 14px;
  }

  .topbar .toolbar {
    width: auto;
    flex-wrap: nowrap;
  }

  .topbar .toolbar button {
    min-height: 34px;
    padding-inline: 9px;
    flex: 0 0 auto;
    font-size: 0.76rem;
  }

  .topbar .toolbar [data-action="saved-views"],
  .topbar .toolbar [data-action="print"] {
    display: none;
  }

  .topbar .section-title .eyebrow,
  .topbar .section-title p {
    display: none;
  }

  .topbar h1 {
    font-size: 1.05rem;
  }

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

  .field-grid,
  .day-review-panel .summary-list {
    grid-template-columns: 1fr;
  }

  .screen-users .panel > .stats,
  .settings-subscription .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .screen-users .panel > .stats {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x proximity;
  }

  .screen-users .panel > .stats .stat {
    min-width: 112px;
    flex: 0 0 112px;
    scroll-snap-align: start;
  }

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

  .project-toolbar .toolbar input[type="search"] {
    min-width: 0;
    width: 100%;
  }

  .jobs-company-banner {
    align-items: stretch;
    flex-direction: column;
  }

  .jobs-company-banner .company-contact-summary {
    display: none;
  }

  .job-stats .stat:nth-child(n + 3),
  .reports-stats .stat:nth-child(n + 3) {
    display: none;
  }

  .jobs-company-actions {
    justify-content: flex-start;
  }

  .jobs-company-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reports-workspace-banner {
    display: none;
  }

  .reports-workspace-banner img {
    display: none;
  }

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

  .attendance-secondary-stat {
    display: none;
  }

  .day-review-toggle {
    display: inline-flex;
  }

  .day-review-body:not(.expanded) {
    display: none;
  }

  .day-review-panel .panel-header .toolbar button {
    flex: 0 1 auto;
  }

  .day-review-panel [data-action="daily-summary-day"],
  .day-review-panel [data-action="daily-summary-day-pdf"] {
    display: none;
  }

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

  .filter-bar {
    grid-template-columns: 1fr;
    padding-inline: 14px;
  }

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

  .panel-header .toolbar {
    width: 100%;
  }

  .panel-header .toolbar button {
    flex: 1 1 145px;
  }

  .attendance-row .icon {
    width: auto;
    justify-self: start;
    padding: 0 12px;
  }

  .panel-body[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }

  .task-board {
    grid-template-columns: 1fr;
  }

  .settings-account .field-grid.single {
    grid-template-columns: 1fr;
  }

  .settings-section-intro {
    align-items: flex-start;
    flex-direction: column;
    min-height: 0;
    padding: 18px;
  }

  .settings-intro-status {
    justify-content: flex-start;
  }

  .settings-account-overview {
    grid-template-columns: 64px minmax(0, 1fr);
    padding: 12px;
  }

  .settings-account-avatar {
    width: 60px;
    height: 60px;
  }

  .settings-dependent-switches {
    grid-template-columns: 1fr;
  }

  .settings-account-actions {
    grid-template-columns: 1fr;
  }

  .settings-account-actions > .badge {
    justify-self: start;
  }

  .settings-section-nav {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-section-nav button {
    width: 100%;
  }

  .responsive-table {
    min-width: 0;
  }

  .responsive-table thead {
    display: none;
  }

  .responsive-table tbody,
  .responsive-table tr,
  .responsive-table td {
    display: block;
    width: 100%;
  }

  .responsive-table tr {
    margin: 10px;
    width: calc(100% - 20px);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    overflow: visible;
  }

  .responsive-table td {
    display: grid;
    grid-template-columns: minmax(88px, 0.34fr) minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    border-bottom: 1px solid var(--line);
    overflow-wrap: anywhere;
  }

  .responsive-table td:last-child {
    border-bottom: 0;
  }

  .responsive-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
  }

  .responsive-table .split-actions {
    display: grid;
    grid-template-columns: minmax(88px, 0.34fr) minmax(0, 1fr);
  }

  .responsive-table .split-actions > :not(.action-menu) {
    min-width: 0;
  }

  .auth-screen {
    background: var(--bg);
  }

  .auth-panel {
    margin-left: 0;
    padding: 22px;
  }

  .auth-actions button {
    flex: 1 1 100%;
  }

  .choice-grid,
  .auth-section .field-grid {
    grid-template-columns: 1fr;
  }

  .punch-section-header,
  .punch-room-card {
    flex-direction: column;
  }

  .brand {
    grid-template-columns: 40px 1fr;
  }

  .brand img {
    width: 40px;
    height: 40px;
  }

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

.invite-delivery-choice {
  margin: 0;
}

.invite-delivery-choice .choice-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

[data-invite-email-field][hidden] {
  display: none;
}

.invite-platform-links {
  display: grid;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.invite-platform-links p {
  margin: 0;
}

.invite-app-options {
  display: grid;
  gap: 14px;
  margin: 18px 0;
  padding: 18px;
  border: 1px solid rgba(18, 59, 102, 0.2);
  border-left: 4px solid var(--app-blue-glow);
  border-radius: 8px;
  background: rgba(232, 242, 252, 0.72);
}

.invite-app-options h2 {
  margin: 0 0 4px;
  font-size: 1.05rem;
}

.invite-app-options p {
  margin: 0;
}

.android-access-request {
  display: grid;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid rgba(18, 59, 102, 0.16);
}

.generated-invite-panel {
  display: grid;
  gap: 18px;
}

.generated-invite-panel .notice {
  display: grid;
  gap: 4px;
}

.invite-qr-panel {
  display: grid;
  grid-template-columns: minmax(220px, 256px) minmax(0, 1fr);
  align-items: center;
  gap: 22px;
  padding: 18px;
  border: 1px solid rgba(18, 59, 102, 0.2);
  border-radius: 8px;
  background: rgba(232, 242, 252, 0.72);
}

.invite-qr-frame {
  display: grid;
  place-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.invite-qr-canvas {
  width: 100%;
  max-width: 256px;
}

.invite-qr-panel h3,
.invite-qr-panel p {
  margin-top: 0;
}

.invite-qr-panel p {
  line-height: 1.55;
}

@media (max-width: 720px) {
  .invite-delivery-choice .choice-grid {
    grid-template-columns: 1fr;
  }

  .invite-app-options {
    padding: 14px;
  }

  .invite-qr-panel {
    grid-template-columns: minmax(0, 1fr);
  }

  .invite-qr-frame {
    width: min(100%, 280px);
    justify-self: center;
  }
}

@media (max-width: 480px) {
  .job-card-grid,
  .reports-card-grid,
  .toolbox-template-grid,
  .drawing-set-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .jobs-company-actions button,
  .panel-header .toolbar button {
    flex-basis: 100%;
  }

  .button-row button,
  .toolbar button {
    min-height: 40px;
    height: auto;
    padding-block: 8px;
    white-space: normal;
  }

  .company-identity {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .company-identity img,
  .company-logo-fallback {
    width: 52px;
    height: 52px;
  }
}

@media print {
  body {
    background: #fff;
  }

  .sidebar,
  .topbar,
  .mobile-tabs,
  .toolbar,
  .button-row,
  .toast-region {
    display: none !important;
  }

  .workspace {
    display: block;
  }

  .main {
    padding: 0;
  }

  .panel {
    box-shadow: none;
  }
}

.skip-link {
  position: fixed;
  z-index: 10000;
  top: 10px;
  left: 10px;
  transform: translateY(-160%);
  padding: 10px 14px;
  border-radius: 6px;
  background: #ffffff;
  color: #123b66;
  box-shadow: 0 8px 24px rgba(16, 31, 54, 0.2);
}

.skip-link:focus {
  transform: translateY(0);
}

.network-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 24px 16px;
  padding: 10px 14px;
  border: 1px solid #d49a2f;
  border-radius: 6px;
  background: #fff8e8;
  color: #573b08;
}

.network-banner span {
  color: #705722;
}

.mobile-app-banner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 24px 16px;
  padding: 12px 14px;
  border: 1px solid #8fb5dc;
  border-left: 5px solid var(--app-blue-glow);
  border-radius: 6px;
  background: #f4f9ff;
  color: var(--ink);
  box-shadow: 0 5px 16px rgba(18, 59, 102, 0.08);
}

.auth-panel .mobile-app-banner {
  margin: 0 0 20px;
}

.mobile-app-banner.android {
  border-left-color: #2f8f5b;
  background: #f4fbf7;
}

.mobile-app-banner > img {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 8px;
}

.mobile-app-banner-copy {
  display: grid;
  min-width: 0;
  flex: 1 1 260px;
  gap: 2px;
}

.mobile-app-banner-copy strong {
  color: var(--app-primary);
  font-size: 0.95rem;
}

.mobile-app-banner-copy span {
  color: var(--muted);
  font-size: 0.85rem;
}

.mobile-app-banner-close {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 32px;
  min-height: 32px;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.activity-button {
  position: relative;
}

.activity-count {
  display: inline-grid;
  min-width: 20px;
  min-height: 20px;
  place-items: center;
  border-radius: 999px;
  background: #b75031;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
}

.activity-tray {
  position: fixed;
  z-index: 1200;
  right: 18px;
  bottom: 18px;
  display: none;
  width: min(390px, calc(100vw - 28px));
  max-height: min(620px, calc(100vh - 36px));
  overflow: auto;
  border: 1px solid rgba(17, 47, 79, 0.18);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 20px 55px rgba(12, 31, 51, 0.24);
}

.activity-tray.open {
  display: block;
}

.activity-tray-header,
.activity-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  border-bottom: 1px solid rgba(17, 47, 79, 0.1);
}

.activity-tray-header {
  position: sticky;
  z-index: 1;
  top: 0;
  background: #123b66;
  color: #ffffff;
}

.activity-item {
  align-items: end;
  flex-wrap: wrap;
}

.activity-item > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.activity-item strong,
.activity-item span {
  overflow-wrap: anywhere;
}

.activity-item span {
  color: var(--muted);
  font-size: 0.82rem;
}

.activity-item progress {
  width: 100%;
  height: 7px;
  accent-color: #2d7b66;
}

.activity-item.error progress,
.activity-item.cancelled progress {
  accent-color: #b75031;
}

.activity-tray > .muted {
  margin: 12px 14px;
}

.global-search-panel {
  display: grid;
  gap: 14px;
}

.global-search-panel > input {
  position: sticky;
  z-index: 1;
  top: 0;
  min-height: 48px;
  border-width: 2px;
  background: #ffffff;
  font-size: 1rem;
}

.search-results,
.saved-view-list {
  display: grid;
  gap: 8px;
}

.search-result,
.saved-view-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(17, 47, 79, 0.12);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  text-align: left;
}

.search-result:hover,
.search-result:focus-visible {
  border-color: #2d7b66;
  background: #f2faf7;
}

.search-result > span:last-child,
.saved-view-row > div:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.search-result small,
.saved-view-row span {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.saved-view-row {
  justify-content: space-between;
}

.confirmation-dialog {
  width: min(520px, calc(100vw - 32px));
}

.confirmation-dialog .dialog-body {
  display: grid;
  gap: 16px;
}

.edit-conflict {
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
}

.toast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.toast button {
  flex: 0 0 auto;
  border-color: currentColor;
  background: transparent;
  color: inherit;
  font-weight: 800;
}

@media (max-width: 760px) {
  .mobile-app-banner {
    align-items: center;
    flex-wrap: nowrap;
    margin: 0 14px 12px;
    min-height: 54px;
    padding: 7px 42px 7px 9px;
  }

  .auth-panel .mobile-app-banner {
    margin: 0 0 20px;
  }

  .mobile-app-banner-copy {
    flex: 1 1 auto;
  }

  .mobile-app-banner-copy span {
    display: none;
  }

  .mobile-app-banner-copy strong {
    font-size: 0.78rem;
  }

  .mobile-app-banner > img {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .mobile-app-banner > .button,
  .mobile-app-banner > button.primary {
    min-height: 34px;
    padding-inline: 9px;
    flex: 0 0 auto;
    font-size: 0.75rem;
  }

  .network-banner {
    align-items: flex-start;
    margin: 0 14px 12px;
  }

  .saved-view-row {
    align-items: stretch;
    flex-direction: column;
  }

  .activity-tray {
    right: 14px;
    bottom: 14px;
  }
}
