* { box-sizing: border-box; }
body {
  font-family: 'Segoe UI', Arial, sans-serif;
  margin: 0;
  background: #f1f5f9;
  color: #1e293b;
}
header {
  background: #1e293b;
  color: white;
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
header h1 { margin: 0; font-size: 20px; }
.view-toggle button {
  background: #334155;
  color: white;
  border: none;
  padding: 8px 14px;
  margin-left: 6px;
  border-radius: 6px;
  cursor: pointer;
}
.view-toggle button.active { background: #3b82f6; }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: white;
  border-bottom: 1px solid #e2e8f0;
}
.nav-period { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.nav-period button {
  background: #e2e8f0; border: none; border-radius: 6px;
  width: 30px; height: 30px; cursor: pointer; font-size: 14px;
}
.worker-add { display: flex; gap: 8px; }
.worker-add input {
  padding: 7px 10px; border: 1px solid #cbd5e1; border-radius: 6px;
}
button {
  background: #3b82f6; color: white; border: none;
  padding: 8px 14px; border-radius: 6px; cursor: pointer; font-size: 14px;
}
button:hover { opacity: 0.9; }
#addWorkerBtn { background: #22c55e; }
.export-buttons button { background: #f97316; margin-left: 6px; }

.legend {
  display: flex; flex-wrap: wrap; gap: 10px;
  padding: 10px 20px; background: #f8fafc; font-size: 12px;
}
.legend-item { display: flex; align-items: center; gap: 4px; }
.legend-swatch { width: 14px; height: 14px; border-radius: 3px; display: inline-block; }

main { padding: 14px 20px 40px; overflow-x: auto; }

table { border-collapse: collapse; background: white; min-width: 100%; }
th, td {
  border: 1px solid #e2e8f0;
  text-align: center;
  font-size: 11px;
  padding: 0;
}
th { background: #f8fafc; padding: 6px 4px; }
td.worker-name {
  text-align: left;
  padding: 6px 10px;
  font-weight: 600;
  white-space: nowrap;
  position: sticky;
  left: 0;
  background: white;
  z-index: 2;
}
td.day-cell {
  width: 28px; height: 28px;
  cursor: pointer;
  font-weight: bold;
  color: white;
}
td.day-cell:hover { outline: 2px solid #1e293b; outline-offset: -2px; }
td.weekend { background: #f1f5f9; }
.delete-worker {
  background: #ef4444; border: none; color: white;
  border-radius: 4px; padding: 2px 6px; font-size: 10px; margin-left: 8px; cursor: pointer;
}

.overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.4);
  display: flex; align-items: center; justify-content: center; z-index: 10;
}
.overlay.hidden { display: none; }
.picker {
  background: white; padding: 20px; border-radius: 10px; min-width: 280px;
}
.picker h3 { margin-top: 0; }
#pickerOptions { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.picker-option {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  border-radius: 6px; cursor: pointer; color: white; font-weight: 600;
}
#pickerCancel { background: #94a3b8; }
