/* ===== NOTES-DS - Verde Aurora Boreal ===== */
:root, [data-theme="dark"] {
  --bg-deep: #05140c;
  --bg-dark: #0a1f14;
  --aurora-green: #00e676;
  --aurora-bright: #00ff9f;
  --aurora-soft: #69f0ae;
  --teal: #00bfa5;
  --purple: #b388ff;
  --blue: #40c4ff;
  --pink: #ff80ab;
  --orange: #ffab40;
  --glass: rgba(255, 255, 255, 0.07);
  --glass-border: rgba(255, 255, 255, 0.14);
  --glass-strong: rgba(0, 230, 118, 0.12);
  --text: #e8f5e9;
  --text-muted: rgba(232, 245, 233, 0.65);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  --input-bg: rgba(0, 0, 0, 0.25);
  --editor-bg: rgba(0, 0, 0, 0.2);
  --toolbar-bg: rgba(255, 255, 255, 0.06);
  --radius: 16px;
  --radius-sm: 10px;
  --nav-h: 64px;
  --header-h: 60px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

[data-theme="light"] {
  --bg-deep: #e8f5e9;
  --bg-dark: #c8e6c9;
  --aurora-green: #00c853;
  --aurora-bright: #00a844;
  --aurora-soft: #1b5e20;
  --teal: #00897b;
  --purple: #7c4dff;
  --blue: #0288d1;
  --pink: #e91e63;
  --orange: #ef6c00;
  --glass: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(0, 100, 50, 0.15);
  --glass-strong: rgba(0, 200, 83, 0.18);
  --text: #1b3a2a;
  --text-muted: rgba(27, 58, 42, 0.65);
  --shadow: 0 8px 32px rgba(0, 80, 40, 0.12);
  --input-bg: rgba(255, 255, 255, 0.9);
  --editor-bg: rgba(255, 255, 255, 0.85);
  --toolbar-bg: rgba(0, 150, 80, 0.08);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-deep);
  color: var(--text);
  min-height: 100%;
  min-height: 100dvh;
  overflow-x: hidden;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

/* Aurora animated background */
.aurora-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-dark) 40%, var(--bg-deep) 100%);
  transition: background 0.4s ease;
}

[data-theme="light"] .aurora {
  opacity: 0.25;
  filter: blur(100px);
}

.aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
  animation: auroraMove 18s ease-in-out infinite alternate;
}

.a1 {
  width: 60vw; height: 50vh;
  background: radial-gradient(circle, #00e676 0%, transparent 70%);
  top: -10%; left: -15%;
  animation-duration: 22s;
}
.a2 {
  width: 50vw; height: 45vh;
  background: radial-gradient(circle, #00bfa5 0%, #b388ff 60%, transparent 80%);
  bottom: 10%; right: -20%;
  animation-duration: 26s;
  animation-delay: -5s;
}
.a3 {
  width: 40vw; height: 40vh;
  background: radial-gradient(circle, #69f0ae 0%, transparent 70%);
  top: 40%; left: 30%;
  animation-duration: 20s;
  animation-delay: -10s;
  opacity: 0.3;
}

@keyframes auroraMove {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -20px) scale(1.08); }
  100% { transform: translate(-20px, 15px) scale(0.95); }
}

/* Glass utility */
.glass {
  background: var(--glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
}

.glass-btn {
  background: var(--glass-strong);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 230, 118, 0.35);
}

/* App layout */
#app {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  max-width: 640px;
  margin: 0 auto;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  height: var(--header-h);
  border-radius: 0 0 18px 18px;
  border-top: none;
  gap: 8px;
}

.logo {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--aurora-bright);
}
.logo span { color: var(--text-muted); font-weight: 500; }

.header-center { flex: 1; text-align: center; }

.datetime-block { display: flex; flex-direction: column; align-items: center; gap: 1px; }

.clock {
  font-size: 1.05rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--aurora-soft);
}

