@font-face {
  font-family: 'Geist';
  src: url('/vendor/fonts/geist-sans/Geist-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #eef0f3;
  --line: #e1e4e9;
  --text: #15171b;
  --muted: #59606b;
  --faint: #6f7682;
  --accent: #2f5bea;
  --accent-ink: #ffffff;
  --accent-soft: #e7edfe;
  --danger: #b8322a;
  --danger-soft: #fcebe9;
  --warn: #8a5300;
  --warn-soft: #fff1dc;
  --ok: #1d7347;
  --ok-soft: #e4f3ea;
  --r-sm: 8px;
  --r-md: 12px;
  --shadow: 0 1px 2px rgb(21 23 27 / .05), 0 10px 30px rgb(21 23 27 / .07);
  --ease: cubic-bezier(.23, 1, .32, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1114;
    --surface: #16191d;
    --surface-2: #1e2227;
    --line: #2b3037;
    --text: #eceef1;
    --muted: #a5abb5;
    --faint: #8b919b;
    --accent: #7d9bff;
    --accent-ink: #0f1114;
    --accent-soft: #1c2441;
    --danger: #ff8178;
    --danger-soft: #3b1e1b;
    --warn: #f1b75f;
    --warn-soft: #3a2d16;
    --ok: #63d39f;
    --ok-soft: #173327;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 12px 32px rgb(0 0 0 / .35);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'Geist', ui-sans-serif, -apple-system, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.45;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
h2 { font-size: 20px; letter-spacing: -0.01em; margin: 0; }
h3 { font-size: 17px; margin: 0; }
.muted { color: var(--muted); }

.brand { font-weight: 650; letter-spacing: -0.02em; font-size: 17px; white-space: nowrap; }
.brand span { color: var(--accent); }
.brand.big { font-size: 26px; }

/* --- butonlar, alanlar --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 38px; padding: 0 14px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  cursor: pointer; white-space: nowrap; font-weight: 500;
  transition: transform .12s var(--ease), background-color .15s, border-color .15s;
}
.btn:hover { border-color: var(--faint); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.danger-ghost { color: var(--danger); border-color: transparent; background: transparent; padding: 0 8px; }
.btn.danger-ghost:hover { background: var(--danger-soft); }
.btn.wide { width: 100%; }
.btn .ph { font-size: 17px; }
.icon-btn {
  width: 36px; height: 36px; display: inline-grid; place-items: center;
  border-radius: var(--r-sm); border: 0; background: transparent; color: var(--muted); cursor: pointer;
  transition: background-color .15s, transform .12s var(--ease);
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn:active { transform: scale(.94); }
.icon-btn .ph { font-size: 20px; }

.field { display: grid; gap: 6px; }
.label { font-size: 13px; font-weight: 550; color: var(--muted); }
input:not([type=checkbox]):not([type=radio]), select, textarea {
  width: 100%; min-height: 40px; padding: 8px 11px;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface);
  outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 84px; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; }
.form-error { color: var(--danger); font-size: 14px; margin: 0; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.seg { display: inline-flex; padding: 3px; background: var(--surface-2); border-radius: var(--r-sm); gap: 2px; }
.seg button {
  border: 0; background: transparent; padding: 6px 14px; border-radius: 6px; cursor: pointer; color: var(--muted); font-weight: 500;
  transition: background-color .15s, color .15s;
}
.seg button.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgb(0 0 0 / .08); }

.checks { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.checks label { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 16px; height: 16px; }

/* --- giris --- */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.login-box {
  width: min(380px, 100%); display: grid; gap: 18px; padding: 28px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow);
}
.login-box p { margin: -8px 0 0; }

/* --- ust bar --- */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 16px;
  height: 60px; padding: 0 max(16px, env(safe-area-inset-left));
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.tabs { display: flex; gap: 2px; margin-left: 8px; }
.tabs button {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px;
  border: 0; border-radius: var(--r-sm); background: transparent; color: var(--muted); cursor: pointer; font-weight: 500;
  transition: background-color .15s, color .15s;
}
.tabs button .ph { font-size: 18px; }
.tabs button:hover { color: var(--text); }
.tabs button.active { background: var(--surface-2); color: var(--text); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  font-size: 13px; font-weight: 500; color: var(--muted); cursor: pointer;
}
.chip .ph { font-size: 16px; }
.chip.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, transparent); background: var(--ok-soft); }
.chip.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 35%, transparent); background: var(--warn-soft); }

