/* =========================================================
   Life Dashboard — tasarım sistemi v2
   ui-ux-pro-max önerisi: flat tasarım, sıcak krem zemin,
   mercan vurgu (#FF5733 / #F6F1E6 — kullanıcı ana renkleri).
   İki tema: :root = açık (varsayılan), [data-theme="dark"] = koyu.
   ========================================================= */
:root {
  /* Yüzeyler */
  --bg: #F6F1E6;
  --bg-elev: #FFFFFF;          /* kart/modal zemini */
  --surface-2: #EFE7D6;        /* hafif dolgu (chip, bar zemini) */
  --surface-3: #E7DCC6;        /* daha koyu dolgu */
  --border: #E3D9C6;
  --border-strong: #C9BBA0;

  /* Metin (krem zemin üzerinde 4.5:1+) */
  --text: #2B2118;
  --text-dim: #6F6151;

  /* Vurgu — mercan */
  --accent: #FF5733;
  --accent-strong: #E8431F;    /* hover */
  --accent-ink: #C0330F;       /* açık zeminde vurgu METNİ için */
  --accent-soft: rgba(255, 87, 51, 0.12);
  --on-accent: #FFFFFF;

  /* Anlamsal */
  --green: #178A5C;
  --green-soft: rgba(23, 138, 92, 0.14);
  --amber: #B45309;
  --amber-soft: rgba(180, 83, 9, 0.14);
  --red: #D92D20;
  --red-soft: rgba(217, 45, 32, 0.12);

  /* Etkileşim dolguları */
  --hover-bg: rgba(43, 33, 24, 0.05);
  --hover-bg-2: rgba(43, 33, 24, 0.09);

  /* Slayt (Duvar Ekranı) */
  --slide-bg: #FF5733;
  --slide-fill: rgba(255, 255, 255, 0.18);
  --slide-track: rgba(0, 0, 0, 0.18);

  /* Aralık ölçeği */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px;
  --sp-5: 24px; --sp-6: 32px; --sp-7: 48px;

  --radius: 10px;
  --radius-lg: 14px;
  --transition: 180ms ease;
  --shadow-pop: 0 12px 40px rgba(43, 33, 24, 0.18);
}

[data-theme="dark"] {
  /* Nötr, siyaha yakın koyu tema (Blitzit hissi) + mercan vurgu */
  --bg: #0E0F12;
  --bg-elev: #17181D;
  --surface-2: #1F2127;
  --surface-3: #2A2D35;
  --border: #26282F;
  --border-strong: #3B3E48;

  --text: #F2F3F5;
  --text-dim: #9BA0AA;

  --accent: #FF5733;
  --accent-strong: #FF7250;
  --accent-ink: #FF8266;
  --accent-soft: rgba(255, 87, 51, 0.16);
  --on-accent: #FFFFFF;

  --green: #34C88F;
  --green-soft: rgba(52, 200, 143, 0.15);
  --amber: #E5A83B;
  --amber-soft: rgba(229, 168, 59, 0.15);
  --red: #FF6B5E;
  --red-soft: rgba(255, 107, 94, 0.14);

  --hover-bg: rgba(242, 243, 245, 0.05);
  --hover-bg-2: rgba(242, 243, 245, 0.10);

  --slide-bg: #17181D;
  --slide-fill: rgba(255, 255, 255, 0.09);
  --slide-track: rgba(255, 255, 255, 0.08);

  --shadow-pop: 0 12px 40px rgba(0, 0, 0, 0.6);
}
/* Koyu temada slayt kartına mercan çerçeve (düz siyah kart kaybolmasın) */
[data-theme="dark"] .slide-content { border: 1px solid var(--border-strong); }

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

body {
  font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.hidden { display: none !important; }

svg.icon { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.logo { font-size: 20px; font-weight: 800; letter-spacing: -0.5px; white-space: nowrap; }
.logo span { color: var(--accent-ink); }

/* ---------- Butonlar (min 44px dokunma hedefi, flat) ---------- */
button { font-family: inherit; cursor: pointer; }

.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--accent);
  color: var(--on-accent); border: none; border-radius: var(--radius);
  min-height: 44px; padding: 0 18px; font-size: 14px; font-weight: 700;
  transition: background var(--transition), transform var(--transition);
}
.btn-primary:hover { background: var(--accent-strong); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: transparent; color: var(--text-dim);
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  min-height: 44px; padding: 0 16px; font-size: 14px; font-weight: 600;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}
.btn-ghost:hover { color: var(--text); border-color: var(--text-dim); background: var(--hover-bg); }

.btn-danger {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: transparent; color: var(--red);
  border: 1px solid var(--red); border-radius: var(--radius);
  min-height: 44px; padding: 0 16px; font-size: 14px; font-weight: 600;
  transition: background var(--transition);
}
.btn-danger:hover { background: var(--red-soft); }

