/* ============================================================
   Reminders App — reminders.css
   ============================================================ */

.reminders-app {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  background: #f2f1f6;
  border-radius: 0.75rem;
  overflow: hidden;
  font-family: -apple-system, 'SF Pro Text', sans-serif;
  font-size: 13px;
  color: #1c1c1e;
  user-select: none;
}

.rem-body {
  flex: 1; display: flex; overflow: hidden;
}

/* ═══ SIDEBAR ═══ */
.rem-sidebar {
  width: 220px; min-width: 220px;
  background: rgba(242,241,246,0.98);
  border-right: 0.5px solid rgba(0,0,0,0.1);
  display: flex; flex-direction: column;
  padding: 12px 8px 12px;
  overflow-y: auto; gap: 4px;
  flex-shrink: 0;
}
.rem-sidebar::-webkit-scrollbar { width: 5px; }
.rem-sidebar::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 3px; }

/* Search */
.rem-search-wrap {
  display: flex; align-items: center; gap: 6px;
  background: rgba(0,0,0,0.07); border-radius: 9px;
  padding: 5px 10px; margin-bottom: 8px;
}
.rem-search-input {
  flex: 1; background: none; border: none; outline: none;
  font-size: 12.5px; color: #1c1c1e;
}
.rem-search-input::placeholder { color: rgba(0,0,0,0.35); }

/* Smart tiles grid */
.rem-smart-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 8px; margin-bottom: 12px;
}
.rem-smart-tile {
  background: #fff; border-radius: 12px;
  border: none; cursor: pointer; padding: 10px 10px 8px;
  text-align: left; display: flex; flex-direction: column; gap: 2px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  transition: transform 100ms ease, box-shadow 100ms ease;
}
.rem-smart-tile:hover { transform: scale(1.02); box-shadow: 0 2px 8px rgba(0,0,0,0.12); }
.rem-smart-tile.active { box-shadow: 0 0 0 2px rgba(0,122,255,0.4), 0 2px 8px rgba(0,0,0,0.12); }

.rem-smart-icon {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 4px;
}
.rem-smart-label { font-size: 11.5px; font-weight: 600; color: rgba(0,0,0,0.6); }
.rem-smart-count  { font-size: 22px; font-weight: 700; line-height: 1; }

/* Section label */
.rem-section-label {
  font-size: 11px; font-weight: 700; color: rgba(0,0,0,0.4);
  letter-spacing: 0.5px; text-transform: uppercase;
  padding: 6px 6px 4px;
}

/* List items */
.rem-list-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px; border: none; background: none;
  cursor: pointer; border-radius: 8px; width: 100%;
  text-align: left; font-size: 13px; color: #1c1c1e;
  transition: background 80ms;
}
.rem-list-item:hover { background: rgba(0,0,0,0.05); }
.rem-list-item.active { background: rgba(0,0,0,0.08); font-weight: 500; }
.rem-list-icon {
  width: 26px; height: 26px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.rem-list-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rem-list-count { font-size: 12px; color: rgba(0,0,0,0.35); }

/* Add List */
.rem-add-list-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 8px; border: none; background: none;
  cursor: pointer; border-radius: 8px; width: 100%;
  font-size: 13px; color: #0a84ff; margin-top: 4px;
  transition: background 80ms;
}
.rem-add-list-btn:hover { background: rgba(0,122,255,0.08); }

/* ═══ MAIN AREA ═══ */
.rem-main {
  flex: 1; display: flex; flex-direction: column;
  overflow: hidden; position: relative;
}

/* Toolbar */
.rem-toolbar {
  height: 56px; min-height: 56px;
  padding: 0 20px 0 80px;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(242,241,246,0.97);
  border-bottom: 0.5px solid rgba(0,0,0,0.08);
  flex-shrink: 0; gap: 12px;
}
.rem-tb-left  { display: flex; flex-direction: column; gap: 1px; }
.rem-tb-right { display: flex; align-items: center; gap: 8px; }

