:root {
  color-scheme: light;
  --ink: #102235;
  --muted: #5d6d80;
  --line: #d9e2ec;
  --line-strong: #c6d3df;
  --paper: #ffffff;
  --paper-soft: #fbfcfe;
  --wash: #f3f6fa;
  --navy: #071b31;
  --navy-2: #12395f;
  --navy-3: #1d4f7a;
  --teal: #0b786f;
  --teal-soft: #e8f6f3;
  --amber: #a86513;
  --amber-soft: #fff5e2;
  --danger: #b42318;
  --shadow: 0 18px 45px rgba(16, 34, 53, 0.1);
  --shadow-soft: 0 8px 22px rgba(16, 34, 53, 0.07);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #f8fafc 0%, var(--wash) 46%, #eef3f8 100%);
  color: var(--ink);
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

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

button {
  cursor: pointer;
}

button,
a,
input,
select,
textarea {
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.18);
  outline-offset: 2px;
}

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

.sidebar {
  background: linear-gradient(180deg, #06172b 0%, var(--navy) 58%, #0b263f 100%);
  color: #f8fbff;
  min-height: 100vh;
  padding: 24px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 0;
  box-shadow: 10px 0 28px rgba(7, 27, 49, 0.14);
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 56px;
}

.brand-logo {
  width: 68px;
  height: 48px;
  object-fit: contain;
  background: var(--navy);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  padding: 6px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

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

.brand span {
  color: #b9c7d9;
  font-size: 0.86rem;
  margin-top: 2px;
}

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

.nav-list-bottom {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  padding-top: 16px;
}

.nav-item {
  border: 0;
  color: #d9e6f4;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 0 13px;
  text-align: left;
  border-radius: 8px;
  font-weight: 750;
}

.nav-item[hidden] {
  display: none;
}

.nav-item span {
  width: 24px;
  text-align: center;
  color: #9fb5cf;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(255, 255, 255, 0.13);
  color: #ffffff;
  box-shadow: inset 3px 0 0 var(--teal);
}

.sidebar-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  padding-top: 16px;
  color: #b9c7d9;
  display: grid;
  gap: 4px;
  font-size: 0.85rem;
}

.sidebar-footer strong {
  color: #ffffff;
  font-size: 0.95rem;
}

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

.auth-screen {
  background: #edf3f8;
}

.auth-screen .app-shell {
  grid-template-columns: 1fr;
}

.auth-screen .sidebar,
.auth-screen .topbar {
  display: none;
}

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

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 22px;
  padding: 14px 16px;
  border: 1px solid rgba(217, 226, 236, 0.7);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
}

.session-user {
  color: var(--muted);
  font-weight: 700;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--teal);
  text-transform: uppercase;
  font-weight: 800;
  font-size: 0.76rem;
}

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

h1 {
  font-size: clamp(1.75rem, 2vw, 2.45rem);
  margin-bottom: 0;
  letter-spacing: 0;
  line-height: 1.15;
}

h2 {
  font-size: 1.12rem;
  margin-bottom: 6px;
  line-height: 1.25;
}

h3 {
  font-size: 1rem;
  margin-bottom: 8px;
  line-height: 1.3;
}

.topbar-actions,
.panel-header.split,
.toolbar,
.print-header,
.button-group,
.sheet-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.button-group,
.sheet-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.primary-button,
.ghost-button {
  border: 1px solid transparent;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 8px;
  font-weight: 800;
  box-shadow: 0 1px 0 rgba(16, 34, 53, 0.04);
}

.small-button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 0.82rem;
}

.primary-button {
  color: #ffffff;
  background: var(--navy-2);
}

.primary-button:hover {
  background: var(--navy-3);
  transform: translateY(-1px);
}

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

.ghost-button:hover {
  border-color: var(--line-strong);
  background: #f8fafc;
  transform: translateY(-1px);
}

.view {
  display: grid;
  gap: 20px;
}

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

.stat,
.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.stat {
  padding: 18px;
  display: grid;
  gap: 4px;
  min-height: 126px;
  border-top: 3px solid transparent;
}

.stat span,
.stat small,
.panel p,
label span,
td small {
  color: var(--muted);
}

.stat strong {
  font-size: 2rem;
  line-height: 1.1;
}

.stat.accent {
  border-color: rgba(15, 118, 110, 0.35);
  border-top-color: var(--teal);
  background: linear-gradient(180deg, #ffffff, var(--teal-soft));
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.8fr);
  gap: 18px;
}