/* ---------- Form elemanları ---------- */
input, select {
  font-family: inherit;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  min-height: 44px;
  padding: 0 14px;
  color: var(--text);
  font-size: 14px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
input:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
input::placeholder { color: var(--text-dim); opacity: 0.8; }
select option { background: var(--bg-elev); color: var(--text); }

/* ---------- Auth ---------- */
.auth-wrap { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: var(--sp-5); }
.auth-card {
  width: 100%; max-width: 400px;
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: var(--sp-7) var(--sp-6); text-align: center;
}
.auth-subtitle { color: var(--text-dim); margin: var(--sp-2) 0 var(--sp-5); font-size: 14px; }
.auth-card form { display: flex; flex-direction: column; gap: var(--sp-3); }
.auth-error { color: var(--red); font-size: 13px; margin-top: var(--sp-4); }
.auth-switch { margin-top: var(--sp-5); font-size: 13px; color: var(--text-dim); }
.auth-switch a { color: var(--accent-ink); text-decoration: none; font-weight: 700; }
.auth-switch a:hover { text-decoration: underline; }

/* ---------- Uygulama iskeleti ---------- */
.app { display: flex; flex-direction: column; height: 100vh; }

.topbar {
  display: flex; align-items: center; gap: var(--sp-4);
  padding: var(--sp-3) var(--sp-5); border-bottom: 1px solid var(--border);
  background: var(--bg-elev);
  flex-wrap: wrap;
}
.quick-add { flex: 1; min-width: 220px; max-width: 520px; }
.quick-add input { width: 100%; background: var(--bg); }
.user-box { margin-left: auto; display: flex; align-items: center; gap: var(--sp-2); font-size: 13px; color: var(--text-dim); }

.main { display: flex; flex: 1; min-height: 0; }

/* ---------- Görünüm gezinmesi ---------- */
.view-nav { display: flex; gap: 4px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 4px; }
.view-btn {
  background: transparent; border: none; color: var(--text-dim);
  min-height: 36px; padding: 0 14px; border-radius: 7px; font-size: 13px; font-weight: 700;
  transition: background var(--transition), color var(--transition);
}
.view-btn:hover { color: var(--text); }
.view-btn.active { background: var(--accent); color: var(--on-accent); }

/* ---------- Liste menüsü (üst barda, Blitzit tarzı) ---------- */
.lists-dd { position: relative; }
.lists-dd-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg-elev); border: 1px solid var(--border-strong);
  border-radius: var(--radius); min-height: 44px; padding: 0 12px;
  color: var(--text); font-size: 14px; font-weight: 700;
  transition: border-color var(--transition), background var(--transition);
}
[data-theme="dark"] .lists-dd-btn { background: var(--surface-2); }
.lists-dd-btn:hover { border-color: var(--accent); }
.dd-avatars { display: inline-flex; }
.dd-avatars .list-chip { margin-left: -6px; box-shadow: 0 0 0 2px var(--bg-elev); }
.dd-avatars .list-chip:first-child { margin-left: 0; }
.dd-label { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.lists-dd-menu {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 70;
  min-width: 260px; max-height: 60vh; overflow-y: auto;
  background: var(--bg-elev); border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg); padding: var(--sp-2);
  box-shadow: var(--shadow-pop);
  display: flex; flex-direction: column; gap: 2px;
}
.list-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  background: transparent; border: none; color: var(--text-dim);
  min-height: 44px; padding: 0 var(--sp-3); border-radius: var(--radius);
  font-size: 14px; font-weight: 600; text-align: left;
  transition: background var(--transition), color var(--transition);
}
.list-item:hover { background: var(--hover-bg); color: var(--text); }
.list-item.active { background: var(--accent-soft); color: var(--text); }
.list-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-count { font-size: 12px; color: var(--text-dim); }

.list-edit {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 6px;
  background: none; border: none; color: var(--text-dim);
  transition: background var(--transition), color var(--transition);
}
.list-edit:hover { background: var(--hover-bg-2); color: var(--text); }
.add-list { width: 100%; margin-top: var(--sp-1); }

/* Tek harfli liste rozeti */
.list-chip {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 7px; flex-shrink: 0;
  color: #fff; font-size: 11px; font-weight: 800;
  text-shadow: 0 1px 2px rgba(0,0,0,0.35);
}
.list-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* ---------- Kanban ---------- */
.kanban {
  flex: 1; display: grid;
  grid-template-columns: repeat(4, minmax(260px, 1fr));
  gap: var(--sp-4); padding: var(--sp-4) var(--sp-5);
  min-width: 0; min-height: 0; overflow-x: auto;
}
.kanban-col {
  display: flex; flex-direction: column; min-height: 0; min-width: 0;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-4);
}
.kanban-col.col-today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent-soft); }
.kanban-col.drag-over { background: var(--accent-soft); border-color: var(--accent); }

.col-head { display: flex; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-3); }
.col-head h2 { font-size: 15px; font-weight: 800; }
.col-meta { margin-left: auto; font-size: 12px; color: var(--text-dim); white-space: nowrap; }
.icon-btn-static {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 8px;
  background: none; border: none; color: var(--text-dim);
  transition: background var(--transition), color var(--transition);
}
.icon-btn-static:hover { background: var(--hover-bg-2); color: var(--text); }

