/* ═══════════════════════════════════════════════════
   RemindersPage — Полностраничный view напоминаний
   Стиль: аналог tasks.css (стеклянные карточки)
   ═══════════════════════════════════════════════════ */

.rm-view {
  position: fixed;
  inset: 56px 0 0 0;
  overflow-y: auto;
  overflow-x: hidden;
  background: transparent;
  z-index: 10;
  display: none;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #e2e8f0;
}
.rm-view.visible { display: block; }

.rm-view::before {
  content: '';
  position: fixed;
  inset: 56px 0 0 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: -1;
}

.rm-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 20%, rgba(251, 191, 36, 0.12) 0%, transparent 35%),
    radial-gradient(circle at 80% 80%, rgba(99, 102, 241, 0.10) 0%, transparent 35%);
}

.rm-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 80px 40px 100px;
  position: relative;
}

/* ── Header ── */
.rm-header-section {
  margin-bottom: 40px;
}

.rm-title {
  font-size: 32px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
  letter-spacing: -0.03em;
  background: linear-gradient(to right, #fff, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.rm-subtitle {
  font-size: 15px;
  color: #94a3b8;
  opacity: 0.8;
}

/* ── Glass Card ── */
.rm-card {
  background: var(--glass-panel-bg);
  backdrop-filter: var(--glass-panel-blur);
  -webkit-backdrop-filter: var(--glass-panel-blur);
  border: 1px solid var(--glass-panel-border);
  border-radius: var(--glass-panel-radius);
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: var(--glass-panel-shadow);
}

/* ── Форма создания (NLP) ── */
.rm-add-form {
  display: flex;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 8px;
  transition: all 0.3s ease;
  align-items: center;
}

.rm-add-form:focus-within {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(251, 191, 36, 0.4);
  box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.1);
}

.rm-add-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  padding: 12px 8px;
  font-size: 15px;
  color: #fff;
  outline: none;
}

.rm-add-input::placeholder { color: #64748b; }

.rm-add-btn {
  background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
  color: #fff;
  border: none;
  border-radius: 14px;
  padding: 0 16px;
  height: 44px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
  white-space: nowrap;
  flex-shrink: 0;
}

.rm-add-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.rm-add-btn:disabled { opacity: 0.5; transform: none; cursor: not-allowed; }

.rm-hint {
  font-size: 12px;
  color: #64748b;
  margin-top: 10px;
  padding: 0 4px;
}

/* ── Section Label ── */
.rm-section-label {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.rm-section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.05);
}

/* ── Reminder List ── */
.rm-list { display: flex; flex-direction: column; gap: 10px; }

/* ── Reminder Item ── */
.rm-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 18px;
  padding: 18px 20px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.rm-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
}

.rm-item-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(251, 191, 36, 0.12);
  color: #fbbf24;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rm-item-icon .material-symbols-outlined { font-size: 22px; }

.rm-item-body { flex: 1; min-width: 0; }

.rm-item-msg {
  font-size: 15px;
  font-weight: 500;
  color: #f1f5f9;
  margin-bottom: 4px;
  word-break: break-word;
}

.rm-item-time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #60a5fa;
  background: rgba(96, 165, 250, 0.1);
  padding: 2px 8px;
  border-radius: 20px;
}

.rm-item-time.overdue {
  color: #f87171;
  background: rgba(248, 113, 113, 0.1);
}

.rm-item-recipients {
  display: flex;
  gap: 4px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.rm-recip-chip {
  font-size: 11px;
  font-weight: 600;
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.12);
  padding: 2px 8px;
  border-radius: 10px;
}

/* ── Action Buttons ── */
.rm-item-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.rm-del-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  opacity: 0;
}

.rm-item:hover .rm-del-btn { opacity: 1; }
.rm-del-btn:hover { background: rgba(239, 68, 68, 0.15); color: #ef4444; border-color: rgba(239, 68, 68, 0.2); }

/* ── Completed/Triggered section ── */
.rm-item.triggered {
  opacity: 0.5;
}
.rm-item.triggered .rm-item-icon {
  background: rgba(34, 197, 94, 0.12);
  color: #22c55e;
}
.rm-item.triggered .rm-item-msg {
  text-decoration: line-through;
  color: #64748b;
}

/* ── Empty State ── */
.rm-empty {
  text-align: center;
  padding: 60px 20px;
}

.rm-empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  filter: drop-shadow(0 0 10px rgba(255,255,255,0.1));
}

