:root {
  --bg: #FBFBFA;
  --surface: #FFFFFF;
  --head: #F7F6F3;
  --ink: #2F3437;
  --strong: #111111;
  --muted: #787774;
  --line: #EAEAEA;
  --sans: 'Geist', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Consolas, monospace;
}

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 920px; margin: 0 auto; padding: 56px 16px 80px; }
.mono { font-family: var(--mono); font-size: 13px; }
.muted { color: var(--muted); font-size: 14px; }
.small { font-size: 12px; }

/* Başlık */
.head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.head h1 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; color: var(--strong); }
.head-actions { display: flex; gap: 8px; }
.head-actions form { margin: 0; }

/* Tablo */
.table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
th {
  background: var(--head); font-size: 12px; font-weight: 500; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.05em; white-space: nowrap;
}
tbody tr:hover { background: #FCFCFB; }
tbody tr:last-child td { border-bottom: 0; }
td { color: var(--strong); }
.c-date { width: 120px; white-space: nowrap; color: var(--muted); }
.c-proj { white-space: nowrap; font-weight: 500; }
.num { text-align: right; white-space: nowrap; }
.note { color: var(--muted); font-size: 13px; margin-top: 2px; }
.empty { text-align: center; color: var(--muted); padding: 40px 16px; }
tfoot td { border-top: 1px solid var(--strong); border-bottom: 0; font-weight: 600; background: var(--head); }
tr.is-editing td { background: #FBF3DB; }

/* Yönetim */
.box { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 20px; margin-bottom: 24px; }
label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.input {
  width: 100%; font: inherit; color: var(--strong); background: #fff;
  border: 1px solid var(--line); border-radius: 6px; padding: 9px 11px;
}
.input:focus { outline: none; border-color: #BDBCB8; box-shadow: 0 0 0 3px var(--head); }
.grid { display: grid; grid-template-columns: 150px 1fr 2fr 110px; gap: 12px; }
.span-2 { grid-column: span 1; }
.span-all { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.form-actions span:last-child { display: flex; gap: 8px; }

.btn {
  font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; padding: 8px 16px; border-radius: 6px;
  border: 1px solid var(--strong); background: var(--strong); color: #fff;
}
.btn:hover { background: #333; }
.btn:active { transform: scale(0.98); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--head); }

.actions { white-space: nowrap; text-align: right; font-size: 13px; }
.actions a, .link { color: var(--muted); text-decoration: none; margin-left: 10px; }
.actions a:hover, .link:hover { color: var(--strong); }
.actions form { display: inline; margin: 0; }
.link { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.link.danger:hover { color: #9F2F2D; }

.notice { padding: 10px 14px; border-radius: 6px; font-size: 14px; margin-bottom: 16px; }
.notice.ok { background: #EDF3EC; color: #346538; }
.notice.err { background: #FDEBEC; color: #9F2F2D; }
.notice.warn { background: #FBF3DB; color: #956400; }

.login { max-width: 340px; margin: 12vh auto 0; padding: 28px; }
.login h1 { font-size: 20px; margin: 0 0 20px; color: var(--strong); letter-spacing: -0.02em; }
.login .btn { width: 100%; justify-content: center; margin-top: 14px; }

@media (max-width: 640px) {
  .wrap { padding-top: 32px; }
  .grid { grid-template-columns: 1fr 1fr; }
  .span-2 { grid-column: 1 / -1; }
  th, td { padding: 11px 12px; }
  .c-date { width: auto; }
}

@media print {
  body { background: #fff; }
  .table-wrap { border: 0; }
}

/* Güncelle butonu */
.actions a.edit {
  display: inline-block; color: var(--ink); border: 1px solid var(--line); border-radius: 5px;
  padding: 2px 10px; margin-left: 0; background: #fff;
}
.actions a.edit:hover { background: var(--head); color: var(--strong); }