.col-progress { height: 5px; border-radius: 4px; background: var(--surface-2); margin-bottom: var(--sp-3); overflow: hidden; }
.col-progress-fill {
  height: 100%; width: 0; border-radius: 4px;
  background: var(--green);
  transition: width 300ms ease;
}

.col-cards { flex: 1; display: flex; flex-direction: column; gap: var(--sp-2); overflow-y: auto; min-height: 60px; padding: 2px; }
.drop-indicator { height: 3px; border-radius: 2px; background: var(--accent); margin: 2px 0; flex-shrink: 0; }

.done-date-head { font-size: 12px; font-weight: 700; color: var(--text-dim); margin: var(--sp-2) 0 2px; }

.focus-cta { width: 100%; margin-top: var(--sp-3); flex-shrink: 0; }

/* ---------- Görev kartları ---------- */
.task-card {
  display: flex; align-items: center; gap: var(--sp-2);
  background: var(--bg); border: 1px solid var(--border);
  border-left-width: 3px;
  border-radius: var(--radius); padding: var(--sp-2) var(--sp-2) var(--sp-2) var(--sp-3);
  cursor: grab; min-height: 52px;
  transition: background var(--transition), border-color var(--transition), transform var(--transition), opacity var(--transition);
}
.task-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.task-meta { font-size: 12px; color: var(--text-dim); display: flex; align-items: center; gap: 6px; line-height: 1.4; }
.task-meta .m-kind { display: inline-flex; align-items: center; }
.task-meta .m-kind.project { color: var(--accent-ink); }
.task-meta .m-kind.curriculum { color: var(--green); }
.task-card.phase-task { border-left-style: dashed; }
.task-meta .m-add-est {
  background: none; border: none; padding: 0;
  color: var(--accent-ink); font-size: 12px; font-weight: 700;
  text-decoration: underline dashed; text-underline-offset: 3px;
}
.task-meta .m-add-est:hover { color: var(--accent-strong); }
.task-meta .m-prio.low { color: var(--green); font-weight: 700; }
.task-meta .m-prio.medium { color: var(--amber); font-weight: 700; }
.task-meta .m-prio.high { color: var(--red); font-weight: 700; }
.task-side { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }

/* ⋮ taşma menüsü */
.kebab-wrap { position: relative; }
.kebab-menu {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 40;
  min-width: 140px; background: var(--bg-elev);
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  box-shadow: var(--shadow-pop); padding: 4px;
  display: flex; flex-direction: column;
}
.kebab-item {
  display: flex; align-items: center; gap: 8px;
  background: none; border: none; border-radius: 7px;
  min-height: 40px; padding: 0 12px; font-size: 13px; font-weight: 600;
  color: var(--text); text-align: left;
  transition: background var(--transition);
}
.kebab-item:hover { background: var(--hover-bg-2); }
.kebab-item.danger { color: var(--red); }
.kebab-item.danger:hover { background: var(--red-soft); }
[data-theme="dark"] .task-card { background: var(--surface-2); }
.task-card:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.task-card.dragging { opacity: 0.4; }
.task-card.prio-low { border-left-color: var(--green); }
.task-card.prio-medium { border-left-color: var(--amber); }
.task-card.prio-high { border-left-color: var(--red); }
.task-card.completed {
  opacity: 0.75; border-left-color: var(--border-strong);
  min-height: 42px; padding: 4px var(--sp-3); flex-wrap: nowrap;
}
.task-card.completed .task-title { text-decoration: line-through; color: var(--text-dim); font-weight: 500; }
.task-card.completed .task-check { width: 22px; height: 22px; }

.task-check {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid var(--border-strong); background: transparent;
  display: flex; align-items: center; justify-content: center;
  color: transparent; padding: 0;
  transition: border-color var(--transition), background var(--transition), color var(--transition);
}
.task-check:hover { border-color: var(--green); color: var(--green); }
.task-card.completed .task-check, .ptask.done .task-check { background: var(--green); border-color: var(--green); color: #fff; }

.task-title { flex: 1; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Rozetler: tek satırda sağda */
.badges { display: flex; align-items: center; gap: var(--sp-2); flex-shrink: 0; }
.badge {
  font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 20px;
  white-space: nowrap; display: inline-flex; align-items: center; gap: 4px;
}
.badge-list { color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.35); }
.badge-priority.low { background: var(--green-soft); color: var(--green); }
.badge-priority.medium { background: var(--amber-soft); color: var(--amber); }
.badge-priority.high { background: var(--red-soft); color: var(--red); }
.badge-time { background: var(--surface-2); color: var(--text-dim); }
.badge-actual { background: var(--green-soft); color: var(--green); }

.task-actions { display: flex; gap: var(--sp-1); flex-shrink: 0; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 8px;
  background: none; border: none; color: var(--text-dim);
  transition: background var(--transition), color var(--transition), opacity var(--transition);
}
.icon-btn:hover { background: var(--hover-bg-2); color: var(--text); }
.icon-btn.icon-danger:hover { background: var(--red-soft); color: var(--red); }
@media (hover: hover) {
  .icon-btn { opacity: 0; }
  .task-card:hover .icon-btn, .ptask:hover .icon-btn, .icon-btn:focus-visible { opacity: 1; }
}

.empty-state {
  display: flex; flex-direction: column; align-items: center; gap: var(--sp-4);
  color: var(--text-dim); text-align: center; padding: var(--sp-7) 0; font-size: 14px;
}

/* ---------- Scorecard ---------- */
.scorecard-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg); border: 1px solid var(--border-strong);
  border-radius: 22px; min-height: 44px; padding: 0 14px;
  color: var(--text); font-size: 14px; font-weight: 800;
  transition: border-color var(--transition), background var(--transition);
}
.scorecard-chip:hover { border-color: var(--accent); background: var(--accent-soft); }
.chip-grade {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%; margin-left: -8px;
  background: var(--accent);
  color: var(--on-accent); font-size: 13px; font-weight: 800;
}

