.rs-property-timeline-panel {
  width: 100%;
  margin-top: 14px;
}

.rs-property-timeline-panel[hidden] { display: none !important; }

.rs-property-timeline-shell {
  border: 1px solid var(--rs-border, rgba(8, 24, 29, .12));
  border-radius: 28px;
  padding: 18px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 18px 42px rgba(8, 24, 29, .08);
}

.rs-property-timeline-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.rs-upcoming-inspections-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.rs-upcoming-inspections-head [data-rs-timeline-action="year"] { width: 100%; }

.rs-property-timeline-head > div:first-child > span,
.rs-inspection-year-page header div > span {
  color: #237549;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.rs-property-timeline-head h2,
.rs-inspection-year-page h1 {
  margin: 4px 0 6px;
  color: var(--rs-ink, #08181d);
  font-size: clamp(28px, 6vw, 44px);
  letter-spacing: -.055em;
}

.rs-property-timeline-head p,
.rs-upcoming-inspections-head p,
.rs-inspection-year-page header p {
  margin: 0;
  color: var(--rs-muted, #617277);
  line-height: 1.5;
}

.rs-property-timeline-head-actions,
.rs-property-timeline-event-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rs-property-timeline-panel button,
.rs-upcoming-inspections-card button,
.rs-inspection-year-page button {
  min-height: 40px;
  border: 1px solid rgba(8, 24, 29, .12);
  border-radius: 999px;
  padding: 9px 14px;
  background: #fff;
  color: var(--rs-ink, #08181d);
  cursor: pointer;
  font-weight: 900;
}

.rs-property-timeline-panel button.is-primary,
.rs-property-timeline-reminder button[type="submit"] {
  background: linear-gradient(135deg, #42d79f, #9ae8cb);
  color: #041f17;
}

.rs-property-timeline-panel button:disabled { cursor: default; opacity: .48; }
.rs-property-timeline-panel button.is-danger { color: #9f3434; }

.rs-property-timeline-status {
  margin: 14px 0;
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(8, 24, 29, .045);
  color: var(--rs-muted, #617277);
  font-size: 13px;
  font-weight: 800;
}
.rs-property-timeline-status.is-warning { background: rgba(244, 171, 62, .12); color: #8b5b12; }
.rs-property-timeline-status.is-success { background: rgba(66, 215, 159, .12); color: #237549; }
.rs-property-timeline-status.is-error { background: rgba(205, 69, 69, .1); color: #9f3434; }

.rs-property-timeline-reminder {
  margin: 0 0 18px;
  border: 1px solid rgba(66, 215, 159, .28);
  border-radius: 18px;
  background: rgba(66, 215, 159, .055);
  overflow: hidden;
}

.rs-property-timeline-reminder summary {
  padding: 13px 15px;
  cursor: pointer;
  font-weight: 950;
}

.rs-property-timeline-reminder form { display: grid; gap: 12px; padding: 0 15px 15px; }
.rs-property-timeline-reminder form > div { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rs-property-timeline-reminder label,
.rs-property-timeline-edit {
  display: grid;
  gap: 6px;
  color: var(--rs-muted, #617277);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.rs-property-timeline-reminder input,
.rs-property-timeline-reminder textarea,
.rs-property-timeline-edit input {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 44px;
  box-sizing: border-box;
  border: 1px solid var(--rs-border, rgba(8, 24, 29, .12));
  border-radius: 13px;
  padding: 10px 12px;
  background: #fff;
  color: var(--rs-ink, #08181d);
  font: inherit;
  font-size: 16px;
  text-transform: none;
  letter-spacing: 0;
}

.rs-property-timeline-list { position: relative; display: grid; gap: 12px; padding-left: 17px; }
.rs-property-timeline-list::before {
  content: "";
  position: absolute;
  top: 7px;
  bottom: 7px;
  left: 6px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(#42d79f, rgba(66, 215, 159, .16));
}
.rs-property-timeline-event { position: relative; display: block; min-width: 0; }
.rs-property-timeline-marker {
  position: absolute;
  top: 22px;
  left: -16px;
  width: 12px;
  height: 12px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #42d79f;
  box-shadow: 0 0 0 1px rgba(35, 117, 73, .25);
}
.rs-property-timeline-event.is-reminder .rs-property-timeline-marker { background: #f4ab3e; }
.rs-property-timeline-event.is-complete { opacity: .66; }
.rs-property-timeline-event-card {
  display: block;
  min-width: 0;
  border: 1px solid var(--rs-border, rgba(8, 24, 29, .12));
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
}
.rs-property-timeline-event-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  min-width: 0;
  padding: 15px;
  cursor: pointer;
  list-style: none;
  touch-action: manipulation;
}
.rs-property-timeline-event-head::-webkit-details-marker { display: none; }
.rs-property-timeline-event-copy { display: grid; gap: 3px; min-width: 0; }
.rs-property-timeline-event-badge { color: #237549; font-size: 10px; font-weight: 950; letter-spacing: .055em; text-transform: uppercase; }
.rs-property-timeline-event h3 { margin: 2px 0; color: var(--rs-ink, #08181d); font-size: 17px; letter-spacing: -.025em; overflow-wrap: anywhere; }
.rs-property-timeline-event time,
.rs-property-timeline-event p { color: var(--rs-muted, #617277); font-size: 13px; line-height: 1.5; }
.rs-property-timeline-event-summary-action {
  align-self: center;
  color: #237549;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}
.rs-property-timeline-event-summary-action::after { content: " +"; }
.rs-property-timeline-event-card[open] .rs-property-timeline-event-summary-action::after { content: " −"; }
.rs-property-timeline-event-body {
  display: grid;
  gap: 13px;
  min-width: 0;
  border-top: 1px solid rgba(8, 24, 29, .09);
  padding: 14px 15px 15px;
}
.rs-property-timeline-changes { display: grid; gap: 7px; min-width: 0; }
.rs-property-timeline-changes > strong { color: var(--rs-ink, #08181d); font-size: 13px; }
.rs-property-timeline-changes ul { display: grid; gap: 6px; margin: 0; padding-left: 19px; }
.rs-property-timeline-changes li { color: var(--rs-muted, #617277); font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.rs-property-timeline-edit { min-width: 0; }
.rs-property-timeline-event-actions { margin-top: 12px; }

.rs-property-timeline-empty,
.rs-property-timeline-loading,
.rs-upcoming-empty {
  display: grid;
  gap: 5px;
  border: 1px dashed rgba(8, 24, 29, .16);
  border-radius: 16px;
  padding: 18px;
  color: var(--rs-muted, #617277);
}
.rs-property-timeline-empty strong,
.rs-upcoming-empty strong { color: var(--rs-ink, #08181d); }

.rs-upcoming-inspections-card {
  grid-column: 1 / -1;
  padding: 18px;
  border: 1px solid var(--rs-border, rgba(8, 24, 29, .12));
  border-radius: var(--rs-radius-lg, 24px);
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 12px 34px rgba(5, 16, 20, .06);
}
.rs-upcoming-inspections-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}
.rs-upcoming-inspections-head > div { min-width: 0; }
#rsStartMenu .rs-upcoming-inspections-head h2 {
  margin: 0 0 16px !important;
  color: var(--rs-portfolio-text, var(--rs-ink, #08181d)) !important;
  font-family: var(--rs-portfolio-serif, inherit) !important;
  font-size: clamp(25px, 3.8vw, 36px) !important;
  font-variant-numeric: lining-nums proportional-nums !important;
  font-weight: 600 !important;
  line-height: 1.02 !important;
  letter-spacing: -.035em !important;
  text-transform: none !important;
}
.rs-upcoming-inspections-head p { margin: 0; font-size: 13px; }
.rs-upcoming-inspections-toggle {
  flex: 0 0 auto !important;
  width: 42px !important;
  min-width: 42px !important;
  height: 42px !important;
  min-height: 42px !important;
  padding: 6px !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: transparent !important;
  color: var(--rs-ink, #08181d) !important;
  box-shadow: none !important;
}
.rs-upcoming-inspections-toggle:hover { transform: none !important; box-shadow: none !important; }
.rs-upcoming-inspections-card.is-collapsed .rs-upcoming-inspections-toggle .rs-ui-icon { transform: rotate(0deg) !important; }
.rs-upcoming-inspections-body { display: grid; gap: 10px; }
.rs-upcoming-inspections-body[hidden] { display: none !important; }
.rs-upcoming-inspections-body > [data-rs-timeline-action="year"] { width: 100%; max-width: none; }
.rs-upcoming-inspections-status { min-height: 0; margin: 0 0 10px; color: var(--rs-muted, #617277); font-size: 12px; font-weight: 800; }
.rs-upcoming-inspections-status:empty { display: none; }
.rs-upcoming-inspections-status.is-warning { color: #8b5b12; }
.rs-upcoming-inspections-status.is-error { color: #9f3434; }
.rs-upcoming-inspections-card [data-rs-upcoming-body] { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rs-upcoming-inspections-card section { display: grid; gap: 8px; }
.rs-upcoming-inspections-card section h3 { margin: 0; font-size: 14px; }
.rs-upcoming-inspections-card .rs-upcoming-inspections-overdue { grid-column: 1 / -1; }
.rs-upcoming-inspections-card .rs-upcoming-inspections-overdue h3,
.rs-upcoming-inspections-card .rs-upcoming-inspections-overdue article time { color: #a33b36; }
.rs-upcoming-inspections-card .rs-upcoming-inspections-overdue .rs-upcoming-inspection-link { border-color: rgba(163, 59, 54, .28) !important; background: #fff9f8 !important; }
.rs-upcoming-inspections-card article,
.rs-inspection-year-page article {
  display: block;
  min-width: 0;
}
.rs-upcoming-inspection-link {
  display: grid !important;
  grid-template-columns: minmax(125px, .42fr) minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  width: 100%;
  min-width: 0;
  min-height: 0 !important;
  border: 1px solid var(--rs-border, rgba(8, 24, 29, .12)) !important;
  border-radius: 15px !important;
  padding: 11px 12px !important;
  background: #fff !important;
  color: var(--rs-ink, #08181d) !important;
  text-align: left;
  box-shadow: none !important;
}
.rs-upcoming-inspections-card article time,
.rs-inspection-year-page article time { color: #237549; font-size: 12px; font-weight: 900; }
.rs-upcoming-inspection-copy { display: grid; gap: 3px; min-width: 0; }
.rs-upcoming-inspection-copy > * { overflow-wrap: anywhere; }
.rs-upcoming-inspections-card article span,
.rs-upcoming-inspections-card article small,
.rs-inspection-year-page article span,
.rs-inspection-year-page article small { color: var(--rs-muted, #617277); }

.rs-inspection-year-page { width: min(100%, 1180px); margin: 0 auto; }
.rs-inspection-year-page[hidden] { display: none !important; }
.rs-inspection-year-page > header {
  display: grid;
  gap: 16px;
  border: 1px solid var(--rs-border, rgba(8, 24, 29, .12));
  border-radius: 28px;
  padding: 20px;
  background: rgba(255, 255, 255, .94);
}
.rs-inspection-year-page [data-rs-year-body] { display: grid; gap: 16px; margin-top: 16px; }
.rs-inspection-year-page [data-rs-year-body] section {
  display: grid;
  gap: 10px;
  border: 1px solid var(--rs-border, rgba(8, 24, 29, .12));
  border-radius: 20px;
  padding: 16px;
  background: rgba(255, 255, 255, .94);
}
.rs-inspection-year-page [data-rs-year-body] h2 { margin: 0; font-size: 19px; }

@media (max-width: 700px) {
  .rs-property-timeline-shell { padding: 13px; border-radius: 22px; }
  .rs-property-timeline-head,
  .rs-property-timeline-event-head { display: grid; }
  .rs-property-timeline-head-actions { display: grid; grid-template-columns: 1fr; }
  .rs-property-timeline-head-actions button { width: 100%; }
  .rs-property-timeline-reminder form > div,
  .rs-upcoming-inspections-card [data-rs-upcoming-body] { grid-template-columns: 1fr; }
  .rs-property-timeline-event-head { grid-template-columns: minmax(0, 1fr); }
  .rs-property-timeline-event-summary-action { justify-self: start; white-space: normal; }
  .rs-property-timeline-event-actions { display: grid; grid-template-columns: 1fr; }
  .rs-property-timeline-event-actions button { width: 100%; }
  .rs-upcoming-inspection-link { grid-template-columns: 1fr; gap: 5px; }
  .rs-inspection-year-page { width: 100%; }
}

/* Patch 24: one outer card per day, with each event and its original controls. */
.rs-property-timeline-day-body { display: grid; gap: 0; padding: 0 15px; }
.rs-property-timeline-day-entry { min-width: 0; padding: 16px 0; }
.rs-property-timeline-day-entry + .rs-property-timeline-day-entry { border-top: 1px solid var(--rs-border, #d5e5e1); }
.rs-property-timeline-day-entry > .rs-property-timeline-event-head { padding: 0; }
.rs-property-timeline-day-entry > .rs-property-timeline-event-body { padding: 12px 0 0; }
.rs-property-timeline-day-entry h3 { font-size: 15px; }
.rs-property-timeline-day-entry.is-reminder .rs-property-timeline-event-badge { color: #80611b; }
.rs-property-timeline-day-entry.is-complete .rs-property-timeline-event-copy { opacity: .66; }

/* Patch 26: compact disclosure; the existing native date/time input is retained. */
.rs-property-timeline-date-editor { justify-self: start; width: fit-content; max-width: 100%; min-width: 0; }
.rs-property-timeline-date-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  min-height: 40px;
  box-sizing: border-box;
  border: 1px solid var(--rs-border, rgba(8, 24, 29, .12));
  border-radius: 12px;
  background: #fff;
  color: var(--rs-ink, #08181d);
  cursor: pointer;
  list-style: none;
}
.rs-property-timeline-date-toggle::-webkit-details-marker { display: none; }
.rs-property-timeline-date-toggle::marker { content: ''; }
.rs-property-timeline-date-toggle:focus-visible { outline: 2px solid var(--rs-accent, #42d79f); outline-offset: 2px; }
.rs-property-timeline-date-editor[open] > .rs-property-timeline-date-toggle { background: rgba(66, 215, 159, .10); }
.rs-property-timeline-date-editor > .rs-property-timeline-edit { margin-top: 8px; width: 260px; max-width: 100%; }
