/* Layout: sabit sol menü + içerik (masaüstü); telefonda üst başlık + alt sekme çubuğu; görev ve proje detayı sağdan açılan panel */
:root {
  --bg: #F3F4F8;
  --surface: #FFFFFF;
  --surface-2: #ECEEF5;
  --ink: #1C1F2E;
  --muted: #6A6F87;
  --line: #E2E5EE;
  --coral: #EE6243;
  --teal: #13968A;
  --c-todo: #8A8FA8; --c-doing: #3A7BEA; --c-review: #D29200; --c-done: #1E9A60;
  --p-teklif: #8A74F0; --p-devam: #3A7BEA; --p-beklemede: #D29200; --p-tamam: #1E9A60;
  --t-teknik: #5466EE; --t-tasarim: #D2468C; --t-icerik: #C98400; --t-odeme: #1E9A60; --t-toplanti: #6A6F87;
  --bad: #DD3F48;
  --scrim: rgba(20, 22, 38, .38);
  --shadow: 0 1px 2px rgba(28,31,46,.05), 0 8px 24px -12px rgba(28,31,46,.18);
  --ws: var(--coral);
  --font-d: "Bricolage Grotesque", "Plus Jakarta Sans", system-ui, sans-serif;
  --font-b: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111219; --surface: #1A1C26; --surface-2: #232634; --ink: #ECEDF4; --muted: #9A9EB5; --line: #2B2E3D;
    --coral: #FF7A5C; --teal: #2EC2B0;
    --c-todo: #9A9EB5; --c-doing: #6FA0FF; --c-review: #F0B429; --c-done: #3DCB86;
    --p-teklif: #A594FF; --p-devam: #6FA0FF; --p-beklemede: #F0B429; --p-tamam: #3DCB86;
    --t-teknik: #8C99FF; --t-tasarim: #FF7DB8; --t-icerik: #F0B429; --t-odeme: #3DCB86; --t-toplanti: #9A9EB5;
    --bad: #FF6670; --scrim: rgba(0,0,0,.55); --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 28px -12px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111219; --surface: #1A1C26; --surface-2: #232634; --ink: #ECEDF4; --muted: #9A9EB5; --line: #2B2E3D;
  --coral: #FF7A5C; --teal: #2EC2B0;
  --c-todo: #9A9EB5; --c-doing: #6FA0FF; --c-review: #F0B429; --c-done: #3DCB86;
  --p-teklif: #A594FF; --p-devam: #6FA0FF; --p-beklemede: #F0B429; --p-tamam: #3DCB86;
  --t-teknik: #8C99FF; --t-tasarim: #FF7DB8; --t-icerik: #F0B429; --t-odeme: #3DCB86; --t-toplanti: #9A9EB5;
  --bad: #FF6670; --scrim: rgba(0,0,0,.55); --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 28px -12px rgba(0,0,0,.6);
  color-scheme: dark;
}
body[data-color="teal"] { --ws: var(--teal); } body[data-color="indigo"] { --ws: var(--indigo); } body[data-color="amber"] { --ws: var(--amber); } body[data-color="rose"] { --ws: var(--rose); }

* { box-sizing: border-box; }
body { background: var(--bg); color: var(--ink); font-family: var(--font-b); font-size: 14px; line-height: 1.5; }
h1, h2, h3 { font-family: var(--font-d); font-weight: 700; letter-spacing: -.02em; margin: 0; text-wrap: balance; }
h1 { font-size: 30px; line-height: 1.1; }
h2 { font-size: 22px; }
h3 { font-size: 15px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--ws); outline-offset: 2px; border-radius: 8px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }

/* ---------- Kabuk ---------- */
.app { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 22px;
  padding-block: 22px; padding-right: 14px; padding-left: max(14px, env(safe-area-inset-left, 0px));
  background: var(--surface); border-right: 1px solid var(--line);
}
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-d); font-weight: 700; font-size: 19px; padding: 0 8px; }
.logo svg { flex: none; }
.label { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 0 10px; }
.stack { display: flex; flex-direction: column; gap: 4px; }
.wsbtn, .navbtn { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 9px 10px; border-radius: 12px; border: 0; background: transparent; }
.wsbtn:hover, .navbtn:hover { background: var(--surface-2); }
.wsbtn[aria-current="true"], .navbtn[aria-current="true"] { background: var(--surface-2); font-weight: 600; }
.wsdot { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 12px; background: var(--c); flex: none; }
.wsbtn small { display: block; color: var(--muted); font-size: 12px; font-weight: 500; }
.navbtn svg { flex: none; opacity: .75; }
.navbtn .count { margin-left: auto; font-size: 12px; font-weight: 600; min-width: 22px; text-align: center; padding: 1px 7px; border-radius: 99px; background: var(--surface-2); color: var(--muted); }
.navbtn .count.alert { background: color-mix(in oklab, var(--bad) 16%, transparent); color: var(--bad); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding: 0 6px; }
.draft { font-size: 12px; color: var(--muted); background: var(--surface-2); border-radius: 12px; padding: 10px 12px; }

.main {
  min-width: 0; width: 100%; max-width: 1320px;
  padding-block: 30px 56px;
  padding-left: max(28px, env(safe-area-inset-left, 0px)); padding-right: max(28px, env(safe-area-inset-right, 0px));
  display: flex; flex-direction: column; gap: 20px;
}
.mhead { display: none; }
.bottomnav { display: none; }

