/* Planladın mı? — tasarım sistemi (koyu tema, tek tema). Bkz. docs Bölüm 7. */

/* --- Yazı tipi: Inter (self-host, Türkçe karakterler için latin + latin-ext) ---- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-ext-wght-normal.1ad231aac0a8.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0,
    U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-wght-normal.260c81a4759b.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}

/* --- Renk ve ölçü değişkenleri -------------------------------------------------- */
:root {
  --bg: #0d1117;
  --surface: #151b23;
  --surface-2: #1c2430;
  --border: #283140;
  --text: #e7ecf3;
  --text-muted: #8b96a8;
  --text-faint: #8590a3;

  --primary: #8b7cff;
  --primary-soft: rgba(139, 124, 255, 0.14);
  --primary-text: #a89eff; /* --primary-soft zemin üzerinde küçük metin için (WCAG AA) */
  --success: #3ddc97;
  --warning: #ffb454;
  --danger: #ff6b6b;

  --cat-1: #8b7cff;
  --cat-2: #4cc9f0;
  --cat-3: #3ddc97;
  --cat-4: #ffd166;
  --cat-5: #ff9f6b;
  --cat-6: #ff6b9a;
  --cat-7: #b8c0cc;
  --cat-8: #c084fc;

  --radius-card: 16px;
  --radius-control: 10px;
  --radius-pill: 999px;

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --dur: 200ms;

  /* Bootstrap değişkenlerini temaya bağla */
  --bs-body-font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bs-body-font-size: 0.9375rem;
  --bs-body-line-height: 1.5;
  --bs-body-bg: var(--bg);
  --bs-body-color: var(--text);
  --bs-border-color: var(--border);
  --bs-primary: var(--primary);
  --bs-link-color: var(--primary);
  --bs-link-hover-color: #a89eff;
}

html {
  color-scheme: dark;
}

body {
  min-height: 100vh;
  background-color: var(--bg);
  /* Sol üstte çok hafif mor ışıma: düz siyahtan daha canlı */
  background-image: radial-gradient(
    ellipse 60% 50% at 0% 0%,
    rgba(139, 124, 255, 0.04),
    transparent 70%
  );
  background-attachment: fixed;
  font-variant-numeric: normal;
}

h1,
h2,
h3 {
  font-weight: 600;
}

h1 {
  font-size: 1.75rem;
}
h2 {
  font-size: 1.25rem;
}
h3 {
  font-size: 1rem;
}

.tabular {
  font-variant-numeric: tabular-nums;
}

.text-muted-app {
  color: var(--text-muted);
}

/* --- Erişilebilirlik ------------------------------------------------------------ */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --- Bileşenler ----------------------------------------------------------------- */
.card-app {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.8125rem;
  font-weight: 500;
}

/* --- Herkese açık sayfalar (landing, giriş/kayıt) ------------------------------- */
.public-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.public-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
}

.hero {
  max-width: 36rem;
  text-align: center;
}

.hero-mark {
  width: 64px;
  height: 64px;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: clamp(2.25rem, 7vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.hero-sub {
  color: var(--text-muted);
  font-size: 1.0625rem;
  margin-bottom: 1.5rem;
}

.public-footer {
  padding: 1.5rem 1rem;
  text-align: center;
  color: var(--text-faint);
  font-size: 0.8125rem;
}

/* ================= Faz 1: auth, uygulama iskeleti, landing ================= */

.skip-link {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  z-index: 2000;
  padding: 0.5rem 0.75rem;
  background: var(--primary);
  color: #0d1117;
  border-radius: var(--radius-control);
  font-weight: 600;
}
.skip-link:focus {
  left: 0.75rem;
}

/* --- Bootstrap bileşenlerini temaya uydur ---------------------------------- */
.btn {
  --bs-btn-border-radius: var(--radius-control);
  --bs-btn-font-weight: 600;
  --bs-btn-padding-y: 0.55rem;
  --bs-btn-padding-x: 1rem;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease),
    color var(--dur) var(--ease);
}
.btn-primary {
  --bs-btn-color: #0d1117;
  --bs-btn-bg: var(--primary);
  --bs-btn-border-color: var(--primary);
  --bs-btn-hover-color: #0d1117;
  --bs-btn-hover-bg: #a094ff;
  --bs-btn-hover-border-color: #a094ff;
  --bs-btn-active-color: #0d1117;
  --bs-btn-active-bg: #7a6af0;
  --bs-btn-active-border-color: #7a6af0;
  --bs-btn-focus-shadow-rgb: 139, 124, 255;
}
.btn-outline-secondary {
  --bs-btn-color: var(--text);
  --bs-btn-border-color: var(--border);
  --bs-btn-hover-color: var(--text);
  --bs-btn-hover-bg: var(--surface-2);
  --bs-btn-hover-border-color: var(--text-faint);
  --bs-btn-active-color: var(--text);
  --bs-btn-active-bg: var(--surface-2);
  --bs-btn-active-border-color: var(--text-faint);
}
.btn-outline-danger {
  --bs-btn-color: var(--danger);
  --bs-btn-border-color: rgba(255, 107, 107, 0.4);
  --bs-btn-hover-bg: rgba(255, 107, 107, 0.12);
  --bs-btn-hover-color: var(--danger);
  --bs-btn-hover-border-color: var(--danger);
}
.btn-link {
  --bs-btn-color: var(--primary);
  --bs-btn-hover-color: #a094ff;
}
.btn-google {
  background: #fff;
  color: #1f1f1f;
  border: 1px solid #dadce0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.7rem 1rem;
  font-weight: 600;
}
.btn-google:hover {
  background: #f1f3f4;
  color: #1f1f1f;
}

.form-control,
.form-select {
  background-color: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-control);
  padding: 0.6rem 0.8rem;
}
.form-control:focus,
.form-select:focus {
  background-color: var(--surface-2);
  color: var(--text);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.form-control::placeholder {
  color: var(--text-faint);
}
.form-label {
  font-weight: 500;
  margin-bottom: 0.35rem;
}
.form-text,
.form-text ul {
  color: var(--text-muted);
  font-size: 0.8125rem;
}
.form-text ul {
  padding-left: 1.1rem;
  margin: 0.35rem 0 0;
}
.form-check-input:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}