.panel {
  padding: 18px;
  min-width: 0;
}

.panel.wide {
  min-height: 360px;
}

.panel-header {
  justify-content: space-between;
  margin-bottom: 16px;
}

.panel-header p {
  margin-bottom: 0;
}

.toolbar {
  flex-wrap: wrap;
  padding: 12px;
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 14px;
}

.search-field {
  flex: 1 1 320px;
}

.compact-field {
  flex: 0 1 220px;
}

label {
  display: grid;
  gap: 6px;
  font-weight: 750;
  font-size: 0.88rem;
}

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

input:hover,
select:hover,
textarea:hover {
  border-color: var(--line-strong);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(15, 118, 110, 0.65);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.1);
}

textarea {
  resize: vertical;
}

.large-note {
  min-height: 150px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

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

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

th {
  color: #415672;
  font-size: 0.78rem;
  text-transform: uppercase;
  background: #f3f7fb;
  letter-spacing: 0;
}

td {
  font-size: 0.93rem;
}

tbody tr:hover td {
  background: #fbfdff;
}

.status,
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.78rem;
  white-space: nowrap;
}

.status {
  background: var(--teal-soft);
  color: var(--teal);
}

.pill {
  background: #edf2f8;
  color: var(--navy-2);
}

.pill.warn {
  background: #fff4df;
  color: var(--amber);
}

.form-panel.hidden,
.hidden {
  display: none;
}

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

.form-grid .full {
  grid-column: 1 / -1;
}

.form-grid button {
  justify-self: start;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.job-form-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--paper-soft);
}

.job-form-section legend {
  color: var(--navy-2);
  font-weight: 900;
  padding: 0 8px;
}

.nested-grid {
  margin-top: 4px;
}

.compact-fieldset {
  margin-top: 4px;
  padding: 10px 12px;
  background: #ffffff;
}

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

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

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

.checkbox-fieldset {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--paper-soft);
}

.checkbox-fieldset legend {
  color: var(--muted);
  font-weight: 850;
  padding: 0 6px;
}

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

.checkbox-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  font-weight: 750;
}

.checkbox-option input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
  accent-color: var(--navy-2);
}

.note-cell {
  max-width: 260px;
  color: #415672;
}

.mini-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  margin: 2px 4px 2px 0;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 0.76rem;
  font-weight: 850;
  white-space: nowrap;
}

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

.inline-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  margin-bottom: 14px;
}

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

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

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

.preview-option {
  min-height: auto;
}

.technician-profile {
  display: grid;
  gap: 18px;
}

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

.technician-profile-header h2 {
  font-size: 1.45rem;
}

.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
  gap: 18px;
}

.detail-list {
  margin: 0;
  display: grid;
  gap: 10px;
}

.detail-list div {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

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

.detail-list dd {
  margin: 0;
}

.profile-tags {
  min-height: 40px;
  margin-bottom: 18px;
}

.profile-note {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--paper-soft);
  color: #415672;
}

.assignment-select {
  margin-bottom: 12px;
}

.assignment-detail-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
}

.compact-detail-list div {
  grid-template-columns: 130px minmax(0, 1fr);
}

.ged-panel {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.ged-form {
  align-items: end;
  margin-bottom: 14px;
}

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

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

.ged-item span {
  display: block;
  color: var(--muted);
  font-size: 0.84rem;
  margin-top: 2px;
}

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

.job-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.job-map {
  min-height: 118px;
  background:
    linear-gradient(135deg, rgba(7, 27, 49, 0.92), rgba(15, 118, 110, 0.74)),
    repeating-linear-gradient(90deg, transparent 0 35px, rgba(255, 255, 255, 0.18) 36px 37px),
    repeating-linear-gradient(0deg, transparent 0 35px, rgba(255, 255, 255, 0.15) 36px 37px);
  color: #ffffff;
  display: grid;
  place-items: center;
  padding: 18px;
  text-align: center;
}

.job-map span {
  display: block;
  margin-top: 6px;
  color: #dce8f6;
  font-weight: 700;
}

.job-card-body {
  padding: 14px;
}

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

.job-card-title h3 {
  margin-bottom: 8px;
}

.archived-card {
  background: #fbfcfe;
}

.archived-card .job-map {
  background:
    linear-gradient(135deg, rgba(65, 86, 114, 0.9), rgba(100, 116, 139, 0.75)),
    repeating-linear-gradient(90deg, transparent 0 35px, rgba(255, 255, 255, 0.18) 36px 37px),
    repeating-linear-gradient(0deg, transparent 0 35px, rgba(255, 255, 255, 0.15) 36px 37px);
}

.archived-pill {
  background: #e8eef5;
  color: #415672;
}

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

.job-info-frame {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--paper-soft);
}

.job-info-frame.full {
  grid-column: 1 / -1;
}

.job-info-frame h4 {
  margin: 0 0 10px;
  color: var(--navy);
  font-size: 0.88rem;
}

.job-info-frame dl {
  margin: 0;
  display: grid;
  gap: 8px;
}

.job-info-frame dl div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 8px;
}

.job-info-frame dl div.full {
  grid-template-columns: 1fr;
}

.job-info-frame dl div.note-display dd {
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 10px;
}

.job-info-frame dt {
  color: var(--muted);
  font-weight: 850;
}

.job-info-frame dd {
  margin: 0;
}

.meta-list {
  display: grid;
  gap: 8px;
  margin: 12px 0;
  color: #415672;
  font-size: 0.9rem;
}

.map-link {
  color: var(--teal);
  font-weight: 850;
  text-decoration: none;
}

.map-link:hover {
  text-decoration: underline;
}

.gps-with-map {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.small-map-link {
  border: 1px solid rgba(15, 118, 110, 0.28);
  border-radius: 8px;
  padding: 4px 8px;
  background: #effaf8;
  line-height: 1.2;
}

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

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--paper-soft);
  color: var(--muted);
  padding: 22px;
  text-align: center;
  font-weight: 800;
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.timeline-date {
  font-weight: 850;
  color: var(--navy-2);
}

.planning-list {
  display: grid;
  gap: 16px;
}

.planning-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.planning-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  padding: 14px;
  background: var(--paper-soft);
  border-bottom: 1px solid var(--line);
}

.planning-card-header h3 {
  margin-bottom: 6px;
}

.planning-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--muted);
  font-size: 0.9rem;
}

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

.planning-table {
  min-width: 820px;
}

.planning-card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

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

.specialty-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.bar {
  grid-column: 1 / -1;
  height: 8px;
  background: #e8eef5;
  border-radius: 999px;
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  background: var(--teal);
}

.printable-sheet {
  margin-top: 4px;
}

.print-header {
  justify-content: space-between;
  border-bottom: 2px solid var(--navy);
  padding-bottom: 12px;
}

.print-header p {
  margin: 0 0 3px;
  color: var(--navy-2);
  font-weight: 900;
}

.print-day {
  margin-top: 18px;
}

.job-sheet-header {
  margin-bottom: 18px;
}

.sheet-section {
  margin-top: 18px;
}

.sheet-split {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(0, 1.35fr);
  gap: 16px;
  align-items: start;
}

.compact-split {
  grid-template-columns: minmax(280px, 0.75fr) minmax(0, 1fr);
}

.sheet-bottom {
  display: grid;
  grid-template-columns: 1fr;
}

.resource-module {
  display: block;
}

.resource-frame {
  padding: 16px;
}

.resource-trash {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border: 1px dashed rgba(180, 35, 24, 0.45);
  border-radius: 8px;
  background: #fff7f6;
  color: var(--danger);
  padding: 10px 12px;
  margin-bottom: 12px;
}

.resource-trash span {
  color: #8c2a22;
  font-size: 0.86rem;
}

.resource-trash.trash-target {
  border-style: solid;
  background: #ffe7e3;
  box-shadow: inset 0 0 0 2px rgba(180, 35, 24, 0.2);
}

.vehicle-bottom {
  margin-top: 22px;
}

.sheet-frame {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
  box-shadow: var(--shadow-soft);
}

.sheet-frame h3 {
  color: var(--navy);
  font-size: 1rem;
  margin-bottom: 12px;
}

.sheet-definition-list {
  margin: 0;
  display: grid;
  gap: 8px;
}