/* ---------- Ortak parçalar ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); padding: 9px 14px; border-radius: 12px; font-weight: 600; white-space: nowrap; }
.btn:hover { border-color: color-mix(in oklab, var(--ink) 25%, var(--line)); }
.btn.primary { background: var(--ws); border-color: transparent; color: #fff; box-shadow: 0 6px 16px -8px var(--ws); }
.btn.primary:hover { filter: brightness(1.05); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.small { padding: 6px 10px; font-size: 13px; border-radius: 10px; }
.iconbtn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); }
.chip { --c: var(--muted); display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap;
  background: color-mix(in oklab, var(--c) 15%, transparent); color: color-mix(in oklab, var(--c) 78%, var(--ink)); }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.chip.plain::before { display: none; }
.ps-teklif { --c: var(--p-teklif); } .ps-devam { --c: var(--p-devam); } .ps-beklemede { --c: var(--p-beklemede); } .ps-tamam { --c: var(--p-tamam); }
.iv-kesilecek { --c: var(--muted); } .iv-kesildi { --c: var(--p-beklemede); } .iv-gecikti { --c: var(--bad); } .iv-odendi { --c: var(--p-tamam); }
.ty { --c: var(--muted); display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; letter-spacing: .03em; color: color-mix(in oklab, var(--c) 85%, var(--ink)); }
.ty::before { content: ""; width: 8px; height: 8px; border-radius: 3px; background: var(--c); }
.ty-teknik { --c: var(--t-teknik); } .ty-tasarim { --c: var(--t-tasarim); } .ty-icerik { --c: var(--t-icerik); } .ty-odeme { --c: var(--t-odeme); } .ty-toplanti { --c: var(--t-toplanti); }
.av { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 11px; font-weight: 700; color: #fff; background: var(--c); border: 2px solid var(--surface); flex: none; }
.avs { display: inline-flex; }
.avs .av + .av { margin-left: -8px; }
.emo { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-size: 19px; flex: none; background: color-mix(in oklab, var(--ws) 13%, var(--surface)); border: 0; }
.bar { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: inherit; background: var(--ws); transition: width .35s ease; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 12px; background: var(--surface-2); max-width: 100%; overflow-x: auto; }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 9px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.eyebrow { margin: 0 0 6px; font-size: 13px; font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.stats { display: flex; gap: 12px; flex-wrap: wrap; }
.stat { flex: 1 1 170px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 16px; display: flex; flex-direction: column; gap: 2px; }
.stat b { font-family: var(--font-d); font-size: 22px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat span { font-size: 13px; color: var(--muted); }
.stat.alert b { color: var(--bad); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.fbtn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 6px 13px; font-weight: 600; font-size: 13px; color: var(--muted); white-space: nowrap; }
.fbtn[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.hint { font-size: 13px; color: var(--muted); }
.hint-mob { display: none; }

/* ---------- Pano ---------- */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; align-items: start; }
.col { background: color-mix(in oklab, var(--surface-2) 60%, transparent); border-radius: 18px; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 260px; scroll-snap-align: start; transition: background .15s; }
.col.over { background: color-mix(in oklab, var(--ws) 12%, var(--surface-2)); }
.colhead { display: flex; align-items: center; gap: 8px; padding: 4px 6px; font-weight: 600; }
.colhead .n { color: var(--muted); font-weight: 500; }
.colhead .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.tcard { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 8px; cursor: grab; text-align: left; width: 100%; transition: transform .15s ease, box-shadow .15s ease; }
.tcard:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.tcard.dragging { opacity: .45; }
.tcard.isdone .ttl { color: var(--muted); text-decoration: line-through; }
.ttl { font-weight: 600; line-height: 1.35; }
.tmeta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tinfo { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.tinfo span { display: inline-flex; align-items: center; gap: 3px; }
.tinfo .late { color: var(--bad); font-weight: 600; }
.ptag { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prio { font-size: 11px; font-weight: 700; color: var(--bad); background: color-mix(in oklab, var(--bad) 12%, transparent); padding: 1px 7px; border-radius: 6px; }
.quick { border: 0; background: transparent; color: var(--muted); font-weight: 600; text-align: left; padding: 8px 6px; border-radius: 10px; }
.quick:hover { background: var(--surface); color: var(--ink); }
.qform { display: flex; flex-direction: column; gap: 6px; }
.qform input { border: 1px solid var(--ws); background: var(--surface); border-radius: 12px; padding: 10px 12px; width: 100%; }

/* ---------- Projeler ---------- */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.pcard { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 12px; text-align: left; width: 100%; transition: box-shadow .15s, transform .15s; }
.pcard:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.ptop { display: flex; gap: 10px; align-items: center; min-width: 0; }
.ptop > div { min-width: 0; }
.pname { font-weight: 700; line-height: 1.3; }
.pclient { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prow { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }

/* ---------- Ödemeler ---------- */
.ilist { display: flex; flex-direction: column; gap: 8px; }
.irow { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; text-align: left; width: 100%; }
.irow:hover { box-shadow: var(--shadow); }
.ino { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.irow .amt { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.irow .amt b { font-variant-numeric: tabular-nums; font-size: 15px; }
.late { color: var(--bad); font-weight: 600; }
.empty { border: 1.5px dashed var(--line); border-radius: 14px; padding: 18px; text-align: center; color: var(--muted); font-size: 13px; display: flex; flex-direction: column; gap: 10px; align-items: center; }

/* ---------- Akış ---------- */
.feed { display: flex; flex-direction: column; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 8px; }
.fitem { display: flex; gap: 12px; padding: 10px; border-radius: 12px; align-items: flex-start; }
.fitem p { margin: 0; }
.fitem time { font-size: 12px; color: var(--muted); }
.fgroup { font-size: 12px; font-weight: 600; color: var(--muted); padding: 10px 10px 2px; }

/* ---------- Detay paneli ---------- */
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 40; animation: fade .2s ease; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 41; width: min(620px, 100%); overflow-y: auto;
  background: var(--bg); box-shadow: -20px 0 60px -30px rgba(0,0,0,.5);
  padding-top: max(18px, env(safe-area-inset-top, 0px)); padding-bottom: max(40px, env(safe-area-inset-bottom, 0px));
  padding-left: 24px; padding-right: max(24px, env(safe-area-inset-right, 0px));
  display: flex; flex-direction: column; gap: 18px; animation: slide .25s cubic-bezier(.2,.8,.2,1);
}
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
.dtop { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.dtitle { display: flex; gap: 14px; align-items: center; }
.dtitle .emo { width: 54px; height: 54px; font-size: 28px; border-radius: 16px; }
.titlein { font-family: var(--font-d); font-size: 26px; font-weight: 700; letter-spacing: -.02em; border: 0; background: transparent; width: 100%; min-width: 0; padding: 2px 4px; border-radius: 8px; resize: none; line-height: 1.2; }
.titlein:hover { background: var(--surface-2); }
.metas { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px 12px; align-items: center; font-size: 13px; margin: 0; }
.metas dt { color: var(--muted); }
.metas dd { margin: 0; min-width: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.metas input, .metas select { border: 1px solid transparent; background: transparent; padding: 4px 6px; border-radius: 8px; min-width: 0; max-width: 100%; }
.metas input:hover, .metas input:focus, .metas select:hover, .metas select:focus { border-color: var(--line); background: var(--surface); }
.whopick { display: inline-flex; gap: 6px; }
.whopick button { border: 2px solid transparent; background: transparent; border-radius: 99px; padding: 0; opacity: .45; }
.whopick button[aria-pressed="true"] { opacity: 1; border-color: var(--ws); }
.section { display: flex; flex-direction: column; gap: 8px; }
.section > h3 { font-family: var(--font-b); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); display: flex; justify-content: space-between; }
.money { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.mrow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.mrow div span { display: block; font-size: 12px; color: var(--muted); }
.mrow div b { font-family: var(--font-d); font-size: 20px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.mrow .rem b { color: var(--ws); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button { border: 0; background: transparent; padding: 10px 12px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ws); }
.tabs .tc { font-size: 11px; background: var(--surface-2); border-radius: 99px; padding: 1px 7px; margin-left: 4px; }
.row { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; text-align: left; width: 100%; }
.row p { margin: 0; flex: 1; min-width: 0; }
.row .due { font-size: 12px; color: var(--muted); white-space: nowrap; }
button.row:hover { box-shadow: var(--shadow); }
.sdot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; }
.check { display: flex; align-items: center; gap: 10px; padding: 6px 4px; }
.check input { width: 18px; height: 18px; accent-color: var(--ws); flex: none; }
.check.on span { color: var(--muted); text-decoration: line-through; }
.addrow { display: flex; gap: 8px; flex-wrap: wrap; }
.addrow input, .addrow select, .field input, .field select, .addrow textarea { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 8px 10px; min-width: 0; }
.addrow input[type="text"], .addrow textarea { flex: 1 1 200px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.cardrow { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.kdv { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.formcard { background: color-mix(in oklab, var(--ws) 6%, var(--surface)); border: 1px dashed color-mix(in oklab, var(--ws) 40%, var(--line)); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 600; }
.field input, .field select { color: var(--ink); font-weight: 500; font-size: 14px; width: 100%; }
.notes-tools { display: flex; gap: 6px; flex-wrap: wrap; }
.notes { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; min-height: 120px; line-height: 1.65; }
.notes:focus { outline: 2px solid color-mix(in oklab, var(--ws) 50%, transparent); }
.notes h3 { font-size: 17px; margin: 6px 0 4px; }
.notes ul { padding-left: 20px; margin: 4px 0; }
.notes p { margin: 4px 0; }
.cmt { display: flex; gap: 10px; align-items: flex-start; }
.cmt .bub { background: var(--surface); border: 1px solid var(--line); border-radius: 4px 14px 14px 14px; padding: 8px 12px; min-width: 0; }
.cmt .bub p { margin: 2px 0 0; }
.cmt time { font-size: 12px; color: var(--muted); margin-left: 6px; font-weight: 500; }

/* ---------- Modal + bildirim ---------- */
.modal { position: fixed; z-index: 51; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(460px, calc(100% - 32px)); max-height: calc(100% - 32px); overflow-y: auto; background: var(--surface); border-radius: 22px; padding: 22px; display: flex; flex-direction: column; gap: 16px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.45); animation: fade .2s ease; }
.emopick { display: flex; gap: 6px; flex-wrap: wrap; }
.emopick button { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); font-size: 19px; }
.emopick button[aria-pressed="true"] { border-color: var(--ws); background: color-mix(in oklab, var(--ws) 14%, var(--surface)); }
.toast { position: fixed; z-index: 60; left: 50%; transform: translateX(-50%); bottom: calc(24px + env(safe-area-inset-bottom, 0px)); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-weight: 600; font-size: 13px; box-shadow: var(--shadow); max-width: calc(100% - 32px); }

/* ---------- Telefon ---------- */
@media (max-width: 780px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .main { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 14px 110px; gap: 16px; }
  .mhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .mhead .logo { padding: 0; }
  h1 { font-size: 26px; }
  .board { grid-auto-columns: 84%; }
  .hint-desk { display: none; } .hint-mob { display: inline; }
  .stat { flex-basis: 120px; padding: 10px 14px; }
  .stat b { font-size: 19px; }
  .filters { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .irow { grid-template-columns: minmax(0, 1fr) auto; }
  .irow .when { grid-column: 1 / -1; grid-row: 2; font-size: 12px; }
  .bottomnav {
    display: flex; position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; justify-content: space-around;
    background: color-mix(in oklab, var(--surface) 92%, transparent); backdrop-filter: blur(12px); border-top: 1px solid var(--line);
    padding-top: 8px; padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  }
  .bottomnav button { border: 0; background: transparent; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 600; color: var(--muted); padding: 4px 10px; border-radius: 12px; position: relative; }
  .bottomnav button[aria-current="true"] { color: var(--ws); }
  .bottomnav .count { position: absolute; top: 0; right: 4px; background: var(--bad); color: #fff; font-size: 10px; border-radius: 99px; padding: 0 5px; }
  .drawer { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .titlein { font-size: 22px; }
  .metas { grid-template-columns: 86px minmax(0, 1fr); }
  .mrow div b { font-size: 17px; }
  .toast { bottom: calc(86px + env(safe-area-inset-bottom, 0px)); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- Uygulamaya özel ekler ---------- */
:root { --indigo: #5466EE; --amber: #C98400; --rose: #D2468C; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --indigo: #8C99FF; --amber: #F0B429; --rose: #FF7DB8; } }
:root[data-theme="dark"] { --indigo: #8C99FF; --amber: #F0B429; --rose: #FF7DB8; }
html, body { margin: 0; }
body { min-height: 100vh; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

.auth { min-height: 100vh; display: grid; place-items: center; padding-block: 24px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.authcard { width: min(400px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 28px; display: flex; flex-direction: column; gap: 16px; box-shadow: var(--shadow); }
.authcard .logo { padding: 0; font-size: 22px; }
.authcard p { margin: 0; color: var(--muted); }
.authcard .field input { padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.authcard .btn { width: 100%; padding: 12px; }
.formerr { color: var(--bad); font-weight: 600; font-size: 13px; }
.loading { min-height: 100vh; display: grid; place-items: center; color: var(--muted); }
.offline { position: fixed; z-index: 70; top: max(10px, env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); background: var(--bad); color: #fff; font-weight: 600; font-size: 13px; padding: 6px 14px; border-radius: 99px; }
.linkbtn { border: 0; background: transparent; color: var(--muted); font-size: 12px; font-weight: 600; padding: 2px 4px; border-radius: 6px; }
.linkbtn:hover { color: var(--bad); }
.danger { color: var(--bad) !important; }
.check .linkbtn { margin-left: auto; opacity: 0; }
.check:hover .linkbtn, .check:focus-within .linkbtn { opacity: 1; }
.check span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.cmt .bub p { white-space: pre-wrap; overflow-wrap: anywhere; }
.side .me { display: flex; align-items: center; gap: 10px; padding: 6px 10px; font-size: 13px; }
.side .me span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty-board { grid-column: 1 / -1; }
.ttl, .pname { overflow-wrap: anywhere; }
@media (max-width: 780px) { .check .linkbtn { opacity: 1; } }
.notes:empty::before { content: attr(data-ph); color: var(--muted); pointer-events: none; }
.notes a { color: var(--ws); }
.iconbtn.me-btn { font-weight: 700; color: #fff; background: var(--ws); border-color: transparent; border-radius: 50%; }
@media (max-width: 780px) {
  .stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .stats:has(> .stat:nth-child(2):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { padding: 10px 12px; }
  .stat b { font-size: 18px; }
  .stat span { font-size: 12px; line-height: 1.3; }
}
.subnav { display: flex; flex-direction: column; gap: 1px; margin: 2px 0 6px; }
.navbtn.sub { padding: 6px 10px 6px 14px; font-size: 13px; font-weight: 500; }
.navbtn.sub[aria-current="true"] { font-weight: 600; }
.navbtn.sub .pe { width: 20px; text-align: center; flex: none; }
.navbtn.sub .pn { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.navbtn.sub.muted { color: var(--muted); }