.alert {
  border-radius: var(--radius-control);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
}
.alert-success {
  border-color: rgba(61, 220, 151, 0.4);
  background: rgba(61, 220, 151, 0.08);
}
.alert-danger {
  border-color: rgba(255, 107, 107, 0.4);
  background: rgba(255, 107, 107, 0.08);
}
.alert-warning {
  border-color: rgba(255, 180, 84, 0.4);
  background: rgba(255, 180, 84, 0.08);
}
.alert-info {
  border-color: rgba(139, 124, 255, 0.4);
  background: var(--primary-soft);
}
.flash-stack {
  margin-bottom: 1rem;
}

.badge {
  font-weight: 500;
  border-radius: var(--radius-pill);
}
.badge-ok {
  background: rgba(61, 220, 151, 0.14);
  color: var(--success);
}
.badge-muted {
  background: var(--surface-2);
  color: var(--text-muted);
}

.dropdown-menu {
  --bs-dropdown-bg: var(--surface);
  --bs-dropdown-border-color: var(--border);
  --bs-dropdown-border-radius: var(--radius-control);
  --bs-dropdown-link-color: var(--text);
  --bs-dropdown-link-hover-bg: var(--surface-2);
  --bs-dropdown-link-hover-color: var(--text);
  --bs-dropdown-header-color: var(--text-muted);
  --bs-dropdown-divider-bg: var(--border);
  min-width: 14rem;
}
.dropdown-header {
  text-overflow: ellipsis;
  overflow: hidden;
  max-width: 18rem;
}
.dropdown-item {
  display: flex;
  align-items: center;
  width: 100%;
}

/* --- Herkese açık sayfalar ---------------------------------------------------- */
.public-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.public-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem;
}
.public-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.brand:hover {
  color: var(--text);
}
.logo-mark {
  width: 28px;
  height: 28px;
  flex: none;
}
.public-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

/* --- Giriş / kayıt kartı ------------------------------------------------------- */
.auth-card {
  width: min(26rem, calc(100% - 2rem));
  margin: auto;
  padding: 2rem 1.75rem;
  flex: none;
}
.auth-head {
  text-align: center;
  margin-bottom: 1.5rem;
}
.auth-head .logo-mark {
  width: 44px;
  height: 44px;
  margin-bottom: 0.75rem;
}
.auth-head h1 {
  font-size: 1.375rem;
  margin-bottom: 0.35rem;
}
.auth-head p {
  color: var(--text-muted);
  margin: 0;
}
.auth-icon {
  font-size: 2.25rem;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 0.75rem;
}
.divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0;
  color: var(--text-faint);
  font-size: 0.8125rem;
}
.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
.auth-links,
.auth-foot {
  text-align: center;
  margin: 1rem 0 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* --- Uygulama iskeleti --------------------------------------------------------- */
.app-shell {
  min-height: 100vh;
}
.page {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
}
.page-head {
  margin-bottom: 1.5rem;
}
.page-head h1 {
  margin-bottom: 0.25rem;
}
.empty-state {
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
}
.empty-state .bi {
  display: block;
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.nav-item-app {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-control);
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.nav-item-app .bi {
  font-size: 1.15rem;
}
.nav-item-app:hover {
  background: var(--surface-2);
  color: var(--text);
}
.nav-item-app.active {
  background: var(--primary-soft);
  color: var(--primary-text);
}

.avatar {
  width: 32px;
  height: 32px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 700;
}
.profile-trigger {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.4rem;
  background: transparent;
  border: 0;
  border-radius: var(--radius-control);
  color: var(--text);
  text-align: left;
}
.profile-trigger:hover {
  background: var(--surface-2);
}
.profile-name {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}
.profile-name-main {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-name-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  overflow-y: hidden;
}
.settings-tab {
  padding: 0.6rem 0.9rem;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-weight: 500;
}
.settings-tab:hover {
  color: var(--text);
}
.settings-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* Mobil: üst çubuk + alt sekme çubuğu */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  background: rgba(13, 17, 23, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.topbar .profile-trigger {
  width: auto;
  padding: 0.2rem;
}
.app-main {
  padding: 1.25rem 1rem calc(5.5rem + env(safe-area-inset-bottom));
}
.tabbar {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 100;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 0.35rem 0.5rem calc(0.35rem + env(safe-area-inset-bottom));
  background: rgba(21, 27, 35, 0.95);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--border);
}
.tabbar .nav-item-app {
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.4rem 0.25rem;
  font-size: 0.6875rem;
}
.tabbar .nav-item-app .bi {
  font-size: 1.25rem;
}

/* Masaüstü: sol menü */
@media (min-width: 992px) {
  .app-shell {
    display: grid;
    grid-template-columns: 15rem 1fr;
  }
  .sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.25rem 0.9rem;
    background: var(--surface);
    border-right: 1px solid var(--border);
  }
  .sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
  }
  .sidebar-foot {
    margin-top: auto;
  }
  .app-main {
    padding: 2.5rem 2rem 3rem;
  }
}

