.reminders-reference {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 190px);
  padding: 0;
  overflow: hidden;
}

body[data-page="reminders"] {
  font-family: "Segoe UI", sans-serif;
}

html[data-theme="midnight"] body[data-page="reminders"],
html[data-theme="midnight"] body[data-page="reminders"] #content {
  background: #080e1a;
}

html[data-theme="midnight"] body[data-page="reminders"] .reminders-page-head {
  background: transparent;
}

html[data-theme="midnight"] body[data-page="reminders"] .reminders-reference {
  background: #080e1a;
  border: 0;
  border-radius: 0;
}

html[data-theme="midnight"] body[data-page="reminders"] .reminder-pane {
  background: #080e1a;
}

html[data-theme="midnight"] body[data-page="reminders"] .reminder-form fieldset,
html[data-theme="midnight"] body[data-page="reminders"] .reminder-form input,
html[data-theme="midnight"] body[data-page="reminders"] .reminder-form select,
html[data-theme="midnight"] body[data-page="reminders"] .reminder-form textarea {
  background: #0d1829;
}

html[data-theme="midnight"] body[data-page="reminders"] #reminderListHost .table-wrap {
  background: #0d1829;
  border-color: #1b2a42;
}

html[data-theme="midnight"] body[data-page="reminders"] .reminder-table th {
  background: #101a2b;
}

body[data-page="reminders"] .reminders-page-head h2 {
  font-size: 24px;
  font-weight: 700;
}

.reminders-page-head {
  margin-bottom: 16px;
}

.reminder-tabs {
  display: flex;
  align-items: stretch;
  gap: 4px;
  background: transparent;
}

.reminder-tabs [role="tab"] {
  flex: 1 1 0;
  min-width: 160px;
  height: 44px;
  min-height: 44px;
  margin: 0;
  padding: 10px 30px;
  border: 1px solid silver;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: whitesmoke;
  color: dimgray;
  font-size: 14px;
  font-weight: 600;
}

.reminder-tabs [role="tab"]:hover {
  color: black;
  background: gainsboro;
}

.reminder-tabs [role="tab"].active {
  margin: 0;
  border-color: darkorange;
  border-bottom: 1px solid orange;
  color: white;
  background: orange;
}

.reminder-pane {
  min-height: 0;
  padding: 18px 13px 0;
}

.reminder-pane:not([hidden]) {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
}

.reminder-pane[data-reminder-pane="add"] {
  padding: 32px 17px 0;
}

.reminder-pane[data-reminder-pane="add"] #reminderCreateForm {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  min-height: 0;
}

.reminder-pane[data-reminder-pane="add"] .reminder-form fieldset {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  min-height: 0;
  padding-top: 22px;
}

.reminder-pane[data-reminder-pane="add"] .reminder-fields {
  margin-bottom: 29px;
}

.reminder-pane[data-reminder-pane="add"] .reminder-fields .field {
  gap: 20px;
}

.reminder-pane[data-reminder-pane="add"] .reminder-description {
  flex: 0 0 auto;
  min-height: 0;
  gap: 14px;
}

.reminder-pane[data-reminder-pane="add"] .reminder-description textarea {
  flex: 0 0 191px;
  height: 191px;
  min-height: 191px;
  resize: none;
}

.reminder-pane[data-reminder-pane="list"] #reminderListHost {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

.reminder-pane[data-reminder-pane="list"] #reminderListHost .table-wrap {
  flex: 1 1 auto;
  min-height: 0;
}

.reminder-pane[hidden] {
  display: none !important;
}

.reminder-form fieldset {
  min-width: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  padding: 18px;
}

.reminder-form legend {
  padding: 0 8px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
}

.reminder-fields {
  display: grid;
  grid-template-columns: minmax(0, 6.3fr) minmax(0, 2.1fr) minmax(0, 1.5fr);
  gap: 16px;
  align-items: end;
  margin-bottom: 16px;
}

.reminder-form .field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
}

.reminder-form .field > span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.reminder-form input,
.reminder-form select,
.reminder-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  padding: 10px 12px;
}

.reminder-form input,
.reminder-form select {
  min-height: 44px;
}

.reminder-form input:focus,
.reminder-form select:focus,
.reminder-form textarea:focus {
  border-color: var(--brand);
  outline: 2px solid color-mix(in srgb, var(--brand) 20%, transparent);
  background: var(--surface-2);
}

.reminder-form textarea {
  min-height: 140px;
  resize: vertical;
}

.reminder-form input::placeholder,
.reminder-form textarea::placeholder {
  color: #64748b;
  opacity: 1;
}

.reminder-form-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 19px;
}

.reminder-form-actions button {
  min-width: 220px;
  min-height: 48px;
}

.reminder-form-actions [data-reminder-save] {
  color: #071b18;
  background: #4edea3;
  border-color: #4edea3;
}

.reminder-form-actions [data-reminder-save]:hover {
  color: #071b18;
  background: #34d399;
  border-color: #34d399;
}

.reminder-list-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.reminder-list-actions [data-reminder-delete] {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
  height: 38px;
  min-height: 38px;
  min-width: 136px;
}

.reminder-list-actions [data-generic-refresh] {
  height: 38px;
  min-height: 38px;
  min-width: 82px;
}

.reminder-list-actions [data-reminder-delete]:hover {
  color: #fff;
  background: var(--brand-2);
}

.reminder-table {
  width: 100%;
  table-layout: fixed;
  min-width: 900px;
  font-size: 12px;
}

.reminder-table th,
.reminder-table td {
  vertical-align: middle;
}

.reminder-table th {
  padding: 14px 12px;
  text-transform: none;
}

.reminder-table td {
  padding: 5px 12px;
}

.reminder-table th:nth-child(1),
.reminder-table td:nth-child(1) { width: 37px; }
.reminder-table th:nth-child(2),
.reminder-table td:nth-child(2) { width: 106px; }
.reminder-table th:nth-child(3),
.reminder-table td:nth-child(3) { width: 81px; }
.reminder-table th:nth-child(4),
.reminder-table td:nth-child(4) { width: 98px; }
.reminder-table th:nth-child(6),
.reminder-table td:nth-child(6) { width: 67px; }
.reminder-table th:nth-child(5),
.reminder-table td:nth-child(5) { width: 511px; }

.reminder-table td:nth-child(2),
.reminder-table td:nth-child(4),
.reminder-table td:nth-child(6) { white-space: nowrap; }
.reminder-table td:nth-child(3) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.reminder-table th {
  font-size: 11px;
}

.reminder-table tbody tr {
  height: 30px;
  cursor: pointer;
}

.reminder-table tbody tr.selected {
  background: var(--selection-bg, var(--hover));
  color: var(--selection-text, var(--ink));
}

.reminder-row-title {
  min-width: 0;
}

.reminder-row-description {
  min-width: 0;
  max-width: none;
  white-space: normal;
  overflow-wrap: anywhere;
}

@media (max-width: 680px) {
  .reminder-pane[data-reminder-pane="add"] {
    padding: 18px 13px 0;
  }

  .reminder-pane[data-reminder-pane="add"] .reminder-description textarea {
    flex-basis: 140px;
    height: 140px;
    min-height: 140px;
  }
  .reminder-fields {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .reminder-form fieldset {
    padding: 14px;
  }

  .reminder-form-actions button {
    width: 100%;
  }
}