.sc-hero { display: flex; align-items: center; gap: var(--sp-4); margin-bottom: var(--sp-5); }
.sc-grade {
  width: 72px; height: 72px; border-radius: 18px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent);
  font-size: 32px; font-weight: 800; color: var(--on-accent);
}
.sc-score { font-size: 36px; font-weight: 800; line-height: 1; }
.sc-score-label { color: var(--text-dim); font-size: 13px; margin-top: 4px; }
.sc-bars { display: flex; flex-direction: column; gap: var(--sp-3); }
.sc-bar-row { display: grid; grid-template-columns: 140px 1fr 36px; align-items: center; gap: var(--sp-3); }
.sc-bar-label { font-size: 13px; color: var(--text-dim); font-weight: 600; }
.sc-bar-label small { opacity: 0.7; }
.sc-bar { height: 8px; border-radius: 5px; background: var(--surface-2); overflow: hidden; }
.sc-bar-fill { height: 100%; width: 0; border-radius: 5px; background: var(--accent); transition: width 400ms ease; }
.sc-bar-val { font-size: 13px; font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
.sc-detail { margin-top: var(--sp-4); font-size: 13px; color: var(--text-dim); }
.sc-note { margin-top: var(--sp-2); font-size: 12px; color: var(--text-dim); opacity: 0.75; }

/* ---------- Proje / Müfredat görünümü ---------- */
.pview { flex: 1; display: flex; flex-direction: column; min-height: 0; padding: var(--sp-4) var(--sp-5); overflow-y: auto; }
.pview-tabs { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; margin-bottom: var(--sp-4); }
.project-tabs { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.project-tab {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg-elev); border: 1px solid var(--border-strong); border-radius: 22px;
  min-height: 44px; padding: 0 16px; color: var(--text-dim); font-size: 14px; font-weight: 700;
  transition: border-color var(--transition), color var(--transition);
}
.project-tab:hover { color: var(--text); }
.project-tab.active { color: var(--text); border-color: var(--tab-color, var(--accent)); box-shadow: 0 0 0 1px var(--tab-color, var(--accent)); }
.project-tab .pt-pct { font-size: 12px; opacity: 0.8; }

.project-body { display: grid; grid-template-columns: 1fr 300px; gap: var(--sp-4); align-items: start; }
.project-body.no-aside { grid-template-columns: 1fr; }

.p-hero {
  grid-column: 1 / -1;
  display: flex; align-items: center; gap: var(--sp-6);
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: var(--sp-5); flex-wrap: wrap;
}
.p-hero-main { flex: 1; min-width: 240px; }
.p-hero-pct { font-size: 44px; font-weight: 800; line-height: 1; }
.p-hero-sub { color: var(--text-dim); font-size: 13px; margin-top: 6px; }
.p-hero-bar { height: 10px; border-radius: 6px; background: var(--surface-2); overflow: hidden; margin-top: var(--sp-4); }
.p-hero-fill { height: 100%; width: 0; border-radius: 6px; transition: width 500ms ease; }
.p-donut-wrap { display: flex; align-items: center; gap: var(--sp-4); }
.p-donut-legend { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--text-dim); max-width: 200px; font-weight: 600; }
.p-donut-legend .lg-row { display: flex; align-items: center; gap: 8px; }
.p-donut-legend .lg-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }

