:root {
  --brand-red: #df1822;
  --brand-red-dark: #b9121a;
  --blue: #25465e;
  --sky: #1875b5;
  --green: #84e889;
  --yellow: #f2ea83;
  --red: #ef7478;
  --line: #d4dce2;
  --line-soft: #e5eaee;
  --text: #24323b;
  --muted-text: #63727d;
  --bg: #f3f5f6;
  --panel: #fff;
  --table-head: #f5f7f8;
}

/* XXXLutz / RZ identity, separate from operational status colours. */
.topbar .brand-header { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; min-width: 0; }
.brand-logo { display: block; width: 120px; height: auto; aspect-ratio: 600 / 144; object-fit: contain; }
.brand-heading { display: grid; gap: 1px; border-left: 1px solid #dce0e2; padding-left: 16px; }
.brand-heading strong { color: #24282a; font-size: 18px; line-height: 1.1; }
.brand-service { font-size: 12px; font-weight: 500; color: #5b6267; margin-left: 5px; }
.brand-subtitle { font-size: 11px; color: #656d72; }
.brand-user { font-size: 12px; }
.login-brand-logo { width: 156px; height: auto; display: block; margin-bottom: 22px; }
.login-service-name { font-size: 12px; color: #666d72; font-weight: 600; margin: 0 0 6px; }
.login-box { border-top: 3px solid var(--brand-red); }

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 14px;
}

a { color: inherit; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  background: #fbfcfd;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06);
  position: sticky;
  top: 0;
  z-index: 5;
}
.topbar nav { display: flex; flex-wrap: wrap; gap: 4px; }
.lang-form {
  margin: 0;
}
.lang-form select {
  min-width: 64px;
  min-height: 34px;
  padding: 6px 8px;
}
.topbar a {
  padding: 8px 10px;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 3px;
}
.topbar a.active { background: #e8f1f8; border-color: #b9cedd; }
.muted { color: var(--muted-text); margin-left: 10px; }

main { padding: 12px; }
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
}
.login-box {
  width: min(420px, calc(100vw - 24px));
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 22px;
}
.login-box h1 { margin: 0 0 18px; font-size: 22px; }
.login-form { display: grid; gap: 12px; }
.login-form label, .login-form input, .login-form button { width: 100%; }
.account-panel + .account-panel { margin-top: 10px; }
.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}
.admin-table th,
.admin-table td {
  border: 1px solid #d7e0e6;
  padding: 8px 10px;
  vertical-align: middle;
}
.admin-table th {
  background: var(--table-head);
  color: var(--muted-text);
  font-size: 12px;
}
.inline-toggle-form {
  margin: 0;
}
.inline-toggle-form button {
  min-width: 110px;
}
.panel, .table-panel, .month {
  background: var(--panel);
  border: 1px solid var(--line);
  margin-bottom: 10px;
  padding: 10px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}
.flash {
  padding: 10px 12px;
  margin-bottom: 10px;
  border: 1px solid #a7d8a9;
  background: #e9f9ea;
}
.flash.error { border-color: #e79797; background: #fdecec; }

.entry-form, .filters, .toolbar, .import-export {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
}
.entry-panel summary {
  display: none;
}
label { display: grid; gap: 4px; font-size: 13px; }
input, select, button, .button {
  min-height: 34px;
  border: 1px solid var(--line);
  padding: 7px 10px;
  font: inherit;
}
input, select {
  background: #fff;
  min-width: 120px;
  border-radius: 3px;
}
input:focus, select:focus {
  outline: 2px solid #b9ddf3;
  outline-offset: 0;
  border-color: var(--sky);
}
button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: var(--sky);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border-radius: 3px;
}
button:hover, .button:hover { filter: brightness(0.96); }
.secondary { background: #7f8c8d; }
.success { background: #27ae60; }
.danger { background: #c0392b; }
.mini, .small-button { min-height: 28px; padding: 5px 9px; font-size: 12px; }
.small-button {
  position: absolute;
  right: 10px;
  bottom: 10px;
  background: var(--blue);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}

.totals { margin-top: 10px; font-weight: 600; display: flex; flex-wrap: wrap; gap: 8px; }
.import-export { margin-top: 10px; }
.import-confirm { display: flex; align-items: center; gap: 6px; }
.import-confirm input { width: 18px; min-width: 18px; min-height: 18px; height: 18px; padding: 0; }
.calendar-toolbar {
  position: sticky;
  top: 48px;
  z-index: 4;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
  margin: -2px 0 10px;
}

.split {
  display: grid;
  grid-template-columns: minmax(650px, 832px) minmax(520px, 1fr);
  gap: 10px;
}
h2 { margin: 0 0 10px; font-size: 16px; }
h3 { margin: 0 0 12px; font-size: 15px; }
.scroll { overflow: auto; max-height: 68vh; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { border: 1px solid #9fa9af; padding: 6px; text-align: left; vertical-align: top; }
th {
  background: var(--table-head);
  position: sticky;
  top: 0;
  z-index: 1;
  border-color: #aab6bd;
}
.table-panel th {
  position: static;
}
td { border-color: #b6c0c7; }
tbody tr:hover td { background: #f5f9fb; }
.week-row { cursor: pointer; }
tbody tr.selected:hover td,
tr.selected:hover td,
tr.state-low td,
tr.state-medium td,
tr.state-high td,
tr.state-vacances td { background: #fff; }
tr.state-low td:last-child { background: #dff7e2; }
tr.state-medium td:last-child { background: #ffdfb3; }
tr.state-high td:last-child { background: #f7c5c8; }
tr.state-vacances td:last-child { background: #4b5563; color: #fff; }
tr.selected td,
tbody tr.selected:hover td { background: #0d83d4; color: #fff; }
.table-panel.large {
  background: #f8fafb;
}
.table-panel.large .scroll {
  background: #f2f6f8;
  border: 1px solid var(--line-soft);
  padding: 6px;
}
.table-panel.large table {
  table-layout: fixed;
  width: 1385px;
  max-width: 100%;
  border-collapse: separate;
  border-spacing: 0 6px;
  background: transparent;
}
.table-panel.large th,
.table-panel:first-child th {
  display: table-cell;
  border: 0;
  background: transparent;
  color: var(--muted-text);
  font-size: 12px;
  font-weight: 700;
  padding: 2px 6px 6px;
}
.table-panel:first-child thead {
  display: none;
}
.weeks-panel-head {
  margin-bottom: 6px;
}
.weeks-panel-head h2 {
  margin-bottom: 7px;
}
.weeks-legend {
  display: grid;
  grid-template-columns: var(--weeks-cols);
  gap: 0;
  color: var(--muted-text);
  font-size: 12px;
  font-weight: 700;
  width: calc(100% - 24px);
  margin-left: 7px;
  padding: 0;
}
.weeks-legend span {
  padding: 0 6px;
}
.weeks-legend span:last-child {
  text-align: center;
}
.table-panel.large td {
  border-width: 1px 0;
  border-color: var(--line-soft);
  background: #fff;
  padding: 8px 6px;
  border-right: 1px solid #d6e0e6;
}
.table-panel.large td:first-child {
  border-left-width: 1px;
  border-radius: 4px 0 0 4px;
}
.table-panel.large td:last-child {
  border-right-width: 1px;
  border-radius: 0 4px 4px 0;
}
.inline-field {
  width: 100%;
  min-width: 0;
  min-height: 28px;
  border: 0;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.72);
  padding: 4px 6px;
}
.inline-field:focus {
  outline: 2px solid #8dc8ed;
  background: #fff;
}
.status-select {
  background: transparent !important;
}
.table-panel.large .actions form {
  margin: 0;
}
.table-panel.large th:nth-child(1),
.table-panel.large td:nth-child(1) { width: 64px; }
.table-panel.large th:nth-child(2),
.table-panel.large td:nth-child(2) { width: 96px; }
.table-panel.large th:nth-child(3),
.table-panel.large td:nth-child(3) { width: 150px; }
.table-panel.large th:nth-child(4),
.table-panel.large td:nth-child(4) { width: 62px; }
.table-panel.large th:nth-child(5),
.table-panel.large td:nth-child(5) { width: 41px; }
.table-panel.large th:nth-child(6),
.table-panel.large td:nth-child(6) { width: 38px; }
.table-panel.large th:nth-child(7),
.table-panel.large td:nth-child(7) { width: 72px; }
.table-panel.large th:nth-child(8),
.table-panel.large td:nth-child(8) { width: 78px; }
.table-panel.large th:nth-child(9),
.table-panel.large td:nth-child(9) { width: 112px; }
.table-panel.large th:nth-child(10),
.table-panel.large td:nth-child(10) { width: 188px; }
.table-panel:first-child {
  font-size: 14px;
  --weeks-cols: 90px 88px 86px 120px 96px minmax(92px, 1fr) minmax(96px, 1.15fr);
}
.table-panel:first-child .scroll {
  background: #f2f6f8;
  border: 1px solid var(--line-soft);
  padding: 6px;
}
.table-panel:first-child table {
  display: block;
  width: 100%;
  background: transparent;
}
.table-panel:first-child tbody {
  display: block;
}
.table-panel:first-child tr {
  display: grid;
  grid-template-columns: var(--weeks-cols);
  align-items: stretch;
  margin-bottom: 6px;
}
.table-panel:first-child td {
  display: block;
  width: auto !important;
  min-width: 0;
  box-sizing: border-box;
  border-width: 1px 0;
  border-color: var(--line-soft);
  background: #fff;
  padding: 8px 6px;
}
.table-panel:first-child td:first-child {
  border-left-width: 1px;
  border-radius: 4px 0 0 4px;
  color: var(--muted-text);
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  vertical-align: middle;
}
.table-panel:first-child tr.same-month td:first-child {
  color: #a2afba;
  font-size: 12px;
  font-weight: 600;
}
.table-panel:first-child td:last-child {
  border-right-width: 1px;
  border-radius: 0 4px 4px 0;
  text-align: center;
  font-weight: 700;
}
.table-panel:first-child td:nth-child(2) {
  font-size: 16px;
  font-weight: 700;
}
.table-panel:first-child td:nth-child(2)::before { content: "S "; color: var(--muted-text); font-size: 12px; }
.table-panel:first-child td:nth-child(3)::before { content: "Eq "; color: var(--muted-text); font-size: 12px; }
.table-panel:first-child td:nth-child(4)::before { content: "Dispo "; color: var(--muted-text); font-size: 12px; }
.table-panel:first-child td:nth-child(5)::before { content: "Plan "; color: var(--muted-text); font-size: 12px; }
.table-panel:first-child td:nth-child(6)::before { content: "Libre "; color: var(--muted-text); font-size: 12px; }
.table-panel:first-child tbody tr:hover td {
  background: #f8fbfd;
}
.table-panel:first-child tr.month-break {
  position: relative;
  margin-top: 14px;
}
.table-panel:first-child tr.month-break td {
  border-top-width: 1px;
}
.table-panel:first-child tr.month-break td:last-child {
  border-top-width: 1px;
}
.table-panel:first-child tr.month-break td:first-child {
  box-shadow: inset 0 2px 0 #9fb2bf;
  border-radius: 4px 0 0 4px;
}
.table-panel:first-child tr.state-low td:last-child,
.table-panel:first-child tr.state-medium td:last-child,
.table-panel:first-child tr.state-high td:last-child,
.table-panel:first-child tr.state-vacances td:last-child {
  background: #dff7e2;
  color: #0f172a;
  border-radius: 999px;
}
.table-panel:first-child tr.state-medium td:last-child { background: #ffdfb3; }
.table-panel:first-child tr.state-high td:last-child { background: #f7c5c8; }
.table-panel:first-child tr.state-vacances td {
  background: #f1f3f5;
  color: #6b7280;
}
.table-panel:first-child tr.state-vacances td:last-child {
  background: #4b5563;
  color: #fff;
}
.table-panel:first-child tr.selected td,
.table-panel:first-child tbody tr.selected:hover td {
  background: #0d83d4;
  color: #fff;
  border-color: #0d83d4;
}
.week-card.state-low { background: #e8f8e9; }
.week-card.state-medium { background: #ffdfb3; }
.week-card.state-high { background: #f7c5c8; }
.week-card.state-vacances { background: #e5e7eb; }
.week-card.state-vacances .small-button { background: #4b5563; }
.status-red { background: #f7c5c8 !important; }
.status-yellow { background: #fbf3b6 !important; }
.status-green { background: #dff7e2 !important; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; }
.actions form { margin: 0; }
.table-panel.large .actions {
  flex-wrap: nowrap;
  align-items: center;
  white-space: nowrap;
}
.table-panel.large .actions .button,
.table-panel.large .actions button {
  width: auto;
}

.week-log {
  margin-top: 22px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 10px;
  width: 1385px;
  max-width: 100%;
}
.week-log-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
}
.format-toolbar {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
}
.format-toolbar button {
  min-width: 34px;
  min-height: 30px;
  padding: 4px 8px;
  background: #edf3f7;
  color: var(--text);
  border: 1px solid var(--line);
}
.log-editor {
  min-height: 210px;
  border: 3px solid #111;
  background: #fff;
  padding: 10px;
  overflow: auto;
}
.log-editor:focus {
  outline: 2px solid #b9ddf3;
  outline-offset: 2px;
}
.log-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.log-delete-form {
  margin-top: 8px;
}

/* Visual refresh: retain the existing planning geometry and column order. */
.topbar {
  background: #fff;
  box-shadow: none;
  border-top: 3px solid var(--brand-red);
}
.topbar strong { font-size: 15px; }
.topbar a { font-weight: 600; }
.topbar a.active { background: #fff0f0; border-color: transparent; color: #b4121b; }
.topbar a:hover { background: #f0f4f7; }
.panel, .table-panel, .month { box-shadow: none; }
.panel { border-color: var(--line-soft); }
.table-panel { min-width: 0; border-color: var(--line); }
h2, h3 { font-weight: 650; color: #263c49; }
label { color: #52636f; font-size: 12px; font-weight: 600; }
input, select { border-color: #d3dce3; border-radius: 4px; color: var(--text); }
button, .button { border-radius: 4px; font-weight: 600; }
button:not(.secondary):not(.success):not(.danger),
.button:not(.secondary):not(.success):not(.danger) { background: var(--brand-red); }
.format-toolbar button:not(.secondary):not(.success):not(.danger) { background: #f1f5f7; }
button:not(.secondary):not(.success):not(.danger):hover { background: var(--brand-red-dark); }
.format-toolbar button:not(.secondary):not(.success):not(.danger):hover { background: #e5ebef; }
button:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 2px solid #1875b5;
  outline-offset: 3px;
}
.secondary { background: #edf1f4; color: #425564; }
.success { background: #287d60; }
.danger { background: #fbeceb; color: #a6322b; }
.danger:hover { background: #f5d8d5; }
.totals { font-size: 12px; color: #647480; gap: 7px; }
.totals strong { color: #263c49; font-size: 14px; font-variant-numeric: tabular-nums; }
.totals span { color: #c2cbd1; }
.data-tools { margin-top: 12px; padding-top: 9px; border-top: 1px solid var(--line-soft); }
.data-tools > summary { width: fit-content; color: #596c79; font-size: 12px; font-weight: 600; cursor: pointer; }
.data-tools .import-export { margin-top: 10px; }
.weeks-legend { font-size: 11px; color: #6b7a85; }
.table-panel:first-child .scroll,
.table-panel.large .scroll { background: #f7f9fa; border-color: #e6ecef; }
.table-panel:first-child td { font-variant-numeric: tabular-nums; }
.table-panel:first-child td:nth-child(2) a { text-decoration: none; }
.table-panel:first-child td:nth-child(2) a:hover { text-decoration: underline; }
.table-panel:first-child td:nth-child(n+3):nth-child(-n+6)::before { content: none; }
.table-panel:first-child td:nth-child(2)::before { color: #708491; }
.table-panel:first-child tr.same-month td:first-child { color: #81919d; font-weight: 400; }
.table-panel:first-child tr.month-break td { border-top-color: #edf1f4; }
.table-panel:first-child tr.month-break td:last-child { border-top-color: transparent; }
.table-panel:first-child tr.month-break td:first-child { box-shadow: inset 0 2px 0 #aabcc8; }
.table-panel:first-child tr.selected td,
.table-panel:first-child tbody tr.selected:hover td {
  background: #1875b5; border-color: #1875b5; color: #fff;
}
.table-panel:first-child tr.selected td:first-child,
.table-panel:first-child tr.selected td:nth-child(2)::before { color: #fff; }
.table-panel:first-child tr.state-low td:last-child { background: #e4f4e9; color: #276340; }
.table-panel:first-child tr.state-medium td:last-child { background: #ffead1; color: #8b4c0c; }
.table-panel:first-child tr.state-high td:last-child { background: #fbe1e0; color: #a33236; }
.table-panel:first-child tr.state-vacances td:last-child { background: #56626a; color: #fff; }
.table-panel:first-child tr.selected td:last-child { box-shadow: inset 0 0 0 1px #1875b5; }
.table-panel.large { background: #fff; }
.table-panel.large th { font-size: 11px; font-weight: 600; }
.table-panel.large td { border-color: #e2e8ed; vertical-align: middle; }
.table-panel.large .inline-field { background: transparent; outline-offset: -1px; }
.table-panel.large .inline-field { font-size: 13px; padding: 4px 2px; }
.table-panel.large input[type="number"] { appearance: textfield; }
.table-panel.large input[type="number"]::-webkit-inner-spin-button,
.table-panel.large input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.table-panel.large .inline-field:hover { background: rgba(255,255,255,.6); box-shadow: inset 0 0 0 1px #c4d3dd; }
.table-panel.large .inline-field:focus { background: #fff; }
.table-panel.large td:nth-child(1) .inline-field { font-weight: 600; }
.table-panel.large td:nth-child(2) .inline-field { font-weight: 500; }
.table-panel.large tr.is-dirty td:first-child { border-left: 3px solid #cb871d; }
.table-panel.large tr.is-dirty button[type="submit"]:not(.danger) { background: #996511; }
.table-panel.large tr.is-dirty td { border-top-color: #e9d6ad; border-bottom-color: #e9d6ad; }
.status-red { background: #fbe1e0 !important; color: #7e3237; }
.status-yellow { background: #fff2cb !important; color: #735b16; }
.status-green { background: #e4f4e9 !important; color: #285c3e; }
.week-log { border: 0; border-top: 1px solid var(--line); padding: 14px 0 0; }
.log-editor { border: 1px solid #bccad4; border-radius: 4px; line-height: 1.5; }
.format-toolbar { gap: 4px; }
.format-toolbar button { background: #f1f5f7; border-color: #e0e7eb; }
.week-log-header .muted { font-size: 12px; }
.scroll { scrollbar-width: thin; scrollbar-color: #bdcbd4 #f3f6f8; }
.admin-table th, .admin-table td { border-color: var(--line-soft); }
.week-card { border-color: #cdd8df; border-radius: 4px; }
.week-card.state-low { background: #edf7f0; }
.week-card.state-medium { background: #fff0dd; }
.week-card.state-high { background: #fce8e7; }

@media (min-width: 901px) and (max-width: 1250px) {
  .split { grid-template-columns: minmax(480px, 44%) minmax(0, 1fr); }
  .table-panel:first-child { --weeks-cols: 1fr .75fr .7fr 1fr .9fr .8fr 1fr; }
}

@media (max-width: 700px) {
  .split { min-width: 0; }
  .table-panel:first-child { --weeks-cols: 1.2fr .85fr 1fr 1fr; }
  .table-panel:first-child table { width: 100% !important; }
  .weeks-legend { width: calc(100% - 24px) !important; }
  .table-panel:first-child .scroll { max-height: 46vh; }
  .table-panel.large .scroll { max-width: 100%; }
  .table-panel.large table { min-width: 1200px !important; }
  .topbar nav { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .lang-form select { min-width: 0; width: 100%; }
  .topbar .brand-header { gap: 12px; }
  .brand-logo { width: 105px; }
  .brand-heading { padding-left: 12px; }
  .brand-heading strong { font-size: 17px; }
  .brand-service { font-size: 11px; }
  .brand-user { width: 100%; }
  .calendar-toolbar { top: 0; }
  .admin-table { display: block; overflow-x: auto; }
  .week-log { padding-top: 12px; }
}

.month h2 {
  margin: -11px 0 12px;
  display: inline-block;
  background: #fff;
  padding: 0 6px;
}
.week-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 16px;
}
.week-card {
  min-height: 140px;
  border: 1px solid #6d7377;
  padding: 12px 12px 44px;
  position: relative;
}
.week-card input { width: 70px; min-width: 70px; min-height: 28px; padding: 4px 6px; }
.week-card p { margin: 9px 0; }

@media (max-width: 900px) {
  .topbar { align-items: flex-start; flex-direction: column; }
  .split { grid-template-columns: 1fr; }
  .scroll { max-height: none; }
  input, select { width: 100%; }
  label { width: 100%; }
  .entry-form button, .filters button, .button { width: 100%; }
}

@media (max-width: 700px) {
  body { font-size: 13px; }
  main { padding: 8px; }
  .topbar {
    position: static;
    gap: 8px;
    padding: 10px 8px;
  }
  .topbar > div {
    display: grid;
    gap: 2px;
  }
  .muted {
    margin-left: 0;
    font-size: 12px;
  }
  .topbar nav {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
  }
  .topbar a {
    text-align: center;
    padding: 8px 4px;
  }

  .panel, .table-panel, .month {
    padding: 8px;
    margin-bottom: 8px;
  }
  .entry-panel summary {
    display: block;
    cursor: pointer;
    font-weight: 700;
    padding: 8px 0;
  }
  .entry-panel:not([open]) {
    padding-top: 4px;
    padding-bottom: 4px;
  }
  .entry-panel[open] summary {
    margin-bottom: 8px;
  }
  input, select, button, .button {
    min-height: 36px;
  }
  .filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: end;
  }
  .filters label:nth-child(1),
  .filters label:nth-child(2),
  .filters button,
  .filters .button {
    grid-column: 1 / -1;
  }
  .totals {
    display: grid;
    gap: 4px;
  }
  .totals span {
    display: none;
  }
  .import-export {
    display: grid;
    grid-template-columns: 1fr;
  }
  .import-export form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .split {
    gap: 8px;
  }
  .table-panel:first-child {
    --weeks-cols: 1.2fr .85fr 1fr 1fr;
  }
  .weeks-legend {
    width: 52%;
  }
  .weeks-legend span:nth-child(3),
  .weeks-legend span:nth-child(4),
  .weeks-legend span:nth-child(6) {
    display: none;
  }
  .table-panel:first-child table {
    min-width: 0;
    width: 52%;
  }
  .table-panel:first-child th:nth-child(3),
  .table-panel:first-child td:nth-child(3),
  .table-panel:first-child th:nth-child(4),
  .table-panel:first-child td:nth-child(4),
  .table-panel:first-child th:nth-child(6),
  .table-panel:first-child td:nth-child(6) {
    display: none;
  }
  .table-panel:first-child th,
  .table-panel:first-child td {
    font-size: 11px;
    padding: 5px 3px;
  }
  .table-panel:first-child th:nth-child(1),
  .table-panel:first-child td:nth-child(1) { width: 54px; }
  .table-panel:first-child th:nth-child(2),
  .table-panel:first-child td:nth-child(2) { width: 44px; }
  .table-panel:first-child th:nth-child(5),
  .table-panel:first-child td:nth-child(5) { width: 46px; }
  .table-panel:first-child th:nth-child(7),
  .table-panel:first-child td:nth-child(7) { width: 58px; }
  .table-panel:first-child td:nth-child(2) {
    font-size: 12px;
  }
  .table-panel:first-child td:nth-child(2)::before,
  .table-panel:first-child td:nth-child(5)::before {
    font-size: 10px;
  }
  .table-panel.large table,
  .week-log {
    width: 100%;
    min-width: 900px;
  }
  .table-panel.large .scroll {
    max-height: 55vh;
  }
  .week-log {
    min-width: 0;
  }
  .log-editor {
    min-height: 160px;
  }
  .log-actions,
  .log-delete-form {
    display: grid;
  }
}
