@font-face {
  font-family: 'Outfit'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url(fonts/outfit-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Outfit'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url(fonts/outfit-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Marka kimliği v1.0: mürekkep, kâğıt, aile sarısı. Vurgu yalnızca küçük alanlarda. */
:root {
  --ink: #121417;
  --paper: #F6F5F1;
  --acc: #FFC857;
  --bg: var(--paper);
  --fg: var(--ink);
  --fg2: #3A3D42;
  --muted: #6B6E73;
  --line: #E3E1DA;
  --line2: #EEECE6;
  --card: #FFFFFF;
  --hover: #F1EFE9;
  --late: #D63F44;
  --late-bg: #FBEBEB;
  --now: #9A6B00;
  --now-bg: #FFF4D9;
  --btn: var(--ink);
  --btn-fg: var(--paper);
  --shadow: 0 1px 2px rgba(18, 20, 23, .04), 0 4px 16px rgba(18, 20, 23, .04);
  --r: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E0F11; --fg: #F1F0EC; --fg2: #C4C6CB; --muted: #8E9197;
    --line: #25282C; --line2: #1E2124; --card: #16181B; --hover: #1D2023;
    --late: #FF6B6F; --late-bg: #2A1718; --now: #FFC857; --now-bg: #2A2414;
    --btn: #F1F0EC; --btn-fg: #121417;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 400 15px/1.5 Outfit, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; line-height: 1.15; }
h1 { font-size: clamp(26px, 4vw, 34px); font-weight: 800; letter-spacing: -0.035em; }
h2 { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; border-radius: 6px; }
.dot { color: var(--acc); }
.muted { color: var(--muted); }
.sm { font-size: 13px; }
.eyebrow { font-size: 11.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic.sm { width: 14px; height: 14px; }
.booting { min-height: 100vh; }

/* ---------- Çatı ---------- */
#app:not(.booting) { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 18px; padding: 22px 16px 16px;
  border-right: 1px solid var(--line);
}
.side-logo { padding: 2px 8px 6px; }
.logo img { height: 23px; width: auto; display: block; }
.new-btn { justify-content: center; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px;
  color: var(--fg2); font-weight: 500;
}
.nav-item:hover { background: var(--hover); color: var(--fg); }
.nav-item.on { background: var(--card); color: var(--fg); font-weight: 600; box-shadow: var(--shadow); }
.nav-item.on .ic { color: var(--fg); }
.badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--acc); color: var(--ink); font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.side-areas { display: flex; flex-direction: column; gap: 1px; }
.side-areas .eyebrow { padding: 0 10px 6px; }
.side-area { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 8px; color: var(--fg2); font-size: 14px; }
.side-area:hover { background: var(--hover); }
.side-area span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-area em { font-style: normal; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.side-user { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; font-weight: 500; font-size: 14px; }
.side-user:hover, .side-user.on { background: var(--hover); }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--ink); color: var(--paper); font-size: 12px; font-weight: 700; letter-spacing: .02em;
}
@media (prefers-color-scheme: dark) { .avatar { background: #2A2D32; color: var(--fg); } }
.swatch { width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex: none; display: inline-block; }
.swatch.lg { width: 14px; height: 14px; }

.main { padding: 32px clamp(16px, 4vw, 44px) 104px; max-width: 1240px; width: 100%; }
.mobile-top, .tabbar { display: none; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); margin-top: 6px; }
.head-actions { display: flex; gap: 8px; align-items: center; }

/* ---------- Ortak bileşenler ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.empty { color: var(--muted); padding: 14px 2px; font-size: 14px; }
.foot-note { color: var(--muted); font-size: 12.5px; margin-top: 10px; }
.link { color: var(--fg2); font-size: 13.5px; font-weight: 500; text-decoration: underline; text-decoration-color: var(--acc); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.link:hover { color: var(--fg); }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--card); font-weight: 600; font-size: 14px; white-space: nowrap;
}
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--btn); color: var(--btn-fg); border-color: var(--btn); }
.btn.primary:hover { opacity: .9; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--fg2); }
.btn.ghost:hover { background: var(--hover); }
.btn.sm { height: 32px; padding: 0 10px; font-size: 13px; gap: 6px; }
.btn.block { width: 100%; justify-content: center; height: 44px; }
.btn.danger, .icon-btn.danger { color: var(--late); }
.icon-btn { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; color: var(--muted); flex: none; }
.icon-btn:hover { background: var(--hover); color: var(--fg); }

.input, .select {
  height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card);
  font-size: 14px; min-width: 0; width: 100%;
}
/* iOS tarih/saat kutularının kendi en küçük genişliği var; kapsayıcıya sığdır. */
.input[type="date"], .input[type="time"] { -webkit-appearance: none; appearance: none; display: block; min-width: 0; max-width: 100%; text-align: left; line-height: 38px; }
.input::-webkit-date-and-time-value { text-align: left; }
textarea.input { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus, .title-input:focus { outline: none; border-color: var(--fg); }
.input.sm { height: 32px; font-size: 13px; }
.select { appearance: none; padding-right: 30px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: right 15px top 50%, right 10px top 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.input:disabled, .select:disabled { opacity: .7; }

.seg { display: inline-flex; background: var(--hover); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { height: 30px; padding: 0 12px; border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--fg2); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.seg button.on { background: var(--card); color: var(--fg); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.seg button:disabled { cursor: default; }

.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--fg2); padding: 2px 8px 2px 7px; border-radius: 999px; background: var(--hover); white-space: nowrap; }
.chip .ic { color: var(--muted); }

/* Öncelik: 1 kırmızı, 2 aile sarısı, 3 nötr, 4 soluk */
.prio { font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; flex: none; display: inline-flex; align-items: center; gap: 5px; }
.prio::before, .prio-seg i { content: ''; width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.p1.prio { background: var(--late-bg); color: var(--late); } .p1.prio::before, .prio-seg .p1 i { background: var(--late); }
.p2.prio { background: var(--now-bg); color: var(--now); } .p2.prio::before, .prio-seg .p2 i { background: var(--acc); }
.p3.prio { color: var(--muted); } .p3.prio::before, .prio-seg .p3 i { background: var(--muted); }
.p4.prio { color: var(--muted); opacity: .75; } .p4.prio::before, .prio-seg .p4 i { background: transparent; border: 1.5px solid var(--muted); width: 5px; height: 5px; }

/* ---------- Görev satırı ---------- */
.tasks { list-style: none; margin: 0; padding: 0; }
.task { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 10px; position: relative; }
.task + .task { border-top: 1px solid var(--line2); }
.task:hover { background: var(--hover); }
.task:hover + .task, .task:hover { border-top-color: transparent; }
.check {
  width: 22px; height: 22px; border-radius: 50%; border: 1.8px solid var(--muted); flex: none; display: grid; place-items: center; color: transparent;
}
.check .ic { width: 13px; height: 13px; stroke-width: 3; }
.check:hover { border-color: var(--fg); color: var(--muted); }
.task.doing .check { border-color: var(--acc); background: linear-gradient(90deg, var(--acc) 50%, transparent 50%); }
.task.done .check, li.done > .check { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.task-main { flex: 1; min-width: 0; text-align: left; display: flex; flex-direction: column; gap: 3px; padding: 2px 0; }
.task-title { font-weight: 500; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 8px; }
.task.done .task-title { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--muted); }
.task-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 12.5px; color: var(--muted); }
.task-meta .chip { background: none; padding: 0; }
.meta { display: inline-flex; align-items: center; gap: 4px; }
.due.late { color: var(--late); font-weight: 600; }
.due.now { color: var(--now); font-weight: 600; }
.doing-tag { color: var(--now); font-weight: 600; }
.new-tag { background: var(--acc); color: var(--ink); font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; text-transform: uppercase; letter-spacing: .06em; }
.task.is-new { background: var(--now-bg); }
.grip { color: var(--muted); cursor: grab; display: grid; opacity: .5; }
.task:hover .grip { opacity: 1; }
.task.dragging { opacity: .4; }
.move { display: none; }
.tasks.compact .task { padding: 6px 4px; }
.tasks.compact .prio { display: none; }

/* ---------- Pano ---------- */
.quick { position: relative; margin-bottom: 18px; }
.quick-plus { position: absolute; left: 16px; top: 15px; color: var(--muted); display: grid; }
.quick-input {
  width: 100%; height: 52px; border-radius: 14px; border: 1px solid var(--line); background: var(--card);
  padding: 0 16px 0 46px; font-size: 15.5px; box-shadow: var(--shadow);
}
.quick-input:focus { outline: none; border-color: var(--fg); }
.quick-preview { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; min-height: 26px; padding: 7px 4px 0; }
.quick-preview .hint { font-size: 12.5px; color: var(--muted); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; text-align: left;
  display: flex; flex-direction: column; gap: 2px; box-shadow: var(--shadow);
}
.stat:hover { border-color: var(--muted); }
.stat b { font-size: 30px; font-weight: 800; letter-spacing: -0.04em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat span { font-size: 13px; color: var(--muted); font-weight: 500; }
.stat.late:not(.zero) b { color: var(--late); }
.stat.now:not(.zero) { border-color: var(--acc); }
.stat.zero b { color: var(--muted); opacity: .6; }

.dash-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.col { display: flex; flex-direction: column; }
.col > .card + .card { margin-top: 16px; }
.focus .tasks { max-height: 620px; overflow-y: auto; margin: 0 -6px; padding: 0 6px; }
.sortable .task { cursor: default; }

.agenda { display: flex; flex-direction: column; gap: 12px; }
.agenda-day { display: grid; grid-template-columns: 92px 1fr; gap: 10px; }
.agenda-label { font-size: 12.5px; font-weight: 600; color: var(--fg2); padding-top: 6px; }
.agenda-day.late .agenda-label { color: var(--late); }
.agenda-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.agenda-items button { width: 100%; display: flex; align-items: center; gap: 9px; padding: 5px 8px; border-radius: 8px; text-align: left; font-size: 14px; }
.agenda-items button:hover { background: var(--hover); }
.agenda-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agenda-meta { font-size: 12px; color: var(--muted); white-space: nowrap; }
.agenda-day.late .agenda-meta { color: var(--late); }

.area-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.area-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px; text-align: left; display: flex; flex-direction: column; gap: 6px; }
.area-card:hover { border-color: var(--c); }
.area-name { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.area-nums { font-size: 13px; color: var(--muted); }
.area-nums b { color: var(--fg); font-size: 18px; font-weight: 700; }
.area-nums em { font-style: normal; color: var(--late); }
.bar { height: 4px; border-radius: 2px; background: var(--hover); overflow: hidden; display: block; }
.bar i { display: block; height: 100%; width: var(--w); background: var(--c); border-radius: 2px; }

/* ---------- Takvim ---------- */
.cal-nav { display: flex; align-items: center; gap: 6px; }
.cal-month { min-width: 130px; text-align: center; font-size: 16px; }
.cal-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.cal { padding: 0; overflow: hidden; }
.cal-head, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-head div { padding: 10px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; border-bottom: 1px solid var(--line); }
.cal-cell {
  min-height: 112px; padding: 6px; border-right: 1px solid var(--line2); border-bottom: 1px solid var(--line2);
  display: flex; flex-direction: column; gap: 3px; cursor: pointer; min-width: 0;
}
.cal-cell:nth-child(7n) { border-right: 0; }
.cal-cell:hover { background: var(--hover); }
.cal-cell.out { background: color-mix(in srgb, var(--bg) 60%, transparent); }
.cal-cell.out .cal-num { opacity: .4; }
.cal-cell.sel { box-shadow: inset 0 0 0 2px var(--fg); }
.cal-cell.drop { background: var(--now-bg); }
.cal-num { font-size: 13px; font-weight: 600; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; color: var(--fg2); }
.cal-cell.today .cal-num { background: var(--ink); color: var(--paper); position: relative; }
.cal-cell.today .cal-num::after { content: ''; position: absolute; top: -1px; right: -1px; width: 8px; height: 8px; border-radius: 50%; background: var(--acc); }
@media (prefers-color-scheme: dark) { .cal-cell.today .cal-num { background: var(--fg); color: var(--ink); } }
.cal-chips { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cal-chip {
  display: flex; gap: 5px; align-items: center; font-size: 12px; padding: 2px 6px; border-radius: 6px; text-align: left; min-width: 0;
  background: color-mix(in srgb, var(--c) 16%, var(--card)); border-left: 3px solid var(--c); width: 100%;
}
.cal-chip[draggable="true"] { cursor: grab; }
.cal-chip .cal-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.cal-chip .cal-time { color: var(--muted); font-variant-numeric: tabular-nums; flex: none; }
.cal-chip.done { opacity: .5; text-decoration: line-through; }
.cal-chip.late { color: var(--late); }
.cal-chip.p1 .cal-t { font-weight: 600; }
.cal-more { font-size: 11.5px; color: var(--muted); padding-left: 6px; }
.cal-dots { display: none; }
.cal-side { display: flex; flex-direction: column; }
.cal-side > .card + .card { margin-top: 16px; }
.undated-list { display: flex; flex-direction: column; gap: 4px; }
.undated-list .cal-chip { font-size: 13px; padding: 5px 8px; }
.undated.drop { background: var(--now-bg); }

/* ---------- Görevler ---------- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.filters .select { width: auto; height: 36px; }
.search-wrap { position: relative; flex: 1; min-width: 160px; display: flex; align-items: center; }
.search-wrap .ic { position: absolute; left: 11px; color: var(--muted); }
.search { height: 36px; padding-left: 32px; }
.group .card-head h2 .swatch { width: 11px; height: 11px; }
.new-card { border-color: var(--acc); }

/* ---------- Alanlar ---------- */
.inline-form { display: flex; gap: 8px; align-items: center; }
.inline-form.big { margin-bottom: 16px; max-width: 560px; }
.inline-form .input[type="date"] { width: 150px; flex: none; }
.areas-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; align-items: start; }
.areas-list .card + .card { margin-top: 0; }
.area-edit { border-top: 4px solid var(--c); }
.area-edit.archived { opacity: .6; }
.area-edit-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.area-title-input { flex: 1; min-width: 0; font-size: 18px; font-weight: 700; letter-spacing: -0.02em; border: 1px solid transparent; border-radius: 8px; padding: 4px 6px; background: none; }
.area-title-input:hover { border-color: var(--line); }
.area-title-input:focus { outline: none; border-color: var(--fg); }
.colors { display: flex; gap: 6px; margin-bottom: 12px; }
.color { width: 22px; height: 22px; border-radius: 50%; background: var(--c); border: 2px solid var(--card); box-shadow: 0 0 0 1px var(--line); }
.color.on { box-shadow: 0 0 0 2px var(--fg); }
.projects { list-style: none; margin: 0 0 12px; padding: 0; }
.projects li { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line2); }
.projects .p-name { flex: 1; min-width: 0; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.projects li.done .p-name { color: var(--muted); text-decoration: line-through; }
.projects .meta { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.projects .check { width: 20px; height: 20px; }

/* ---------- Bağlantılar / Hesap ---------- */
.conn-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-bottom: 16px; }
.conn-grid .card + .card { margin-top: 0; }
.code-card { display: flex; flex-direction: column; gap: 12px; }
.big-code { font-size: clamp(30px, 6vw, 40px); font-weight: 800; letter-spacing: .06em; font-variant-numeric: tabular-nums; line-height: 1; }
.code-input { text-transform: uppercase; letter-spacing: .12em; font-weight: 600; font-size: 16px; }
.conn-grid .card .inline-form { margin: 12px 0 10px; }
.people { list-style: none; margin: 0; padding: 0; }
.people li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line2); flex-wrap: wrap; }
.people li:first-child { border-top: 0; }
.person { flex: 1; min-width: 140px; display: flex; flex-direction: column; font-size: 14px; }
.person .muted { font-size: 12.5px; }
.people .meta { font-size: 13px; color: var(--muted); }
.form { display: flex; flex-direction: column; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; color: var(--fg2); }
.form .btn { align-self: flex-start; }
.form .btn.block { align-self: stretch; }
.form-err { color: var(--late); font-size: 13.5px; min-height: 0; }
.form-err:empty { display: none; }
.logout { margin-top: 8px; }

/* ---------- Görev penceresi ---------- */
.modal {
  border: 0; padding: 0; border-radius: 18px; width: min(620px, calc(100vw - 32px)); max-height: calc(100vh - 48px);
  background: var(--card); color: var(--fg); box-shadow: 0 24px 64px rgba(0, 0, 0, .22);
}
.modal::backdrop { background: rgba(18, 20, 23, .38); backdrop-filter: blur(2px); }
.modal-body { padding: 18px 22px 20px; display: flex; flex-direction: column; gap: 12px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin: -4px -8px -4px 0; }
.title-input { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; border: 1px solid transparent; border-radius: 10px; padding: 6px 8px; margin: 0 -9px; background: none; width: calc(100% + 18px); }
.title-input:hover:not(:disabled) { border-color: var(--line); }
.title-input:disabled { color: var(--fg); }
.note-info { font-size: 13px; color: var(--fg2); background: var(--now-bg); padding: 8px 12px; border-radius: 10px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span:first-child { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.field.wide { grid-column: 1 / -1; }
.field .ro { height: 40px; display: flex; align-items: center; font-size: 14px; }
.prio-seg { display: flex; }
.prio-seg button { flex: 1; justify-content: center; }
.modal-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; }
.comment-box { border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.comments { display: flex; flex-direction: column; gap: 8px; max-height: 220px; overflow-y: auto; }
.comment { background: var(--hover); border-radius: 12px; padding: 8px 12px; max-width: 88%; }
.comment.me { align-self: flex-end; background: var(--now-bg); }
.comment-who { font-size: 12px; font-weight: 600; }
.comment-body { font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------- Giriş ---------- */
.auth { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; grid-column: 1 / -1; }
.auth-card { width: min(400px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 32px 28px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; }
.auth-logo img { height: 30px; margin-bottom: 18px; }
.auth-card .form { margin-top: 12px; }
.auth-switch { font-size: 14px; color: var(--muted); margin-top: 6px; text-align: center; }
.auth-foot { margin-top: 18px; font-size: 12.5px; color: var(--muted); }

/* ---------- Onay penceresi ---------- */
.confirm-modal { width: min(420px, calc(100vw - 32px)); }
@media (max-width: 820px) { .modal.confirm-modal { margin: auto; border-radius: 18px; width: calc(100vw - 32px); max-width: calc(100vw - 32px); } }
.confirm-msg { font-size: 16px; line-height: 1.5; }
.btn.danger-solid { background: var(--late); border-color: var(--late); color: #fff; }

/* ---------- Geri bildirim ---------- */
.fab {
  position: fixed; right: 24px; bottom: 24px; z-index: 40; height: 44px; padding: 0 16px 0 14px; border-radius: 22px;
  display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600;
  background: var(--card); color: var(--fg); border: 1px solid var(--line); box-shadow: 0 6px 20px rgba(18, 20, 23, .12);
}
.fab:hover { border-color: var(--muted); }
.fab .ic { color: var(--fg); }
.fab::after { content: ''; position: absolute; top: 7px; right: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--acc); }
.fb-title { font-size: 20px; }
.fb-seg { align-self: flex-start; }
.fb-history { display: flex; flex-direction: column; gap: 8px; }
.fb-history:empty { display: none; }
.fb-history { border-top: 1px solid var(--line); padding-top: 12px; }
.fb-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; max-height: 240px; overflow-y: auto; }
.fb-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fb-msg { font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 4px; }
.fb-note { font-size: 13px; color: var(--fg2); background: var(--now-bg); border-radius: 8px; padding: 6px 10px; margin-top: 6px; white-space: pre-wrap; }
.fb-status { font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--hover); color: var(--fg2); }
.fb-status.new { background: var(--acc); color: var(--ink); }
.fb-status.done { background: var(--fg); color: var(--bg); }
.fb-kind { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; }
.fb-kind.bug { color: var(--late); }
.fb-admin { display: flex; flex-direction: column; gap: 12px; }
.fb-admin .card + .card { margin-top: 0; }
.fb-card { display: flex; flex-direction: column; gap: 10px; }
.fb-card.done { opacity: .7; }
.fb-ctx summary { cursor: pointer; font-size: 12.5px; color: var(--muted); }
.fb-ctx pre { font-size: 12px; background: var(--hover); padding: 10px; border-radius: 8px; overflow-x: auto; white-space: pre-wrap; overflow-wrap: anywhere; margin: 8px 0 0; }
.admin-link { margin-bottom: 16px; }
.admin-link .badge { margin-left: 4px; }
body:has(dialog[open]) .fab { display: none; }

/* ---------- Çevrimdışı şeridi ---------- */
:root { --offline-h: calc(26px + env(safe-area-inset-top)); }
body.offline::before {
  content: 'Çevrimdışı · son kaydedilen veriler gösteriliyor'; position: fixed; top: 0; left: 0; right: 0; z-index: 90;
  height: var(--offline-h); padding: calc(4px + env(safe-area-inset-top)) 12px 0; box-sizing: border-box;
  text-align: center; font-size: 12.5px; font-weight: 600; background: var(--acc); color: var(--ink);
}
body.offline[data-offline="server"]::before { content: 'Sunucuya ulaşılamıyor · son kaydedilen veriler gösteriliyor'; }
/* Şerit sayfanın üstüne binmesin. */
body.offline { padding-top: var(--offline-h); }
body.offline .side { top: var(--offline-h); height: calc(100vh - var(--offline-h)); }

/* ---------- Bildirim ---------- */
#toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 100; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 12px; font-size: 14px; font-weight: 500; box-shadow: 0 8px 24px rgba(0,0,0,.2); transition: opacity .3s, transform .3s; }
.toast::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--acc); margin-right: 9px; vertical-align: 2px; }
.toast.err::before { background: var(--late); }
.toast.out { opacity: 0; transform: translateY(6px); }
@media (prefers-color-scheme: dark) { .toast { background: #2A2D32; color: var(--fg); } }

/* ---------- Dar ekran ---------- */
@media (max-width: 1080px) {
  .dash-grid, .cal-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 820px) {
  #app:not(.booting) { display: block; }
  /* iOS 16 pikselden küçük kutulara odaklanınca sayfayı büyütür; bütün yazı alanları 16 piksel. */
  input, select, textarea, .input, .input.sm, .select, .quick-input, .filters .select, .search { font-size: 16px; }
  .input.sm { height: 40px; }
  /* hidden değil clip: hidden gövdeyi kaydırma kutusuna çevirip yapışkan başlığı bozar. */
  html, body { overflow-x: clip; }
  .inline-form .input[type="date"] { flex: 1 1 140px; width: auto; min-width: 0; }
  .side { display: none; }
  .mobile-top {
    display: flex; align-items: center; justify-content: space-between; padding: calc(12px + env(safe-area-inset-top)) 16px 12px; position: sticky; top: 0; z-index: 20;
    background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
  }
  body.offline .mobile-top { top: var(--offline-h); padding-top: 12px; }
  .mobile-top .logo img { height: 21px; }
  .main { padding: 18px 16px calc(96px + env(safe-area-inset-bottom)); }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: var(--card); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar .nav-item { flex-direction: column; gap: 2px; font-size: 11px; padding: 6px 2px; box-shadow: none; background: none; justify-content: center; position: relative; }
  .tabbar .nav-item.on { color: var(--fg); }
  .tabbar .badge { position: absolute; top: 0; right: calc(50% - 22px); min-width: 17px; height: 17px; font-size: 10.5px; }
  .tab-add { width: 48px; height: 48px; border-radius: 16px; background: var(--btn); color: var(--btn-fg); display: grid; place-items: center; justify-self: center; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .fab { right: 16px; bottom: calc(84px + env(safe-area-inset-bottom)); width: 48px; height: 48px; padding: 0; justify-content: center; border-radius: 50%; }
  .fab span { display: none; }
  .fab::after { top: 8px; right: 8px; }
  .stat b { font-size: 26px; }
  .card { padding: 14px; }
  .task .prio { display: none; }
  .sortable .move { display: flex; }
  .focus .tasks { max-height: none; overflow: visible; }
  #toasts { bottom: calc(144px + env(safe-area-inset-bottom)); }
  .sortable .grip { display: none; }
  .agenda-day { grid-template-columns: 1fr; gap: 2px; }
  .agenda-label { padding-top: 0; }
  .cal-cell { min-height: 54px; padding: 4px; align-items: center; }
  .cal-chips { display: none; }
  .cal-dots { display: flex; gap: 3px; flex-wrap: wrap; justify-content: center; }
  .cal-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
  .cal-dots i.done { opacity: .35; }
  .cal-head div { padding: 8px 2px; text-align: center; font-size: 11px; letter-spacing: .02em; }
  .page-head { margin-bottom: 14px; }
  .fields { grid-template-columns: 1fr; }
  .prio-seg button { padding: 0 6px; }
  .modal { width: 100vw; max-width: 100vw; max-height: 92vh; margin: auto 0 0; border-radius: 18px 18px 0 0; }
  .modal-body { padding: 16px 16px calc(20px + env(safe-area-inset-bottom)); }
  .areas-list { grid-template-columns: minmax(0, 1fr); }
  .inline-form { flex-wrap: wrap; }
  .inline-form .input { flex: 1 1 160px; }
  .filters .seg { width: 100%; }
  .filters .seg button { flex: 1; justify-content: center; }
  .filters .select { flex: 1; }
}
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }
