/* ==========================================================
   components.css — Tekrar kullanılan arayüz parçaları
   ========================================================== */

/* ---------- Butonlar ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { filter: brightness(1.08); }
.btn--light { background: rgba(255, 255, 255, 0.18); color: #fff; }
.btn--light:hover { background: rgba(255, 255, 255, 0.28); }

.icon-btn {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
}
.icon-btn:hover { color: var(--text); border-color: var(--muted); }

/* ---------- Form ---------- */
.input {
  height: 42px;
  padding: 0 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: 0;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input.is-invalid { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }

.quick-add { display: flex; gap: 8px; flex: 1; min-width: min(100%, 300px); max-width: 480px; }
.quick-add .input { flex: 1; min-width: 0; }

/* ---------- Kart ---------- */
.card {
  min-width: 0;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card__title { font-size: 16px; font-weight: 650; }
.card__hint { font-size: 13px; color: var(--muted); }

.card--accent {
  background: var(--grad);
  border-color: transparent;
  color: #fff;
}
.card--accent .card__hint { color: rgba(255, 255, 255, 0.75); }

/* ---------- Rozet ---------- */
.badge {
  display: inline-flex; align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.badge--danger { background: var(--danger-soft); color: var(--danger); }

/* ---------- İstatistik kartı ---------- */
.stat {
  display: flex; align-items: center; gap: 14px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 0;
}
.stat__icon {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  flex-shrink: 0;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}
.stat--ok .stat__icon { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.stat--danger .stat__icon { background: var(--danger-soft); color: var(--danger); }
.stat--warn .stat__icon { background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); }
.stat__body { min-width: 0; }
.stat__label { font-size: 13px; color: var(--muted); }
.stat__value { font-size: 24px; font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
.stat__note { font-size: 12px; color: var(--muted); }

/* ---------- Görev listesi ---------- */
/* minmax(0, 1fr): tek satırlık (kesilen) açıklamalar sütunu sayfadan taşıracak kadar genişletmesin */
.task-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }

.task {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px;
  border-radius: var(--radius-sm);
}
.task:hover { background: var(--surface-2); }

.task__check {
  appearance: none;
  width: 20px; height: 20px;
  margin: 2px 0 0;
  flex-shrink: 0;
  border: 2px solid var(--muted);
  border-radius: 6px;
  background: none;
  cursor: pointer;
}
.task__check:checked {
  border-color: var(--ok);
  /* Onay işareti: küçük bir SVG'yi arka plan resmi olarak kullanıyoruz */
  background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 14px no-repeat;
}

.task__body { flex: 1; min-width: 0; }
.task__title { font-weight: 550; overflow-wrap: anywhere; }
.task.is-done .task__title { color: var(--muted); text-decoration: line-through; }

.task__meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px;
  margin-top: 3px;
  font-size: 12.5px;
  color: var(--muted);
}
.task__meta-item { display: inline-flex; align-items: center; gap: 5px; }

/* Başlığa tıklanınca görev penceresi açılır (dashboard) */
.task__open {
  display: block; width: 100%;
  padding: 0; border: 0; background: none;
  color: inherit; font: inherit; font-weight: 550; text-align: left;
  cursor: pointer;
}
.task__open:hover { color: var(--accent); }
.task.is-done .task__open { color: var(--muted); text-decoration: line-through; }

/* Alt görev sayacı = aç / kapat düğmesi */
.task__expand {
  display: inline-flex; align-items: center; gap: 5px;
  margin: -3px -6px; padding: 3px 6px;
  border: 0; border-radius: 6px; background: none;
  color: inherit; font: inherit; cursor: pointer;
}
.task__expand:hover { background: var(--surface-2); color: var(--text); }
.task__expand .icon { width: 15px; height: 15px; }
.task__chevron { transform: rotate(-90deg); transition: transform 0.15s ease; }
.task__expand[aria-expanded="true"] .task__chevron { transform: rotate(90deg); }

/* Görevin altında açılan alt görevler */
.task__subtasks { display: grid; gap: 2px; margin-top: 8px; padding-left: 2px; }
.task__subtask-label {
  display: flex; align-items: center; gap: 10px;
  padding: 5px 6px; border-radius: 6px;
  font-size: 14px; cursor: pointer; overflow-wrap: anywhere;
}
.task__subtask-label:hover { background: var(--surface-2); }
.task__subtask.is-done .task__subtask-label span { color: var(--muted); text-decoration: line-through; }
.task__check--sm { width: 17px; height: 17px; margin: 0; border-radius: 5px; }
.task__check--sm:checked { background-size: 12px; }
.task__meta-item--danger { color: var(--danger); font-weight: 600; }

/* Kategori noktası: rengi JS'ten --cat değişkeniyle gelir */
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cat, var(--muted)); }