.short-date {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: capitalize;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.weather {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
  padding: 4px 8px;
  border-radius: 20px;
  background: rgba(0, 230, 118, 0.1);
  border: 1px solid rgba(0, 230, 118, 0.2);
  cursor: default;
}
.weather-temp { font-weight: 600; color: var(--aurora-soft); }
.weather-icon { font-size: 1rem; }

.icon-btn {
  background: transparent;
  border: none;
  color: var(--text);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.icon-btn:hover, .icon-btn:active {
  background: rgba(0, 230, 118, 0.15);
  color: var(--aurora-bright);
}

/* Main */
.main {
  flex: 1;
  padding: 12px 14px calc(var(--nav-h) + 16px + var(--safe-bottom));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.view { display: none; animation: fadeIn 0.25s ease; }
.view.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 10px;
}
.view-header h2 {
  font-size: 1.25rem;
  font-weight: 650;
  color: var(--aurora-soft);
}

/* Buttons */
.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.15s, background 0.2s;
}
.btn-primary {
  background: linear-gradient(135deg, #00c853, #00e676);
  color: #003d1f;
  box-shadow: 0 4px 14px rgba(0, 230, 118, 0.35);
}
.btn-primary:active { transform: scale(0.97); }
.btn-secondary {
  background: rgba(255,255,255,0.08);
  color: var(--text);
  border: 1px solid var(--glass-border);
}

/* Filters */
.filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 8px;
  scrollbar-width: none;
}
.filters::-webkit-scrollbar { display: none; }

.filter-chip {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.05);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.filter-chip.active, .filter-chip:hover {
  background: rgba(0, 230, 118, 0.2);
  border-color: rgba(0, 230, 118, 0.5);
  color: var(--aurora-bright);
}

/* Notes list */
.notes-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.note-card {
  position: relative;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--glass);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s;
  overflow: hidden;
}
.note-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--theme-color, var(--aurora-green));
}
.note-card:active { transform: scale(0.985); }

.note-card.theme-green { --theme-color: #00e676; }
.note-card.theme-blue { --theme-color: #40c4ff; }
.note-card.theme-purple { --theme-color: #b388ff; }
.note-card.theme-teal { --theme-color: #00bfa5; }
.note-card.theme-pink { --theme-color: #ff80ab; }
.note-card.theme-orange { --theme-color: #ffab40; }

.note-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 6px;
}
.note-card-title {
  font-size: 1rem;
  font-weight: 600;
  flex: 1;
  word-break: break-word;
}
.note-card-cat {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(255,255,255,0.08);
  color: var(--text-muted);
  white-space: nowrap;
}
.note-card-preview {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 8px;
}
.note-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  color: var(--text-muted);
}
.note-reminder-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--aurora-soft);
}
.note-actions {
  display: flex;
  gap: 4px;
  opacity: 0.7;
}
.note-actions button {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 4px;
  cursor: pointer;
  border-radius: 6px;
}
.note-actions button:hover { color: var(--aurora-bright); background: rgba(0,230,118,0.15); }

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}
.empty-state .emoji { font-size: 2.5rem; margin-bottom: 10px; }

/* Calendar */
.cal-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
#cal-month-label {
  font-weight: 600;
  min-width: 120px;
  text-align: center;
  font-size: 0.95rem;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 16px;
}
.cal-weekday {
  text-align: center;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 6px 0;
  text-transform: uppercase;
}
.cal-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 0.85rem;
  cursor: pointer;
  position: relative;
  background: rgba(255,255,255,0.03);
  border: 1px solid transparent;
  transition: background 0.15s;
}
.cal-day:hover { background: rgba(0,230,118,0.12); }
.cal-day.other-month { opacity: 0.35; }
.cal-day.today {
  border-color: var(--aurora-green);
  background: rgba(0, 230, 118, 0.15);
  font-weight: 700;
  color: var(--aurora-bright);
}
.cal-day.selected {
  background: rgba(0, 230, 118, 0.28);
  border-color: var(--aurora-bright);
}
.cal-day.has-events::after {
  content: '';
  position: absolute;
  bottom: 4px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--aurora-green);
}
.cal-day.has-birthday::after {
  background: var(--pink);
}

.day-events {
  padding: 14px;
  border-radius: var(--radius);
  min-height: 120px;
}
.day-events h3 {
  font-size: 0.95rem;
  margin-bottom: 10px;
  color: var(--aurora-soft);
}
.event-item {
  display: flex;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.05);
  margin-bottom: 8px;
  align-items: flex-start;
}
.event-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}
.event-dot.event { background: var(--aurora-green); }
.event-dot.reminder { background: var(--orange); }
.event-dot.birthday { background: var(--pink); }
.event-info { flex: 1; }
.event-title { font-weight: 600; font-size: 0.9rem; }
.event-time { font-size: 0.75rem; color: var(--text-muted); }
.event-actions { display: flex; gap: 4px; }