.phase-list { display: flex; flex-direction: column; gap: var(--sp-3); min-width: 0; }
.phase-card { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--sp-4); }
.phase-head { display: flex; align-items: center; gap: var(--sp-3); cursor: pointer; }
.phase-head h3 { font-size: 15px; font-weight: 800; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phase-meta { font-size: 12px; color: var(--text-dim); white-space: nowrap; }
.phase-weight { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 12px; background: var(--surface-2); color: var(--text-dim); }
.phase-pct { font-size: 14px; font-weight: 800; min-width: 44px; text-align: right; font-variant-numeric: tabular-nums; }
.phase-bar { height: 7px; border-radius: 5px; background: var(--surface-2); overflow: hidden; margin-top: var(--sp-3); }
.phase-fill { height: 100%; width: 0; border-radius: 5px; transition: width 500ms ease, background 500ms ease; }

.phase-tasks { margin-top: var(--sp-3); display: flex; flex-direction: column; gap: var(--sp-1); }
.ptask {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: 8px 10px; border-radius: 8px; min-height: 44px;
  transition: background var(--transition);
}
.ptask:hover { background: var(--hover-bg); }
.ptask.sub { margin-left: 34px; border-left: 2px solid var(--border); padding-left: var(--sp-3); min-height: 40px; }
.ptask.done .ptask-title { text-decoration: line-through; color: var(--text-dim); }
.ptask-title { flex: 1; font-size: 14px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ptask-today-chip { font-size: 10.5px; font-weight: 800; padding: 3px 8px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-ink); white-space: nowrap; }
.ptask-today-btn { min-height: 32px; padding: 0 10px; font-size: 12px; gap: 5px; white-space: nowrap; }
.ptask-today-btn .icon { width: 13px; height: 13px; }
@media (max-width: 768px) { .ptask-today-btn span { display: none; } }
.prio-chip {
  font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 12px;
  border: none; min-height: 28px;
  transition: filter var(--transition);
}
.prio-chip:hover { filter: brightness(1.12); }
.prio-chip.low { background: var(--green-soft); color: var(--green); }
.prio-chip.medium { background: var(--amber-soft); color: var(--amber); }
.prio-chip.high { background: var(--red-soft); color: var(--red); }
.phase-add-task { margin-top: var(--sp-2); }

.p-aside { display: flex; flex-direction: column; gap: var(--sp-4); }
.queue-panel { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--sp-4); }
.queue-panel h3 { font-size: 14px; font-weight: 800; margin-bottom: var(--sp-3); }
.queue-item {
  display: flex; align-items: center; gap: var(--sp-2);
  padding: 8px 6px; border-radius: 8px; min-height: 44px;
}
.queue-item:hover { background: var(--hover-bg); }
.queue-rank {
  width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); font-size: 11px; font-weight: 800; color: var(--text-dim);
}
.queue-main { flex: 1; min-width: 0; }
.queue-title { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue-module { font-size: 11px; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue-more { margin-top: var(--sp-2); font-size: 11.5px; color: var(--text-dim); }

.pview-empty { text-align: center; color: var(--text-dim); padding: var(--sp-7) 0; }

/* ---------- Analytics ---------- */
.an-toolbar { display: flex; align-items: center; gap: var(--sp-4); margin-bottom: var(--sp-4); flex-wrap: wrap; }
.an-range { display: flex; gap: 4px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 4px; }
.range-btn {
  background: transparent; border: none; color: var(--text-dim);
  min-height: 36px; padding: 0 14px; border-radius: 7px; font-size: 13px; font-weight: 700;
  transition: background var(--transition), color var(--transition);
}
.range-btn:hover { color: var(--text); }
.range-btn.active { background: var(--bg-elev); color: var(--text); }
.an-streak { font-size: 15px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.an-streak small { color: var(--text-dim); font-weight: 600; }

.an-grid { display: grid; grid-template-columns: 2fr 1fr; gap: var(--sp-4); align-items: start; }
.an-card {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: var(--sp-4); min-width: 0;
}
.an-card h3 { font-size: 14px; font-weight: 800; margin-bottom: var(--sp-3); }
.an-card .an-sub { font-size: 12px; color: var(--text-dim); margin-top: -8px; margin-bottom: var(--sp-3); }
.an-card svg { display: block; width: 100%; height: auto; }
.an-wide { grid-column: 1 / -1; }
.an-empty { color: var(--text-dim); font-size: 13px; padding: var(--sp-4) 0; }

.cmp-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.cmp-tile { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--sp-3); }
[data-theme="dark"] .cmp-tile { background: var(--surface-2); }
.cmp-tile .cmp-label { font-size: 11px; color: var(--text-dim); letter-spacing: 0.5px; font-weight: 700; }
.cmp-tile .cmp-val { font-size: 24px; font-weight: 800; margin-top: 2px; }
.cmp-tile .cmp-prev { font-size: 11.5px; color: var(--text-dim); margin-top: 2px; }
.cmp-delta { font-size: 12px; font-weight: 800; margin-left: 6px; }
.cmp-delta.up { color: var(--green); }
.cmp-delta.down { color: var(--red); }

.lm-row { display: grid; grid-template-columns: 110px 1fr 64px; align-items: center; gap: var(--sp-3); min-height: 32px; }
.lm-name { font-size: 12.5px; color: var(--text-dim); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.lm-bar { height: 14px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.lm-fill { height: 100%; border-radius: 4px 0 0 4px; transition: width 400ms ease; }
.lm-val { font-size: 12px; font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }

/* Proje/müfredat analiz satırları */
.pa-row { padding: var(--sp-3) 0; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; }
.pa-row:first-of-type { border-top: none; }
.pa-head { display: flex; align-items: center; gap: 8px; }
.pa-name { font-size: 14px; font-weight: 800; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pa-pct { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.pa-stats { font-size: 12.5px; color: var(--text-dim); }

.an-tooltip {
  position: fixed; z-index: 60; pointer-events: none;
  background: var(--bg-elev); border: 1px solid var(--border-strong);
  border-radius: 8px; padding: 8px 12px; font-size: 12px;
  box-shadow: var(--shadow-pop); white-space: nowrap;
}
.an-tooltip .tt-title { font-weight: 800; margin-bottom: 2px; }
.an-tooltip .tt-val { color: var(--text-dim); }

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

/* ---------- Başarım bildirimi + rozetler ---------- */
.achieve-toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  z-index: 110; display: flex; align-items: center; gap: var(--sp-3);
  background: var(--bg-elev); border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg); padding: var(--sp-3) var(--sp-5);
  box-shadow: var(--shadow-pop);
  animation: toast-in 400ms cubic-bezier(0.2, 1.4, 0.4, 1);
}
@keyframes toast-in { from { opacity: 0; transform: translateX(-50%) translateY(20px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
.at-icon { font-size: 32px; }
.at-title { font-size: 14px; font-weight: 800; }
.at-sub { font-size: 13px; color: var(--text-dim); }

.ach-streak-line { font-size: 14px; margin: -8px 0 var(--sp-4); color: var(--text-dim); }
.ach-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-3); }
.ach-item {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  text-align: center; padding: var(--sp-3) var(--sp-2);
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
}
[data-theme="dark"] .ach-item { background: var(--surface-2); }
.ach-item .ach-icon { font-size: 30px; }
.ach-item .ach-name { font-size: 12px; font-weight: 800; }
.ach-item .ach-desc { font-size: 10.5px; color: var(--text-dim); line-height: 1.35; }
.ach-item.locked { opacity: 0.42; filter: grayscale(1); }
.ach-item.earned { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent-soft); }

/* ---------- Ayarlar ---------- */
.set-group { display: flex; flex-direction: column; gap: var(--sp-3); }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); min-height: 44px; }
.set-row .set-label { font-size: 14px; font-weight: 600; }
.set-row .set-hint { font-size: 12px; color: var(--text-dim); }
.set-weights { display: flex; gap: var(--sp-2); }
.set-weights label { flex: 1; }
.set-weights input { width: 100%; text-align: center; }
.switch { position: relative; width: 46px; height: 26px; flex-shrink: 0; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch .track {
  position: absolute; inset: 0; border-radius: 13px; background: var(--surface-3);
  transition: background var(--transition); pointer-events: none;
}
.switch .track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
  border-radius: 50%; background: var(--bg-elev); box-shadow: 0 1px 3px rgba(0,0,0,0.25);
  transition: transform var(--transition);
}
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(20px); }
.set-error { color: var(--red); font-size: 12.5px; }

/* ---------- Yönetim ---------- */
.adm-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--sp-3); margin-bottom: var(--sp-4); }
.adm-users-head { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-3); }
.adm-users-head h3 { margin-bottom: 0; flex: 1; }
.adm-users-head input { max-width: 260px; }
.adm-table-wrap { overflow-x: auto; }
.adm-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.adm-table th {
  text-align: left; font-size: 11px; letter-spacing: 0.5px; color: var(--text-dim);
  padding: 8px 10px; border-bottom: 1px solid var(--border-strong); white-space: nowrap;
}
.adm-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; vertical-align: middle; }
.adm-table select, .adm-table input[type="date"] { min-height: 36px; font-size: 12.5px; padding: 0 8px; }
.adm-disabled td { opacity: 0.5; }