/* --- Landing --------------------------------------------------------------------- */
.landing-main {
  flex: 1;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}
.hero-split {
  display: grid;
  gap: 2.5rem;
  align-items: center;
  padding: 1.5rem 0 3rem;
}
.hero-title {
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 1rem;
}
.hero-sub {
  color: var(--text-muted);
  font-size: 1.125rem;
  max-width: 32rem;
  margin-bottom: 1.75rem;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.preview {
  padding: 1.25rem;
  max-width: 26rem;
  width: 100%;
  margin-inline: auto;
}
.preview-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}
.preview-greeting {
  font-weight: 600;
  font-size: 1.0625rem;
}
.preview-date,
.preview-sub {
  color: var(--text-muted);
  font-size: 0.8125rem;
}
.preview-streak {
  color: var(--warning);
  font-weight: 600;
  font-size: 0.875rem;
}
.preview-progress {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem;
  margin-bottom: 1rem;
  background: var(--surface-2);
  border-radius: var(--radius-control);
}
.preview-count {
  font-size: 0.9375rem;
}
.preview-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0.25rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.9375rem;
}
.preview-row.done > span:last-child,
.preview-row.done > span:nth-child(3) {
  color: var(--text-faint);
  text-decoration: line-through;
}
.preview-row .time {
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  font-size: 0.8125rem;
  min-width: 2.6rem;
}
.preview-row .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-left: auto;
}
.check {
  width: 20px;
  height: 20px;
  flex: none;
  border: 2px solid var(--border);
  border-radius: 50%;
}
.check.done {
  background: var(--success);
  border-color: var(--success);
  position: relative;
}
.check.done::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: solid #0d1117;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.preview-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}
.pchip {
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  color: var(--text-muted);
}
.pchip.on {
  background: rgba(61, 220, 151, 0.14);
  border-color: rgba(61, 220, 151, 0.4);
  color: var(--success);
}

.features {
  display: grid;
  gap: 1rem;
}
.feature {
  padding: 1.5rem;
}
.feature .bi {
  font-size: 1.5rem;
  color: var(--primary);
}
.feature h2 {
  margin: 0.75rem 0 0.35rem;
}
.feature p {
  margin: 0;
  color: var(--text-muted);
}

@media (min-width: 768px) {
  .features {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (min-width: 992px) {
  .hero-split {
    grid-template-columns: 1.1fr 0.9fr;
    padding: 3rem 0 4rem;
  }
}
/* ================= Faz 2: görevler, Bugün, Yaklaşan ================= */

[x-cloak] {
  display: none !important;
}

/* Kategori renkleri: satır içi stil yerine sınıf (cat-0 = kategorisiz) */
.cat-0 { --cat: var(--border); }
.cat-1 { --cat: var(--cat-1); }
.cat-2 { --cat: var(--cat-2); }
.cat-3 { --cat: var(--cat-3); }
.cat-4 { --cat: var(--cat-4); }
.cat-5 { --cat: var(--cat-5); }
.cat-6 { --cat: var(--cat-6); }
.cat-7 { --cat: var(--cat-7); }
.cat-8 { --cat: var(--cat-8); }

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--cat, var(--border));
}
.dot-lg {
  width: 14px;
  height: 14px;
}

.eyebrow {
  margin: 0 0 0.15rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}
.page-head-split {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}
.week-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* --- Küçük ikon düğmeleri ------------------------------------------------------------ */
.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--text-muted);
  font-size: 1.05rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.icon-btn:hover {
  background: var(--surface-2);
  color: var(--text);
}
.icon-btn.active {
  color: var(--primary);
  background: var(--primary-soft);
}
.icon-btn:focus-within {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.icon-btn-danger:hover {
  color: var(--danger);
  background: rgba(255, 107, 107, 0.12);
}

/* --- İlerleme kartı ------------------------------------------------------------------ */
.progress-card {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 1.1rem 1.25rem;
  margin-bottom: 1rem;
}
.ring {
  position: relative;
  width: 80px;
  height: 80px;
  flex: none;
}
.ring svg {
  display: block;
  width: 100%;
  height: 100%;
}
.ring-bg,
.ring-fg {
  fill: none;
  stroke-width: 8;
}
.ring-bg {
  stroke: var(--border);
}
.ring-fg {
  stroke: var(--success);
  stroke-linecap: round;
  transition: stroke-dashoffset 600ms var(--ease);
}
.ring-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  font-weight: 700;
}
.progress-main {
  font-size: 1.0625rem;
}
.progress-sub {
  color: var(--text-muted);
  font-size: 0.875rem;
}
.tabular {
  font-variant-numeric: tabular-nums;
}