/* FAB */
.fab {
  position: fixed;
  bottom: calc(var(--nav-h) + 20px + var(--safe-bottom));
  right: max(16px, calc(50% - 320px + 16px));
  width: 56px; height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  color: #003d1f;
  background: linear-gradient(135deg, #00c853, #00e676);
  box-shadow: 0 6px 20px rgba(0, 230, 118, 0.45);
  cursor: pointer;
  z-index: 40;
  transition: transform 0.2s;
}
.fab:active { transform: scale(0.92); }

/* Reminders & Birthdays lists */
.reminders-list, .birthdays-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.reminder-card, .bday-card {
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--glass);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.reminder-card.past { opacity: 0.6; }
.bday-card .bday-date {
  font-size: 0.8rem;
  color: var(--pink);
  font-weight: 600;
}

/* Bottom Nav */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 640px;
  height: calc(var(--nav-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 50;
  border-radius: 20px 20px 0 0;
  border-bottom: none;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 500;
  padding: 8px 4px;
  cursor: pointer;
  transition: color 0.2s;
}
.nav-item svg { transition: transform 0.2s; }
.nav-item.active {
  color: var(--aurora-bright);
}
.nav-item.active svg { transform: translateY(-2px); }

/* Modals */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}
.modal.hidden { display: none; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 90dvh;
  overflow-y: auto;
  border-radius: 24px 24px 0 0;
  padding: 20px 18px calc(20px + var(--safe-bottom));
  animation: slideUp 0.3s ease;
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.modal-header h3 {
  font-size: 1.15rem;
  color: var(--aurora-soft);
}
.modal-close {
  font-size: 1.5rem;
  line-height: 1;
  width: 36px; height: 36px;
}

.form-group {
  margin-bottom: 14px;
}
.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.form-group input[type="text"],
.form-group input[type="date"],
.form-group input[type="time"],
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--aurora-green);
  box-shadow: 0 0 0 3px rgba(0, 230, 118, 0.2);
}
.form-group textarea { resize: vertical; min-height: 100px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.checkbox-label {
  display: flex !important;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.9rem !important;
  color: var(--text) !important;
}
.checkbox-label input { width: 18px; height: 18px; accent-color: var(--aurora-green); }

.reminder-fields {
  padding: 12px;
  border-radius: 12px;
  background: rgba(0, 230, 118, 0.08);
  border: 1px dashed rgba(0, 230, 118, 0.3);
  margin-bottom: 14px;
}
.reminder-fields.hidden { display: none; }

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 8px;
}
.modal-actions button { min-width: 100px; }

/* Toast */
.toast {
  position: fixed;
  bottom: calc(var(--nav-h) + 24px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 22px;
  border-radius: 30px;
  background: rgba(0, 30, 18, 0.92);
  border: 1px solid rgba(0, 230, 118, 0.4);
  color: var(--aurora-soft);
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 200;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  animation: toastIn 0.3s ease;
  max-width: 90%;
  text-align: center;
}
.toast.hidden { display: none; }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Desktop / larger screens */
@media (min-width: 640px) {
  .modal {
    align-items: center;
    padding: 20px;
  }
  .modal-content {
    border-radius: 20px;
    max-height: 85vh;
  }
  .fab {
    right: max(24px, calc(50% - 320px + 24px));
  }
}

@media (min-width: 900px) {
  #app { max-width: 720px; }
}

/* Scrollbar subtle */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0, 230, 118, 0.3); border-radius: 10px; }

/* ===== Rich Text Editor ===== */
.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px;
  background: var(--toolbar-bg);
  border: 1px solid var(--glass-border);
  border-bottom: none;
  border-radius: 12px 12px 0 0;
}
.editor-toolbar button {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text);
  width: 34px;
  height: 32px;
  border-radius: 8px;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
}
.editor-toolbar button:hover,
.editor-toolbar button.active {
  background: rgba(0, 230, 118, 0.18);
  border-color: rgba(0, 230, 118, 0.4);
  color: var(--aurora-bright);
}
.toolbar-sep {
  width: 1px;
  height: 22px;
  background: var(--glass-border);
  margin: 0 4px;
  align-self: center;
}
.rich-editor {
  min-height: 140px;
  max-height: 280px;
  overflow-y: auto;
  padding: 12px 14px;
  border-radius: 0 0 12px 12px;
  border: 1px solid var(--glass-border);
  background: rgba(8, 28, 18, 0.82);
  color: #f2fff6 !important;
  caret-color: #00ff9f;
  font-size: 0.95rem;
  line-height: 1.5;
  outline: none;
  transition: border-color 0.2s;
  -webkit-text-fill-color: #f2fff6;
}
.rich-editor *,
.rich-editor p,
.rich-editor div,
.rich-editor span,
.rich-editor li,
.rich-editor font {
  color: #f2fff6 !important;
  -webkit-text-fill-color: #f2fff6;
}
.rich-editor:focus {
  border-color: var(--aurora-green);
  box-shadow: 0 0 0 3px rgba(0, 230, 118, 0.2);
}
.rich-editor:empty:before {
  content: attr(data-placeholder);
  color: rgba(242, 255, 246, 0.45) !important;
  -webkit-text-fill-color: rgba(242, 255, 246, 0.45);
  pointer-events: none;
}
.rich-editor ul, .rich-editor ol {
  padding-left: 1.4em;
  margin: 0.4em 0;
}
.rich-editor b, .rich-editor strong { font-weight: 700; }
.rich-editor i, .rich-editor em { font-style: italic; }