/* ---------- Duvar Ekranı Modu: slayt döngüsü ---------- */
.wall {
  position: fixed; inset: 0; z-index: 95;
  display: flex; flex-direction: column;
  background: var(--bg);
}
.wall-top { display: flex; align-items: center; gap: var(--sp-4); padding: var(--sp-4) var(--sp-5); }
.wall-clock { font-size: clamp(22px, 4vw, 34px); font-weight: 800; font-variant-numeric: tabular-nums; }
.wall-date { color: var(--text-dim); font-size: clamp(13px, 2vw, 16px); flex: 1; }
.wall-bottom { display: flex; align-items: center; justify-content: center; gap: var(--sp-4); padding: var(--sp-4); }
.wall-dots { display: flex; gap: 8px; max-width: 60vw; overflow: hidden; }
.wall-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--surface-3); transition: background var(--transition), transform var(--transition); flex-shrink: 0; }
.wall-dot.active { background: var(--accent); transform: scale(1.25); }

.wall-slide { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 var(--sp-5); }
.slide-content {
  /* Referans dersi: sadece max-width degil, width de sart */
  width: 100%; max-width: 860px; max-height: 100%;
  background: var(--slide-bg); color: #fff;
  border-radius: 24px; padding: clamp(20px, 4vw, 44px);
  display: flex; flex-direction: column; min-height: 0;
  animation: slide-in 450ms ease;
}
@keyframes slide-in { from { opacity: 0; transform: translateY(14px) scale(0.985); } to { opacity: 1; transform: none; } }
.slide-title { font-size: clamp(18px, 3vw, 26px); font-weight: 800; margin-bottom: clamp(12px, 2vw, 22px); display: flex; align-items: center; gap: 10px; }
.slide-title .st-count { margin-left: auto; font-size: 0.7em; opacity: 0.9; font-weight: 700; }