/* --- Hızlı ekleme ---------------------------------------------------------------------- */
.quick-add {
  padding: 0.5rem 0.6rem;
  margin-bottom: 1.5rem;
  transition: border-color var(--dur) var(--ease);
}
.quick-add:focus-within {
  border-color: var(--primary);
}
.quick-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.quick-plus {
  padding: 0 0.35rem 0 0.5rem;
  color: var(--primary);
  font-size: 1.1rem;
}
.quick-input {
  flex: 1;
  min-width: 0;
  padding: 0.55rem 0.25rem;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 1rem;
}
.quick-input:focus {
  outline: none;
}
.quick-input::placeholder {
  color: var(--text-faint);
}
.quick-icons {
  display: flex;
  gap: 0.1rem;
}
.quick-opts {
  padding: 0.5rem 0.5rem 0.4rem;
  border-top: 1px solid var(--border);
  margin-top: 0.4rem;
}
.quick-opt {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.quick-opt label {
  color: var(--text-muted);
  font-size: 0.8125rem;
  min-width: 3.2rem;
}
.quick-opt .form-control,
.quick-opt .form-select {
  max-width: 14rem;
}

/* --- Bölümler ve listeler -------------------------------------------------------------- */
.task-section {
  margin-bottom: 1.5rem;
}
.section-title {
  margin: 0 0 0.6rem;
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.task-list,
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}
.task-list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
}
.task-list > li + li {
  border-top: 1px solid var(--border);
}

/* --- Görev satırı ------------------------------------------------------------------------ */
.task-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.7rem;
  transition: background-color var(--dur) var(--ease), opacity 300ms var(--ease);
}
.task-row:hover {
  background: var(--surface-2);
}
.task-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 2px solid var(--cat, var(--border));
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: background-color 200ms var(--ease), border-color 200ms var(--ease),
    transform 150ms var(--ease);
}
.task-check:hover {
  background: var(--primary-soft);
}
.task-check:active {
  transform: scale(0.9);
}
.task-check svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: #0d1117;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.task-check path {
  stroke-dasharray: 16;
  stroke-dashoffset: 16;
  transition: stroke-dashoffset 200ms var(--ease) 60ms;
}
.is-done .task-check {
  background: var(--success);
  border-color: var(--success);
}
.is-done .task-check path {
  stroke-dashoffset: 0;
}
.task-main {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  padding: 0.15rem 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.task-title {
  overflow-wrap: anywhere;
  transition: color 300ms var(--ease);
}
.is-done .task-title {
  color: var(--text-faint);
  text-decoration: line-through;
  text-decoration-color: var(--text-faint);
}
.task-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem 0.75rem;
  color: var(--text-muted);
  font-size: 0.8125rem;
}
.task-meta:empty {
  display: none;
}
.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.meta-time {
  font-variant-numeric: tabular-nums;
}
.meta-overdue {
  color: var(--danger);
}
.meta-important {
  color: var(--warning);
}
.task-actions {
  display: flex;
  gap: 0.1rem;
  opacity: 0.6;
  transition: opacity var(--dur) var(--ease);
}
@media (hover: hover) {
  .task-actions {
    opacity: 0;
  }
  .task-row:hover .task-actions,
  .task-row:focus-within .task-actions {
    opacity: 1;
  }
}

/* --- Zaman çizelgesi ---------------------------------------------------------------------- */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.timeline-item {
  display: grid;
  grid-template-columns: 3.1rem 1fr;
  align-items: center;
}
.timeline-time {
  color: var(--text-muted);
  font-size: 0.8125rem;
}
.timeline-item .task-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.timeline-item .task-row:hover {
  background: var(--surface-2);
}
.now-line {
  display: grid;
  grid-template-columns: 3.1rem 1fr;
  align-items: center;
}
.now-time {
  color: var(--danger);
  font-size: 0.75rem;
  font-weight: 600;
}
.now-rule {
  position: relative;
  height: 1px;
  background: var(--danger);
}
.now-rule::before {
  content: "";
  position: absolute;
  left: -3px;
  top: -3px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--danger);
}