.rem-list-header-title {
  font-size: 22px; font-weight: 800;
  letter-spacing: -0.3px; line-height: 1;
}
.rem-list-subtitle { font-size: 11px; color: rgba(0,0,0,0.4); margin-top: 1px; }

.rem-count-badge {
  font-size: 26px; font-weight: 700; line-height: 1;
  min-width: 40px; text-align: right;
}

.rem-tb-actions { display: flex; align-items: center; gap: 2px; }
.rem-tb-btn {
  width: 28px; height: 28px; border-radius: 6px;
  background: none; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: rgba(0,0,0,0.45); transition: background 80ms;
}
.rem-tb-btn:hover  { background: rgba(0,0,0,0.07); color: #000; }
.rem-tb-btn.active { background: rgba(0,0,0,0.1); color: #0a84ff; }

/* ── List content ── */
.rem-list-content {
  flex: 1; overflow-y: auto; padding: 8px 16px 80px;
}
.rem-list-content::-webkit-scrollbar { width: 6px; }
.rem-list-content::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 3px; }

/* ── Task item ── */
.rem-item {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 8px 10px; border-radius: 10px;
  margin-bottom: 2px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  transition: background 80ms, opacity 300ms, transform 300ms;
  cursor: default;
}
.rem-item:hover { background: #fafafa; }
.rem-item.completed { opacity: 0.5; }

/* Checkbox */
.rem-checkbox {
  width: 22px; height: 22px; flex-shrink: 0;
  border-radius: 50%; background: none; border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: #8e8e93; margin-top: 1px;
  transition: transform 150ms, color 150ms;
}
.rem-checkbox:hover { transform: scale(1.2); color: #0a84ff; }
.rem-item.completed .rem-checkbox { color: #30d158; }

/* Content */
.rem-item-content { flex: 1; min-width: 0; }
.rem-item-title-row {
  display: flex; align-items: center; gap: 4px;
  font-size: 13.5px; font-weight: 500; color: #1c1c1e;
}
.rem-item.completed .rem-item-title-row { text-decoration: line-through; color: rgba(0,0,0,0.35); }
.rem-item-title { cursor: text; }

.rem-priority      { font-size: 11px; font-weight: 700; flex-shrink: 0; }
.rem-priority-high { color: #ff453a; }
.rem-priority-med  { color: #ff9f0a; }
.rem-priority-low  { color: #636366; }

.rem-item-notes {
  font-size: 11.5px; color: rgba(0,0,0,0.45);
  margin-top: 2px; line-height: 1.4;
}
.rem-item-due {
  font-size: 11px; color: rgba(0,0,0,0.4);
  margin-top: 2px;
}
.rem-item-due.overdue { color: #ff453a; }
.rem-item-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.rem-tag {
  font-size: 10.5px; color: #0a84ff;
  background: rgba(10,132,255,0.1); border-radius: 6px;
  padding: 1px 6px;
}
.rem-item-img {
  width: 100%; max-height: 140px; object-fit: cover;
  border-radius: 8px; margin-top: 6px;
}

/* Subtasks */
.rem-subtasks { margin-top: 4px; display: flex; flex-direction: column; gap: 2px; }
.rem-subtask {
  display: flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: rgba(0,0,0,0.55); padding-left: 4px;
}
.rem-subtask.done { text-decoration: line-through; opacity: 0.5; }
.rem-subtask-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: rgba(0,0,0,0.3); flex-shrink: 0;
}

/* Actions */
.rem-item-actions {
  display: flex; align-items: center; gap: 2px;
  opacity: 0; transition: opacity 150ms;
}
.rem-item:hover .rem-item-actions { opacity: 1; }
.rem-flag-btn, .rem-info-btn {
  width: 24px; height: 24px; border-radius: 5px;
  border: none; background: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: rgba(0,0,0,0.35); transition: background 80ms;
}
.rem-flag-btn:hover, .rem-info-btn:hover { background: rgba(0,0,0,0.07); }
.rem-flag-btn.active { color: #ff9f0a; }

/* Inline edit */
.rem-inline-input {
  font-size: 13.5px; font-weight: 500;
  background: none; border: none; border-bottom: 1.5px solid #0a84ff;
  outline: none; color: #1c1c1e; width: 100%;
}

/* Completed section */
.rem-completed-header {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: rgba(0,0,0,0.5);
  padding: 12px 10px 6px;
}
.rem-completed-count {
  background: rgba(0,0,0,0.1); border-radius: 10px;
  padding: 1px 7px; font-size: 11px; font-weight: 600;
}
.rem-clear-btn {
  margin-left: auto; background: none; border: none;
  color: #ff453a; font-size: 12px; cursor: pointer;
  padding: 2px 8px; border-radius: 6px;
}
.rem-clear-btn:hover { background: rgba(255,69,58,0.1); }

/* FAB */
.rem-fab {
  position: absolute; bottom: 20px; right: 20px;
  width: 44px; height: 44px; border-radius: 50%;
  background: #0a84ff; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #fff; box-shadow: 0 4px 16px rgba(10,132,255,0.45);
  transition: transform 150ms ease, box-shadow 150ms ease;
  z-index: 10;
}
.rem-fab:hover { transform: scale(1.1); box-shadow: 0 6px 20px rgba(10,132,255,0.55); }
.rem-fab:active { transform: scale(0.95); }

/* Empty state */
.rem-empty {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; height: 200px; gap: 10px;
  color: rgba(0,0,0,0.25);
}
.rem-empty-icon { font-size: 40px; opacity: 0.3; }

/* ═══ KANBAN ═══ */
.rem-kanban {
  display: flex; gap: 12px; overflow-x: auto;
  padding: 16px 16px 80px; flex: 1;
  align-items: flex-start;
}
.rem-kanban::-webkit-scrollbar { height: 6px; }
.rem-kanban::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 3px; }

.rem-kanban-col {
  min-width: 240px; max-width: 260px;
  background: rgba(0,0,0,0.04); border-radius: 14px;
  padding: 10px; display: flex; flex-direction: column; gap: 8px;
  flex-shrink: 0;
}

.rem-kanban-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 2px 4px 6px;
}
.rem-kanban-name { font-size: 15px; font-weight: 700; color: #1c1c1e; }
.rem-kanban-more {
  width: 24px; height: 24px; border-radius: 5px;
  background: none; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: rgba(0,0,0,0.35);
}
.rem-kanban-more:hover { background: rgba(0,0,0,0.07); }

.rem-kanban-cards { display: flex; flex-direction: column; gap: 6px; }

/* Kanban card */
.rem-kanban-card {
  background: #fff; border-radius: 10px;
  padding: 10px 10px 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
  cursor: default;
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.rem-kanban-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
}
.rem-kc-header {
  display: flex; align-items: center; gap: 4px; margin-bottom: 5px;
}
.rem-kc-check {
  width: 20px; height: 20px; border-radius: 50%;
  background: none; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.rem-kc-more {
  margin-left: auto; width: 20px; height: 20px;
  border-radius: 4px; background: none; border: none;
  cursor: pointer; display: flex; align-items: center;
  justify-content: center; color: rgba(0,0,0,0.3);
  opacity: 0; transition: opacity 100ms;
}
.rem-kanban-card:hover .rem-kc-more { opacity: 1; }
.rem-kc-title { font-size: 13px; font-weight: 500; color: #1c1c1e; line-height: 1.35; }
.rem-kc-notes { font-size: 11.5px; color: rgba(0,0,0,0.4); margin-top: 3px; line-height: 1.3; }
.rem-kc-due   { font-size: 10.5px; color: rgba(0,0,0,0.38); margin-top: 4px; }
.rem-kc-due.overdue { color: #ff453a; }
.rem-kc-img   { width: 100%; border-radius: 7px; margin-top: 6px; max-height: 120px; object-fit: cover; }

.rem-kanban-add {
  width: 100%; border: none; background: none; cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  padding: 6px 4px; font-size: 12.5px; color: rgba(0,0,0,0.4);
  border-radius: 7px; transition: background 80ms, color 80ms;
}
.rem-kanban-add:hover { background: rgba(0,0,0,0.05); color: #0a84ff; }

/* ═══ DETAIL PANEL ═══ */
.rem-detail {
  width: 260px; min-width: 260px;
  border-left: 0.5px solid rgba(0,0,0,0.1);
  background: rgba(248,248,252,0.98);
  overflow-y: auto; flex-shrink: 0;
  transition: width 0.22s ease, min-width 0.22s ease;
}
.rem-detail::-webkit-scrollbar { width: 5px; }
.rem-detail::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); border-radius: 3px; }

.rem-detail-empty {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; height: 100%; gap: 10px;
  color: rgba(0,0,0,0.25); font-size: 12px; padding: 20px;
  text-align: center;
}

.rem-detail-inner { padding: 14px; display: flex; flex-direction: column; gap: 10px; }

.rem-detail-header {
  display: flex; justify-content: flex-end;
}
.rem-detail-close {
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(0,0,0,0.08); border: none; cursor: pointer;
  font-size: 10px; display: flex; align-items: center; justify-content: center;
  color: rgba(0,0,0,0.5); transition: background 80ms;
}
.rem-detail-close:hover { background: rgba(0,0,0,0.15); }

.rem-detail-row { display: flex; flex-direction: column; }

.rem-detail-title {
  font-size: 16px; font-weight: 600;
  border: none; background: none; outline: none;
  color: #1c1c1e; border-bottom: 1.5px solid rgba(0,0,0,0.1);
  padding-bottom: 6px;
}
.rem-detail-title:focus { border-color: #0a84ff; }

.rem-detail-notes {
  font-size: 13px; background: none; border: none; outline: none;
  color: rgba(0,0,0,0.6); resize: none; min-height: 56px;
  border-bottom: 0.5px solid rgba(0,0,0,0.08); padding-bottom: 6px;
  font-family: inherit;
}
.rem-detail-notes:focus { border-color: #0a84ff; }

/* Detail fields */
.rem-detail-fields { display: flex; flex-direction: column; gap: 0; }
.rem-detail-field {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 0;
  border-bottom: 0.5px solid rgba(0,0,0,0.06);
}
.rem-df-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: rgba(0,0,0,0.5); flex-shrink: 0;
}
.rem-df-value { display: flex; justify-content: flex-end; }
.rem-df-input {
  font-size: 12px; color: #1c1c1e; background: none;
  border: none; outline: none; text-align: right;
  max-width: 130px;
}
.rem-df-select {
  font-size: 12px; color: #0a84ff; background: none;
  border: none; outline: none; cursor: pointer;
  text-align: right;
}

/* Toggle switch */
.rem-toggle { position: relative; display: inline-flex; cursor: pointer; }
.rem-toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.rem-toggle-track {
  width: 36px; height: 20px; border-radius: 10px;
  background: rgba(0,0,0,0.15); transition: background 200ms;
  position: relative;
}
.rem-toggle-track::after {
  content: ""; position: absolute;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff; top: 2px; left: 2px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  transition: transform 200ms cubic-bezier(0.34,1.4,0.64,1);
}
.rem-toggle input:checked + .rem-toggle-track { background: #30d158; }
.rem-toggle input:checked + .rem-toggle-track::after { transform: translateX(16px); }

/* Subtasks section */
.rem-detail-subtasks-section { display: flex; flex-direction: column; gap: 6px; }
.rem-detail-sub-header {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; font-weight: 600; color: rgba(0,0,0,0.4);
}
.rem-detail-add-sub {
  font-size: 11.5px; color: #0a84ff; background: none; border: none;
  cursor: pointer; padding: 2px 6px; border-radius: 5px;
}
.rem-detail-add-sub:hover { background: rgba(10,132,255,0.1); }

.rem-detail-subtasks-list { display: flex; flex-direction: column; gap: 4px; }
.rem-detail-subtask {
  display: flex; align-items: center; gap: 6px;
}
.rem-sub-check { width: 14px; height: 14px; accent-color: #0a84ff; flex-shrink: 0; cursor: pointer; }
.rem-sub-title {
  flex: 1; font-size: 12.5px; background: none; border: none; outline: none;
  color: #1c1c1e; border-bottom: 0.5px solid rgba(0,0,0,0.08);
  padding-bottom: 2px;
}
.rem-sub-del {
  width: 18px; height: 18px; border-radius: 50%;
  background: none; border: none; cursor: pointer;
  font-size: 9px; color: rgba(0,0,0,0.3);
  display: flex; align-items: center; justify-content: center;
  transition: background 80ms;
}
.rem-sub-del:hover { background: rgba(255,69,58,0.12); color: #ff453a; }

/* Delete button */
.rem-detail-delete {
  width: 100%; padding: 8px; border-radius: 8px;
  background: rgba(255,69,58,0.08); border: none;
  color: #ff453a; font-size: 12.5px; font-weight: 500;
  cursor: pointer; transition: background 80ms; margin-top: 4px;
}
.rem-detail-delete:hover { background: rgba(255,69,58,0.15); }

/* ═══ CONTEXT MENU ═══ */
.rem-context-menu {
  background: rgba(245,244,242,0.95); backdrop-filter: blur(20px);
  border-radius: 10px; padding: 5px; min-width: 170px;
  box-shadow: 0 0 0 0.5px rgba(0,0,0,0.12), 0 6px 24px rgba(0,0,0,0.2);
}
.rem-ctx-item {
  display: block; width: 100%; padding: 6px 12px;
  background: none; border: none; cursor: pointer;
  text-align: left; font-size: 13px; color: #1c1c1e;
  border-radius: 6px; transition: background 60ms;
}
.rem-ctx-item:hover   { background: #0a84ff; color: #fff; }
.rem-ctx-danger       { color: #ff3b30; }
.rem-ctx-danger:hover { background: rgba(255,59,48,0.1); color: #ff3b30; }
.rem-ctx-sep          { height: 0.5px; background: rgba(0,0,0,0.1); margin: 3px 6px; }

/* ═══ Dark mode ═══ */
#desktop.dark-mode .reminders-app    { background: #1c1c1e; color: #f5f5f7; }
#desktop.dark-mode .rem-sidebar      { background: rgba(28,28,30,0.98); border-color: rgba(255,255,255,0.08); }
#desktop.dark-mode .rem-smart-tile   { background: rgba(44,44,46,0.9); }
#desktop.dark-mode .rem-smart-label  { color: rgba(255,255,255,0.55); }
#desktop.dark-mode .rem-list-item    { color: #f5f5f7; }
#desktop.dark-mode .rem-list-item:hover { background: rgba(255,255,255,0.07); }
#desktop.dark-mode .rem-list-item.active { background: rgba(255,255,255,0.1); }
#desktop.dark-mode .rem-toolbar      { background: rgba(28,28,30,0.97); border-color: rgba(255,255,255,0.07); }
#desktop.dark-mode .rem-item         { background: rgba(44,44,46,0.85); }
#desktop.dark-mode .rem-item-title-row { color: #f5f5f7; }
#desktop.dark-mode .rem-kanban-col   { background: rgba(255,255,255,0.05); }
#desktop.dark-mode .rem-kanban-card  { background: rgba(44,44,46,0.9); }
#desktop.dark-mode .rem-kc-title     { color: #f5f5f7; }
#desktop.dark-mode .rem-detail       { background: rgba(28,28,30,0.98); border-color: rgba(255,255,255,0.08); }
#desktop.dark-mode .rem-detail-title { color: #f5f5f7; border-color: rgba(255,255,255,0.1); }
#desktop.dark-mode .rem-detail-notes { color: rgba(255,255,255,0.6); }
#desktop.dark-mode .rem-context-menu { background: rgba(44,44,46,0.95); }
#desktop.dark-mode .rem-ctx-item     { color: #f5f5f7; }
 
