@import url("/static/fonts/gridnik/stylesheet.css");
@import url("https://cdn.svar.dev/fonts/wxi/wx-icons.css");

@font-face {
  font-family: "Gridnik";
  src: url("/static/fonts/gridnik/gridmed-webfont.woff") format("woff");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

body {
  background-color: #f6f7fb;
  overflow-y: scroll;
  font-family: "Outfit", "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

html {
  overflow-y: scroll;
}

.page-container {
  max-width: 80rem;
  width: 100%;
}

#main-nav .page-container {
  max-width: 100%;
}

.logo-text {
  font-family: "Outfit", "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
}

.gantt-table th,
.gantt-table td {
  text-align: center;
  vertical-align: middle;
  font-size: 0.75rem;
  padding: 0.35rem;
}

.gantt-cell.active {
  background-color: #4f8dd1;
}

.gantt-date {
  min-width: 50px;
}

.capacity-table-wrap {
  background: #fff;
  border-radius: 0.75rem;
  padding: 0;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  position: relative;
  overflow: auto;
}

.capacity-table th,
.capacity-table td {
  box-sizing: border-box;
  text-align: center;
  vertical-align: middle;
  font-size: 0.8rem;
  min-width: 30px;
  padding: 0.35rem;
  border: 1px solid #e5e7eb;
}

.capacity-table tbody th,
.capacity-table tbody td {
  border-top: 0;
  border-bottom: 0;
  border-left: 1px solid rgba(148, 163, 184, 0.22);
  border-right: 1px solid rgba(148, 163, 184, 0.22);
}

.capacity-table thead tr:nth-child(3) th {
  border-bottom: 1px solid #e5e7eb;
}

.capacity-table tbody th,
.capacity-table tbody td {
  height: 35px;
}

.capacity-table {
  border-collapse: collapse;
  border-spacing: 0;
  color: #475569;
  width: max-content;
  min-width: 100%;
  --capacity-head-row-height: 35px;
  --capacity-day-cell-size: 35px;
}

.capacity-table thead th {
  background: #f8fafc;
  font-weight: 600;
  color: #0f172a;
  height: var(--capacity-head-row-height);
}

.capacity-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
}

.capacity-table thead tr:nth-child(2) th {
  top: var(--capacity-head-row-height);
}

.capacity-table thead tr:nth-child(3) th {
  top: calc(var(--capacity-head-row-height) * 2);
}

.capacity-table tbody tr:nth-child(even) td,
.capacity-table tbody tr:nth-child(even) th {
  background: #fbfdff;
}

.capacity-employee-header,
.capacity-employee {
  position: sticky;
  left: 0;
  background: #fff;
  text-align: left;
  min-width: var(--capacity-employee-col-width, 220px);
  z-index: 2;
}

.capacity-employee-hours-header,
.capacity-employee-hours-cell {
  --capacity-hours-col-width: 88px;
  min-width: var(--capacity-hours-col-width);
  width: var(--capacity-hours-col-width);
  max-width: var(--capacity-hours-col-width);
  white-space: nowrap;
  text-align: right !important;
  padding-right: 0.55rem !important;
}

.capacity-employee-hours-header {
  background: #f8fafc;
  color: #0f172a;
  font-weight: 600;
}

.capacity-employee-hours-cell {
  color: #334155;
  font-weight: 600;
  background: #fff;
}

.capacity-employee-hours-col-1,
.capacity-employee-hours-col-2,
.capacity-employee-hours-col-3,
.capacity-employee-hours-col-4 {
  position: sticky;
  background: #fff;
}

.capacity-employee-hours-col-1 {
  left: var(--capacity-employee-col-width, 220px);
}

.capacity-employee-hours-col-2 {
  left: calc(var(--capacity-employee-col-width, 220px) + var(--capacity-hours-col-width));
}

.capacity-employee-hours-col-3 {
  left: calc(var(--capacity-employee-col-width, 220px) + (var(--capacity-hours-col-width) * 2));
}

