:root {
  --bg: #fbfbf8; --side: #f1f3ec; --strip: #e7ecdf; --panel: #ffffff;
  --text: #263029; --muted: #7d847c; --faint: #a3a99f; --line: #e3e6dd;
  --green: #405c46; --green-hover: #344c3a; --green-soft: #e2e9da; --dot: #6f8b68;
  --amber-bg: #f8ecd8; --amber: #9b7639; --blue-bg: #e6edf3; --blue: #4d6a82; --ok-bg: #e2ecdf; --ok: #3f6b45;
  --red: #b5483e; --red-bg: #f7e4e1; --radius: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 14px/1.5 "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
svg.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.hidden { display: none !important; }
.btn { display: inline-flex; align-items: center; gap: 8px; border-radius: 8px; padding: 10px 18px; font-weight: 600; font-size: 13px; white-space: nowrap; }
.btn.sm { padding: 6px 12px; font-size: 12px; }
.btn.primary { background: var(--green); color: #fff; }
.btn.primary:hover { background: var(--green-hover); }
.btn.outline { border: 1px solid var(--line); background: var(--panel); }
.btn.outline:hover { border-color: var(--dot); }
.btn.danger { color: var(--red); padding-left: 0; }
.link { color: var(--muted); font-size: 13px; display: inline-flex; gap: 6px; align-items: center; }
.link:hover { color: var(--green); }
.link svg { width: 15px; height: 15px; }
input, select, textarea { width: 100%; border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 9px 12px; }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--green-soft); border-color: var(--dot); }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--green); margin: 0; flex: none; }
label { display: block; font-size: 12px; color: var(--muted); margin: 12px 0 5px; }
kbd { font: 11px ui-monospace, Consolas, monospace; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; background: var(--panel); }