.wrap { max-width: 1240px; margin: 0 auto; padding: 22px 16px 80px; }

/* --- hizli ekleme --- */
.quick { display: grid; gap: 7px; margin-bottom: 18px; }
.quick-row {
  display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow);
  transition: border-color .15s;
}
.quick-row:focus-within { border-color: var(--accent); }
.quick-icon { color: var(--accent); font-size: 20px; }
.quick-row input { border: 0 !important; box-shadow: none !important; padding: 8px 4px; min-width: 0; flex: 1; background: transparent; }
.quick-result {
  padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-2); font-size: 14px; white-space: pre-wrap;
}
.quick-result.loading { color: var(--muted); }

/* --- filtreler --- */
.filters { display: flex; gap: 6px; margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.filters button {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; flex: none;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); cursor: pointer; font-weight: 500;
}
.filters button b { font-weight: 600; font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.filters button.active { background: var(--text); border-color: var(--text); color: var(--bg); }
.filters button.active b { color: inherit; opacity: .7; }

/* --- pano --- */
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.col { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.col-head { display: flex; align-items: baseline; gap: 8px; padding: 14px 16px 10px; }
.col-head h3 { font-size: 15px; }
.col-head .count { color: var(--faint); font-size: 13px; font-variant-numeric: tabular-nums; }
.col-head .role { margin-left: auto; color: var(--faint); font-size: 12px; }
.list { list-style: none; margin: 0; padding: 0 6px 6px; }
.empty { padding: 18px 12px 22px; color: var(--faint); font-size: 14px; }

.task {
  display: flex; gap: 10px; align-items: flex-start; padding: 10px; border-radius: var(--r-sm); cursor: pointer;
  transition: background-color .15s, opacity .25s var(--ease), transform .25s var(--ease);
}
.task + .task { border-top: 1px solid var(--line); border-top-left-radius: 0; border-top-right-radius: 0; }
.task:hover { background: var(--surface-2); }
.task.leaving { opacity: 0; transform: translateX(8px); }
.check {
  flex: none; width: 24px; height: 24px; margin-top: -1px; display: grid; place-items: center;
  border: 0; background: transparent; color: var(--faint); cursor: pointer; border-radius: 50%;
  transition: color .15s, transform .15s var(--ease);
}
.check .ph, .check .ph-fill { font-size: 21px; }
.check:hover { color: var(--ok); }
.check:active { transform: scale(.88); }
.task.done .check { color: var(--ok); }
.task.done .t-title { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--faint); }
.t-body { min-width: 0; flex: 1; display: grid; gap: 4px; }
.t-title { overflow-wrap: anywhere; }
.t-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 12.5px; color: var(--faint); }
.t-meta .ph { font-size: 14px; vertical-align: -2px; }
.due { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-weight: 500; }
.due.today { background: var(--warn-soft); color: var(--warn); }
.due.overdue { background: var(--danger-soft); color: var(--danger); }

.today-meetings {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; padding: 10px 12px;
  border-radius: var(--r-md); background: var(--accent-soft); color: var(--text); font-size: 14px;
}
.today-meetings .ph { color: var(--accent); font-size: 18px; }
.today-meetings button { border: 0; background: transparent; cursor: pointer; padding: 2px 4px; border-radius: 6px; color: inherit; text-align: left; }
.today-meetings button:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.today-meetings b { font-variant-numeric: tabular-nums; }