/* --- Katlanabilir bölümler ------------------------------------------------------------------- */
.fold > summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
  cursor: pointer;
  list-style: none;
}
.fold > summary::-webkit-details-marker {
  display: none;
}
.fold > summary::before {
  content: "\F285"; /* bi-chevron-right */
  font-family: "bootstrap-icons";
  font-size: 0.75rem;
  color: var(--text-faint);
  transition: transform var(--dur) var(--ease);
}
.fold[open] > summary::before {
  transform: rotate(90deg);
}
.fold-title {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.fold-title.text-danger {
  color: var(--danger) !important;
}
.count {
  padding: 0 0.5rem;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}
.fold-actions {
  margin-bottom: 0.6rem;
}
.done-state .bi {
  color: var(--success);
}

/* --- Yaklaşan ---------------------------------------------------------------------------------- */
.day-group {
  margin-bottom: 1.5rem;
}
.day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}
.day-head .section-title {
  margin: 0;
}
.is-today .section-title {
  color: var(--primary);
}
.day-date {
  margin-left: 0.4rem;
  color: var(--text-faint);
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}
.day-empty {
  margin: 0;
  padding: 0.4rem 0.2rem;
  color: var(--text-faint);
  font-size: 0.875rem;
}
.inline-add {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

/* --- Düzenleme paneli: mobilde alttan, masaüstünde sağdan ------------------------------------- */
.offcanvas.task-panel {
  --bs-offcanvas-bg: var(--surface);
  --bs-offcanvas-color: var(--text);
  --bs-offcanvas-border-color: var(--border);
  --bs-offcanvas-height: auto;
  max-height: 88vh;
  border-radius: var(--radius-card) var(--radius-card) 0 0;
}
@media (min-width: 768px) {
  .offcanvas.task-panel {
    top: 0;
    bottom: 0;
    left: auto;
    right: 0;
    width: 26rem;
    height: auto;
    max-height: none;
    border-radius: 0;
    border-top: 0;
    border-right: 0;
    transform: translateX(100%);
  }
  .task-panel.show:not(.hiding),
  .task-panel.showing {
    transform: none;
  }
}
.panel-skeleton {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.panel-skeleton span {
  height: 2.4rem;
  border-radius: var(--radius-control);
  background: linear-gradient(90deg, var(--surface-2), var(--border), var(--surface-2));
  background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
}
@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

/* --- Bildirim (toast) ------------------------------------------------------------------------------ */
.toast-region {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  pointer-events: none;
}
.app-toast {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem 1rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  pointer-events: auto;
  animation: toast-in 220ms var(--ease);
  transition: opacity 200ms var(--ease), transform 200ms var(--ease);
}
.app-toast.is-error {
  border-color: rgba(255, 107, 107, 0.5);
}
.app-toast.is-leaving {
  opacity: 0;
  transform: translateY(6px);
}
.app-toast-undo {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--primary);
  font-weight: 600;
  white-space: nowrap;
}
.app-toast-undo:hover {
  color: #a094ff;
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}
.confetti {
  position: fixed;
  inset: 0;
  z-index: 3000;
  pointer-events: none;
}

/* --- Kategoriler ve onboarding ------------------------------------------------------------------------ */
.category-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.category-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}
.category-item:last-child {
  border-bottom: 0;
}
.category-name {
  flex: 1;
}
.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.swatch {
  position: relative;
  cursor: pointer;
}
.swatch input,
.starter-cat input {
  position: absolute;
  opacity: 0;
  inset: 0;
}
.swatch-dot {
  display: block;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--cat);
  transition: box-shadow var(--dur) var(--ease);
}
.swatch input:checked + .swatch-dot {
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--cat);
}
.swatch input:focus-visible + .swatch-dot {
  outline: 2px solid var(--primary);
  outline-offset: 4px;
}
.starter-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.starter-cat {
  position: relative;
  cursor: pointer;
}
.starter-cat span {
  display: inline-block;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.starter-cat input:checked + span {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary);
}
.starter-cat input:focus-visible + span {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* --- Mobil: ortada yüzen "+" butonu --------------------------------------------------------------------- */
.tabbar {
  display: flex;
}
.tabbar .nav-item-app {
  flex: 1;
}
.tabbar .nav-item-app:nth-child(2) {
  margin-right: 3.6rem;
}
.fab {
  position: absolute;
  left: 50%;
  top: -1.5rem;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border: 4px solid var(--bg);
  border-radius: 50%;
  background: var(--primary);
  color: #0d1117;
  font-size: 1.5rem;
  text-decoration: none;
  transition: transform 150ms var(--ease), background-color var(--dur) var(--ease);
}
.fab:hover {
  background: #a094ff;
  color: #0d1117;
}
.fab:active {
  transform: translateX(-50%) scale(0.94);
}
@media (max-width: 991.98px) {
  .toast-region {
    left: 1rem;
    align-items: stretch;
    bottom: calc(5.4rem + env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  .confetti {
    display: none;
  }
}
/* ================= Faz 3: alışkanlıklar ve sorumluluklar ================= */

.streak {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--warning);
  font-weight: 600;
  white-space: nowrap;
}
.streak-card {
  margin-left: auto;
  align-self: flex-start;
  font-size: 1.0625rem;
}
.meta-repeat {
  color: var(--primary);
}

/* --- Seçim pill'leri (plan, gün, sıklık) --------------------------------------------- */
.choice-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.choice {
  position: relative;
  cursor: pointer;
}
.choice input {
  position: absolute;
  opacity: 0;
  inset: 0;
}
.choice span:not(.visually-hidden) {
  display: inline-block;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.choice input:checked + span {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary);
}
.choice input:focus-visible + span {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* --- Alışkanlık kartları --------------------------------------------------------------- */
.habit-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.habit-card {
  padding: 1rem 1.1rem;
}
.habit-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.habit-title {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 1.0625rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.habit-emoji {
  font-size: 1.25rem;
}
.habit-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.25rem;
}
.habit-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}
.habit-day-label {
  color: var(--text-faint);
  font-size: 0.6875rem;
  font-weight: 500;
}
.habit-day.is-today .habit-day-label {
  color: var(--primary);
}
.habit-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 2px solid var(--cat, var(--border));
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: background-color 200ms var(--ease), transform 150ms var(--ease),
    opacity var(--dur) var(--ease);
}
.habit-dot:hover:not(:disabled) {
  background: var(--primary-soft);
}
.habit-dot:active:not(:disabled) {
  transform: scale(0.9);
}
.habit-dot.is-unplanned {
  border-style: dashed;
  border-color: var(--border);
}
.habit-dot:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.habit-dot svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: #0d1117;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.habit-dot path {
  stroke-dasharray: 16;
  stroke-dashoffset: 16;
  transition: stroke-dashoffset 200ms var(--ease) 60ms;
}
.habit-dot.is-on {
  background: var(--cat);
  border-color: var(--cat);
  border-style: solid;
}
.habit-dot.is-on path {
  stroke-dashoffset: 0;
}
.habit-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 1rem;
  margin-top: 0.85rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}