/* ------------------------------------------------ giriş */
#login { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: var(--side); }
.login-card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 32px; width: 100%; max-width: 390px; }
.login-card h1 { font-size: 26px; letter-spacing: -.02em; margin: 22px 0 6px; }
.login-card p { margin: 0 0 8px; color: var(--muted); }
.login-card .btn { width: 100%; justify-content: center; margin-top: 18px; }
.hint { font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.error { color: var(--red); font-size: 13px; min-height: 18px; margin-top: 8px; }

/* ------------------------------------------------ iskelet */
.strip { background: var(--strip); height: 34px; display: flex; justify-content: flex-end; align-items: center; gap: 22px; padding: 0 28px; font-size: 11.5px; color: var(--muted); }
.strip button { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.strip button:hover { color: var(--green); }
.layout { display: grid; grid-template-columns: 250px 1fr; min-height: calc(100vh - 34px); }
aside { background: var(--side); padding: 24px 20px 18px; display: flex; flex-direction: column; border-right: 1px solid var(--line); }
.logo { display: flex; align-items: center; gap: 10px; font-size: 21px; font-weight: 600; letter-spacing: -.03em; margin-bottom: 26px; }
.logo-mark { width: 36px; height: 36px; border-radius: 9px; background: var(--green); color: #fff; display: grid; place-items: center; }
.logo-mark svg { width: 20px; height: 20px; }
.logo b { color: var(--dot); }
.ws { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: flex; align-items: center; gap: 12px; }
.avatar { width: 32px; height: 32px; border-radius: 7px; background: var(--side); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.avatar.round { border-radius: 50%; background: var(--green-soft); color: var(--green); }
.avatar.xs { width: 26px; height: 26px; font-size: 10.5px; }
.ws-name { font-weight: 600; font-size: 13px; line-height: 1.3; }
.ws-sub { font-size: 11px; color: var(--muted); }
.ws .dot { margin-left: auto; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--dot); display: inline-block; flex: none; }
.dot.live { animation: pulse 2.4s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 4px rgba(111,139,104,.18); } }
.side-label { font-size: 10.5px; font-weight: 600; letter-spacing: .12em; color: var(--muted); margin: 28px 12px 10px; display: flex; justify-content: space-between; align-items: center; }
.side-label button { color: var(--muted); }
.side-label button:hover { color: var(--green); }
.nav { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; color: #4a524b; cursor: pointer; margin-bottom: 2px; }
.nav:hover { background: rgba(64,92,70,.06); }
.nav.active { background: var(--green-soft); color: var(--text); font-weight: 600; }
.nav .count { margin-left: auto; font-size: 12px; color: var(--muted); font-weight: 400; }
.nav .count.alert { color: var(--red); font-weight: 600; }
.proj-link { display: flex; align-items: center; gap: 10px; padding: 6px 12px; border-radius: 6px; cursor: pointer; font-size: 13px; overflow: hidden; }
.proj-link span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.proj-link small { color: var(--faint); font-size: 11px; }
.proj-link:hover, .proj-link.active { background: rgba(64,92,70,.08); }
.proj-link .dot.done { background: var(--faint); }
.proj-link .dot.todo { background: var(--blue); }
.tip { margin-top: 26px; background: var(--green-soft); border: 1px solid #d6dfcc; border-radius: 10px; padding: 18px; }
.tip svg { color: var(--green); }
.tip h4 { margin: 12px 0 6px; font-size: 13px; }
.tip p { margin: 0 0 12px; font-size: 12px; color: var(--muted); line-height: 1.6; }
.tip button { font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.tip button svg { width: 14px; height: 14px; }
.side-spacer { flex: 1; }
.side-foot { display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--line); margin-top: 22px; padding-top: 16px; }
.side-foot .avatar { border-radius: 50%; width: 34px; height: 34px; }

main { min-width: 0; }
.topbar { height: 74px; border-bottom: 1px solid var(--line); display: flex; align-items: center; padding: 0 44px; gap: 14px; }
.crumb { font-size: 13px; color: var(--muted); display: flex; gap: 14px; flex: 1; min-width: 0; }
.crumb a { color: inherit; text-decoration: none; }
.crumb a:hover { color: var(--green); }
.crumb b { color: var(--text); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-state { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; padding-right: 14px; border-right: 1px solid var(--line); }
.icon-btn { color: var(--muted); padding: 6px; border-radius: 6px; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; }
.icon-btn:hover { color: var(--green); background: var(--side); }
.menu-btn { display: none; }
.content { padding: 40px 44px 60px; max-width: 1100px; }

.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .12em; color: var(--muted); margin-bottom: 8px; }
.hero { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.hero h1 { font-size: 34px; letter-spacing: -.03em; font-weight: 600; margin: 0 0 12px; line-height: 1.2; overflow-wrap: anywhere; }
.hero p { margin: 0; color: var(--muted); font-size: 13px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.pill { display: inline-block; font-size: 11px; padding: 3px 9px; border-radius: 5px; font-weight: 500; white-space: nowrap; }
.pill.todo { background: var(--blue-bg); color: var(--blue); }
.pill.doing { background: var(--amber-bg); color: var(--amber); }
.pill.done { background: var(--ok-bg); color: var(--ok); }
.pill.late { background: var(--red-bg); color: var(--red); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 40px 0 36px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; cursor: pointer; transition: border-color .15s; }
.stat:hover { border-color: var(--dot); }
.stat-head { display: flex; justify-content: space-between; font-size: 12px; color: #5c645d; gap: 8px; }
.stat-head svg { color: var(--muted); }
.stat-num { font-size: 30px; font-weight: 600; margin: 18px 0 14px; letter-spacing: -.02em; }
.stat-sub { font-size: 10.5px; color: var(--muted); }
.stat.alert .stat-num { color: var(--red); }

.split { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; margin-bottom: 44px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; min-width: 0; }
.panel-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.panel-head h2 { font-size: 15px; margin: 0; font-weight: 600; }
.panel-head .link { margin-left: auto; font-size: 12px; }
.mini-empty { color: var(--muted); font-size: 13px; padding: 18px 0; }
.focus-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); cursor: pointer; }
.focus-item:first-of-type { border-top: 0; }
.focus-item:hover .row-title { color: var(--green); }
.focus-item > div { flex: 1; min-width: 0; }
.feed-item { display: flex; gap: 12px; padding: 9px 0; font-size: 12.5px; border-top: 1px solid var(--line); }
.feed-item:first-of-type { border-top: 0; }
.feed-item > div { min-width: 0; }
.feed-item .what { color: var(--muted); }
.feed-item .what b { color: var(--text); font-weight: 600; }
.feed-item .target { color: var(--text); cursor: pointer; overflow-wrap: anywhere; }
.feed-item .target:hover { color: var(--green); text-decoration: underline; }
.feed-item time { display: block; font-size: 11px; color: var(--faint); }

.tabs-row { display: flex; align-items: center; gap: 20px; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.tabs { display: flex; gap: 22px; }
.tab { padding: 12px 0; font-size: 13px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab.active { color: var(--text); font-weight: 600; border-color: var(--green); }
.search { margin-left: auto; display: flex; align-items: center; gap: 10px; color: var(--muted); width: 270px; margin-top: 0; margin-bottom: 0; }
.search input { border: 0; background: transparent; padding: 6px 0; font-size: 12px; }
.search input:focus { outline: none; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: -10px 0 22px; }
.toolbar select { font-size: 12.5px; padding: 7px 10px; width: auto; min-width: 150px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-left: auto; background: var(--panel); }
.seg button { padding: 6px 12px; font-size: 12px; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
.seg button svg { width: 14px; height: 14px; }
.seg button.on { background: var(--green-soft); color: var(--text); font-weight: 600; }
.clear-filters { font-size: 12px; color: var(--muted); text-decoration: underline; }

.sec { margin-bottom: 44px; }
.sec-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.sec-head h2 { font-size: 16px; margin: 0; font-weight: 600; }
.badge { font-size: 11px; background: var(--side); color: var(--muted); border-radius: 5px; padding: 1px 8px; }
.sec-head .link { margin-left: auto; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; cursor: pointer; display: flex; flex-direction: column; transition: border-color .15s, box-shadow .15s; min-height: 200px; min-width: 0; }
.card:hover { border-color: var(--dot); box-shadow: 0 4px 16px rgba(38,48,41,.05); }
.card-top { display: flex; justify-content: space-between; gap: 10px; font-size: 10px; letter-spacing: .14em; font-weight: 600; color: var(--muted); }
.card-top span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-top svg { width: 15px; height: 15px; }
.card h3 { font-size: 16px; margin: 18px 0 8px; font-weight: 600; overflow-wrap: anywhere; }
.card .desc { font-size: 12px; color: var(--muted); flex: 1; white-space: pre-wrap; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.card-foot { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 14px; display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 11px; color: var(--muted); }
.progress { height: 4px; background: var(--side); border-radius: 4px; margin-top: 14px; overflow: hidden; }
.progress div { height: 100%; background: var(--dot); transition: width .3s; }

.rows { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.row { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); cursor: pointer; }
.row:last-child { border-bottom: 0; }
.row:hover { background: #fafbf7; }
.check { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid #c3c9bd; display: grid; place-items: center; color: #fff; flex: none; }
.check:hover { border-color: var(--green); }
.check svg { width: 13px; height: 13px; stroke-width: 2.5; }
.check.doing { border-color: var(--amber); background: var(--amber-bg); }
.check.done { background: var(--green); border-color: var(--green); }
.row-title { font-weight: 500; overflow-wrap: anywhere; }
.done > div > .row-title, .done .row-title { color: var(--muted); text-decoration: line-through; }
.row-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.row-meta span { display: inline-flex; align-items: center; gap: 5px; }
.row-meta svg { width: 13px; height: 13px; }
.row-meta .late { color: var(--red); font-weight: 600; }
.row-meta .hi { color: var(--red); font-weight: 600; }

/* ------------------------------------------------ kanban */
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.col { background: var(--side); border-radius: var(--radius); padding: 12px; min-height: 160px; transition: background .15s, outline-color .15s; outline: 2px dashed transparent; outline-offset: -2px; }
.col.over { background: var(--green-soft); outline-color: var(--dot); }
.col-head { display: flex; align-items: center; gap: 8px; padding: 4px 6px 12px; font-weight: 600; font-size: 13px; }
.col-head .badge { background: var(--panel); }
.col-head button { margin-left: auto; color: var(--muted); }
.col-head button:hover { color: var(--green); }
.kcard { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 8px; cursor: grab; }
.kcard:hover { border-color: var(--dot); }
.kcard.dragging { opacity: .45; }
.kcard .row-title { font-size: 13px; }
.kcard-top { display: flex; gap: 10px; align-items: flex-start; }
.kcard-top > div { flex: 1; min-width: 0; }
.kcard .prog { margin-top: 8px; }
.kcard .progress { margin-top: 4px; }

.empty { border: 1px dashed #d4d9cd; border-radius: var(--radius); padding: 34px 20px; text-align: center; color: var(--muted); font-size: 13px; }
.empty button { color: var(--green); font-weight: 600; margin-left: 4px; }

/* ------------------------------------------------ markdown */
.md { font-size: 13.5px; line-height: 1.65; overflow-wrap: anywhere; }
.md > :first-child { margin-top: 0; }
.md h1, .md h2, .md h3 { margin: 18px 0 8px; line-height: 1.3; }
.md h1 { font-size: 20px; } .md h2 { font-size: 17px; } .md h3 { font-size: 15px; }
.md p { margin: 0 0 10px; }
.md ul, .md ol { margin: 0 0 10px; padding-left: 22px; }
.md li.task { list-style: none; margin-left: -20px; }
.md code { font: 12.5px ui-monospace, Consolas, monospace; background: var(--side); padding: 1px 5px; border-radius: 4px; }
.md pre { background: #263029; color: #e9eee5; padding: 12px 14px; border-radius: 8px; overflow: auto; margin: 0 0 12px; }
.md pre code { background: none; padding: 0; color: inherit; }
.md a { color: var(--green); }
.md blockquote { margin: 0 0 10px; padding: 4px 12px; border-left: 3px solid var(--dot); color: var(--muted); }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }

/* ------------------------------------------------ modal */
.backdrop { position: fixed; inset: 0; background: rgba(30,38,32,.35); display: grid; place-items: center; padding: 16px; z-index: 20; }
.modal { background: var(--panel); border-radius: 16px; padding: 26px; width: 100%; max-width: 580px; max-height: calc(100vh - 32px); overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,.15); }
.modal.wide { max-width: 720px; }
.modal-title { display: flex; align-items: center; gap: 10px; }
.modal h3 { margin: 0; font-size: 18px; letter-spacing: -.01em; flex: 1; }
.modal textarea { min-height: 110px; resize: vertical; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 14px; }
.modal-actions { display: flex; gap: 10px; margin-top: 20px; align-items: center; }
.modal-actions .spacer { flex: 1; }
.meta { font-size: 11.5px; color: var(--muted); margin-top: 12px; }
.block { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 16px; }
.block-head { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 13px; margin-bottom: 10px; }
.block-head .muted { color: var(--muted); font-weight: 400; font-size: 12px; }
.block-head .progress { flex: 1; margin: 0; max-width: 160px; }
.cl-item { display: flex; align-items: center; gap: 10px; padding: 6px 4px; border-radius: 6px; }
.cl-item:hover { background: var(--bg); }
.cl-item span { flex: 1; font-size: 13px; overflow-wrap: anywhere; }
.cl-item.done span { color: var(--muted); text-decoration: line-through; }
.cl-item button { color: var(--faint); opacity: 0; }
.cl-item:hover button { opacity: 1; }
.cl-item button:hover { color: var(--red); }
.add-line { display: flex; gap: 8px; margin-top: 8px; }
.add-line input { padding: 7px 10px; font-size: 13px; }
.comment { display: flex; gap: 10px; padding: 8px 0; }
.comment > div { flex: 1; min-width: 0; }
.comment .who { font-size: 12px; color: var(--muted); }
.comment .who b { color: var(--text); }
.comment .who button { margin-left: 8px; font-size: 11px; color: var(--faint); }
.comment .who button:hover { color: var(--red); }
.comment .body { font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 2px; }
.history { font-size: 12px; color: var(--muted); }
.history div { padding: 3px 0; }
.history b { color: var(--text); font-weight: 600; }
details summary { cursor: pointer; font-weight: 600; font-size: 13px; list-style: none; }
details summary::before { content: "▸ "; color: var(--muted); }
details[open] summary::before { content: "▾ "; }
.seg.inline { margin-left: 0; }
.preview { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; min-height: 200px; max-height: 50vh; overflow: auto; }

#toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--text); color: #fff; padding: 10px 18px; border-radius: 10px; font-size: 13px; opacity: 0; pointer-events: none; transition: all .2s; z-index: 40; }
#toast.show { opacity: 1; transform: translateX(-50%); }

@media (max-width: 1000px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .layout { grid-template-columns: 1fr; }
  aside { position: fixed; top: 0; bottom: 0; left: 0; width: 270px; z-index: 15; transform: translateX(-100%); transition: transform .2s; overflow: auto; }
  aside.open { transform: none; box-shadow: 0 0 0 100vw rgba(30,38,32,.3); }
  .menu-btn { display: inline-flex; }
  .topbar { padding: 0 16px; height: 60px; gap: 8px; }
  .db-state span:last-child, .icon-btn .lbl { display: none; }
  .content { padding: 26px 16px 50px; }
  .hero { flex-direction: column; }
  .hero h1 { font-size: 27px; }
  .stats { gap: 10px; margin: 28px 0 28px; }
  .stat { padding: 16px; }
  .tabs-row { flex-wrap: wrap; gap: 0; }
  .tabs { overflow-x: auto; }
  .search { width: 100%; margin: 0; border-top: 1px solid var(--line); }
  .seg { margin-left: 0; }
  .board { grid-template-columns: 1fr; gap: 12px; }
  .col { min-height: 0; }
  .grid2 { grid-template-columns: 1fr; }
  .grid3 { grid-template-columns: 1fr 1fr; }
  .strip { padding: 0 16px; }

  /* Üst çubukta yalnızca bulunulan sayfa */
  .crumb a, .crumb a + span { display: none; }
  .crumb b { font-size: 15px; font-weight: 600; }

  /* Filtreler: iki sütun, görünüm seçici tam satır */
  .toolbar { display: grid; grid-template-columns: 1fr 1fr; margin-top: 0; }
  .toolbar select { width: 100%; min-width: 0; }
  .toolbar .seg { grid-column: 1 / -1; justify-self: start; }
  .clear-filters { grid-column: 1 / -1; justify-self: start; }
  .hero-actions { justify-content: flex-start; }

  /* iOS'ta odaklanınca sayfanın yakınlaşmasını önler */
  input, select, textarea, .search input { font-size: 16px; }

  /* Pencereler alttan açılan tam genişlik sayfa; Kaydet her zaman görünür */
  .backdrop { place-items: end center; padding: 0; }
  .modal, .modal.wide { max-width: none; border-radius: 18px 18px 0 0; max-height: 94vh; padding: 20px 18px 0; }
  .modal-actions { position: sticky; bottom: 0; background: var(--panel); margin: 16px -18px 0; padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
  .modal-actions .btn { padding: 11px 16px; }
  .modal .error:empty { min-height: 0; margin: 0; }
  #toast { bottom: calc(84px + env(safe-area-inset-bottom)); max-width: calc(100vw - 32px); }
}

/* Dokunmatik ekranlar: büyük dokunma alanları, fareyle-üzerine-gelme yok */
@media (pointer: coarse) {
  .check { width: 26px; height: 26px; border-radius: 7px; }
  .check svg { width: 15px; height: 15px; }
  .cl-item { padding: 9px 4px; }
  .cl-item input[type=checkbox] { width: 20px; height: 20px; }
  .nav { padding: 12px; }
  .proj-link { padding: 10px 12px; }
  .icon-btn { padding: 9px; }
  .kcard { cursor: pointer; }
  .side-foot .ws-sub { display: none; }
}
@media (hover: none) {
  .cl-item button { opacity: 1; }
}

/* ------------------------------------------------ kişisel takvim */
.cal-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 20px; margin-top: 32px; align-items: start; }
.cal { padding: 18px; }
.cal-head { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.cal-head h2 { flex: 1; text-align: center; font-size: 16px; margin: 0; text-transform: capitalize; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-grid.weekdays div { font-size: 11px; color: var(--muted); text-align: center; padding-bottom: 6px; font-weight: 600; }
.cell { min-height: 92px; border: 1px solid var(--line); border-radius: 8px; padding: 5px; text-align: left; display: flex; flex-direction: column; gap: 3px; background: var(--panel); min-width: 0; overflow: hidden; }
.cell:hover { border-color: var(--dot); }
.cell.other { background: var(--bg); }
.cell.other .num { color: var(--faint); }
.cell.sel { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.cell-head { display: flex; align-items: center; justify-content: space-between; }
.num { font-size: 12px; font-weight: 600; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; }
.cell.today .num { background: var(--green); color: #fff; }
.has-note svg { width: 13px; height: 13px; color: var(--muted); }
.chips { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.chip { font-size: 10.5px; line-height: 1.35; padding: 1px 5px; border-radius: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip b { font-weight: 600; }
.chip.mine { background: var(--green-soft); color: var(--green); }
.chip.team { background: var(--amber-bg); color: var(--amber); cursor: pointer; }
.chip.late { background: var(--red-bg); color: var(--red); }
.chip.done { text-decoration: line-through; opacity: .6; }
.more { font-size: 10px; color: var(--muted); padding-left: 4px; }
.dots { display: none; gap: 3px; justify-content: center; margin-top: auto; }
.d { width: 6px; height: 6px; border-radius: 50%; display: inline-block; flex: none; }
.d.mine { background: var(--green); } .d.done { background: var(--faint); } .d.team { background: #d1a253; }
.d.late { background: var(--red); } .d.note { background: var(--blue); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 11px; color: var(--muted); margin-top: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }

.day-panel { position: sticky; top: 16px; }
.day-head { display: flex; align-items: center; gap: 8px; }
.day-head > div { flex: 1; text-align: center; }
.day-head h2 { font-size: 16px; margin: 2px 0 0; }
.carry { display: flex; align-items: center; gap: 10px; background: var(--amber-bg); color: var(--amber); border-radius: 8px; padding: 10px 12px; margin-top: 14px; font-size: 12.5px; }
.carry span { flex: 1; }
.cl-item.daily time { font-size: 11.5px; font-weight: 600; color: var(--green); background: var(--green-soft); border-radius: 4px; padding: 0 6px; flex: none; }
.cl-item.daily span { cursor: text; }
.cl-item .move { font-size: 11px; color: var(--muted); opacity: 0; padding: 2px 6px; border-radius: 4px; }
.cl-item:hover .move { opacity: 1; }
.cl-item .move:hover { color: var(--green); background: var(--green-soft); }
.daily-add input[type=time] { width: 112px; flex: none; }
.day-note { min-height: 150px; resize: vertical; font-size: 13.5px; line-height: 1.6; }
.today-line { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 12px; padding: 10px 12px; border-radius: 8px; background: var(--side); font-size: 12.5px; color: var(--text); text-align: left; }
.today-line:hover { background: var(--green-soft); }
.today-line > span:last-child { margin-left: auto; color: var(--muted); }
.today-line svg { width: 15px; height: 15px; }

@media (max-width: 1000px) {
  .cal-layout { grid-template-columns: 1fr; }
  .day-panel { position: static; }
}
@media (max-width: 760px) {
  .cal-layout { margin-top: 24px; gap: 14px; }
  .cal { padding: 12px 8px; }
  .cal-grid { gap: 2px; }
  .cell { min-height: 50px; padding: 4px 2px; align-items: center; border-color: transparent; background: transparent; }
  .cell.other { background: transparent; }
  .cell.sel { border-color: var(--green); background: var(--green-soft); box-shadow: none; }
  .cell-head { justify-content: center; }
  .chips, .has-note { display: none; }
  .dots { display: flex; }
  .num { width: 28px; height: 28px; font-size: 13px; }
  .daily-add { flex-wrap: wrap; }
  .daily-add input[type=time] { width: 120px; }
  .daily-add input:not([type=time]) { flex: 1 1 100%; order: -1; }
  .daily-add .btn { flex: 1; justify-content: center; }
}
@media (hover: none) {
  .cl-item .move { opacity: 1; }
}

/* ------------------------------------------------ çoklu gün seçimi */
.btn.outline.on { background: var(--green-soft); border-color: var(--green); color: var(--green); }
.cell.multi { background: var(--green-soft); border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.cell.multi .num { background: var(--green); color: #fff; }
.date-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.date-pill { display: inline-flex; align-items: center; gap: 4px; background: var(--green-soft); color: var(--green); border-radius: 999px; padding: 3px 6px 3px 10px; font-size: 12px; font-weight: 500; }
.date-pill button { color: var(--green); display: inline-flex; opacity: .7; }
.date-pill button:hover { opacity: 1; }
.date-pill svg { width: 13px; height: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
@media (pointer: coarse) { .desk-only { display: none; } }
@media (max-width: 760px) {
  .cell.multi { background: var(--green-soft); border-color: var(--green); }
}

/* ------------------------------------------------ haftalık görünüm, listeler, tekrarlar */
.cal-main { min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.cal-main .sec { margin: 0; }
.cal-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: -4px 0 14px; }
.cal-tools .seg { margin-right: auto; }
.week { display: flex; flex-direction: column; gap: 6px; }
.week-day { display: grid; grid-template-columns: 58px 1fr; gap: 12px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--panel); }
.week-day.today .week-date .num { background: var(--green); color: #fff; }
.week-day.sel { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.week-day.multi { background: var(--green-soft); border-color: var(--green); }
.week-date { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 2px 0; border-radius: 8px; align-self: start; }
.week-date:hover { background: var(--side); }
.week-date .wd { font-size: 11px; color: var(--muted); font-weight: 600; }
.week-date .num { width: 30px; height: 30px; font-size: 14px; }
.week-items { display: flex; flex-direction: column; gap: 4px; min-width: 0; justify-content: center; }
.week-item { display: flex; align-items: center; gap: 8px; font-size: 13px; min-width: 0; }
.week-item span:not(.rec) { overflow-wrap: anywhere; }
.week-item time { font-size: 11.5px; font-weight: 600; color: var(--green); background: var(--green-soft); border-radius: 4px; padding: 0 6px; flex: none; }
.week-item.done span { color: var(--muted); text-decoration: line-through; }
.week-item.late span { color: var(--red); }
.week-empty { color: var(--faint); font-size: 12.5px; text-align: left; padding: 4px 0; }
.week-empty:hover { color: var(--green); }
.week-note { display: flex; gap: 6px; align-items: flex-start; font-size: 12px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 6px; margin-top: 2px; }
.week-note svg { width: 13px; height: 13px; flex: none; margin-top: 2px; }
.rec { display: inline-flex; color: var(--muted); flex: none; }
.rec svg { width: 13px; height: 13px; }
.drop { outline: 2px dashed var(--green) !important; outline-offset: -2px; background: var(--green-soft) !important; }

.cl-item .more-btn { color: var(--muted); opacity: 1; }
.cl-item .more-btn svg { width: 18px; height: 18px; }
.cl-item.open { background: var(--bg); }
.item-actions { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 4px 10px 30px; }
.item-actions .btn.danger { padding-left: 8px; }
.sm-select { width: auto; padding: 5px 8px; font-size: 12px; border-radius: 8px; }
.daily-add { flex-wrap: wrap; }
.daily-add input:not([type=time]) { flex: 1 1 220px; }
.daily-add .sm-select { flex: 0 1 auto; }
.panel-actions { display: flex; align-items: center; gap: 10px; margin-top: 18px; }
.panel-actions .spacer { flex: 1; }

.lists-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; align-items: start; }
.lists-grid.compact { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.list-card { padding: 16px 16px 14px; }
.list-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.list-head h3 { margin: 0; font-size: 15px; cursor: text; overflow-wrap: anywhere; }
.list-head .icon-btn { margin-left: auto; }
.list-head .icon-btn svg { width: 15px; height: 15px; }
.list-item { cursor: grab; }
.list-item.dragging { opacity: .4; }
.list-item .act { color: var(--muted); opacity: 0; }
.list-item:hover .act { opacity: 1; }
.list-item .act svg { width: 15px; height: 15px; }
.schedule-row { padding: 0 4px 8px 30px; margin-top: 0; flex-wrap: wrap; }
.schedule-row input[type=date] { flex: 1 1 140px; }
.schedule-row input[type=time] { width: 110px; flex: none; }
.done-list { margin-top: 10px; }
.done-list summary { font-size: 12px; font-weight: 500; color: var(--muted); }
.cal-lists .sec-head { margin-bottom: 12px; flex-wrap: wrap; }
.cal-lists .sec-head .link { margin-left: auto; }

.rec-panel .rec-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.rec-panel .rec-row:first-of-type { border-top: 0; }
.rec-panel .rec-row > div { flex: 1; min-width: 0; }
.rec-panel .rec-row > span svg { color: var(--green); }

@media (max-width: 760px) {
  .week-day { grid-template-columns: 46px 1fr; padding: 8px 10px; gap: 8px; }
  .daily-add input:not([type=time]) { flex: 1 1 100%; }
  .daily-add .sm-select { flex: 1 1 auto; }
  .item-actions { padding-left: 4px; }
  .item-actions .btn, .item-actions .sm-select { flex: 1 1 auto; }
  .lists-grid, .lists-grid.compact { grid-template-columns: 1fr; }
}
@media (hover: none) {
  .list-item .act { opacity: 1; }
  .list-item { cursor: default; }
}

/* ------------------------------------------------ sayfa içi pencere, yeni liste kartı */
#ask-modal { z-index: 30; }
.btn.primary.danger-fill { background: var(--red); }
.btn.primary.danger-fill:hover { background: #9c3c33; }
.new-list { border-style: dashed; background: var(--bg); }
.ideas { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.ideas button { font-size: 12px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--text); }
.ideas button:hover { border-color: var(--green); color: var(--green); }

/* ------------------------------------------------ tekrarlayan işler paneli */
.rec-panel .panel-head svg { color: var(--green); }
.rec-panel .rec-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.rec-form { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 12px; }
.rec-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 0 12px; }
.rec-grid label { margin: 6px 0 0; }
.rec-grid label > input, .rec-grid label > select { margin-top: 5px; }
.rec-grid .full { grid-column: 1 / -1; }
.wd-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 12px 0 2px; font-size: 12px; color: var(--muted); }
.wd-chip { min-width: 44px; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); font-size: 12.5px; color: var(--text); }
.wd-chip.on { background: var(--green); border-color: var(--green); color: #fff; font-weight: 600; }
.rec-form > .btn { margin-top: 12px; }
@media (max-width: 760px) {
  .rec-grid { grid-template-columns: 1fr 1fr; }
  .wd-chip { flex: 1 1 0; min-width: 0; }
  .rec-form > .btn { width: 100%; justify-content: center; }
}

/* ------------------------------------------------ pano grafikleri */
.kpi-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.kpi-row .spark { width: 96px; height: 30px; margin-bottom: 14px; }
.delta { font-size: 11.5px; display: inline-flex; align-items: center; gap: 4px; }
.delta svg { width: 13px; height: 13px; }
.delta.up { color: #006300; }
.delta.down { color: var(--red); font-weight: 600; }
.delta.flat { color: var(--muted); }

.dash-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 20px; margin-bottom: 44px; }
.dash-panel { display: flex; flex-direction: column; }
.dash-panel .panel-head { flex-wrap: wrap; }
.legend.inline { display: flex; gap: 14px; margin: 0 0 0 auto; font-size: 11.5px; color: var(--muted); }
.legend.inline span { display: inline-flex; align-items: center; gap: 6px; }
.key { display: inline-block; flex: none; }
.key.bar { width: 10px; height: 10px; border-radius: 3px; }
.key.line { width: 14px; height: 2px; border-radius: 2px; }

.chart { width: 100%; }
.viz-svg { width: 100%; height: auto; display: block; overflow: visible; }
.viz-svg .grid { stroke: #ecede7; stroke-width: 1; }
.viz-svg .axis { stroke: #c3c2b7; stroke-width: 1; }
.viz-svg .tick { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.viz-svg .val { fill: var(--text); font-size: 12px; font-weight: 600; }
.viz-svg .hit { fill: transparent; cursor: default; }
.viz-svg .hit:hover { fill: rgba(64, 92, 70, .06); }
.table-view { margin-top: 8px; font-size: 12px; }
.table-view summary { font-size: 12px; font-weight: 500; color: var(--muted); }
.table-view table { width: 100%; border-collapse: collapse; margin-top: 8px; font-variant-numeric: tabular-nums; }
.table-view th, .table-view td { text-align: left; padding: 5px 8px; border-bottom: 1px solid var(--line); }
.table-view th { color: var(--muted); font-weight: 500; }

.agenda { display: flex; flex-direction: column; gap: 12px; }
.agenda-day { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.agenda-day .agenda-count { margin-left: auto; font-weight: 500; }
.agenda-group.late .agenda-day { color: var(--red); }
.agenda-day svg { width: 13px; height: 13px; }
.agenda-item { display: flex; flex-direction: column; align-items: flex-start; width: 100%; text-align: left; padding: 7px 10px; border-radius: 8px; border-left: 3px solid var(--green-soft); }
.agenda-group.late .agenda-item { border-left-color: var(--red-bg); }
.agenda-item:hover { background: var(--bg); }
.agenda-item .row-title { font-size: 13px; }
.agenda .more { font-size: 11.5px; color: var(--muted); padding-left: 13px; }

.hbar-row { display: grid; grid-template-columns: minmax(70px, 120px) 1fr 28px auto; align-items: center; gap: 10px; padding: 6px 4px; border-radius: 6px; cursor: pointer; }
.hbar-row:hover { background: var(--bg); }
.hbar-name { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-track { height: 14px; }
.hbar { display: flex; gap: 2px; height: 100%; min-width: 4px; }
.hbar span { display: block; height: 100%; min-width: 4px; }
.hbar span:last-child { border-radius: 0 4px 4px 0; }
.hbar-val { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.hbar-late { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--red); font-weight: 600; white-space: nowrap; }
.hbar-late svg { width: 12px; height: 12px; }

.meter-row { display: block; width: 100%; text-align: left; padding: 8px 4px; border-radius: 6px; }
.meter-row:hover { background: var(--bg); }
.meter-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.meter-pct { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.meter { height: 8px; border-radius: 4px; background: #dcebe0; overflow: hidden; }
.meter div { height: 100%; background: var(--dot); border-radius: 0 4px 4px 0; }
.meter-row .row-meta .late { display: inline-flex; align-items: center; gap: 4px; }
.meter-row .row-meta svg { width: 12px; height: 12px; }

#viz-tip { position: fixed; left: 0; top: 0; z-index: 50; pointer-events: none; background: var(--text); color: #fff; font-size: 12px; line-height: 1.4; padding: 6px 10px; border-radius: 6px; max-width: 260px; opacity: 0; transition: opacity .1s; box-shadow: 0 6px 20px rgba(0,0,0,.15); }
#viz-tip.show { opacity: 1; }

@media (max-width: 1000px) {
  .dash-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .kpi-row .spark { width: 70px; }
  .hbar-row { grid-template-columns: 84px 1fr 24px; }
  .hbar-late { grid-column: 2 / -1; }
  .legend.inline { margin-left: 0; width: 100%; }
}

/* ------------------------------------------------ Excel'e aktar */
.toolbar .export-btn svg { width: 15px; height: 15px; }
@media (max-width: 760px) { .toolbar .export-btn { grid-column: 1 / -1; justify-content: center; } }

/* ------------------------------------------------ ekip */
.member-add { display: flex; gap: 10px; margin: 28px 0 20px; padding: 14px; }
.member-add input { flex: 1; }
.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.member-card { display: flex; flex-direction: column; gap: 14px; }
.member-head { display: flex; align-items: center; gap: 12px; }
.member-head > div { flex: 1; min-width: 0; }
.member-head h3 { margin: 0; font-size: 15px; overflow-wrap: anywhere; }
.member-head .avatar { width: 40px; height: 40px; font-size: 14px; }
.member-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.member-stats div { background: var(--bg); border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; }
.member-stats strong { font-size: 18px; font-weight: 600; }
.member-stats span { font-size: 11px; color: var(--muted); }
.member-next { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; border-left: 3px solid var(--green-soft); padding: 6px 10px; border-radius: 6px; }
button.member-next:hover { background: var(--bg); }
.member-next.empty-next { color: var(--faint); font-size: 12.5px; }
.member-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.member-actions .btn svg { width: 14px; height: 14px; }
.member-foot { display: flex; gap: 16px; border-top: 1px solid var(--line); padding-top: 10px; }
.member-foot .link { font-size: 12px; }
.danger-link:hover { color: var(--red); }
@media (max-width: 760px) {
  .member-add { flex-direction: column; }
  .member-grid { grid-template-columns: 1fr; }
}
