/* ============================================================
   APPEARANCE BUTTON & GLASSMORPHISM PANEL
   ============================================================ */

.appearance-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 700;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
  letter-spacing: 0.02em;
}

.appearance-btn:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-1px);
}

.appearance-btn.open {
  background: var(--primary);
  color: #fff;
  border-color: rgba(255,255,255,0.18);
}

.appearance-panel {
  display: none;
  flex-direction: column;
  gap: 14px;
  margin-top: 10px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 8px 32px rgba(124,58,237,0.18), inset 0 1px 0 rgba(255,255,255,0.25);
  animation: apFadeIn 0.22s ease;
}

.appearance-panel.open { display: flex; }

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

body.dark-mode .appearance-panel {
  background: rgba(15, 10, 40, 0.55);
  border-color: rgba(167,139,250,0.22);
  box-shadow: 0 8px 32px rgba(0,0,0,0.45), inset 0 1px 0 rgba(167,139,250,0.15);
}

.ap-section { display: flex; flex-direction: column; gap: 8px; }

.ap-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.ap-options { display: flex; gap: 6px; }

.ap-opt {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px;
  border-radius: 12px;
  background: rgba(255,255,255,0.08);
  border: 1.5px solid rgba(255,255,255,0.12);
  color: var(--text);
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, transform 0.15s;
}

.ap-opt:hover {
  background: rgba(124,58,237,0.12);
  border-color: rgba(124,58,237,0.3);
  transform: translateY(-1px);
}

.ap-opt.ap-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(124,58,237,0.4);
}

body.dark-mode .ap-opt {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.08);
  color: var(--text);
}

body.dark-mode .ap-opt:hover {
  background: rgba(167,139,250,0.15);
  border-color: rgba(167,139,250,0.35);
}

.ap-icon { font-size: 1.1rem; line-height: 1; }

.ap-divider {
  height: 1px;
  background: rgba(255,255,255,0.15);
  border-radius: 999px;
}

body.dark-mode .ap-divider { background: rgba(167,139,250,0.15); }


/* ============================================================
   TODO PAGE — GLASSMORPHISM
   ============================================================ */

.todo-page {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding: 8px 0 60px;
  overflow: visible;
}

.todo-bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  opacity: 1;
}

.todo-orb-1 {
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(124,58,237,0.22) 0%, transparent 70%);
  top: -60px; left: -100px;
}

.todo-orb-2 {
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(16,185,129,0.16) 0%, transparent 70%);
  bottom: 100px; right: -80px;
}

.todo-orb-3 {
  width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(167,139,250,0.14) 0%, transparent 70%);
  top: 40%; left: 50%;
  transform: translateX(-50%);
}

.todo-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 28px;
}

.todo-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 6px;
  background: var(--primary-soft);
  padding: 4px 12px;
  border-radius: 999px;
}

.todo-title {
  font-size: 30px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.15;
  margin-bottom: 6px;
}

.todo-subtitle { font-size: 14px; color: var(--muted); }

.todo-counters { display: flex; gap: 10px; align-items: center; }

.todo-counter-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 18px;
  border-radius: 18px;
  background: rgba(124,58,237,0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(124,58,237,0.18);
  min-width: 72px;
}

.todo-counter-done {
  background: rgba(16,185,129,0.1);
  border-color: rgba(16,185,129,0.2);
}

.counter-num { font-size: 22px; font-weight: 800; color: var(--primary); line-height: 1; }
.todo-counter-done .counter-num { color: #10b981; }
.counter-label { font-size: 11px; color: var(--muted); margin-top: 2px; font-weight: 600; }

.todo-form-glass {
  position: relative;
  z-index: 1;
  padding: 20px;
  border-radius: 24px;
  margin-bottom: 16px;
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.7);
  box-shadow: 0 8px 32px rgba(124,58,237,0.1), inset 0 1px 0 rgba(255,255,255,0.9);
}

body.dark-mode .todo-form-glass {
  background: rgba(15,10,40,0.55);
  border-color: rgba(167,139,250,0.18);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), inset 0 1px 0 rgba(167,139,250,0.1);
}

.todo-form-grid {
  display: grid;
  grid-template-columns: 2fr 0.7fr 1.2fr auto;
  gap: 12px;
  align-items: center;
}

.todo-input {
  width: 100%;
  height: 50px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1.5px solid rgba(124,58,237,0.15);
  background: rgba(255,255,255,0.7);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}