/* Light theme: dark text on pale editor */
[data-theme="light"] .rich-editor {
  background: rgba(255, 255, 255, 0.92);
  color: #123322 !important;
  caret-color: #00a844;
  -webkit-text-fill-color: #123322;
}
[data-theme="light"] .rich-editor *,
[data-theme="light"] .rich-editor p,
[data-theme="light"] .rich-editor div,
[data-theme="light"] .rich-editor span,
[data-theme="light"] .rich-editor li,
[data-theme="light"] .rich-editor font {
  color: #123322 !important;
  -webkit-text-fill-color: #123322;
}
[data-theme="light"] .rich-editor:empty:before {
  color: rgba(18, 51, 34, 0.45) !important;
  -webkit-text-fill-color: rgba(18, 51, 34, 0.45);
}

/* Form inputs adapt to theme */
.form-group input[type="text"],
.form-group input[type="date"],
.form-group input[type="time"],
.form-group textarea,
.form-group select {
  background: var(--input-bg) !important;
  color: var(--text) !important;
}

/* Light theme adjustments */
[data-theme="light"] .logo { color: var(--aurora-bright); }
[data-theme="light"] .btn-primary {
  background: linear-gradient(135deg, #00a844, #00c853);
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 168, 68, 0.3);
}
[data-theme="light"] .fab {
  background: linear-gradient(135deg, #00a844, #00c853);
  color: #fff;
  box-shadow: 0 6px 20px rgba(0, 168, 68, 0.35);
}
[data-theme="light"] .note-card {
  background: rgba(255, 255, 255, 0.85);
}
[data-theme="light"] .glass {
  background: rgba(255, 255, 255, 0.7);
}
[data-theme="light"] .toast {
  background: rgba(232, 245, 233, 0.95);
  color: #1b5e20;
  border-color: rgba(0, 168, 68, 0.4);
}

/* ===== Tasks / ToDo ===== */
.tasks-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.task-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--glass);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  transition: opacity 0.2s;
}
.task-card.done {
  opacity: 0.55;
}
.task-card.done .task-title {
  text-decoration: line-through;
}
.task-card.overdue .task-due {
  color: #ff5252;
  font-weight: 600;
}
.task-check {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid var(--aurora-green);
  background: transparent;
  color: var(--aurora-bright);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
  transition: background 0.15s;
}
.task-check:hover,
.task-card.done .task-check {
  background: rgba(0, 230, 118, 0.25);
}
.task-body {
  flex: 1;
  min-width: 0;
  cursor: pointer;
}
.task-title {
  font-weight: 600;
  font-size: 0.95rem;
  word-break: break-word;
}
.task-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
  font-size: 0.7rem;
}
.task-prio {
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.prio-high { background: rgba(255, 82, 82, 0.2); color: #ff8a80; }
.prio-medium { background: rgba(255, 171, 64, 0.2); color: #ffab40; }
.prio-low { background: rgba(0, 230, 118, 0.15); color: var(--aurora-soft); }
.task-due, .task-cat {
  color: var(--text-muted);
}
.task-del { opacity: 0.6; }
.task-del:hover { opacity: 1; }

/* Calendar event type for tasks */
.event-dot.task { background: #40c4ff; }

/* Nav with 5 items */
.bottom-nav .nav-item {
  font-size: 0.6rem;
  padding: 6px 2px;
}
.bottom-nav .nav-item svg {
  width: 20px;
  height: 20px;
}

.cal-nav {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
}

/* Images inside notes */
.rich-editor img,
.note-card-preview img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 6px 0;
  display: block;
}
.note-card-preview img {
  max-height: 80px;
  object-fit: cover;
}

/* Autosave indicator */
.autosave-status {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: auto;
  margin-right: 8px;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.25s;
  white-space: nowrap;
}
.autosave-status.visible {
  opacity: 1;
}
.autosave-status.saving {
  color: var(--orange);
}
.autosave-status.saved {
  color: var(--aurora-soft);
}
.modal-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Weather city */
.weather {
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 3px 8px;
  line-height: 1.15;
}
.weather-city {
  font-size: 0.55rem;
  color: var(--text-muted);
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.weather-temp {
  font-size: 0.8rem;
}

/* Dictation button */
#btn-dictation.listening {
  background: rgba(255, 82, 82, 0.25) !important;
  border-color: #ff5252 !important;
  color: #ff8a80 !important;
  animation: pulse-mic 1.2s ease infinite;
}
@keyframes pulse-mic {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.refresh-btn.spinning svg {
  animation: spin-refresh 0.6s linear;
}
@keyframes spin-refresh {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.tags-editor-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 40vh;
  overflow-y: auto;
}
.tag-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.tag-row input {
  flex: 1;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: var(--input-bg);
  color: var(--text);
  font-size: 0.95rem;
}