.slide-body { overflow-y: auto; min-height: 0; display: flex; flex-direction: column; gap: 10px; }

.ws-task {
  display: flex; align-items: center; gap: 12px;
  background: var(--slide-fill); border-radius: 12px;
  padding: clamp(10px, 1.6vw, 14px) clamp(12px, 2vw, 18px);
  font-size: clamp(14px, 2.2vw, 18px); font-weight: 700;
}
.ws-task.done { opacity: 0.6; }
.ws-task.done .ws-name { text-decoration: line-through; }
.ws-check { width: 22px; height: 22px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.8); flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 12px; }
.ws-task.done .ws-check { background: #fff; color: var(--slide-bg); border-color: #fff; }
.ws-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-meta { font-size: 0.75em; opacity: 0.9; white-space: nowrap; }
.ws-more { text-align: center; opacity: 0.9; font-size: 14px; }

/* Tek görev slaytı (odak görünümü) */
.ws-single { display: flex; flex-direction: column; align-items: center; text-align: center; gap: clamp(10px, 2vw, 18px); padding: clamp(10px, 3vw, 30px) 0; }
.ws-single-kicker { font-size: clamp(12px, 1.8vw, 15px); font-weight: 800; letter-spacing: 2px; opacity: 0.9; }
.ws-single-title { font-size: clamp(26px, 6vw, 52px); font-weight: 800; line-height: 1.15; overflow-wrap: anywhere; }
.ws-single-badges { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.ws-single-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--slide-fill); border-radius: 20px;
  padding: 8px 16px; font-size: clamp(13px, 2vw, 16px); font-weight: 700;
}
.ws-single-badge .dot { width: 10px; height: 10px; border-radius: 50%; }

.ws-hero { display: flex; align-items: center; gap: clamp(16px, 4vw, 36px); }
.ws-grade {
  width: clamp(84px, 16vw, 130px); height: clamp(84px, 16vw, 130px);
  border-radius: 26px; background: var(--slide-fill);
  display: flex; align-items: center; justify-content: center;
  font-size: clamp(40px, 9vw, 64px); font-weight: 800; flex-shrink: 0;
}
.ws-hero-num { font-size: clamp(40px, 9vw, 70px); font-weight: 800; line-height: 1; }
.ws-hero-sub { opacity: 0.92; font-size: clamp(13px, 2vw, 16px); margin-top: 6px; }
.ws-quote { margin-top: clamp(12px, 2vw, 20px); font-style: italic; opacity: 0.92; font-size: clamp(13px, 2.2vw, 17px); }

