.vodi-prefs-grid,
.vodi-reminders-grid {
  display: grid;
  align-items: start;
  gap: 20px;
}

.vodi-prefs-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.24fr); }
.vodi-prefs-panel .dashboard-panel-heading { margin-bottom: 19px; }
.vodi-pref-fields { display: grid; gap: 7px; }
.vodi-pref-fields label, .vodi-pref-rule label { font-weight: 650; }
.vodi-pref-fields > label:not(:first-child) { margin-top: 10px; }
.vodi-pref-fields input, .vodi-pref-rule input[type="number"] {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #c9d3e4;
  border-radius: 11px;
  background: white;
  color: var(--ink);
  font: inherit;
}
.vodi-pref-fields input::placeholder { color: var(--muted); }
.vodi-pref-fields input:disabled, .vodi-pref-rule input:disabled { background: #f5f7fb; color: #687184; }
.vodi-pref-help, .vodi-pref-optional { color: var(--muted); font-size: .875rem; font-weight: 400; }

.vodi-notifications-heading { flex-wrap: wrap; gap: 7px 12px; }
.vodi-prefs-inline-link {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: #2343bc;
  font-size: .92rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.vodi-pref-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 13px;
  background: #edf2ff;
  cursor: pointer;
}
.vodi-pref-switch input[type="checkbox"] {
  appearance: none;
  position: relative;
  flex: none;
  width: 45px;
  height: 26px;
  margin: 0;
  border: 2px solid transparent;
  border-radius: 99px;
  background: #69768c;
  cursor: pointer;
}
.vodi-pref-switch input::before { content: ''; position: absolute; inset: 2px auto 2px 2px; aspect-ratio: 1; border-radius: 50%; background: white; }
.vodi-pref-switch input:checked { background: var(--blue); }
.vodi-pref-switch input:checked::before { inset-inline: auto 2px; }

.vodi-pref-options { min-inline-size: 0; margin: 0; padding: 16px 0 0; border: 0; }
.vodi-pref-options:disabled { color: var(--muted); }
.vodi-pref-rule {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid #e5e9f1;
}
.vodi-pref-rule label { display: inline-flex; align-items: center; gap: 8px; }
.vodi-pref-rule input[type="checkbox"] { width: 17px; height: 17px; margin: 0; accent-color: var(--blue); }
.vodi-pref-rule .vodi-pref-rule-detail { color: #4b5670; font-size: .9rem; font-weight: 500; }
.vodi-pref-rule input[type="number"] { width: 68px; padding: 5px 8px; }
.vodi-prefs-footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 16px; margin-top: 19px; }
.vodi-prefs-footer [role="alert"] { color: #a62826; }
.vodi-prefs-footer .vodi-settings-save { min-height: 46px; padding: 10px 19px; }
.vodi-settings-save:disabled { opacity: .65; cursor: wait; }
.password-settings { margin-top: 20px; }
.password-settings summary { cursor: pointer; font-weight: 700; }
.password-settings form { max-width: 28rem; margin-top: 16px; }
.password-settings button { margin-top: 16px; }

.vodi-reminders-grid { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); grid-template-areas: 'schedule rail'; }
.vodi-reminders-rail { grid-area: rail; display: grid; gap: 14px; }
.vodi-reminders-heading .vodi-settings-link, .vodi-reminder-action {
  min-height: 42px;
  padding: 8px 14px;
  border: 1px solid #d1dcf0;
  border-radius: 999px;
  background: #f7f9ff;
  color: #2343bc;
  font-weight: 700;
  font-size: .9rem;
}
.vodi-reminders-heading .vodi-settings-link:hover, .vodi-reminder-action:hover { background: #e8efff; }
.vodi-next-deadline {
  padding: clamp(20px, 2.25vw, 30px);
  border-radius: 26px;
  background: radial-gradient(ellipse at 100% 0%, #5a79f4a6, transparent 64%), linear-gradient(140deg, #284fe4, #1b36b7 92%);
  color: #fff;
}
.vodi-next-deadline .item-icon { width: 34px; height: 34px; margin-bottom: 13px; background: #ffffff26; color: #fff; }
.vodi-next-deadline h2 { color: #eaf0ff; font-size: 1rem; font-weight: 650; line-height: 1.25; letter-spacing: 0; }
.vodi-next-date { margin-top: 7px; font-size: clamp(1.48rem, 3.2vw, 2.35rem); font-weight: 750; line-height: 1.05; letter-spacing: -.04em; }
.vodi-next-description { margin-top: 8px; color: #edf2ff; overflow-wrap: anywhere; }

.vodi-delivery .dashboard-panel-heading { flex-wrap: wrap; gap: 7px 10px; }
.vodi-delivery-badge, .vodi-deadline-tag {
  align-self: start;
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef1f6;
  color: #465370;
  font-size: .8125rem;
  font-weight: 700;
}
.vodi-delivery-badge.is-active { background: #e2f4e9; color: #21694c; }
.vodi-delivery-address { margin: 12px 0 14px; font-weight: 700; overflow-wrap: anywhere; }
.vodi-delivery-rules { display: grid; gap: 6px; padding-top: 12px; border-top: 1px solid #e5e9f1; font-size: .92rem; }
.vodi-delivery-rules > div { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.vodi-delivery-rules dt { color: var(--muted); }
.vodi-delivery-rules dd { margin: 0; font-weight: 650; text-align: end; }

.vodi-deadlines-panel { grid-area: schedule; }
.vodi-deadline-group { margin: 20px 0 7px; color: #4b5a77; font-size: .94rem; font-weight: 700; }
.vodi-deadline-list { margin: 0; padding: 0; list-style: none; }
.vodi-deadline {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 86px;
  padding: 12px 0;
  border-top: 1px solid #e5e9f1;
}
.vodi-deadline-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 7px; }
.vodi-deadline-title h3 { min-width: 0; font-size: 1.05rem; line-height: 1.2; overflow-wrap: anywhere; }
.vodi-deadline-tag { min-height: 21px; padding: 2px 6px; color: #2649be; background: #eef2ff; }
.vodi-deadline-tag.is-overdue { color: #a62826; background: #fff0ed; }
.vodi-deadline-copy p { margin-top: 4px; color: #485570; font-size: .92rem; overflow-wrap: anywhere; }
.vodi-deadline-copy .vodi-deadline-note { color: var(--muted); font-size: .875rem; }
.vodi-reminder-action { white-space: nowrap; }
.vodi-reminder-empty { margin-top: 18px; color: var(--muted); }

@media (max-width: 1050px) {
  .vodi-reminders-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 14px; }
  .vodi-deadline { grid-template-columns: auto minmax(0, 1fr); gap: 8px 10px; }
  .vodi-deadline > .item-icon { align-self: start; }
  .vodi-deadline > button { grid-column: 2; justify-self: start; }
}

@media (max-width: 870px) {
  .vodi-prefs-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .vodi-reminders-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'rail' 'schedule'; }
  .vodi-reminders-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .vodi-reminders-heading { flex-wrap: wrap; }
  .vodi-reminders-rail { grid-template-columns: minmax(0, 1fr); }
  .vodi-prefs-footer .vodi-settings-save { width: 100%; }
}

@media (forced-colors: active) {
  .vodi-pref-switch input[type="checkbox"] { appearance: auto; width: 20px; height: 20px; }
  .vodi-pref-switch input::before { content: none; }
}