.capacity-employee-hours-col-4 {
  left: calc(var(--capacity-employee-col-width, 220px) + (var(--capacity-hours-col-width) * 3));
}

.capacity-table thead .capacity-employee-hours-col-1,
.capacity-table thead .capacity-employee-hours-col-2,
.capacity-table thead .capacity-employee-hours-col-3,
.capacity-table thead .capacity-employee-hours-col-4 {
  background: #f8fafc;
  z-index: 11;
}

.capacity-table tbody .capacity-employee-hours-col-1,
.capacity-table tbody .capacity-employee-hours-col-2,
.capacity-table tbody .capacity-employee-hours-col-3,
.capacity-table tbody .capacity-employee-hours-col-4 {
  z-index: 5;
}

.capacity-employee-header {
  z-index: 8;
}

.capacity-employee {
  font-weight: 600;
  z-index: 4;
}

/* Keep the full first column sticky, including empty header cells in row 2/3 */
.capacity-table thead tr th.capacity-employee-header {
  position: sticky;
  left: 0;
  min-width: var(--capacity-employee-col-width, 220px);
  width: var(--capacity-employee-col-width, 220px);
  background: #f8fafc;
  z-index: 12;
}

.capacity-table thead tr:nth-child(1) th.capacity-employee-header {
  top: 0;
}

.capacity-table thead tr:nth-child(2) th.capacity-employee-header {
  top: var(--capacity-head-row-height);
}

.capacity-table thead tr:nth-child(3) th.capacity-employee-header {
  top: calc(var(--capacity-head-row-height) * 2);
}

.capacity-table tbody td {
  position: relative;
  z-index: 1;
  min-width: var(--capacity-day-cell-size);
  width: var(--capacity-day-cell-size);
  max-width: var(--capacity-day-cell-size);
}

.capacity-table thead .capacity-employee-header {
  background: #f8fafc;
}

/* Ensure non-declarable summary columns stay fixed like Medewerker column */
.capacity-employee {
  width: var(--capacity-employee-col-width, 220px);
  max-width: var(--capacity-employee-col-width, 220px);
}

.capacity-table th.capacity-employee-hours-col-1,
.capacity-table td.capacity-employee-hours-col-1,
.capacity-table th.capacity-employee-hours-col-2,
.capacity-table td.capacity-employee-hours-col-2,
.capacity-table th.capacity-employee-hours-col-3,
.capacity-table td.capacity-employee-hours-col-3,
.capacity-table th.capacity-employee-hours-col-4,
.capacity-table td.capacity-employee-hours-col-4 {
  position: sticky !important;
}

.capacity-table th.capacity-employee-hours-col-1,
.capacity-table td.capacity-employee-hours-col-1 {
  left: var(--capacity-hours-col-1-left, var(--capacity-employee-col-width, 220px)) !important;
}

.capacity-table th.capacity-employee-hours-col-2,
.capacity-table td.capacity-employee-hours-col-2 {
  left: calc(
    var(
      --capacity-hours-col-2-left,
      calc(
        var(--capacity-hours-col-1-left, var(--capacity-employee-col-width, 220px))
        + var(--capacity-hours-col-width, 88px)
      )
    ) - 1px
  ) !important;
}

.capacity-table th.capacity-employee-hours-col-3,
.capacity-table td.capacity-employee-hours-col-3 {
  left: calc(var(--capacity-employee-col-width, 220px) + (var(--capacity-hours-col-width, 88px) * 2)) !important;
}

.capacity-table th.capacity-employee-hours-col-4,
.capacity-table td.capacity-employee-hours-col-4 {
  left: calc(var(--capacity-employee-col-width, 220px) + (var(--capacity-hours-col-width, 88px) * 3)) !important;
}

.capacity-table thead th.capacity-employee-hours-col-1,
.capacity-table thead th.capacity-employee-hours-col-2,
.capacity-table thead th.capacity-employee-hours-col-3,
.capacity-table thead th.capacity-employee-hours-col-4 {
  background: #f8fafc !important;
  z-index: 12 !important;
}