.habit-foot small {
  color: var(--text-faint);
}
.habit-plan {
  margin-left: auto;
  color: var(--text-faint);
}
.archived-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0.8rem;
}

/* --- Bugün: alışkanlık çipleri -------------------------------------------------------------- */
.habit-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.habit-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--cat, var(--border));
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text);
  font-size: 0.9375rem;
  cursor: pointer;
  transition: background-color 200ms var(--ease), color 200ms var(--ease),
    transform 150ms var(--ease);
}
.habit-chip:hover {
  background: var(--surface-2);
}
.habit-chip:active {
  transform: scale(0.96);
}
.habit-chip small {
  color: var(--text-muted);
}
.habit-chip.is-on {
  background: var(--cat);
  border-color: var(--cat);
  color: #0d1117;
  font-weight: 600;
}
.habit-chip.is-on small {
  color: rgba(13, 17, 23, 0.7);
}
.habit-chip.is-met {
  border-style: dashed;
  color: var(--text-muted);
}

/* --- Sorumluluk listesi ------------------------------------------------------------------------ */
.rule-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}
.rule-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 0.9rem;
}
.rule-item.is-paused {
  opacity: 0.65;
}
.rule-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.rule-title {
  font-weight: 600;
  overflow-wrap: anywhere;
}
.rule-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.75rem;
  color: var(--text-muted);
  font-size: 0.8125rem;
}
.rule-meta .bi-arrow-repeat {
  color: var(--primary);
}
.rule-next {
  color: var(--text-faint);
  font-size: 0.8125rem;
}
.rule-actions {
  display: flex;
  gap: 0.1rem;
}
.repeat-box {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* --- İstatistikler ve Geçmiş (Faz 4) ----------------------------------------------------- */
.page.page-wide {
  max-width: 1100px;
}
.ico-success {
  color: var(--success);
}
.ico-warning {
  color: var(--warning);
}
.ico-muted {
  color: var(--text-faint);
}

.period-bar {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}
.period-picker {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.5rem;
}
.period-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  list-style: none;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.period-btn::-webkit-details-marker {
  display: none;
}
.period-btn:hover {
  background: var(--surface-2);
  color: var(--text);
}
.period-btn.active {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary);
}
.custom-range {
  position: relative;
}
.custom-range-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
  margin-top: 0.5rem;
  padding: 0.85rem 1rem;
}
.custom-range-form label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}
.period-range {
  font-size: 0.875rem;
}

.stat-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.stat-card {
  padding: 1rem 1.1rem;
}
.stat-label {
  margin: 0 0 0.35rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
}
.stat-value {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.15;
}
.stat-delta {
  margin: 0.3rem 0 0;
  font-size: 0.8125rem;
  font-weight: 600;
  min-height: 1.25rem;
}
.stat-delta.is-up {
  color: var(--success);
}
.stat-delta.is-down {
  color: var(--danger);
}
.stat-delta.is-flat {
  color: var(--text-muted);
}

.insights {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: grid;
  gap: 0.5rem;
}
.insight {
  padding: 0.7rem 1rem;
  border-radius: var(--radius-control);
  background: var(--primary-soft);
  color: var(--text);
  font-size: 0.9375rem;
}
.insight .bi {
  color: var(--primary);
  margin-right: 0.35rem;
}

.chart-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.chart-grid > * {
  min-width: 0; /* canvas'ın doğal genişliği ızgarayı taşırmasın */
}
.chart-card,
.category-card,
.feed-card,
.heatmap-card {
  padding: 1.1rem 1.25rem;
}
.chart-card h2,
.category-card h2,
.feed-card h2 {
  margin-bottom: 0.9rem;
  font-size: 1rem;
}
.chart-box {
  position: relative;
  height: 240px;
}
.chart-empty {
  margin: 0;
  padding: 2rem 0;
  text-align: center;
}
.data-table {
  margin-top: 0.75rem;
  font-size: 0.8125rem;
}
.data-table summary {
  cursor: pointer;
  color: var(--text-muted);
}
.data-table table {
  margin: 0.5rem 0 0;
  --bs-table-bg: transparent;
  --bs-table-color: var(--text);
}
.data-table th[scope="row"] {
  font-weight: 500;
}