/* --- toplantilar --- */
.section-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.section-head .btn { margin-left: auto; }
.day-group { margin-bottom: 22px; }
.day-group h4 { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.meeting {
  display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center;
  padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); cursor: pointer;
  transition: border-color .15s;
}
.meeting + .meeting { margin-top: 8px; }
.meeting:hover { border-color: var(--faint); }
.meeting .time { font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.meeting .dur { font-size: 12px; color: var(--faint); }
.meeting .m-title { font-weight: 550; }
.meeting .m-meta { font-size: 13px; color: var(--muted); }
.meeting a { color: var(--accent); text-decoration: none; font-size: 13px; font-weight: 500; display: inline-flex; gap: 5px; align-items: center; }
.meeting a:hover { text-decoration: underline; }

/* --- ayarlar --- */
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px; display: grid; gap: 14px; }
.panel.span2 { grid-column: span 2; }
.panel h3 { display: flex; align-items: center; gap: 8px; }
.panel h3 .ph { color: var(--accent); font-size: 20px; }
.panel p { margin: 0; color: var(--muted); font-size: 14px; }
.panel .actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.qr { display: grid; justify-items: start; gap: 10px; }
.qr img { width: 240px; height: 240px; border-radius: var(--r-sm); background: #fff; padding: 8px; border: 1px solid var(--line); }
.pair-code { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 28px; letter-spacing: .12em; font-weight: 600; }
.steps { margin: 0; padding-left: 20px; color: var(--muted); font-size: 14px; display: grid; gap: 4px; }
.status-line { display: flex; align-items: center; gap: 8px; font-weight: 550; }
.status-line.ok { color: var(--ok); }
.status-line.warn { color: var(--warn); }
.status-line .ph { font-size: 20px; }
.group-row { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.group-row:first-child { border-top: 0; }
.group-row label { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); font-size: 13px; cursor: pointer; }
.person-grid { display: grid; grid-template-columns: 110px 1fr 1fr; gap: 10px; align-items: center; }
.person-grid .who { font-weight: 550; }
.person-grid .who small { display: block; color: var(--faint); font-weight: 400; font-size: 12px; }
.inline { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.inline .field { flex: 1; min-width: 120px; }
.days { display: flex; flex-wrap: wrap; gap: 6px; }
.days label { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; cursor: pointer; }
.preview { white-space: pre-wrap; font-size: 13.5px; background: var(--surface-2); padding: 12px; border-radius: var(--r-sm); max-height: 360px; overflow: auto; }
.events { list-style: none; margin: 0; padding: 0; font-size: 13px; display: grid; }
.events li { display: grid; grid-template-columns: 92px 1fr; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); color: var(--muted); }
.events li:first-child { border-top: 0; }
.events time { color: var(--faint); font-variant-numeric: tabular-nums; }

/* --- cekmece --- */
.drawer { position: fixed; inset: 0; z-index: 40; }
.scrim { position: absolute; inset: 0; background: rgb(10 12 15 / .35); animation: fade .2s var(--ease); }
.sheet {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(460px, 100%);
  display: grid; grid-template-rows: auto 1fr auto;
  background: var(--surface); border-left: 1px solid var(--line); box-shadow: var(--shadow);
  animation: slide .28s var(--ease);
}
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.sheet-body { overflow-y: auto; padding: 18px; display: grid; gap: 16px; align-content: start; }
.sheet-foot { display: flex; gap: 8px; align-items: center; padding: 14px 18px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.spacer { flex: 1; }
.source { font-size: 13.5px; color: var(--muted); padding: 10px 12px; border-left: 3px solid var(--line); background: var(--surface-2); border-radius: 0 var(--r-sm) var(--r-sm) 0; white-space: pre-wrap; }
.source b { display: block; font-size: 12px; color: var(--faint); font-weight: 550; margin-bottom: 3px; }

.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 60;
  transform: translateX(-50%); max-width: calc(100% - 32px);
  padding: 10px 16px; border-radius: var(--r-sm); background: var(--text); color: var(--bg);
  font-size: 14px; box-shadow: var(--shadow); animation: rise .25s var(--ease);
}
.toast.error { background: var(--danger); color: #fff; }

@keyframes slide { from { transform: translateX(24px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translate(-50%, 8px); opacity: 0; } }

@media (max-width: 960px) {
  .board { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .panel.span2 { grid-column: auto; }
}
@media (max-width: 640px) {
  .top { gap: 8px; }
  .top .brand { display: none; }
  .tabs { margin-left: 0; }
  .tabs button { padding: 0 10px; }
  .tabs button span { display: none; }
  .tabs button.active span { display: inline; }
  .hide-sm { display: none; }
  .chip span { display: none; }
  .quick-icon { display: none; }
  .person-grid { grid-template-columns: 1fr; }
  .meeting { grid-template-columns: 54px 1fr; }
  .meeting a { grid-column: 2; }
  .sheet { width: 100%; border-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