.capacity-table tbody td.capacity-employee-hours-col-1,
.capacity-table tbody td.capacity-employee-hours-col-2,
.capacity-table tbody td.capacity-employee-hours-col-3,
.capacity-table tbody td.capacity-employee-hours-col-4 {
  background: #fff !important;
  z-index: 6 !important;
}

.capacity-date {
  min-width: var(--capacity-day-cell-size);
  width: var(--capacity-day-cell-size);
  max-width: var(--capacity-day-cell-size);
}

.capacity-date-week {
  font-size: 0.7rem;
  color: #6b7280;
}

.capacity-month,
.capacity-week {
  font-size: 0.75rem;
  font-weight: 600;
  color: #374151;
  background: #f8fafc;
}

.capacity-cell {
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.capacity-table tbody tr td.capacity-cell.capacity-cell--off {
  background: #dadada;
  color: #6b7280;
  cursor: default;
}

.capacity-table tbody tr td.capacity-cell.capacity-cell--busy {
  background: #bfdaff;
}

.capacity-table tbody tr td.capacity-cell.capacity-cell--partial {
  background: #ddebff;
}

.capacity-table tbody tr td.capacity-cell.capacity-cell--vacation {
  background: #a8e6cf;
}

.capacity-table tbody tr td.capacity-cell.capacity-cell--holiday {
  background: #ffd3b6;
  color: #7c2d12;
}


.capacity-table tbody tr td.capacity-cell.capacity-cell--deadline-miss {
  background: #ffaaa5;
  color: #7f1d1d;
}

.capacity-table tbody tr td.capacity-cell.capacity-cell--over {
  background: #ffaaa5;
  color: #7f1d1d;
}

.capacity-table td.capacity-cell:hover:not(.capacity-cell--off) {
  background: #dbeafe;
}

.capacity-table td.capacity-cell.capacity-cell--deadline-miss:hover {
  background: #fca5a5;
}

.capacity-table td.capacity-cell.capacity-cell--over:hover {
  background: #fca5a5;
}

.capacity-table td.capacity-cell.capacity-cell--holiday:hover {
  background: #fdba74;
}


.capacity-table tbody tr td.capacity-cell.capacity-cell--off {
  background: #e2e8f0;
  color: #94a3b8;
}

.capacity-hours {
  font-weight: 400;
}

.capacity-hours.capacity-hours--zero {
  color: #94a3b8;
}

.capacity-tasks {
  margin-top: 0.25rem;
  font-size: 0.7rem;
  text-align: left;
}

.capacity-task a {
  color: #0f172a;
  text-decoration: none;
}

.capacity-task a:hover {
  text-decoration: underline;
}

.vacation-input {
  display: none;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  background: transparent;
  text-align: center;
  padding: 0;
  border-radius: 0;
  font-size: 0.8rem;
  appearance: textfield;
  -moz-appearance: textfield;
  -webkit-appearance: none;
}

.capacity-table.vacation-edit-mode .vacation-input {
  display: block;
}

.capacity-table.vacation-edit-mode .capacity-hours {
  display: none;
}

.vacation-input:focus {
  outline: none;
  box-shadow: none;
}

.capacity-table.vacation-edit-mode td.capacity-cell:hover:not(.capacity-cell--off) {
  background: #e0f2fe;
}

.vacation-input::-webkit-outer-spin-button,
.vacation-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.capacity-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.capacity-legend-dot {
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 0.3rem;
  border: 1px solid #cbd5e1;
  display: inline-block;
}

.capacity-legend-dot.capacity-cell--free {
  background: transparent;
}

.capacity-legend-dot.capacity-cell--busy {
  background: #bfdaff;
}

.capacity-legend-dot.capacity-cell--vacation {
  background: #a8e6cf;
}

.capacity-legend-dot.capacity-cell--holiday {
  background: #ffd3b6;
}

.capacity-legend-dot.capacity-cell--deadline-miss {
  background: #ffaaa5;
}

.capacity-legend-dot.capacity-cell--over {
  background: #ffaaa5;
}

.capacity-legend-dot.capacity-cell--off {
  background: #dadada;
}