.cat-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.65rem;
}
.cat-row {
  display: grid;
  grid-template-columns: minmax(6rem, 10rem) 1fr auto;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9375rem;
}
.cat-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cat-track {
  display: block;
  height: 10px;
}
.cat-bar {
  display: block;
  height: 100%;
  min-width: 10px;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--c) 22%, transparent);
  overflow: hidden;
}
.cat-fill {
  display: block;
  height: 100%;
  border-radius: var(--radius-pill);
  background: var(--c);
}
.cat-count {
  color: var(--text-muted);
  font-size: 0.8125rem;
}

/* Isı haritası */
.heatmap-summary {
  margin: 0 0 0.75rem;
  font-size: 0.9375rem;
}
.heatmap-scroll {
  overflow-x: auto;
  padding-bottom: 0.4rem;
}
.heatmap {
  display: block;
  max-width: none;
}
.hm-label {
  fill: var(--text-faint);
  font-size: 10px;
}
.hm-link {
  cursor: pointer;
  outline: none;
}
.hm-cell {
  stroke: transparent;
  stroke-width: 1.5;
  transition: stroke var(--dur) var(--ease);
}
.hm-link:hover .hm-cell {
  stroke: var(--primary);
}
.hm-link:focus-visible .hm-cell {
  stroke: var(--text);
  stroke-width: 2;
}
.hm-link.is-selected .hm-cell {
  stroke: var(--text);
}
.hm-l0 {
  fill: var(--surface-2);
}
.hm-l1 {
  fill: rgba(255, 107, 107, 0.12);
  stroke: rgba(255, 107, 107, 0.45);
}
.hm-l2 {
  fill: rgba(61, 220, 151, 0.28);
}
.hm-l3 {
  fill: rgba(61, 220, 151, 0.5);
}
.hm-l4 {
  fill: rgba(61, 220, 151, 0.75);
}
.hm-l5 {
  fill: var(--success);
}
.heatmap-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
  font-size: 0.75rem;
}
.heatmap-legend svg {
  display: block;
}