/* Öncelik etiketi */
.priority {
  flex-shrink: 0;
  margin-top: 1px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--p);
  background: color-mix(in srgb, var(--p) 14%, transparent);
}
.priority--low { --p: var(--p-low); }
.priority--normal { --p: var(--p-normal); }
.priority--high { --p: var(--p-high); }
.priority--urgent { --p: var(--p-urgent); }

/* ---------- Boş durum ---------- */
.empty {
  display: grid; justify-items: center; gap: 6px;
  padding: 26px 12px;
  color: var(--muted);
  text-align: center;
}
.empty .icon { width: 28px; height: 28px; opacity: 0.7; }

/* ---------- Günlük hedefler ---------- */
.goal-row { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }

/* Halka: --p (0-100) değişkenine göre conic-gradient ile doldurulur */
.ring {
  --p: 0;
  position: relative;
  display: grid; place-items: center;
  width: 104px; height: 104px;
  flex-shrink: 0;
  border-radius: 50%;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--surface-2) 0);
}
.ring::before {
  content: "";
  position: absolute; inset: 11px;
  border-radius: 50%;
  background: var(--surface);
}
.ring__value { position: relative; font-size: 20px; font-weight: 700; }

.goal-list { flex: 1; min-width: 160px; display: grid; gap: 12px; }
.goal__top { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.goal__label { color: var(--muted); }
.goal__value { font-weight: 600; }

.bar { height: 7px; margin-top: 5px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bar__fill { height: 100%; border-radius: inherit; background: var(--cat, var(--accent)); }

/* ---------- Kategori dağılımı ---------- */
.bar-list { display: grid; gap: 12px; }
.bar-item__top { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.bar-item__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-item__count { font-weight: 600; }

/* ---------- Pomodoro önizleme ---------- */
.timer-preview {
  margin: 4px 0 16px;
  font-size: 46px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

/* ---------- Yer tutucu sayfa ---------- */
.placeholder {
  display: grid; justify-items: center; gap: 12px;
  max-width: 520px;
  margin: 6vh auto 0;
  padding: 36px 24px;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  text-align: center;
}
.placeholder__icon {
  display: grid; place-items: center;
  width: 60px; height: 60px;
  border-radius: 18px;
  background: var(--accent-soft);
  color: var(--accent);
}
.placeholder__icon .icon { width: 28px; height: 28px; }
.placeholder__list { display: grid; gap: 6px; margin: 4px 0 10px; color: var(--muted); font-size: 14px; }

/* ---------- Ek buton türleri ---------- */
.btn--ghost { background: var(--surface-2); color: var(--text); }
.btn--ghost:hover { border-color: var(--border); }
.btn--danger { background: var(--danger); color: #fff; }
.btn--danger:hover { filter: brightness(1.08); }

.icon-btn--sm { width: 34px; height: 34px; border-color: transparent; background: none; }
.icon-btn--sm:hover { background: var(--surface-2); border-color: transparent; }
.icon-btn--sm .icon { width: 18px; height: 18px; }

.link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

/* ---------- Görevler sayfası ---------- */
.segmented {
  display: inline-flex; gap: 4px;
  max-width: 100%;
  margin-bottom: 14px;
  padding: 4px;
  border-radius: 12px;
  background: var(--surface-2);
  overflow-x: auto;
}
.segmented__btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px;
  border: 0;
  border-radius: 9px;
  background: none;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.segmented__btn:hover { color: var(--text); }
.segmented__btn.is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.segmented__count { font-size: 12px; font-weight: 600; color: var(--muted); }

.task__desc {
  margin-top: 2px;
  font-size: 13.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.task__actions { display: flex; flex-shrink: 0; margin: -6px -4px 0 0; }

.data-note { margin-top: 14px; font-size: 13px; color: var(--muted); text-align: center; }

/* ---------- Pencere (dialog) ---------- */
.modal {
  width: min(580px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 20px 60px rgba(10, 12, 20, 0.35);
}
.modal--sm { width: min(420px, calc(100vw - 24px)); }
.modal::backdrop { background: rgba(10, 12, 20, 0.55); }
.modal__body { display: grid; gap: 14px; padding: 22px; }
.modal__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.modal__title { font-size: 18px; font-weight: 700; }
.modal__foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }

.field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.field label { font-size: 13px; font-weight: 600; }
.field .input { width: 100%; }
.field__error { font-size: 12.5px; color: var(--danger); }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.input--area { height: auto; min-height: 84px; padding: 10px 14px; resize: vertical; }

/* ---------- Aşama 3: filtreler, etiketler, listeler ---------- */
.btn--sm { height: 34px; padding: 0 14px; font-size: 14px; }
.icon-btn:disabled { opacity: 0.3; cursor: default; }

.toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.toolbar .input { flex: 1 1 150px; min-width: 0; max-width: 230px; height: 38px; font-size: 14px; }

.tag {
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
}

.section-title { margin: 22px 0 12px; font-size: 17px; font-weight: 700; }

.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.tile-grid--wide { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); align-items: start; }
.tile-grid > .empty { grid-column: 1 / -1; }

.tile { display: flex; flex-direction: column; gap: 14px; }
.tile__body { flex: 1; display: grid; gap: 6px; align-content: start; }
.tile__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

/* Genel satır (Kategoriler sayfası) */
.row { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: var(--radius-sm); }
.row:hover { background: var(--surface-2); }
.row__body { flex: 1; min-width: 0; }
.row__title { font-weight: 600; overflow-wrap: anywhere; }
.row__hint { font-size: 13px; color: var(--muted); }
.row .task__actions { margin: 0; }

.swatch {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  flex-shrink: 0;
  border-radius: 12px;
  background: color-mix(in srgb, var(--cat) 22%, transparent);
  border: 2px solid var(--cat);
  font-size: 18px;
}

/* Kontrol listesi kartı */
.checklist .card__head { align-items: flex-start; margin-bottom: 10px; }
.checklist .task__actions { margin: -4px -6px 0 0; }
.checklist__progress { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.checklist__progress .bar { flex: 1; margin-top: 0; }
.checklist__progress .bar__fill { background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width 0.3s ease; }
.checklist__count { font-size: 12.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.checklist__items { display: grid; gap: 2px; margin-bottom: 12px; }
.checklist__item { display: flex; align-items: center; gap: 4px; border-radius: var(--radius-sm); }
.checklist__item:hover { background: var(--surface-2); }
.checklist__label { flex: 1; min-width: 0; display: flex; align-items: flex-start; gap: 10px; padding: 7px 8px; cursor: pointer; }
.checklist__text { overflow-wrap: anywhere; }
.checklist__item.is-done .checklist__text { color: var(--muted); text-decoration: line-through; }

/* Satır içi ekleme (kutu + düğme) */
.inline-add { display: flex; gap: 8px; }
.inline-add .input { flex: 1; min-width: 0; height: 38px; }
.inline-add .btn { height: 38px; }

/* Madde düzenleyici (formlardaki alt görev / şablon maddeleri) */
.item-editor { display: grid; gap: 6px; }
.item-editor__row { display: flex; align-items: center; gap: 4px; }
.item-editor__row .task__check { margin: 0 6px 0 0; }
.item-editor__text { flex: 1; min-width: 0; height: 36px; }

.input--color { padding: 4px; cursor: pointer; }

/* Simge (emoji) seçici */
.field__label { font-size: 13px; font-weight: 600; }
.emoji-toggle { text-align: left; cursor: pointer; }
.emoji-panel {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
  grid-auto-rows: 40px; /* satırlar sıkışmasın, panel kaydırılsın */
  gap: 4px;
  max-height: 190px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  overflow-y: auto;
}
.emoji-btn {
  display: grid; place-items: center;
  height: 40px;
  border: 2px solid transparent;
  border-radius: 10px;
  background: none;
  font-size: 20px;
  cursor: pointer;
}
.emoji-btn:hover { background: var(--surface); }
.emoji-btn.is-active { border-color: var(--accent); background: var(--accent-soft); }
.emoji-btn--none { font-size: 12px; font-weight: 600; color: var(--muted); }

/* ---------- Aşama 4: Pomodoro ---------- */
.btn--lg { height: 48px; min-width: 130px; padding: 0 24px; font-size: 16px; }

.timer-card { display: grid; justify-items: center; gap: 18px; text-align: center; }
.timer-card .segmented { margin-bottom: 0; }
.timer-card__task { width: min(100%, 360px); text-align: left; }
.timer-card__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

/* Serbest mod: süre yazma alanı */
.custom-time { display: grid; justify-items: center; gap: 8px; }
.custom-time__inputs { display: flex; align-items: flex-start; gap: 6px; }
.custom-time__part { display: grid; justify-items: center; gap: 4px; }
.custom-time__part label { font-size: 12px; color: var(--muted); }
.custom-time__sep { height: 46px; line-height: 44px; font-size: 22px; font-weight: 700; color: var(--muted); }
.custom-time .input { width: 76px; height: 46px; padding: 0 6px; text-align: center; font-size: 20px; font-weight: 700; }
.custom-time__presets { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.chip {
  min-width: 44px;
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.is-active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.chip:disabled, .custom-time .input:disabled { opacity: 0.5; cursor: default; }

.ring--timer {
  --ring-w: 14px;
  width: min(260px, 70vw);
  height: min(260px, 70vw);
}
.ring__center { position: relative; display: grid; justify-items: center; gap: 2px; }
.ring--timer .ring__value {
  font-size: clamp(44px, 12vw, 58px);
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums; /* rakamlar eşit genişlikte: saat titremez */
}
.ring--timer.is-long .ring__value { font-size: clamp(34px, 9vw, 44px); } /* "1:30:00" sığsın */
.ring__label { font-size: 13px; color: var(--muted); }

.cycle { display: flex; gap: 8px; }
.cycle__dot { width: 12px; height: 12px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border); }
.cycle__dot.is-filled { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 8px var(--glow); }

.stat__icon--sm { width: 36px; height: 36px; border-radius: 10px; }
.stat__icon--sm .icon { width: 18px; height: 18px; }
.stat__icon--muted { background: var(--surface-2); color: var(--muted); }

.settings-form { display: grid; gap: 14px; }
.check-row { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.check-row .task__check { margin: 0; }
.notify-btn { margin-top: 12px; }
.field__value { color: var(--muted); font-weight: 500; }
.range { width: 100%; accent-color: var(--accent); cursor: pointer; }
.range:disabled, select.input:disabled, .btn:disabled { opacity: 0.5; cursor: default; }

/* ---------- Aşama 5: Planlayıcı ---------- */
.planner-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.planner-bar__nav { display: flex; align-items: center; gap: 8px; }
.planner-bar .segmented { margin-bottom: 0; }
.card--danger { border-color: color-mix(in srgb, var(--danger) 45%, transparent); }

/* Günlük zaman çizelgesi */
.timeline { max-height: 560px; overflow-y: auto; border-radius: var(--radius-sm); }
.timeline__inner { position: relative; }
.timeline__hour {
  position: absolute; left: 0; right: 0;
  display: flex; align-items: flex-start; /* düğme içeriği varsayılan olarak ortalanır; üste alıyoruz */
  padding: 0;
  border: 0;
  border-top: 1px solid var(--border);
  background: none;
  text-align: left;
  cursor: pointer;
}
.timeline__hour:hover { background: var(--surface-2); }
.timeline__label { display: block; width: 52px; padding: 4px 0 0 4px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.timeline__now { position: absolute; left: 52px; right: 0; height: 2px; background: var(--danger); pointer-events: none; }
.timeline__now::before { content: ""; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }

/* Zaman bloğu. --lane: kaçıncı şerit, --lanes: toplam şerit sayısı (planner.js verir) */
.block {
  position: absolute;
  left: calc(60px + (100% - 68px) * var(--lane) / var(--lanes));
  width: calc((100% - 68px) / var(--lanes) - 4px);
  display: flex; flex-direction: column; justify-content: center; gap: 1px;
  padding: 2px 8px;
  line-height: 1.25;
  border: 0;
  border-left: 4px solid var(--cat, var(--accent));
  border-radius: 8px;
  background: color-mix(in srgb, var(--cat, var(--accent)) 22%, var(--surface));
  color: var(--text);
  text-align: left;
  overflow: hidden;
  cursor: pointer;
}
.block:hover { filter: brightness(1.08); }
.block__title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.block__time { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.block.is-short { flex-direction: row; align-items: center; justify-content: flex-start; gap: 8px; }
.block.is-short .block__time { flex-shrink: 0; }
.block.is-done { opacity: 0.6; }
.block.is-done .block__title { text-decoration: line-through; }
.block.is-late { border-left-color: var(--danger); }

/* Hafta ve aydaki küçük görev etiketi */
.cal-chip {
  display: flex; align-items: baseline; gap: 5px;
  width: 100%;
  min-width: 0; /* uzun başlık hücreyi genişletmesin, "..." ile kısalsın */
  overflow: hidden;
  padding: 3px 7px;
  border: 0;
  border-left: 3px solid var(--cat, var(--accent));
  border-radius: 6px;
  background: color-mix(in srgb, var(--cat, var(--accent)) 16%, transparent);
  color: var(--text);
  font-size: 12.5px;
  text-align: left;
  cursor: pointer;
}
.cal-chip:hover { filter: brightness(1.1); }
.cal-chip__time { flex-shrink: 0; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cal-chip__title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-chip.is-done { opacity: 0.55; }
.cal-chip.is-done .cal-chip__title { text-decoration: line-through; }
.cal-chip.is-late { border-left-color: var(--danger); background: var(--danger-soft); }

/* Haftalık görünüm */
.week { display: grid; grid-template-columns: repeat(7, minmax(120px, 1fr)); gap: 8px; overflow-x: auto; }
.week__col { display: grid; grid-template-columns: minmax(0, 1fr); gap: 5px; align-content: start; min-width: 0; min-height: 180px; padding: 6px; border-radius: var(--radius-sm); background: var(--surface-2); }
.week__col.is-today { outline: 2px solid var(--accent); outline-offset: -2px; }
.week__head { display: flex; align-items: baseline; justify-content: space-between; padding: 4px 6px 8px; border: 0; background: none; color: var(--text); cursor: pointer; }
.week__head:hover .week__num { color: var(--accent); }
.week__name { font-size: 12px; font-weight: 600; color: var(--muted); }
.week__num { font-size: 18px; font-weight: 700; }
.week__empty { padding: 4px 6px; color: var(--muted); font-size: 13px; }

/* Aylık görünüm */
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.month__weekday { padding: 4px 0 8px; font-size: 12px; font-weight: 600; color: var(--muted); text-align: center; }
.month__cell { display: grid; grid-template-columns: minmax(0, 1fr); gap: 3px; align-content: start; min-width: 0; min-height: 104px; padding: 5px; border-radius: 10px; background: var(--surface-2); }
.month__cell.is-other { opacity: 0.45; }
.month__cell.is-today { outline: 2px solid var(--accent); outline-offset: -2px; }
.month__day { justify-self: start; min-width: 28px; height: 26px; padding: 0 6px; border: 0; border-radius: 8px; background: none; color: var(--text); font-weight: 700; cursor: pointer; }
.month__day:hover { background: var(--accent-soft); color: var(--accent); }
.month__cell.is-today .month__day { background: var(--accent); color: #fff; }
.month__more { padding: 0 4px; border: 0; background: none; color: var(--muted); font-size: 12px; text-align: left; cursor: pointer; }
.month__more:hover { color: var(--accent); }
.month__count { display: none; }

/* Dar ekranda ay hücreleri küçülür: etiketler gizlenir, yalnızca görev sayısı görünür */
@media (max-width: 700px) {
  .month__cell { min-height: 58px; justify-items: center; }
  .month__day { justify-self: center; }
  .month .cal-chip, .month__more { display: none; }
  .month__count {
    display: grid; place-items: center;
    min-width: 20px; height: 20px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 11px; font-weight: 700;
  }
}

/* ---------- Beyaz tahta ---------- */
.board-card { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.board-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.board-bar .segmented { margin-bottom: 0; }
.board-bar__group { display: flex; align-items: center; gap: 8px; }
.board-bar__size { font-size: 13px; font-weight: 600; }
.board-bar__size .range { width: 120px; }

/* Tahta her temada beyaz kağıt gibidir; noktalı zemin hizalamaya yardım eder. */
.board {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background-color: #ffffff;
  background-image: radial-gradient(#d5d9e6 1px, transparent 1px);
  background-size: 22px 22px;
  cursor: crosshair;
  touch-action: none; /* parmakla çizerken sayfa kaymasın */
}
.board.is-eraser { cursor: cell; }

.color-dot {
  width: 28px; height: 28px;
  padding: 0;
  flex-shrink: 0;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--dot);
  box-shadow: 0 0 0 1px var(--border);
  cursor: pointer;
}
.color-dot.is-active { box-shadow: 0 0 0 2px var(--accent); transform: scale(1.1); }
.color-dot--custom { background: conic-gradient(#ef4444, #eab308, #22c55e, #06b6d4, #6366f1, #ec4899, #ef4444); overflow: hidden; }
.color-dot--custom::-webkit-color-swatch-wrapper { padding: 0; }
.color-dot--custom::-webkit-color-swatch { border: 0; opacity: 0; }
.color-dot--custom::-moz-color-swatch { border: 0; opacity: 0; }

/* ---------- Ayarlar: seçenek düğmeleri ---------- */
.option-title { margin: 18px 0 10px; font-size: 13px; font-weight: 600; color: var(--muted); }
.option-title:first-of-type { margin-top: 0; }
.option-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.option {
  display: grid; gap: 8px; justify-items: start;
  padding: 10px;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text);
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.option:hover { border-color: var(--muted); }
.option.is-active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.option__swatch { width: 100%; height: 44px; border-radius: 8px; background: var(--grad); }
.option__swatch--light { background: linear-gradient(135deg, #ffffff, #dfe4f5); border: 1px solid #d5d9e6; }
.option__swatch--dark { background: linear-gradient(135deg, #1b1e2c, #090a13); border: 1px solid #2a2e40; }

/* Arka plan önizlemeleri: sahnenin küçük bir CSS çizimi */
.option--scene .option__swatch { background-image: none; background-color: color-mix(in srgb, var(--accent) 14%, var(--surface)); }
.option--scene[data-background-option="waves"] .option__swatch {
  background-image:
    radial-gradient(120% 90% at 30% 120%, color-mix(in srgb, var(--accent) 55%, transparent) 60%, transparent 61%),
    radial-gradient(120% 90% at 80% 135%, color-mix(in srgb, var(--accent-2) 55%, transparent) 60%, transparent 61%);
}
.option--scene[data-background-option="forest"] .option__swatch,
.option--scene[data-background-option="river"] .option__swatch {
  background-image:
    linear-gradient(to top, var(--scene-near) 22%, transparent 22%),
    conic-gradient(from 150deg at 22% 30%, var(--scene-mid) 60deg, transparent 0),
    conic-gradient(from 150deg at 50% 22%, var(--scene-near) 60deg, transparent 0),
    conic-gradient(from 150deg at 78% 34%, var(--scene-mid) 60deg, transparent 0);
}
.option--scene[data-background-option="river"] .option__swatch {
  background-image:
    linear-gradient(100deg, transparent 42%, var(--scene-water) 42%, var(--scene-water) 60%, transparent 60%),
    linear-gradient(to top, var(--scene-near) 22%, transparent 22%),
    conic-gradient(from 150deg at 20% 30%, var(--scene-mid) 60deg, transparent 0),
    conic-gradient(from 150deg at 80% 30%, var(--scene-mid) 60deg, transparent 0);
}

/* ---------- Pano (Kanban) ---------- */
.page-head__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.page-head__actions .input { min-width: 170px; }

.kanban { display: grid; grid-template-columns: repeat(3, minmax(250px, 1fr)); gap: 16px; align-items: start; overflow-x: auto; padding-bottom: 6px; }
.kanban__col {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: var(--glass);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  backdrop-filter: blur(18px) saturate(1.5);
  box-shadow: var(--shadow);
}
.kanban__col.is-drop-target { outline: 2px dashed var(--accent); outline-offset: -2px; }
.kanban__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kanban__title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.kanban__list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; align-content: start; min-height: 90px; }
.kanban__empty { padding: 22px 8px; border: 1px dashed var(--border); border-radius: var(--radius-sm); color: var(--muted); font-size: 13px; text-align: center; }
.kanban__drop { height: 4px; border-radius: 999px; background: var(--accent); box-shadow: 0 0 8px var(--glow); }

.kcard {
  display: grid; gap: 8px;
  padding: 12px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--cat, var(--border));
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow);
  cursor: grab;
}
.kcard:active { cursor: grabbing; }
.kcard.is-dragging { opacity: 0.4; }
.kcard.is-late { border-left-color: var(--danger); }
.kcard.is-done .kcard__title { color: var(--muted); text-decoration: line-through; }
.kcard__title {
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  font-weight: 600;
  text-align: left;
  overflow-wrap: anywhere;
  cursor: pointer;
}
.kcard__title:hover { color: var(--accent); }
.kcard .task__meta { margin-top: 0; }
.kcard__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kcard__moves { display: flex; margin: -4px -6px -4px 0; }

/* ---------- Aşama 6: hedefler, alışkanlıklar, notlar, seyahat ---------- */
.card.is-done { opacity: 0.75; }
.goal-card__value { margin-top: 6px; font-size: 14px; font-weight: 600; }
.goal-card__buttons { display: flex; gap: 6px; }

/* Alışkanlık satırı */
.habit { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 10px; border-radius: var(--radius-sm); }
.habit:hover { background: var(--surface-2); }
.habit__info { flex: 1 1 200px; min-width: 0; }
.habit__days { display: flex; gap: 6px; }
.habit .task__actions { margin: 0; }
.habit.is-met .row__title::after { content: " ✓"; color: var(--ok); }

.day-dot {
  width: 34px; height: 34px;
  padding: 0;
  border: 2px solid var(--border);
  border-radius: 50%;
  background: none;
  color: var(--muted);
  font-size: 12px; font-weight: 700;
  cursor: pointer;
}
.day-dot:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.day-dot.is-today { border-color: var(--accent); }
.day-dot.is-done { border-color: var(--ok); background: var(--ok); color: #fff; }
.day-dot:disabled { opacity: 0.35; cursor: default; }

/* Not kartı (kartın tamamı düğme) */
.note { display: grid; gap: 8px; align-content: start; color: var(--text); text-align: left; cursor: pointer; transition: transform 0.15s ease, box-shadow 0.2s ease; }
.note:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -16px var(--glow); }
.note__text {
  color: var(--muted);
  font-size: 14px;
  white-space: pre-line;   /* nottaki satır sonlarını koru */
  overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden;
}
.input--tall { min-height: 200px; }
.modal__foot--split { justify-content: space-between; }
.modal__foot-group { display: flex; gap: 8px; }
.btn--danger-text { color: var(--danger); }

/* Seyahat */
.trip.is-active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.trip__select { display: grid; gap: 4px; padding: 0; border: 0; background: none; color: var(--text); text-align: left; cursor: pointer; }
.trip__select:hover .card__title { color: var(--accent); }
.trip__notes { margin: -4px 0 14px; color: var(--muted); white-space: pre-line; }

.plan { display: grid; gap: 2px; margin-bottom: 12px; }
.plan__day { margin-top: 10px; padding: 4px 8px; font-size: 13px; font-weight: 700; color: var(--accent); }
.plan__day:first-child { margin-top: 0; }
.plan__item { display: flex; align-items: center; gap: 10px; padding: 4px 4px 4px 8px; border-radius: var(--radius-sm); }
.plan__item:hover { background: var(--surface-2); }
.plan__time { width: 46px; flex-shrink: 0; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.plan__title { flex: 1; min-width: 0; overflow-wrap: anywhere; }

.row--compact { padding: 4px 4px 4px 10px; }
.inline-add--wrap { flex-wrap: wrap; }
.inline-add--wrap .input { flex: 1 1 130px; }
.inline-add + select.input { margin-top: 8px; width: 100%; height: 38px; }

/* ---------- Aşama 8: hesap ve ortak panolar ---------- */
code { padding: 1px 6px; border-radius: 6px; background: var(--surface-2); font-family: Consolas, "Courier New", monospace; font-size: 0.92em; }
.account-modes { margin: 14px 0; }
.account-form { max-width: 420px; }
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; white-space: nowrap; }
.admin-table th, .admin-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); }
.admin-table th { color: var(--muted); font-weight: 600; font-size: 13px; }
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-name { font-weight: 600; margin-right: 8px; }
.admin-actions { text-align: right; }
/* Hesap penceresi: giriş yapılmış hal, ortalanmış profil */
.account-profile { display: grid; justify-items: center; gap: 2px; margin: 4px 0 16px; text-align: center; }
.account-profile__avatar {
  display: grid; place-items: center;
  width: 64px; height: 64px; margin-bottom: 8px;
  border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  font-size: 26px; font-weight: 700;
}
.account-profile__avatar .icon { width: 30px; height: 30px; }
.account-profile__name { font-size: 18px; font-weight: 700; overflow-wrap: anywhere; }
.account-profile__email { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.account-sync {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.account-sync > .icon { color: var(--accent); }
.account-sync__text { flex: 1 1 160px; min-width: 0; }
.account-sync__text .page-sub { margin-top: 0; font-size: 13px; }
.account-sync__title { font-weight: 600; }
.account-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }

/* Üst çubuktaki eşitleme düğmesi: sağ alttaki nokta durumu gösterir */
.sync-btn { position: relative; }
.sync-btn::after {
  content: ""; position: absolute; right: 7px; bottom: 7px;
  width: 8px; height: 8px; border-radius: 50%;
  border: 2px solid var(--surface);
  background: var(--ok);
}
.sync-btn[data-state="pending"]::after { background: var(--warn); }
.sync-btn[data-state="offline"]::after { background: var(--muted); }
.sync-btn[data-state="error"]::after { background: var(--danger); }
.sync-btn[data-state="syncing"]::after { background: var(--accent); animation: sync-pulse 0.9s ease-in-out infinite alternate; }
@keyframes sync-pulse { from { opacity: 0.35; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .sync-btn[data-state="syncing"]::after { animation: none; }
}

.account-note { margin-top: 12px; font-size: 0.85rem; color: var(--muted); }
.account-note a, .account-danger a { color: var(--accent); }
.account-danger { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 18px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); font-size: 0.9rem; }
.verify-box { display: grid; gap: 10px; justify-items: start; margin: 12px 0; padding: 12px 14px; border: 1px solid var(--warn); border-radius: var(--radius-sm); background: color-mix(in srgb, var(--warn) 12%, transparent); }

.invite-list { display: grid; gap: 10px; margin-bottom: 16px; }
.invite { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; border-color: var(--accent); }
.invite__text { font-weight: 600; }
.invite__actions { display: flex; gap: 8px; }

.new-board { max-width: 520px; margin-bottom: 16px; }
.new-board .input, .new-board .btn { height: 42px; }

.board-tile { display: grid; gap: 4px; color: var(--text); text-align: left; cursor: pointer; }
.board-tile:hover .card__title { color: var(--accent); }
.board-tile.is-active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.board-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.board-head .section-title { margin-bottom: 12px; }
#boardDetail > .card { margin-bottom: 16px; }

.members { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.member { display: inline-flex; align-items: center; gap: 2px; padding: 3px 4px 3px 12px; border-radius: 999px; background: var(--surface-2); font-size: 14px; font-weight: 600; }
.member__name { padding: 4px 8px 4px 0; }
.member .icon-btn--sm { width: 28px; height: 28px; }
.invite-form { margin-bottom: 8px; max-width: 520px; }

/* ---------- Ayarlar kartları ---------- */
.settings-card { margin-top: 16px; }
.settings-card--first { margin-top: 0; }
.profile-field { max-width: 420px; }
.welcome__logo { border-radius: 16px; }
.settings-card__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

/* ---------- Dar ekran düzeltmeleri (telefon) ---------- */
@media (max-width: 600px) {
  /* Düğmeli görev satırı: başlık tüm genişliği kullanır; öncelik ve düğmeler alt satıra iner */
  .task--full { flex-wrap: wrap; row-gap: 6px; }
  .task--full .task__body { flex: 1 1 calc(100% - 32px); }
  .task--full .priority { margin: 0 0 0 32px; }
  .task--full .task__actions { margin: -4px -4px -4px auto; }

  /* Filtre kutuları ikişerli, eşit genişlikte */
  .toolbar .input { flex: 1 1 calc(50% - 4px); max-width: none; }

  /* Sayfa başlığındaki düğmeler tam genişlik */
  .page-head > .btn, .page-head__actions { width: 100%; }
  .page-head__actions > * { flex: 1 1 auto; }

  /* Sekme düğmeleri sığmazsa yatay kaydırılır, sayfayı genişletmez */
  .segmented { display: flex; }
  .segmented__btn { flex: 1 0 auto; justify-content: center; padding-inline: 10px; }

  .modal__body { padding: 16px; }
  .tile-grid, .tile-grid--wide { grid-template-columns: minmax(0, 1fr); }

  /* Beyaz tahta araç çubuğu: gruplar alt alta, içerik sığmazsa satır atlar */
  .board-bar { gap: 10px; }
  .board-bar__group { flex-wrap: wrap; min-width: 0; max-width: 100%; }
  .board-bar__size { width: 100%; }
  .board-bar__size .range { flex: 1; width: auto; min-width: 0; }
  .board-bar .segmented { max-width: 100%; }
}

/* ---------- Toast ---------- */
.toast {
  /* popover özelliğinin tarayıcı varsayılanlarını sıfırla */
  inset: auto;
  margin: 0;
  border: 0;
  position: fixed;
  left: 50%; bottom: 24px;
  z-index: 50;
  transform: translateX(-50%);
  max-width: calc(100vw - 32px);
  padding: 11px 18px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow);
}

@media (max-width: 860px) {
  .stat { padding: 14px; gap: 10px; }
  .stat__icon { width: 38px; height: 38px; }
  .stat__value { font-size: 20px; }
  .card { padding: 16px; }
  .quick-add { max-width: none; }
}