.ws-bar-row { display: grid; grid-template-columns: minmax(90px, 150px) 1fr 44px; align-items: center; gap: 12px; font-size: clamp(12px, 1.8vw, 14px); font-weight: 600; }
.ws-bar { height: 10px; border-radius: 6px; background: var(--slide-track); overflow: hidden; }
.ws-fill { height: 100%; border-radius: 6px; background: #fff; transition: width 600ms ease; }
.ws-bar-val { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }

.ws-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.ws-stat { background: var(--slide-fill); border-radius: 14px; padding: clamp(12px, 2vw, 18px); text-align: center; }
.ws-stat .n { font-size: clamp(26px, 5vw, 40px); font-weight: 800; line-height: 1.1; }
.ws-stat .l { font-size: clamp(11px, 1.6vw, 13px); opacity: 0.9; margin-top: 4px; }

/* ---------- Focus Mode ---------- */
.focus {
  position: fixed; inset: 0; z-index: 100;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
}
.focus-window-btns { position: absolute; top: var(--sp-4); right: var(--sp-4); z-index: 2; display: flex; gap: var(--sp-2); }

.focus-inner {
  display: flex; flex-direction: column; align-items: center; gap: var(--sp-4);
  text-align: center; padding: var(--sp-5); max-width: 640px; width: 100%;
}
.focus-inner h2 { font-size: clamp(20px, 4vw, 32px); font-weight: 800; }
.focus-timer {
  font-size: clamp(64px, 14vw, 120px); font-weight: 800; letter-spacing: -2px;
  font-variant-numeric: tabular-nums; line-height: 1;
}
.focus-timer.overtime { color: var(--amber); }
.focus-timer.paused { opacity: 0.5; }
.focus-progress { width: 100%; max-width: 420px; height: 6px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.focus-progress-fill {
  height: 100%; width: 0; border-radius: 4px;
  background: var(--accent);
  transition: width 900ms linear;
}
.focus-sub { color: var(--text-dim); font-size: 14px; min-height: 21px; }
.focus-actions { display: flex; gap: var(--sp-3); flex-wrap: wrap; justify-content: center; }
.focus-queue { display: flex; flex-direction: column; gap: var(--sp-1); margin-top: var(--sp-4); width: 100%; max-width: 420px; }
.focus-queue-item {
  display: flex; align-items: center; gap: var(--sp-2);
  font-size: 13px; color: var(--text-dim); text-align: left; font-weight: 600;
  padding: 6px 12px; border-radius: 8px; background: var(--surface-2);
}
.focus-queue-item .q-time { margin-left: auto; font-variant-numeric: tabular-nums; }

.focus-celebrate {
  position: absolute; inset: 0; z-index: 3;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--sp-3);
  background: color-mix(in srgb, var(--bg) 75%, transparent); backdrop-filter: blur(4px);
}
.celebrate-gif {
  max-width: min(420px, 80vw); max-height: 40vh;
  border-radius: var(--radius-lg); border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-pop);
  animation: pop-in 400ms cubic-bezier(0.2, 1.6, 0.4, 1);
}
.celebrate-emoji { font-size: 96px; animation: pop-in 400ms cubic-bezier(0.2, 1.6, 0.4, 1); }
.celebrate-msg { font-size: 28px; font-weight: 800; animation: pop-in 500ms cubic-bezier(0.2, 1.6, 0.4, 1); }
@keyframes pop-in { from { transform: scale(0.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
#confetti-canvas { position: fixed; inset: 0; z-index: 120; pointer-events: none; width: 100%; height: 100%; }

/* ---------- Focus mini sayaç ---------- */
.focus-mini {
  position: fixed; right: 20px; bottom: 20px; z-index: 90;
  width: 280px; background: var(--bg-elev);
  border: 1px solid var(--border-strong); border-radius: var(--radius-lg);
  padding: var(--sp-3) var(--sp-4);
  box-shadow: var(--shadow-pop);
  cursor: grab; user-select: none;
}
.fm-row { display: flex; align-items: center; gap: var(--sp-3); }
.fm-title { flex: 1; font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-timer { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.fm-timer.overtime { color: var(--amber); }
.fm-timer.paused { opacity: 0.5; }
.fm-bar { height: 4px; border-radius: 3px; background: var(--surface-2); overflow: hidden; margin-top: 8px; }
.fm-fill { height: 100%; width: 0; background: var(--accent); transition: width 900ms linear; }
.fm-actions { display: flex; justify-content: center; gap: 6px; margin-top: 8px; }
.fm-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 32px; border-radius: 8px;
  background: var(--surface-2); border: none; color: var(--text-dim);
  transition: background var(--transition), color var(--transition);
}
.fm-btn:hover { background: var(--hover-bg-2); color: var(--text); }
.fm-ok { color: var(--green); }
.fm-celebrate {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--bg-elev) 85%, transparent); border-radius: var(--radius-lg);
  font-size: 40px; animation: pop-in 300ms ease;
}
.wall-active { color: var(--accent-ink) !important; }

/* ---------- Modallar ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(30, 22, 14, 0.45);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; z-index: 50;
  padding: var(--sp-4);
}
[data-theme="dark"] .modal-backdrop { background: rgba(0, 0, 0, 0.6); }
.modal {
  background: var(--bg-elev); border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg); padding: var(--sp-6); width: 100%; max-width: 480px;
  box-shadow: var(--shadow-pop);
  animation: modal-in 200ms ease;
  max-height: 90vh; overflow-y: auto;
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.modal-sm { max-width: 360px; }
.modal h3 { margin-bottom: var(--sp-5); font-size: 17px; font-weight: 800; }
.modal form { display: flex; flex-direction: column; gap: var(--sp-4); }
.modal label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 700; color: var(--text-dim); flex: 1; }
.modal input[type="color"] { padding: 4px; height: 44px; cursor: pointer; }
.form-row { display: flex; gap: var(--sp-3); }
.modal-actions { display: flex; justify-content: flex-end; gap: var(--sp-2); margin-top: var(--sp-2); }

/* Hızlı ekleme liste seçici */
.list-pick { display: flex; flex-direction: column; gap: var(--sp-2); }
.list-pick .list-pick-btn {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  min-height: 48px; padding: 0 var(--sp-4); font-size: 14px; font-weight: 700; color: var(--text);
  transition: border-color var(--transition), background var(--transition);
}
[data-theme="dark"] .list-pick .list-pick-btn { background: var(--surface-2); }
.list-pick .list-pick-btn:hover { border-color: var(--accent); background: var(--accent-soft); }
.list-pick-title { font-size: 13px; color: var(--text-dim); margin-bottom: var(--sp-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .kanban { grid-template-columns: repeat(4, 85vw); gap: var(--sp-3); padding: var(--sp-3); scroll-snap-type: x mandatory; }
  .kanban-col { scroll-snap-align: start; }
}
@media (max-width: 768px) {
  .topbar { gap: var(--sp-3); }
  .quick-add { order: 3; max-width: none; flex-basis: 100%; }
  .view-nav { order: 2; }
  .main { flex-direction: column; }
  .dd-label { max-width: 80px; }
  .form-row { flex-direction: column; }
  .badge-time, .badge-actual { display: none; }
  .project-body { grid-template-columns: 1fr; }
}

/* ---------- Hareket azaltma tercihi ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
