/* Bağımsız Todo.html sayfası */
.todo-standalone-body {
  margin: 0;
  min-height: 100vh;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  color: #1e293b;
}

.todo-standalone-wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 20px 48px;
}

.todo-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #6d28d9;
  text-decoration: none;
  transition: color 0.2s;
}

.todo-back-link:hover {
  color: #5b21b6;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Alışveriş notları — ana uygulama içi (#page-todo) ve Todo.html uyumu */

#page-todo .todo-page,
.todo-page {
  position: relative;
  padding: 8px 4px 32px;
  min-height: 60vh;
  overflow: hidden;
  border-radius: 24px;
  isolation: isolate;
}

#page-todo .todo-bg-orb,
.todo-bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.45;
  pointer-events: none;
  z-index: 0;
}

.todo-orb-1 {
  width: 220px;
  height: 220px;
  background: #a78bfa;
  top: -40px;
  right: -20px;
}

.todo-orb-2 {
  width: 180px;
  height: 180px;
  background: #34d399;
  bottom: 10%;
  left: -30px;
}

.todo-orb-3 {
  width: 120px;
  height: 120px;
  background: #7c3aed;
  top: 40%;
  right: 15%;
  opacity: 0.3;
}

#page-todo .todo-header,
.todo-header {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.todo-title-block {
  max-width: 520px;
}

.todo-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #7c3aed;
  margin-bottom: 8px;
}

.todo-title {
  font-size: clamp(1.5rem, 2.2vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #1e293b;
  margin: 0 0 8px 0;
  line-height: 1.2;
}

.todo-subtitle {
  margin: 0;
  color: #64748b;
  font-size: 1rem;
  line-height: 1.55;
  max-width: 46ch;
}

.todo-counters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.todo-counter-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  padding: 10px 16px;
  background: #fff;
  border: 1px solid #e9e0ff;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(76, 29, 149, 0.08);
}

.todo-counter-pill .counter-num {
  font-size: 1.35rem;
  font-weight: 800;
  color: #1e293b;
  line-height: 1.1;
}

.todo-counter-pill .counter-label {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 600;
}

.todo-counter-done {
  border-color: rgba(16, 185, 129, 0.35);
  background: linear-gradient(180deg, #ecfdf5 0%, #fff 100%);
}

.todo-counter-done .counter-num {
  color: #059669;
}

#page-todo .todo-form-glass,
.todo-form-glass {
  position: relative;
  z-index: 3;
  padding: 18px 18px 20px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(124, 58, 237, 0.15);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(76, 29, 149, 0.08);
  margin-bottom: 20px;
}

.todo-form-grid {
  display: grid;
  grid-template-columns: 1fr 100px 160px auto;
  gap: 10px;
  align-items: stretch;
}

@media (max-width: 900px) {
  .todo-form-grid {
    grid-template-columns: 1fr 1fr;
  }

  .todo-form-grid .todo-add-btn {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  .todo-form-grid {
    grid-template-columns: 1fr;
  }
}

.todo-input {
  height: 48px;
  padding: 0 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  font-size: 0.95rem;
  font-family: inherit;
  background: #fff;
  color: #1e293b;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.todo-input:focus {
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.todo-input::placeholder {
  color: #94a3b8;
}

.todo-input-sm {
  min-width: 0;
}

.todo-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.todo-add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #5b21b6, #7c3aed 55%, #8b5cf6);
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(109, 40, 217, 0.35);
  transition: transform 0.15s, box-shadow 0.2s;
  position: relative;
  z-index: 1;
}

.todo-add-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(109, 40, 217, 0.45);
}

.todo-add-icon {
  font-size: 1.2rem;
  font-weight: 300;
  line-height: 1;
  opacity: 0.95;
}

.todo-filter-section {
  position: relative;
  z-index: 1;
  margin-bottom: 16px;
}

.todo-filter-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #64748b;
  margin-bottom: 8px;
}

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

.todo-filters--row {
  width: 100%;
}

.todo-filters--tags {
  width: 100%;
  margin-bottom: 0;
}

.todo-filter-btn {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  color: #64748b;
  font-weight: 700;
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
  transition: 0.2s;
}

.todo-filter-btn:hover {
  border-color: #c4b5fd;
  color: #5b21b6;
}

.todo-filter-btn.active {
  background: #ede9fe;
  border-color: #7c3aed;
  color: #5b21b6;
}

.todo-filter-clear {
  margin-left: auto;
  padding: 8px 12px;
  background: transparent;
  border: none;
  color: #ef4444;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  font-family: inherit;
}

.todo-filter-clear:hover {
  text-decoration: underline;
}

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

.todo-list--sticky {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 18px;
  align-items: start;
}

/* Etiket filtreleri */
.todo-tag-filter {
  padding: 8px 14px;
  border-radius: 12px;
  border: 2px solid #e2e8f0;
  background: #fff;
  color: #475569;
  font-weight: 800;
  font-size: 0.82rem;
  font-family: inherit;
  cursor: pointer;
  transition: 0.2s;
}

.todo-tag-filter:hover {
  border-color: #a78bfa;
}

