* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial,
    sans-serif;
  background: #0b1020;
  color: #e6e8ef;
  height: 100vh;
}
header,
footer {
  text-align: center;
  padding: 16px;
}
header h1 {
  margin: 8px 0 0;
  font-size: 1.6rem;
}
main {
  max-width: 980px;
  margin: 0 auto;
  padding: 16px;
}
.step {
  display: none;
  background: #161b2e;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.25);
}
.step.active {
  display: block;
}
.field {
  margin-bottom: 14px;
}
.field.group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}
input,
textarea,
select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #2b3355;
  border-radius: 8px;
  background: #0e1430;
  color: #e6e8ef;
}
input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
}
button {
  padding: 10px 14px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}
button.primary {
  background: #5b8cff;
  color: #fff;
}
button.secondary {
  background: #2b3355;
  color: #e6e8ef;
}
button + button {
  margin-left: 8px;
}

.config {
  margin: 16px 0;
  padding: 12px;
  border: 1px solid #2b3355;
  border-radius: 8px;
  background: #0f1533;
}
.config details {
  border-radius: 8px;
}
.config details > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 4px;
  margin-bottom: 8px;
  font-weight: 600;
}
.config details > summary::-webkit-details-marker {
  display: none;
}
.config-summary-values {
  color: #a7b0d1;
  font-weight: 500;
  font-size: 0.95em;
}
.config-body {
  padding-top: 4px;
}
.config-row {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 10px;
  align-items: center;
  margin: 6px 0;
}
.config-row > div {
  display: flex;
  gap: 10px;
  align-items: center;
}
.inline-hint {
  color: #a7b0d1;
  font-size: 0.9em;
}

#daysTable {
  width: 100%;
  border-collapse: collapse;
  background: #0f1533;
  border-radius: 8px;
  overflow: hidden;
}
#daysTable th,
#daysTable td {
  border-bottom: 1px solid #2b3355;
  padding: 10px;
  text-align: left;
}
#daysTable th label.cbx {
  margin-top: 4px;
  display: inline-block;
}
#daysTable thead {
  background: #10183a;
}
#daysTable tbody tr:nth-child(even) {
  background: #0e1430;
}
/* Custom Checkbox Component */
label.cbx {
  position: relative;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}
label.cbx input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
label.cbx .cbx-ui {
  width: 20px;
  height: 20px;
  border: 2px solid #4a567d;
  border-radius: 6px;
  display: inline-block;
  box-sizing: border-box;
  background: linear-gradient(180deg, #10183a, #0e1430);
  position: relative;
  transition: border-color 0.2s, background 0.2s;
}
label.cbx.cbx--sm .cbx-ui {
  width: 18px;
  height: 18px;
}
label.cbx .cbx-ui:after {
  content: "";
  position: absolute;
  inset: 0;
  display: block;
  opacity: 0;
  transform: scale(0.6);
  background: url('data:image/svg+xml;utf8,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 14 14%22><path fill=%22%23ffffff%22 d=%22M5.7 10.3L2.4 7l1.1-1.1 2.2 2.2 4.8-4.8L11.6 4z"/></svg>')
    center/12px 12px no-repeat;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
label.cbx input:checked + .cbx-ui {
  background: #5b8cff;
  border-color: #5b8cff;
}
label.cbx input:checked + .cbx-ui:after {
  opacity: 1;
  transform: scale(1);
}
label.cbx input:focus-visible + .cbx-ui {
  box-shadow: 0 0 0 3px rgba(91, 140, 255, 0.35);
}
label.cbx input:disabled + .cbx-ui {
  opacity: 0.4;
  cursor: not-allowed;
}
/* Indeterminate state styling (set via JS el.indeterminate = true) */
label.cbx input.indeterminate + .cbx-ui {
  background: #2b3355;
}
label.cbx input.indeterminate + .cbx-ui:after {
  opacity: 1;
  transform: scale(1);
  background: none;
  content: "";
  width: 10px;
  height: 2px;
  position: absolute;
  top: 50%;
  left: 50%;
  margin-top: -1px;
  margin-left: -5px;
  background-color: #ffffff;
  border-radius: 1px;
}

.totals {
  text-align: right;
  margin-top: 12px;
  font-size: 1.1rem;
}
.actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
}

@media (max-width: 600px) {
  .field.group {
    grid-template-columns: 1fr;
  }
  .config-row {
    grid-template-columns: 1fr;
  }
}