.rm-empty-text { color: #94a3b8; font-size: 15px; line-height: 1.6; }

/* ── Error ── */
.rm-error {
  display: none;
  color: #f87171;
  font-size: 13px;
  padding: 8px 12px;
  margin-top: 8px;
  background: rgba(248, 113, 113, 0.1);
  border-radius: 10px;
}

/* ── Loading ── */
.rm-loading {
  text-align: center;
  padding: 40px;
  color: #64748b;
}

.rm-loading-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255,255,255,0.1);
  border-top: 3px solid #fbbf24;
  border-radius: 50%;
  margin: 0 auto 12px;
  animation: rmSpin 0.8s linear infinite;
}

@keyframes rmSpin {
  to { transform: rotate(360deg); }
}

/* ═══ MOBILE ═══ */
@media (max-width: 768px) {
  .rm-view { inset: 0 0 60px 0; }
  .rm-view::before { inset: 0 0 60px 0; }
  .rm-wrap { padding: 72px 12px 90px; }
  .rm-title { font-size: 24px; }
  .rm-subtitle { font-size: 13px; }
  .rm-card { padding: 16px 12px; border-radius: 16px; margin-bottom: 14px; }
  .rm-add-form { gap: 6px; padding: 6px; border-radius: 16px; }
  .rm-add-input { padding: 10px 6px; font-size: 14px; }
  .rm-add-btn { padding: 0 14px; height: 40px; font-size: 13px; border-radius: 12px; }

  .rm-item {
    padding: 14px 12px;
    border-radius: 16px;
    gap: 12px;
  }

  .rm-item-icon { width: 36px; height: 36px; border-radius: 10px; }
  .rm-item-icon .material-symbols-outlined { font-size: 18px; }
  .rm-item-msg { font-size: 14px; }
  .rm-item-time { font-size: 11px; }

  .rm-del-btn {
    opacity: 1 !important;
    width: 30px;
    height: 30px;
    border-radius: 9px;
  }

  .rm-empty { padding: 40px 16px; }
  .rm-empty-icon { font-size: 36px; }
  .rm-empty-text { font-size: 14px; }
  .rm-section-label { font-size: 11px; margin-bottom: 14px; }
}

/* ═══ LIGHT THEME ═══ */
[data-mode="light"] .rm-view { color: #0f172a; }
[data-mode="light"] .rm-view::before { background: transparent; }
[data-mode="light"] .rm-glow {
  background:
    radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.06) 0%, transparent 35%),
    radial-gradient(circle at 80% 80%, rgba(var(--primary-rgb), 0.04) 0%, transparent 35%);
}
[data-mode="light"] .rm-title {
  background: linear-gradient(to right, #0f172a, #475569) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}
[data-mode="light"] .rm-subtitle { color: #64748b !important; }
[data-mode="light"] .rm-card { color: #0f172a !important; }
[data-mode="light"] .rm-add-form {
  background: rgba(0, 0, 0, 0.03) !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
}
[data-mode="light"] .rm-add-form:focus-within {
  background: rgba(0, 0, 0, 0.02) !important;
  border-color: rgba(245, 158, 11, 0.40) !important;
}
[data-mode="light"] .rm-add-input { color: #0f172a !important; }
[data-mode="light"] .rm-add-input::placeholder { color: #94a3b8 !important; }
[data-mode="light"] .rm-section-label { color: #334155 !important; }
[data-mode="light"] .rm-section-label::after { background: rgba(0, 0, 0, 0.06) !important; }
[data-mode="light"] .rm-item {
  background: rgba(0, 0, 0, 0.02) !important;
  border-color: rgba(0, 0, 0, 0.06) !important;
}
[data-mode="light"] .rm-item:hover {
  background: rgba(0, 0, 0, 0.04) !important;
  border-color: rgba(0, 0, 0, 0.10) !important;
}
[data-mode="light"] .rm-item-msg { color: #0f172a !important; }
[data-mode="light"] .rm-item-time {
  color: #1d4ed8 !important;
  background: rgba(29, 78, 216, 0.08) !important;
}
[data-mode="light"] .rm-item-time.overdue {
  color: #dc2626 !important;
  background: rgba(220, 38, 38, 0.08) !important;
}
[data-mode="light"] .rm-empty-text { color: #64748b !important; }
[data-mode="light"] .rm-del-btn {
  background: rgba(0, 0, 0, 0.03) !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  color: #94a3b8 !important;
}
[data-mode="light"] .rm-recip-chip {
  color: #4338ca !important;
  background: rgba(67, 56, 202, 0.08) !important;
}
[data-mode="light"] .rm-hint { color: #94a3b8 !important; }
