@font-face {
  font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("../fonts/inter-latin-ext-wght-normal.ad4eb06671be.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: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("../fonts/inter-latin-wght-normal.8e433c0592f7.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;
}

/* Açık tema (varsayılan) */
:root {
  --bg: #f4f5fb;
  --bg-glow: rgba(83, 74, 183, .10);
  --surface: #ffffff;
  --surface-2: #f7f7fc;
  --text: #1c1b33;
  --muted: #62617a;
  --border: #e4e3ef;
  --border-strong: #c9c8dc;
  --accent: #534ab7;
  --accent-fill: #534ab7;
  --accent-fill-hover: #463ea3;
  --accent-soft: #eeedfe;
  --accent-text: #ffffff;
  --danger: #b4302a;
  --danger-soft: #fcebeb;
  --danger-border: #f2c3c1;
  --warn-soft: #faeeda;
  --warn-text: #633806;
  --ok-soft: #e1f5ee;
  --ok-text: #085041;
  --ok-border: #a9e2cc;
  --col-todo: #534ab7;  --col-todo-soft: #eeedfe;  --col-todo-ink: #3c3489;
  --col-prog: #ba7517;  --col-prog-soft: #faeeda;  --col-prog-ink: #633806;
  --col-done: #1d9e75;  --col-done-soft: #e1f5ee;  --col-done-ink: #085041;
  --shadow-sm: 0 1px 2px rgba(28, 27, 51, .06), 0 1px 1px rgba(28, 27, 51, .04);
  --shadow-md: 0 6px 18px rgba(28, 27, 51, .10), 0 2px 4px rgba(28, 27, 51, .06);
  --shadow-lg: 0 16px 40px rgba(28, 27, 51, .18);
  --backdrop: rgba(28, 27, 51, .35);
  --focus: #534ab7;
  --radius: 8px;
  --radius-lg: 12px;
  --gap: 14px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  color-scheme: light;
}

/* Koyu tema: açık seçim veya (JS yoksa) sistem tercihi */
:root[data-theme="dark"] {
  --bg: #111118;
  --bg-glow: rgba(127, 119, 221, .14);
  --surface: #1b1b25;
  --surface-2: #23232f;
  --text: #ecebf7;
  --muted: #a3a2b8;
  --border: #2d2c3d;
  --border-strong: #45445c;
  --accent: #a8a2f0;
  --accent-fill: #6c63d9;
  --accent-fill-hover: #7d75e2;
  --accent-soft: #2a2848;
  --accent-text: #ffffff;
  --danger: #f2948f;
  --danger-soft: #3a1818;
  --danger-border: #6b2a28;
  --warn-soft: #3a2a10;
  --warn-text: #fac775;
  --ok-soft: #0f3329;
  --ok-text: #9fe1cb;
  --ok-border: #1d5a47;
  --col-todo: #8b84ea;  --col-todo-soft: #2a2848;  --col-todo-ink: #cecbf6;
  --col-prog: #ef9f27;  --col-prog-soft: #3a2a10;  --col-prog-ink: #fac775;
  --col-done: #5dcaa5;  --col-done-soft: #0f3329;  --col-done-ink: #9fe1cb;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, .45);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, .55);
  --backdrop: rgba(0, 0, 0, .55);
  --focus: #a8a2f0;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #111118; --bg-glow: rgba(127, 119, 221, .14); --surface: #1b1b25; --surface-2: #23232f;
    --text: #ecebf7; --muted: #a3a2b8; --border: #2d2c3d; --border-strong: #45445c;
    --accent: #a8a2f0; --accent-fill: #6c63d9; --accent-fill-hover: #7d75e2; --accent-soft: #2a2848;
    --danger: #f2948f; --danger-soft: #3a1818; --danger-border: #6b2a28;
    --warn-soft: #3a2a10; --warn-text: #fac775; --ok-soft: #0f3329; --ok-text: #9fe1cb; --ok-border: #1d5a47;
    --col-todo: #8b84ea; --col-todo-soft: #2a2848; --col-todo-ink: #cecbf6;
    --col-prog: #ef9f27; --col-prog-soft: #3a2a10; --col-prog-ink: #fac775;
    --col-done: #5dcaa5; --col-done-soft: #0f3329; --col-done-ink: #9fe1cb;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35); --shadow-md: 0 6px 18px rgba(0, 0, 0, .45); --shadow-lg: 0 16px 40px rgba(0, 0, 0, .55);
    --backdrop: rgba(0, 0, 0, .55); --focus: #a8a2f0;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font: 14px/1.5 var(--font);
  font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; overflow-x: hidden;
  background-image: radial-gradient(1100px 420px at 85% -120px, var(--bg-glow), transparent 70%); background-repeat: no-repeat; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--surface); padding: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }
main { outline: none; }
.js .nojs-only { display: none; }
html:not(.js) .js-only { display: none; }
.icon { width: 16px; height: 16px; flex: 0 0 auto; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Düğmeler ve formlar */
.btn { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 6px 12px; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--surface); color: var(--text); font: inherit; font-weight: 500; text-decoration: none;
  cursor: pointer; white-space: nowrap; box-shadow: var(--shadow-sm); transition: background-color .15s, border-color .15s, color .15s, transform .1s; }
.btn:hover { border-color: var(--border-strong); background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--accent-fill); border-color: var(--accent-fill); color: var(--accent-text); }
.btn-primary:hover { background: var(--accent-fill-hover); border-color: var(--accent-fill-hover); }
.btn-danger { color: var(--danger); border-color: var(--danger-border); }
.btn-danger:hover { background: var(--danger-soft); border-color: var(--danger); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); box-shadow: none; }
.btn-ghost:hover { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.btn-small { min-height: 28px; padding: 3px 9px; font-size: 13px; }
.btn-icon { padding: 6px; width: 34px; justify-content: center; }
.btn-block { width: 100%; justify-content: center; min-height: 40px; }
input[type=text], input[type=search], input[type=password], input[type=date], select, textarea {
  font: inherit; color: inherit; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius);
  min-height: 34px; padding: 5px 10px; max-width: 100%; transition: border-color .15s, box-shadow .15s; }
input:hover, select:hover, textarea:hover { border-color: var(--muted); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent-fill); box-shadow: 0 0 0 3px var(--accent-soft); }
input[disabled] { opacity: .5; }
input[type=checkbox] { accent-color: var(--accent-fill); width: 16px; height: 16px; }
textarea { width: 100%; resize: vertical; min-height: 120px; }
[aria-invalid="true"] { border-color: var(--danger); }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; flex: 1 1 0; min-width: 0; }
.field label { font-weight: 600; font-size: 13px; color: var(--muted); }
.field input, .field select { width: 100%; }
.field-error { color: var(--danger); margin: 2px 0 0; font-size: 13px; }
.field-error::before { content: "⚠ "; }
.row { display: flex; gap: var(--gap); }
.hint { color: var(--muted); font-size: 13px; margin: 4px 0; }
.check { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; color: var(--muted); }
.banner { border-radius: var(--radius); padding: 10px 12px; margin: 0 0 12px; }
.banner p { margin: 0 0 6px; } .banner p:last-child { margin-bottom: 0; }
.banner-error { background: var(--danger-soft); color: var(--danger); border: 1px solid var(--danger-border); }
.notice { background: var(--warn-soft); color: var(--warn-text); border-radius: var(--radius); padding: 8px 12px; margin: 0 0 12px; font-size: 13px; }
.notice a { color: inherit; font-weight: 600; }

/* Üst çubuk */
.topbar { position: sticky; top: 0; z-index: 50; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 10px 20px;
  background: color-mix(in srgb, var(--surface) 85%, transparent); backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--border); }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; font-size: 17px; letter-spacing: -.01em; color: var(--text); text-decoration: none; }