.day-section {
  margin: 1rem 0;
}
.day-hint {
  margin: 0;
  padding: 0.5rem 0.25rem;
  font-size: 0.9375rem;
}
.day-detail {
  padding: 1.1rem 1.25rem;
}
.day-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.day-detail-head h3 {
  margin: 0;
  font-size: 1.0625rem;
}
.day-sub {
  margin: 1rem 0 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.day-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.day-list li {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.3rem 0;
}
.day-list li > span:first-of-type {
  flex: 1;
  min-width: 0;
}
.day-cat {
  font-size: 0.75rem;
  color: var(--c, var(--text-muted));
}
.day-cat.cat-1 { --c: var(--cat-1); }
.day-cat.cat-2 { --c: var(--cat-2); }
.day-cat.cat-3 { --c: var(--cat-3); }
.day-cat.cat-4 { --c: var(--cat-4); }
.day-cat.cat-5 { --c: var(--cat-5); }
.day-cat.cat-6 { --c: var(--cat-6); }
.day-cat.cat-7 { --c: var(--cat-7); }
.day-cat.cat-8 { --c: var(--cat-8); }

/* Aktivite akışı */
.feed-group + .feed-group {
  margin-top: 1.1rem;
}
.feed-day {
  margin: 0 0 0.4rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
}
.feed-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.feed-item {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
}
.feed-item:last-child {
  border-bottom: 0;
}
.feed-item .bi {
  color: var(--primary);
  flex: none;
}
.feed-text {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.feed-time {
  color: var(--text-faint);
  font-size: 0.8125rem;
}
.feed-more {
  margin-top: 1rem;
  text-align: center;
}

@media (min-width: 576px) {
  .period-bar {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }
  .period-range {
    text-align: right;
  }
}
@media (min-width: 992px) {
  .stat-cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .chart-grid {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  }
}

/* --- Faz 5: akıllı hızlı ekleme, kısayollar, kaydırma, PWA, cila ---------------------------- */

/* Hızlı ekleme çipleri */
.quick-chips:empty {
  display: none;
}
.quick-chips {
  padding: 0.5rem 0.2rem 0.1rem;
}
.qchip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.qchip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 32px;
  padding: 0.2rem 0.65rem;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background: var(--primary-soft);
  color: var(--text);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  animation: chip-in 180ms var(--ease);
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.qchip:hover {
  border-color: var(--primary);
}
.qchip .bi:first-child {
  color: var(--primary);
}
.qchip-time .bi:first-child {
  color: var(--cat-2);
}
.qchip-priority .bi:first-child {
  color: var(--warning);
}
.qchip-repeat .bi:first-child {
  color: var(--success);
}
.qchip-x {
  color: var(--text-muted);
  font-size: 1rem;
  margin-right: -0.2rem;
}
.qchip.is-ignored {
  background: transparent;
  border: 1px dashed var(--border);
  color: var(--text-muted);
}
.qchip.is-ignored:hover {
  border-color: var(--text-muted);
}
.quick-hint {
  margin: 0.4rem 0.2rem 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
}
.quick-hint.is-warn {
  color: var(--warning);
}
@keyframes chip-in {
  from {
    opacity: 0;
    transform: translateY(4px) scale(0.96);
  }
}

/* Kaydırma hareketi (mobil) */
.task-row {
  touch-action: pan-y;
}
.task-row.is-swiping {
  position: relative;
  overflow: hidden;
  user-select: none;
}
.task-row.is-swiping > :not(.swipe-hint) {
  transform: translateX(var(--swipe-x, 0));
  position: relative;
  z-index: 1;
}
.task-row.is-swiping {
  background: var(--surface);
}
.task-row.swipe-release > :not(.swipe-hint) {
  transition: transform 180ms var(--ease);
}
.swipe-hint {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface-2);
}
.swipe-hint-right,
.swipe-hint-left {
  display: none;
  align-items: center;
  gap: 0.4rem;
}
.swipe-hint[data-dir="right"] .swipe-hint-right,
.swipe-hint[data-dir="left"] .swipe-hint-left {
  display: inline-flex;
}
.swipe-hint[data-dir="left"] {
  justify-content: flex-end;
}
.swipe-hint.is-armed[data-dir="right"] {
  background: rgba(61, 220, 151, 0.2);
  color: var(--success);
}
.swipe-hint.is-armed[data-dir="left"] {
  background: rgba(255, 180, 84, 0.2);
  color: var(--warning);
}

/* Klavye kısayolları */
kbd {
  display: inline-block;
  min-width: 1.5em;
  padding: 0.05rem 0.4rem;
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
}
.shortcuts-dialog {
  width: min(92vw, 28rem);
  padding: 1.1rem 1.25rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
  color: var(--text);
}
.shortcuts-dialog::backdrop {
  background: rgba(5, 8, 12, 0.7);
}
.shortcuts-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.shortcuts-head h2 {
  margin: 0;
  font-size: 1.0625rem;
}
.shortcut-list {
  display: grid;
  gap: 0.55rem;
  margin: 0;
}
.shortcut-list > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}
.shortcut-list dt {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 400;
  color: var(--text-muted);
  white-space: nowrap;
}
.shortcut-list dd {
  margin: 0;
  text-align: right;
}
.shortcut-note {
  margin: 1rem 0 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Boş durum illüstrasyonu ve çevrimdışı sayfası */
.empty-art {
  display: block;
  width: 120px;
  height: 96px;
  margin: 0 auto 0.75rem;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.empty-art .art-body {
  stroke: var(--border);
  stroke-width: 3;
  fill: var(--surface-2);
}
.empty-art .art-line {
  stroke: var(--text-faint);
  stroke-width: 3;
}
.empty-art .art-ring {
  stroke: var(--primary);
  stroke-width: 4;
}
.empty-art .art-ok {
  stroke: var(--success);
  stroke-width: 3;
}
.empty-art .art-ok-big {
  stroke-width: 6;
}
.empty-art .art-spark {
  stroke: var(--warning);
  stroke-width: 3;
}
.empty-art .art-accent-fill {
  fill: var(--primary);
  stroke: none;
}
.empty-art .art-success-fill {
  fill: var(--success);
  stroke: none;
}
.empty-art .art-flame {
  stroke: var(--warning);
}
.empty-state .empty-art {
  color: inherit;
}
.offline-card {
  max-width: 28rem;
  margin: 2rem auto;
  padding: 2.5rem 1.5rem;
  text-align: center;
}
.offline-card h1 {
  font-size: 1.35rem;
}

/* Cila: sayfa girişi, yüklenirken soluk içerik, iskeletler */
@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}
.page {
  animation: page-in 220ms var(--ease);
}
#stats-content {
  transition: opacity var(--dur) var(--ease);
}
#stats-content.htmx-request {
  opacity: 0.55;
  pointer-events: none;
}
.feed-more.htmx-request .btn {
  opacity: 0.6;
}
.day-skeleton {
  padding: 1.1rem 1.25rem;
}
@media (prefers-reduced-motion: reduce) {
  .qchip,
  .page {
    animation: none;
  }
}

/* --- Faz 6: yasal sayfalar, tehlikeli bölge ---------------------------------------------------- */
.public-main.legal-main {
  align-items: flex-start;
}
.legal {
  width: 100%;
  max-width: 46rem;
  padding: 1.5rem 1.5rem 2rem;
  line-height: 1.65;
}
.legal h1 {
  font-size: 1.6rem;
  margin-bottom: 0.25rem;
}
.legal h2 {
  font-size: 1.05rem;
  margin: 1.6rem 0 0.4rem;
}
.legal ul {
  padding-left: 1.2rem;
}
.danger-zone {
  border-color: rgba(255, 107, 107, 0.35);
}
.auth-consent {
  margin: 0.9rem 0 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-align: center;
}