body.dark-mode .todo-input {
  background: rgba(255,255,255,0.06);
  border-color: rgba(167,139,250,0.2);
  color: var(--text);
}

.todo-input::placeholder { color: var(--muted); }

.todo-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(124,58,237,0.12);
  background: rgba(255,255,255,0.9);
}

body.dark-mode .todo-input:focus { background: rgba(255,255,255,0.1); }

.todo-select { cursor: pointer; }

.todo-add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 50px;
  padding: 0 22px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, #7c3aed, #a78bfa);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(124,58,237,0.35);
  transition: transform 0.15s, box-shadow 0.15s;
  font-family: inherit;
}

.todo-add-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(124,58,237,0.45);
}

.todo-add-btn:active { transform: translateY(0); }
.todo-add-icon { font-size: 20px; line-height: 1; margin-bottom: 1px; }

.todo-filters {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 16px;
}

.todo-filter-btn {
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  border: 1.5px solid rgba(124,58,237,0.15);
  background: rgba(255,255,255,0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: inherit;
}

body.dark-mode .todo-filter-btn {
  background: rgba(255,255,255,0.06);
  border-color: rgba(167,139,250,0.15);
}

.todo-filter-btn.active,
.todo-filter-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(124,58,237,0.3);
}

.todo-filter-clear {
  margin-left: auto;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  border: 1.5px solid rgba(239,68,68,0.2);
  background: rgba(239,68,68,0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--danger);
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: inherit;
}

.todo-filter-clear:hover {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

.todo-list {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.todo-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.65);
  background: rgba(255,255,255,0.5);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 16px rgba(124,58,237,0.07), inset 0 1px 0 rgba(255,255,255,0.8);
  transition: transform 0.18s, box-shadow 0.18s, opacity 0.2s;
  animation: todoSlideIn 0.22s ease;
}

body.dark-mode .todo-item {
  background: rgba(255,255,255,0.05);
  border-color: rgba(167,139,250,0.15);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3), inset 0 1px 0 rgba(167,139,250,0.08);
}

.todo-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(124,58,237,0.12), inset 0 1px 0 rgba(255,255,255,0.9);
}

.todo-item.done { opacity: 0.5; }
.todo-item.done .todo-item-name { text-decoration: line-through; color: var(--muted); }

@keyframes todoSlideIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.todo-check {
  width: 26px; height: 26px; min-width: 26px;
  border-radius: 50%;
  border: 2px solid rgba(124,58,237,0.3);
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(8px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  transition: all 0.2s ease;
  font-family: inherit;
}

.todo-check:hover {
  border-color: var(--primary);
  background: rgba(124,58,237,0.08);
  transform: scale(1.1);
}

.todo-check.checked {
  background: linear-gradient(135deg, #10b981, #34d399);
  border-color: #10b981;
  box-shadow: 0 3px 10px rgba(16,185,129,0.4);
}

.todo-item-info { flex: 1; min-width: 0; }

.todo-item-name {
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.todo-item-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.todo-item-category {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(124,58,237,0.1);
  backdrop-filter: blur(6px);
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  border: 1px solid rgba(124,58,237,0.15);
}

.todo-item-amount { font-size: 12px; color: var(--muted); font-weight: 600; }

.todo-delete-btn {
  background: rgba(239,68,68,0.08);
  backdrop-filter: blur(8px);
  color: var(--danger);
  border: 1px solid rgba(239,68,68,0.15);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s;
  font-family: inherit;
  white-space: nowrap;
}

.todo-delete-btn:hover {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
  box-shadow: 0 4px 12px rgba(239,68,68,0.3);
}

.todo-empty {
  padding: 48px 24px;
  text-align: center;
  color: var(--muted);
  border-radius: 20px;
  font-size: 15px;
  font-weight: 600;
  background: rgba(255,255,255,0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px dashed rgba(124,58,237,0.2);
}

body.dark-mode .todo-empty {
  background: rgba(255,255,255,0.04);
  border-color: rgba(167,139,250,0.15);
}

.todo-empty-icon { font-size: 40px; display: block; margin-bottom: 12px; }

@media (max-width: 640px) {
  .todo-form-grid { grid-template-columns: 1fr 1fr; }
  .todo-form-grid .todo-input:first-child { grid-column: 1 / -1; }
  .todo-add-btn { grid-column: 1 / -1; width: 100%; }
  .todo-title { font-size: 24px; }
  .todo-filter-clear { margin-left: 0; width: 100%; text-align: center; }
}