.brand-mark { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 9px; color: #fff;
  background: linear-gradient(135deg, #7f77dd 0%, #534ab7 55%, #1d9e75 130%); box-shadow: 0 4px 10px rgba(83, 74, 183, .35); }
.brand-mark .icon { width: 18px; height: 18px; stroke-width: 2.5; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; flex: 1 1 520px; min-width: 0; }
.filters input[type=search] { flex: 1 1 200px; min-width: 0; padding-left: 32px;
  background: var(--surface) no-repeat 10px 50% / 15px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a89a0' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E"); }
.filters input[name=assignee] { flex: 0 1 130px; min-width: 0; }
.js .filters button[type=submit] { display: none; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.actions form { margin: 0; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* Pano */
#main { padding: 20px 20px 40px; }
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); align-items: start; }
.column { --c: var(--col-todo); --c-soft: var(--col-todo-soft); --c-ink: var(--col-todo-ink);
  background: color-mix(in srgb, var(--surface) 70%, transparent); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 12px; min-width: 0; box-shadow: inset 0 3px 0 var(--c), var(--shadow-sm); }
.col-in_progress { --c: var(--col-prog); --c-soft: var(--col-prog-soft); --c-ink: var(--col-prog-ink); }
.col-done { --c: var(--col-done); --c-soft: var(--col-done-soft); --c-ink: var(--col-done-ink); }
.column-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; margin: 2px 0 10px; min-height: 28px; }
.column-head h2 { font-size: 14px; font-weight: 650; margin: 0; display: flex; align-items: center; gap: 8px; color: var(--c-ink); }
.column-head h2::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px var(--c-soft); }
.column-head form { margin: 0; }
.count { background: var(--c-soft); color: var(--c-ink); border-radius: 999px; padding: 1px 8px; font-size: 12px; font-weight: 600; }
.cards { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; min-height: 44px; }
.empty { color: var(--muted); font-size: 13px; margin: 0; padding: 14px 10px; text-align: center; border: 1.5px dashed var(--border-strong); border-radius: var(--radius); }
.quick-add { margin-bottom: 10px; }
.quick-add input[type=text] { width: 100%; background: var(--surface-2); border-style: dashed; }
.quick-add input[type=text]:focus { border-style: solid; background: var(--surface); }
.card { position: relative; display: flex; align-items: stretch; background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; min-width: 0; box-shadow: var(--shadow-sm); transition: box-shadow .15s, border-color .15s, transform .15s; }
.card:hover { border-color: color-mix(in srgb, var(--c, var(--accent)) 45%, var(--border)); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.card.overdue { box-shadow: inset 3px 0 0 var(--danger), var(--shadow-sm); }
.card.overdue:hover { box-shadow: inset 3px 0 0 var(--danger), var(--shadow-md); }
.col-done .card-title { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--border-strong); }
.handle { flex: 0 0 auto; width: 26px; border: 0; background: transparent; color: var(--border-strong); cursor: grab; touch-action: none;
  border-radius: 10px 0 0 10px; font-size: 13px; letter-spacing: -2px; padding: 0; transition: color .15s; }
.card:hover .handle, .handle:focus-visible { color: var(--muted); }
.handle:active { cursor: grabbing; }
.card-link { flex: 1 1 auto; display: block; padding: 10px 12px; color: inherit; text-decoration: none; min-width: 0; border-radius: 10px; }
.handle + .card-link { padding-left: 0; }
.card-title { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; font-weight: 550; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.meta:empty { display: none; }
.meta > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.prio, .due, .status-tag { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 1px 8px; font-weight: 600; font-size: 11.5px; line-height: 18px; }
.prio { background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.prio-high { background: var(--danger-soft); color: var(--danger); border-color: var(--danger-border); }
.prio-high::before { content: "▲"; font-size: 9px; }
.prio-low::before { content: "▽"; font-size: 9px; }
.due { background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.due::before { content: ""; width: 11px; height: 11px; background: currentColor; flex: 0 0 auto;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='3'/%3E%3Cpath d='M16 3v4M8 3v4M3 11h18'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='3'/%3E%3Cpath d='M16 3v4M8 3v4M3 11h18'/%3E%3C/svg%3E") center / contain no-repeat; }
.due.is-soon { background: var(--warn-soft); color: var(--warn-text); border-color: transparent; }
.due.is-overdue { background: var(--danger-soft); color: var(--danger); border-color: var(--danger-border); }
.assignee { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; color: var(--text); font-weight: 500; }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; flex: 0 0 auto;
  background: var(--c, var(--accent-fill)); color: #fff; font-size: 10.5px; font-weight: 700; }
:root[data-theme="dark"] .avatar { color: #111118; }
.status-tag { background: var(--accent-soft); color: var(--accent); }
.sortable-ghost { opacity: .35; }
.sortable-chosen, .sortable-fallback { box-shadow: var(--shadow-lg) !important; transform: rotate(1.5deg); }
.board-wrap.is-busy .handle { cursor: progress; }

/* Arşiv */
.page-title { font-size: 22px; font-weight: 700; letter-spacing: -.01em; margin: 0 0 6px; }
.archive-summary { color: var(--muted); margin: 0 0 14px; }
.archive-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-width: 900px; }
.archive-list .card { flex-wrap: wrap; align-items: center; }
.archive-list .assignee { margin-left: 0; }
.archived-at { margin-left: auto; }
.row-actions { display: flex; gap: 6px; padding: 8px 12px; }
.row-actions form { margin: 0; }
.pagination { display: flex; gap: 12px; align-items: center; margin-top: 16px; color: var(--muted); }

/* Detay paneli */
.panel { border: 0; padding: 0; margin: 0 0 0 auto; height: 100dvh; max-height: 100dvh; width: min(500px, 100vw); max-width: 100vw;
  background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); border-radius: 16px 0 0 16px; }
.panel[open] { animation: panel-in .22s cubic-bezier(.2, .8, .2, 1); }
@keyframes panel-in { from { transform: translateX(32px); opacity: 0; } }
.panel::backdrop { background: var(--backdrop); backdrop-filter: blur(2px); }
.panel-inner { padding: 18px 22px 24px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.panel-head h2 { font-size: 18px; font-weight: 700; letter-spacing: -.01em; margin: 0; outline: none; }
.close { font-size: 16px; }
.form-actions, .panel-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.panel-actions { padding-top: 14px; border-top: 1px solid var(--border); }
.panel-actions form { margin: 0; }
.move-group { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; width: 100%; }
.timestamps, .readonly { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; font-size: 13px; margin: 16px 0; }
.timestamps { background: var(--surface-2); border-radius: var(--radius); padding: 10px 12px; }
.timestamps dt, .readonly dt { color: var(--muted); }
.timestamps dd, .readonly dd { margin: 0; overflow-wrap: anywhere; }
.description { white-space: normal; }
.page-panel { max-width: 560px; margin: 24px auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 8px 0 16px; box-shadow: var(--shadow-md); }
.page-panel > h1, .page-panel > p, .page-panel > form { margin-left: 20px; margin-right: 20px; }
.page-panel > h1 { font-size: 20px; }

/* Giriş */
.auth-box { max-width: 380px; margin: 10vh auto 48px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 28px; box-shadow: var(--shadow-lg); }
.auth-box h1 { display: flex; align-items: center; gap: 10px; font-size: 22px; letter-spacing: -.01em; margin: 0 0 20px; }

/* Bildirimler */
.toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 1000; max-width: min(420px, calc(100vw - 32px)); }
.toasts-error { bottom: auto; top: 16px; }
.toast { background: var(--ok-soft); color: var(--ok-text); border: 1px solid var(--ok-border); border-radius: 10px; padding: 10px 12px;
  box-shadow: var(--shadow-md); display: flex; gap: 8px; align-items: flex-start; animation: toast-in .2s ease-out; }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }
.toast-error { background: var(--danger-soft); color: var(--danger); border-color: var(--danger-border); }
.toast button { margin-left: auto; color: inherit; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .card:hover, .sortable-chosen, .sortable-fallback { transform: none; }
}

@media (max-width: 760px) {
  #main { padding: 12px 10px 32px; }
  .topbar { position: static; padding: 10px; }
  .board { grid-template-columns: minmax(0, 1fr); }
  .filters { flex-basis: 100%; order: 3; }
  .filters select { flex: 1 1 40%; min-width: 0; }
  .filters input[name=assignee] { flex: 1 1 40%; }
  .actions { margin-left: auto; }
  .row { flex-direction: column; gap: 0; }
  .panel { width: 100vw; border-radius: 0; }
  .handle { width: 34px; font-size: 15px; }
}