.sheet-definition-list div {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.sheet-definition-list div.full {
  grid-template-columns: 1fr;
}

.sheet-definition-list dt {
  color: var(--muted);
  font-weight: 850;
}

.sheet-definition-list dd {
  margin: 0;
}

.excel-frame {
  border-radius: 4px;
}

.job-sheet-info {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 18px;
}

.job-sheet-title {
  display: grid;
  gap: 4px;
  background: var(--navy);
  color: #ffffff;
  padding: 16px;
}

.job-sheet-title span {
  color: #cbd8e8;
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.job-sheet-title strong {
  font-size: 1.25rem;
}

.job-sheet-info dl {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.job-sheet-info dl div {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 10px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
}

.job-sheet-info dl div:nth-child(odd) {
  border-right: 1px solid var(--line);
}

.job-sheet-info dt {
  color: var(--muted);
  font-weight: 850;
}

.job-sheet-info dd {
  margin: 0;
}

.matrix-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.job-matrix {
  min-width: 980px;
}

.resource-matrix {
  min-width: 1180px;
  table-layout: fixed;
}

.catering-matrix {
  min-width: 760px;
  table-layout: fixed;
}

.resource-matrix th:first-child,
.resource-matrix td:first-child {
  width: 180px;
}

.resource-matrix th:nth-child(2),
.resource-matrix td:nth-child(2) {
  width: 190px;
}

.resource-matrix th:nth-child(n + 3),
.resource-matrix td:nth-child(n + 3) {
  width: 180px;
}

.catering-matrix th,
.catering-matrix td {
  width: 52px;
  padding: 8px 6px;
}

.catering-matrix .identity-col,
.catering-matrix td:first-child {
  width: 170px;
  min-width: 170px;
}

.vehicle-matrix,
.vehicle-table,
.assignment-table {
  min-width: 620px;
}

.assignment-table-wrap,
.vehicle-table-wrap {
  margin-top: 14px;
}

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

.catering-matrix th,
.catering-matrix td {
  text-align: center;
}

.catering-checkbox {
  width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
  accent-color: var(--teal);
}

.catering-matrix .identity-col,
.catering-matrix td:first-child {
  text-align: left;
}

.total-row td {
  background: #f8fafc;
  color: var(--navy);
  font-weight: 900;
}

.catering-totals {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 12px 2px 2px;
}

.hotel-editor {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-soft);
  padding: 12px;
  margin: 12px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hotel-editor strong,
.hotel-editor span {
  display: block;
}

.hotel-editor span {
  color: var(--muted);
  font-size: 0.84rem;
  margin-top: 2px;
}

.hotel-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 10px;
  flex: 1 1 420px;
  max-width: 620px;
}

.hotel-fields label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.hotel-fields input {
  min-height: 38px;
}

.total-field {
  flex: 0 0 170px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-soft);
  padding: 10px;
  display: grid;
  gap: 4px;
}

.total-field strong {
  color: var(--navy);
}

.event-total {
  border-color: rgba(15, 118, 110, 0.45);
  background: #eef9f7;
}

.job-matrix th {
  background: #e8eef5;
  color: var(--navy);
  border-right: 1px solid #ccd7e3;
  text-align: center;
}

.job-matrix th.identity-col {
  text-align: left;
  background: #dce8f6;
}

.job-matrix td {
  border-right: 1px solid var(--line);
}

.job-matrix td:nth-child(n + 5) {
  text-align: center;
  min-width: 128px;
}

.assignment-cell {
  color: var(--navy-2);
  min-height: 96px;
}

.assignment-cell small,
.muted {
  color: var(--muted);
  font-weight: 650;
}

.resource-drop-zone {
  min-height: 82px;
  display: grid;
  align-content: start;
  gap: 8px;
  border: 1px dashed transparent;
  border-radius: 8px;
  padding: 4px;
}

.inline-add-button {
  width: 100%;
  min-height: 34px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--navy-2);
  font-weight: 900;
}

.inline-add-button:hover {
  border-color: var(--resource-color);
  color: var(--resource-color);
  background: #ffffff;
}

.inline-assignment-form {
  display: grid;
  gap: 8px;
  border: 1px solid var(--resource-color);
  border-radius: 8px;
  background: #ffffff;
  padding: 8px;
}

.inline-assignment-form input,
.inline-assignment-form textarea {
  min-height: 34px;
  padding: 7px 8px;
  font-size: 0.82rem;
}

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

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

.resource-drop-zone.drop-target {
  border-color: var(--resource-color);
  background: #f8fafc;
}

.task-card {
  border-left: 5px solid var(--resource-color);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 1px 0 rgba(16, 34, 53, 0.08);
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 8px;
  cursor: grab;
  display: grid;
  gap: 4px;
}

