.date-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  position: relative;
  width: 100%;
  min-width: 0;
  gap: 0;
  text-align: left;
}
.date-control[hidden], .date-picker [hidden] { display: none !important; }
.date-control .date-control-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  border: 0 !important;
  clip-path: inset(50%);
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}
.date-control .date-control-text {
  grid-column: 1 / -1;
  grid-row: 1;
  width: 100%;
  min-width: 0;
  height: 40px;
  box-sizing: border-box;
  border: 1px solid #dce0e7;
  border-radius: 8px;
  padding: 0 42px 0 12px;
  background: #fff;
  color: #252a34;
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  letter-spacing: .1px;
}
.date-control .date-control-text::placeholder { color: #969eab; font-size: 13px; }
.date-control .date-control-text:focus { border-color: #4574d4; box-shadow: 0 0 0 3px #4574d41a; }
.date-control .date-control-text[aria-invalid="true"] { border-color: #c54747; }
.date-control .date-control-toggle {
  grid-column: 2;
  grid-row: 1;
  position: relative;
  align-self: center;
  width: 32px;
  height: 32px;
  padding: 7px;
  border: 0;
  border-radius: 6px;
  color: #69778d;
  background: transparent;
}
.date-control .date-control-toggle:hover:not(:disabled) { background: #edf2fc; color: #3f70cf; }
.date-control .date-control-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.date-control .date-control-toggle:focus-visible, .date-picker button:focus-visible { outline: 2px solid #4574d4; outline-offset: 1px; }
.date-control .date-control-hint, .date-control .date-control-error {
  grid-column: 1 / -1;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.5;
  margin-top: 4px;
  color: #828b99;
  overflow-wrap: anywhere;
}
.date-control .date-control-error { color: #b23b3b; }
.date-control .date-control-error:empty { display: none; }
.date-control.is-disabled .date-control-text, .date-control.is-readonly .date-control-text { background: #f4f5f7; color: #687180; }
.date-control .date-control-toggle:disabled { opacity: .4; cursor: default; }
.date-picker {
  width: 336px;
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 32px);
  box-sizing: border-box;
  margin: auto;
  padding: 20px;
  border: 1px solid #e1e5ec;
  border-radius: 16px;
  box-shadow: 0 18px 70px #18243b33;
  background: #fff;
  color: #252a34;
  overflow-y: auto;
  font-family: inherit;
  font-size: 14px;
  text-align: left;
}
.date-picker::backdrop { background: #17243b40; }
.date-picker .date-picker-heading { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 18px; gap: 8px; }
.date-picker .date-picker-heading strong { display: block; font-size: 17px; }
.date-picker .date-picker-heading small { display: block; font-size: 11px; color: #828b99; margin-top: 5px; }
.date-picker button { width: auto; height: 34px; min-width: 0; border: 0; border-radius: 7px; padding: 0 10px; background: transparent; color: #47556a; font-size: 14px; cursor: pointer; }
.date-picker button:hover:not(:disabled) { color: #3f70cf; background: #edf2fc; }
.date-picker button:disabled { color: #bdc3cd; cursor: default; }
.date-picker .date-picker-navigation { display: grid; grid-template-columns: 30px minmax(0, 1fr) minmax(0, 1fr) 30px; align-items: center; gap: 6px; }
.date-picker input, .date-picker select { width: 100%; min-width: 0; height: 36px; box-sizing: border-box; border: 1px solid #dce0e7; border-radius: 7px; background: #fff; padding: 0 6px; color: #252a34; font-size: 14px; }
.date-picker .date-picker-weekdays, .date-picker .date-picker-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.date-picker .date-picker-weekdays { margin: 16px 0 6px; color: #828b99; font-size: 12px; text-align: center; }
.date-picker .date-picker-days button { width: 100%; height: 34px; padding: 0; font-variant-numeric: tabular-nums; }
.date-picker .date-picker-days button[aria-current="date"] { box-shadow: inset 0 0 0 1px #4574d4; color: #3f70cf; }
.date-picker .date-picker-days button[aria-pressed="true"] { background: #4574d4; color: #fff; }
.date-picker .date-picker-time { border-top: 1px solid #e9ecf2; padding-top: 16px; margin-top: 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.date-picker .date-picker-time small { display: block; color: #828b99; font-size: 11px; margin-top: 4px; }
.date-picker .date-picker-time > div { display: flex; align-items: center; gap: 8px; }
.date-picker .date-picker-time select { width: 62px; font-variant-numeric: tabular-nums; }
.date-picker .date-picker-message { font-size: 12px; color: #b23b3b; line-height: 1.5; }
.date-picker .date-picker-message:empty { display: none; }
.date-picker .date-picker-footer { display: flex; gap: 6px; border-top: 1px solid #e9ecf2; padding-top: 14px; margin-top: 18px; }
.date-picker .date-picker-footer [data-apply] { margin-left: auto; background: #4574d4; color: #fff; padding: 0 16px; }
.date-picker .date-picker-footer [data-apply]:disabled { background: #e6ebf4; color: #929daf; }
@media (max-width: 560px) {
  .date-picker { padding: 16px; }
  .date-control .date-control-text { font-size: 16px; }
}

/* Todo options share a compact single-line pill; keep date help out of that row. */
.dashboard-task-composer .dashboard-reminder-date .date-control {
  flex: 0 0 112px;
  width: 112px;
  height: 20px;
  grid-template-columns: minmax(0, 1fr) 24px;
}
.dashboard-task-composer .dashboard-reminder-date .date-control-text {
  width: 100%;
  max-width: none;
  height: 20px;
  padding: 0 26px 0 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.dashboard-task-composer .dashboard-reminder-date .date-control-toggle {
  width: 24px;
  height: 20px;
  min-height: 20px;
  padding: 2px 4px;
}
.dashboard-task-composer .dashboard-reminder-date .date-control-toggle svg {
  width: 16px;
  height: 16px;
}
.dashboard-task-composer .dashboard-reminder-date .date-control-hint {
  display: none;
}
.dashboard-task-composer .dashboard-reminder-date .date-control-error:not(:empty) {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 2;
  width: max-content;
  max-width: 200px;
  padding: 4px 6px;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 2px 8px #18243b1a;
}