.todo-tag-filter.active {
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.todo-tag--alis.active {
  background: #ca8a04;
  border-color: #a16207;
}

.todo-tag--guz.active {
  background: #db2777;
  border-color: #be185d;
}

.todo-tag--ozel.active {
  background: #4f46e5;
  border-color: #4338ca;
}

.todo-tag-filter[data-tag="all"].active {
  background: #334155;
  border-color: #1e293b;
  color: #fff;
}

.todo-sticky {
  position: relative;
  border-radius: 4px 4px 10px 10px;
  box-shadow:
    2px 5px 12px rgba(15, 23, 42, 0.12),
    0 0 0 1px rgba(0, 0, 0, 0.04) inset;
  transform: rotate(var(--sticky-rotate, 0deg));
  transition: transform 0.2s, box-shadow 0.2s;
}

.todo-sticky:hover {
  z-index: 2;
  box-shadow:
    3px 10px 22px rgba(15, 23, 42, 0.18),
    0 0 0 1px rgba(0, 0, 0, 0.05) inset;
}

.todo-sticky--alisveris .todo-sticky-inner {
  background: linear-gradient(145deg, #fffbeb 0%, #fef3c7 50%, #fde68a 100%);
}

.todo-sticky--guzellik .todo-sticky-inner {
  background: linear-gradient(145deg, #fdf2f8 0%, #fce7f3 45%, #fbcfe8 100%);
}

.todo-sticky--ozel .todo-sticky-inner {
  background: linear-gradient(145deg, #eef2ff 0%, #e0e7ff 50%, #c7d2fe 100%);
}

.todo-sticky-inner {
  position: relative;
  padding: 14px 12px 12px 14px;
  min-height: 130px;
  color: #1e293b;
}

.todo-sticky.is-done .todo-sticky-inner {
  opacity: 0.88;
  filter: saturate(0.65);
}

.todo-sticky.is-done .todo-sticky-title {
  text-decoration: line-through;
  color: #64748b;
}

.todo-sticky-pin {
  position: absolute;
  top: -4px;
  right: 12px;
  font-size: 1.1rem;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.15));
  z-index: 1;
}

.todo-sticky-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #fff;
  padding: 4px 8px;
  border-radius: 6px;
  margin-bottom: 8px;
}

.todo-sticky--alisveris .todo-sticky-badge {
  background: #b45309;
}

.todo-sticky--guzellik .todo-sticky-badge {
  background: #be185d;
}

.todo-sticky--ozel .todo-sticky-badge {
  background: #4338ca;
}

.todo-sticky-checkrow {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-top: 2px;
}

.todo-sticky .todo-check {
  flex-shrink: 0;
  width: 32px;
  min-height: 32px;
  border-radius: 8px;
  border: 2px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.55);
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  color: #64748b;
  transition: 0.2s;
  margin-top: 2px;
}

.todo-sticky .todo-check:hover {
  border-color: #5b21b6;
  color: #5b21b6;
}

.todo-sticky .todo-check.checked {
  background: linear-gradient(135deg, #059669, #10b981);
  border-color: transparent;
  color: #fff;
}

.todo-sticky-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.35;
  word-break: break-word;
  flex: 1;
  min-width: 0;
}

.todo-sticky-legacy {
  margin: 6px 0 0;
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.35;
}

.todo-sticky-amount {
  margin: 8px 0 0;
  font-size: 0.8rem;
  font-weight: 700;
  color: #0f172a;
}

.todo-sticky-bar {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed rgba(15, 23, 42, 0.12);
}

.todo-sticky-del {
  padding: 6px 10px;
  font-size: 0.75rem;
  font-weight: 800;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.55);
  color: #b91c1c;
  cursor: pointer;
  font-family: inherit;
}

.todo-sticky-del:hover {
  background: #fef2f2;
}

.todo-empty {
  text-align: center;
  padding: 48px 20px;
  color: #64748b;
  background: #f8fafc;
  border: 1px dashed #e2e8f0;
  border-radius: 20px;
  font-size: 1rem;
  line-height: 1.5;
}

.todo-empty-icon {
  display: block;
  font-size: 2rem;
  margin-bottom: 8px;
}

/* Dark mode */
body.dark-mode .todo-title,
body.dark-mode .todo-sticky-title {
  color: var(--text);
}

body.dark-mode .todo-subtitle,
body.dark-mode .todo-counter-pill .counter-label,
body.dark-mode .todo-filter-label {
  color: var(--muted);
}

body.dark-mode .todo-form-glass {
  background: rgba(15, 23, 42, 0.65);
  border-color: rgba(124, 58, 237, 0.25);
}

body.dark-mode .todo-input,
body.dark-mode .todo-counter-pill,
body.dark-mode .todo-filter-btn,
body.dark-mode .todo-tag-filter {
  background: #111827;
  border-color: var(--border);
  color: var(--text);
}

body.dark-mode .todo-filter-btn.active {
  background: #312e81;
  border-color: #7c3aed;
  color: #e9d5ff;
}

body.dark-mode .todo-empty {
  background: #111827;
  border-color: var(--border);
  color: var(--muted);
}

body.dark-mode .todo-sticky {
  box-shadow: 2px 8px 24px rgba(0, 0, 0, 0.35);
}
