/* Reminders Tab — Local browser storage (no backend) */
:root {
  --rm-accent: #34c759;
  --rm-danger: #ff3b30;
  --rm-overdue: #ff9500;
}

.rm-shell { display: grid; gap: 14px; }

.rm-header {
  background: var(--lh-surface, #fff);
  border: 1px solid var(--lh-border, #e8e8ed);
  border-radius: 16px;
  padding: 14px;
  display: grid;
  gap: 10px;
}

.rm-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rm-header h2 { margin: 0; font-size: 18px; }
.rm-subtitle { margin: 4px 0 0; color: var(--lh-muted, #86868b); font-size: 12px; }

.rm-filter-bar {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.rm-filter-bar::-webkit-scrollbar { display: none; }

.rm-pill {
  border: 1px solid var(--lh-border, #e8e8ed);
  background: #fff;
  color: var(--lh-text, #1d1d1f);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.rm-pill.active {
  background: var(--rm-accent, #34c759);
  color: #fff;
  border-color: var(--rm-accent, #34c759);
}

.rm-sync-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rm-btn {
  border: 1px solid var(--lh-border, #e8e8ed);
  background: #fff;
  color: var(--lh-text, #1d1d1f);
  border-radius: 999px;
  min-height: 36px;
  padding: 0 14px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.rm-btn:hover { border-color: rgba(10,132,255,0.3); }
.rm-btn:active { transform: scale(0.96); }
.rm-btn-primary { background: var(--rm-accent, #34c759); color: #fff; border-color: var(--rm-accent, #34c759); }
.rm-btn-small { min-height: 30px; padding: 0 10px; font-size: 12px; }
.rm-btn-danger { color: var(--rm-danger, #ff3b30); border-color: rgba(255,59,48,0.2); }
.rm-btn-danger:hover { border-color: var(--rm-danger); }
.rm-btn-complete { color: var(--rm-accent); border-color: rgba(52,199,89,0.2); }

.rm-meta { color: var(--lh-muted, #86868b); font-size: 11px; }

.rm-group { display: grid; gap: 8px; }
.rm-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0 4px;
}
.rm-group-head h3 {
  margin: 0;
  font-size: 13px;
  color: var(--lh-muted, #86868b);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.rm-task {
  background: var(--lh-surface, #fff);
  border: 1px solid var(--lh-border, #e8e8ed);
  border-radius: 14px;
  padding: 12px;
  display: grid;
  gap: 8px;
  animation: rm-fade-in 200ms ease;
}
.rm-overdue { border-left: 3px solid var(--rm-overdue, #ff9500); }

.rm-task-main { display: grid; gap: 4px; }
.rm-task-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.rm-task h4 { margin: 0; font-size: 15px; line-height: 1.35; font-weight: 500; }
.rm-task-notes { font-size: 13px; color: var(--lh-muted, #86868b); line-height: 1.4; }

.rm-due-badge {
  font-size: 11px;
  color: var(--lh-muted, #86868b);
  background: var(--lh-bg, #f5f5f7);
  border-radius: 6px;
  padding: 2px 8px;
  white-space: nowrap;
}
.rm-due-badge.overdue { color: var(--rm-overdue); background: #fff7e6; }

.rm-task-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* Modal */
.rm-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: none;
  align-items: flex-end;
  justify-content: center;
  z-index: 1000;
  padding: 0;
}
.rm-modal-overlay.open { display: flex; }

.rm-modal-sheet {
  background: #fff;
  border-radius: 20px 20px 0 0;
  padding: 16px 18px max(18px, env(safe-area-inset-bottom));
  width: 100%;
  max-width: 500px;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.1);
  animation: rm-sheet-up 250ms ease;
}

.rm-modal-handle {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: rgba(0,0,0,0.12);
  margin: -8px auto 10px;
}

.rm-form { display: grid; gap: 12px; }
.rm-form h3 { margin: 0; font-size: 17px; }

.rm-field {
  display: grid;
  gap: 6px;
  border: 1px solid var(--lh-border, #e8e8ed);
  border-radius: 12px;
  padding: 10px 12px;
}
.rm-field span { font-size: 11px; color: var(--lh-muted, #86868b);}
.rm-field input, .rm-field textarea, .rm-field select {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--lh-text, #1d1d1f);
  font: inherit;
  font-size: 15px;
}
.rm-field textarea { min-height: 60px; resize: vertical; }

.rm-modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* Toast */
.rm-toast-stack {
  position: fixed;
  bottom: max(20px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 1100;
  display: grid;
  gap: 6px;
  pointer-events: none;
}
.rm-toast {
  background: #1d1d1f;
  color: #fff;
  border-radius: 14px;
  padding: 10px 16px;
  font-size: 13px;
  text-align: center;
  animation: rm-toast-up 200ms ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.rm-empty {
  text-align: center;
  padding: 40px 16px;
  color: var(--lh-muted, #86868b);
  font-size: 14px;
}

.rm-loading {
  text-align: center;
  padding: 40px 16px;
  color: var(--lh-muted, #86868b);
}

/* Animations */
@keyframes rm-fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes rm-sheet-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
@keyframes rm-toast-up {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (min-width: 720px) {
  .rm-header { padding: 18px; }
  .rm-tasks-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .rm-task, .rm-modal-sheet, .rm-toast { animation: none; transition: none; }
}