.task-card:active {
  cursor: grabbing;
}

.task-card.dragging {
  opacity: 0.55;
}

.task-card strong {
  color: var(--ink);
  font-size: 0.86rem;
}

.task-card em {
  justify-self: start;
  border-radius: 999px;
  background: color-mix(in srgb, var(--resource-color) 16%, #ffffff);
  color: var(--resource-color);
  border: 1px solid color-mix(in srgb, var(--resource-color) 32%, #ffffff);
  padding: 2px 8px;
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.35;
}

.task-card span {
  color: #415672;
  font-size: 0.78rem;
  line-height: 1.35;
}

.assignment-cell hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 8px 0;
}

.login-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
  align-items: end;
  gap: 24px;
}

.login-page {
  width: min(500px, 100%);
}

.login-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 30px;
  display: grid;
  gap: 18px;
}

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

.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 4px;
}

.login-brand h2 {
  margin: 0;
  font-size: 1.6rem;
}

.login-form {
  display: grid;
  gap: 12px;
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--navy-2);
  padding: 0;
  justify-self: start;
  font-weight: 800;
}

.text-button:hover {
  text-decoration: underline;
}

.password-reset-panel {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  display: grid;
  gap: 12px;
}

.password-reset-panel h3 {
  margin-bottom: 0;
}

.password-reset-panel .form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.personal-hero {
  background: var(--navy);
  color: #ffffff;
  border-radius: 8px;
  padding: 22px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
  box-shadow: var(--shadow-soft);
}

.personal-hero p {
  color: #cbd8e8;
  margin-bottom: 0;
}

.personal-stats {
  margin-bottom: 18px;
}

.personal-job-list,
.personal-planning-list {
  display: grid;
  gap: 16px;
}

.personal-prestation-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 18px;
  display: grid;
  gap: 16px;
  box-shadow: var(--shadow-soft);
}

.personal-prestation-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

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

.personal-table-wrap {
  margin-top: 0;
}

.portal-view {
  display: grid;
  gap: 16px;
}

.portal-hero {
  background: var(--navy);
  color: #ffffff;
  padding: 22px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.portal-hero p {
  color: #cbd8e8;
  margin-bottom: 0;
}

.assignment-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 16px;
  display: grid;
  gap: 12px;
  box-shadow: var(--shadow-soft);
}

.assignment-card header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  background: var(--navy);
  color: #ffffff;
  padding: 12px 14px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

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

  .sidebar {
    position: static;
    min-height: auto;
  }

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

  .stats-grid,
  .content-grid,
  .job-grid,
  .login-panel,
  .settings-grid,
  .profile-grid,
  .personal-info-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .main {
    padding: 18px;
  }

  .topbar,
  .portal-hero,
  .personal-hero,
  .assignment-card header,
  .technician-profile-header,
  .planning-card-header,
  .personal-prestation-header {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar-actions {
    justify-content: stretch;
  }

  .topbar-actions button,
  .panel-header.split button,
  .button-group button,
  .sheet-actions button {
    width: 100%;
  }

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

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

  .checkbox-grid,
  .inline-form,
  .job-detail-grid,
  .sheet-split,
  .compact-split {
    grid-template-columns: 1fr;
  }

  .job-info-frame.full {
    grid-column: auto;
  }

  .job-info-frame dl div {
    grid-template-columns: 1fr;
  }

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

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

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

  .sheet-definition-list div {
    grid-template-columns: 1fr;
  }

  .timeline-item {
    grid-template-columns: 1fr;
  }
}

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

  .sidebar,
  .topbar,
  .panel:not(.printable-sheet),
  .toast {
    display: none !important;
  }

  .app-shell,
  .main {
    display: block;
    padding: 0;
  }

  .printable-sheet {
    border: 0;
    box-shadow: none;
    padding: 0;
  }

  table {
    min-width: 0;
  }

  .job-sheet-info {
    border-radius: 0;
  }

  .job-sheet-info dl {
    grid-template-columns: 1fr;
  }

  .sheet-split,
  .compact-split {
    grid-template-columns: 1fr;
  }

  .job-sheet-info dl div,
  .job-sheet-info dl div:nth-child(odd) {
    border-right: 0;
  }

  .matrix-wrap {
    overflow: visible;
    border: 0;
  }

  .job-matrix {
    min-width: 0;
    font-size: 0.72rem;
  }

  th,
  td {
    padding: 6px;
  }
}
