/* ==========================================================================
   AGD Adana — Raporlama Paneli
   Tasarım sistemi: tokenlar → temel → layout → bileşenler → sayfa özel
   ========================================================================== */

/* ---------- Tokenlar ---------- */
:root {
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --bg: #f4f6f3;
  --surface: #ffffff;
  --surface-2: #f8faf7;
  --surface-3: #eef2ed;
  --border: #e2e7e0;
  --border-strong: #cbd4c8;

  --text: #13201a;
  --text-2: #4a5a52;
  --text-3: #7f8d86;

  --brand: #0f8468;
  --brand-hover: #0b6f57;
  --brand-soft: #e5f4ee;
  --brand-soft-2: #c9e9dc;
  --brand-ink: #09503f;
  --on-brand: #ffffff;
  --ring: rgba(15, 132, 104, .24);

  --amber: #b25a07;
  --amber-soft: #fdf1df;
  --blue: #3456d1;
  --blue-soft: #e9efff;
  --rose: #c42452;
  --rose-soft: #fdebf0;
  --violet: #6d45e0;
  --violet-soft: #f0ebfe;
  --gray-soft: #edf0ec;

  --shadow-sm: 0 1px 2px rgba(15, 30, 22, .05);
  --shadow: 0 1px 2px rgba(15, 30, 22, .04), 0 6px 20px -8px rgba(15, 30, 22, .10);
  --shadow-lg: 0 28px 60px -16px rgba(15, 30, 22, .28);

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;

  --sidebar-w: 268px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a100e;
    --surface: #111916;
    --surface-2: #141e1a;
    --surface-3: #1a2621;
    --border: #212e28;
    --border-strong: #2f3f37;
    --text: #e6eee9;
    --text-2: #a7b6ae;
    --text-3: #6f7f77;
    --brand: #34c398;
    --brand-hover: #4fd3aa;
    --brand-soft: rgba(52, 195, 152, .12);
    --brand-soft-2: rgba(52, 195, 152, .22);
    --brand-ink: #9fe8cf;
    --on-brand: #04261c;
    --ring: rgba(52, 195, 152, .32);
    --amber: #f3b75a;
    --amber-soft: rgba(243, 183, 90, .12);
    --blue: #93a9ff;
    --blue-soft: rgba(147, 169, 255, .12);
    --rose: #ff7d9d;
    --rose-soft: rgba(255, 125, 157, .12);
    --violet: #b59cff;
    --violet-soft: rgba(181, 156, 255, .12);
    --gray-soft: #1a2621;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -10px rgba(0, 0, 0, .5);
    --shadow-lg: 0 28px 60px -16px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0a100e;
  --surface: #111916;
  --surface-2: #141e1a;
  --surface-3: #1a2621;
  --border: #212e28;
  --border-strong: #2f3f37;
  --text: #e6eee9;
  --text-2: #a7b6ae;
  --text-3: #6f7f77;
  --brand: #34c398;
  --brand-hover: #4fd3aa;
  --brand-soft: rgba(52, 195, 152, .12);
  --brand-soft-2: rgba(52, 195, 152, .22);
  --brand-ink: #9fe8cf;
  --on-brand: #04261c;
  --ring: rgba(52, 195, 152, .32);
  --amber: #f3b75a;
  --amber-soft: rgba(243, 183, 90, .12);
  --blue: #93a9ff;
  --blue-soft: rgba(147, 169, 255, .12);
  --rose: #ff7d9d;
  --rose-soft: rgba(255, 125, 157, .12);
  --violet: #b59cff;
  --violet-soft: rgba(181, 156, 255, .12);
  --gray-soft: #1a2621;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -10px rgba(0, 0, 0, .5);
  --shadow-lg: 0 28px 60px -16px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

/* ---------- Temel ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -0.015em; }
p { margin: 0; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-hover); }
button, input, select, textarea { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
svg { display: block; }
::selection { background: var(--brand-soft-2); }
[hidden] { display: none !important; }

.icon { width: 18px; height: 18px; flex-shrink: 0; stroke-width: 1.9; }
svg.lucide { width: 18px; height: 18px; flex-shrink: 0; stroke-width: 1.9; }
.icon-sm, svg.icon-sm { width: 15px; height: 15px; }
.icon-lg, svg.icon-lg { width: 22px; height: 22px; }

.muted { color: var(--text-2); }
.subtle { color: var(--text-3); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }

/* ---------- Layout ---------- */
.shell { min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-right: 1px solid var(--border);
  z-index: 40;
  transition: transform .3s var(--ease);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 22px 18px;
  color: var(--text);
}
.brand:hover { color: var(--text); }
.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .04em;
  color: #fff;
  background:
    radial-gradient(120% 120% at 0% 0%, #3fd0a4 0%, transparent 55%),
    linear-gradient(135deg, #0f8468 0%, #0a4f45 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14), 0 6px 16px -6px rgba(15, 132, 104, .6);
  flex-shrink: 0;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand-name { font-weight: 750; font-size: 15.5px; letter-spacing: -0.01em; }
.brand-sub { font-size: 12px; color: var(--text-3); font-weight: 500; }

.nav { flex: 1; overflow-y: auto; padding: 6px 14px 16px; }
.nav-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 18px 10px 8px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 42px;
  padding: 0 12px;
  border-radius: 11px;
  color: var(--text-2);
  font-weight: 550;
  font-size: 14px;
  transition: background .15s, color .15s;
}
.nav-item:hover { background: var(--surface-3); color: var(--text); }
.nav-item.active { background: var(--brand-soft); color: var(--brand-ink); }
.nav-item.active .icon, .nav-item.active svg { color: var(--brand); }
.nav-item .count {
  margin-left: auto;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 11.5px;
  font-weight: 700;
  background: var(--amber-soft);
  color: var(--amber);
}

.sidebar-footer { padding: 14px; border-top: 1px solid var(--border); }
.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 12px;
}
.user-card .meta { flex: 1; min-width: 0; line-height: 1.3; }
.user-card .name { font-weight: 650; font-size: 13.5px; }
.user-card .role { font-size: 12px; color: var(--text-3); }
.user-card a.meta { color: inherit; }

.main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.content { width: 100%; max-width: 1280px; margin: 0 auto; padding: 36px 40px 64px; flex: 1; }
.content.narrow { max-width: 860px; }

.topbar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 30;
  height: 60px;
  padding: 0 16px;
  align-items: center;
  gap: 12px;
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar .brand { padding: 0; }
.topbar .brand-mark { width: 34px; height: 34px; border-radius: 10px; font-size: 10.5px; }
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 16, 12, .45);
  backdrop-filter: blur(2px);
  z-index: 35;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}

@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .overlay { opacity: 1; pointer-events: auto; }
  .main { margin-left: 0; }
  .topbar { display: flex; }
  .content { padding: 24px 16px 56px; }
}

/* ---------- Sayfa başlığı ---------- */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.page-head h1 { font-size: 27px; font-weight: 750; letter-spacing: -0.025em; }
.page-head .lead { color: var(--text-2); margin-top: 6px; font-size: 15px; max-width: 640px; }
.page-head .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-3);
  margin-bottom: 10px;
}
.back-link:hover { color: var(--text); }
.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 6px;
}

/* ---------- Butonlar ---------- */
.btn {
  --btn-bg: var(--surface);
  --btn-fg: var(--text);
  --btn-border: var(--border-strong);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: 11px;
  border: 1px solid var(--btn-border);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 650;
  font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: background .15s, border-color .15s, box-shadow .15s, transform .08s, color .15s;
  box-shadow: var(--shadow-sm);
}
.btn:hover { background: var(--surface-3); color: var(--btn-fg); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--ring); }
.btn:disabled, .btn.is-disabled { opacity: .55; pointer-events: none; }
.btn-primary { --btn-bg: var(--brand); --btn-fg: var(--on-brand); --btn-border: transparent; box-shadow: 0 1px 2px rgba(0,0,0,.08), inset 0 1px 0 rgba(255,255,255,.12); }
.btn-primary:hover { background: var(--brand-hover); color: var(--on-brand); }
.btn-soft { --btn-bg: var(--brand-soft); --btn-fg: var(--brand-ink); --btn-border: transparent; box-shadow: none; }
.btn-soft:hover { background: var(--brand-soft-2); color: var(--brand-ink); }
.btn-ghost { --btn-bg: transparent; --btn-border: transparent; --btn-fg: var(--text-2); box-shadow: none; }
.btn-ghost:hover { background: var(--surface-3); color: var(--text); }
.btn-danger { --btn-bg: var(--rose); --btn-fg: #fff; --btn-border: transparent; }
.btn-danger:hover { background: var(--rose); filter: brightness(1.08); color: #fff; }
.btn-danger-soft { --btn-bg: var(--rose-soft); --btn-fg: var(--rose); --btn-border: transparent; box-shadow: none; }
.btn-danger-soft:hover { background: var(--rose-soft); filter: brightness(.97); color: var(--rose); }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 9px; gap: 6px; }
.btn-lg { height: 48px; padding: 0 22px; font-size: 15px; border-radius: 13px; }
.btn-block { width: 100%; }
.btn-icon { width: 40px; padding: 0; }
.btn-icon.btn-sm { width: 34px; }
.btn .spinner { display: none; }
.btn.is-loading { color: transparent !important; pointer-events: none; }
.btn.is-loading > *:not(.spinner) { visibility: hidden; }
.btn.is-loading .spinner { display: block; position: absolute; inset: 0; margin: auto; }
.btn.is-loading::after {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--btn-fg);
  border-right-color: transparent;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Kartlar ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
}
.card-header h2, .card-header h3 { font-size: 15.5px; font-weight: 700; }
.card-header .hint { font-size: 13px; color: var(--text-3); }
.card-body { padding: 22px; }
.card-footer { padding: 14px 22px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }

/* ---------- İstatistik kartları ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1100px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .stats { grid-template-columns: 1fr; } }
.stat {
  position: relative;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.stat-top { display: flex; align-items: center; justify-content: space-between; }
.stat-label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.stat-value { font-size: 32px; font-weight: 750; letter-spacing: -0.03em; margin-top: 10px; line-height: 1; font-variant-numeric: tabular-nums; }
.stat-foot { margin-top: 10px; font-size: 12.5px; color: var(--text-3); }
.chip-icon {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand);
}
.chip-icon.amber { background: var(--amber-soft); color: var(--amber); }
.chip-icon.blue { background: var(--blue-soft); color: var(--blue); }
.chip-icon.rose { background: var(--rose-soft); color: var(--rose); }
.chip-icon.violet { background: var(--violet-soft); color: var(--violet); }
.chip-icon.gray { background: var(--gray-soft); color: var(--text-2); }

/* ---------- Rozetler ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
  background: var(--gray-soft);
  color: var(--text-2);
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .9; }
.badge.plain::before { display: none; }
.badge-active, .badge-submitted, .badge-success { background: var(--brand-soft); color: var(--brand-ink); }
.badge-active::before, .badge-submitted::before, .badge-success::before { background: var(--brand); }
.badge-draft, .badge-info { background: var(--blue-soft); color: var(--blue); }
.badge-pending, .badge-warn { background: var(--amber-soft); color: var(--amber); }
.badge-closed { background: var(--gray-soft); color: var(--text-2); }
.badge-overdue, .badge-danger { background: var(--rose-soft); color: var(--rose); }
.badge-admin { background: var(--violet-soft); color: var(--violet); }

/* ---------- Avatar ---------- */
.avatar {
  --av: var(--brand);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .02em;
  color: var(--av);
  background: color-mix(in srgb, var(--av) 14%, var(--surface));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--av) 22%, transparent);
}
.avatar.sm { width: 30px; height: 30px; font-size: 11.5px; }
.avatar.lg { width: 56px; height: 56px; font-size: 19px; }
.avatar[data-c="1"] { --av: #0f8468; }
.avatar[data-c="2"] { --av: #3456d1; }
.avatar[data-c="3"] { --av: #b25a07; }
.avatar[data-c="4"] { --av: #6d45e0; }
.avatar[data-c="5"] { --av: #c42452; }
.avatar[data-c="6"] { --av: #0e7490; }

/* ---------- Formlar ---------- */
.field { display: flex; flex-direction: column; gap: 7px; }
.field + .field { margin-top: 16px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field-row + .field, .field + .field-row, .field-row + .field-row { margin-top: 16px; }
.field-row > .field + .field { margin-top: 0; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.label { font-size: 13.5px; font-weight: 650; color: var(--text); }
.label .req { color: var(--rose); margin-left: 2px; }
.label .opt { display: inline; font-weight: 500; color: var(--text-3); margin-left: 4px; }
.hint { font-size: 12.5px; color: var(--text-3); }
.error-text { font-size: 12.5px; color: var(--rose); font-weight: 550; display: flex; align-items: center; gap: 6px; }

.input, .select, .textarea {
  width: 100%;
  height: 42px;
  padding: 0 13px;
  border-radius: 11px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 14.5px;
  transition: border-color .15s, box-shadow .15s, background .15s;
  outline: none;
}
.textarea { height: auto; min-height: 96px; padding: 11px 13px; resize: vertical; line-height: 1.55; }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:hover, .select:hover, .textarea:hover { border-color: color-mix(in srgb, var(--border-strong) 60%, var(--text-3)); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--ring); }
.input:disabled, .select:disabled, .textarea:disabled, .input[readonly] { background: var(--surface-2); color: var(--text-2); cursor: not-allowed; }
.is-invalid .input, .is-invalid .select, .is-invalid .textarea, .input.is-invalid { border-color: var(--rose); }
.is-invalid .input:focus, .input.is-invalid:focus { box-shadow: 0 0 0 4px var(--rose-soft); }
.select {
  appearance: none;
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237f8d86' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
}
.input-icon { position: relative; }
.input-icon > svg, .input-icon > .icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.input-icon .input { padding-left: 40px; }
.input-icon .toggle-pass {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: var(--text-3);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.input-icon .toggle-pass:hover { background: var(--surface-3); color: var(--text); }

/* Anahtar (switch) */
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track {
  position: relative;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: var(--border-strong);
  transition: background .2s var(--ease);
  flex-shrink: 0;
}
.switch .track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
  transition: transform .2s var(--ease);
}
.switch input:checked + .track { background: var(--brand); }
.switch input:checked + .track::after { transform: translateX(16px); }
.switch input:focus-visible + .track { box-shadow: 0 0 0 4px var(--ring); }

/* Özel checkbox */
.check { position: relative; display: inline-grid; place-items: center; width: 20px; height: 20px; flex-shrink: 0; }
.check input { appearance: none; margin: 0; width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--border-strong); background: var(--surface); cursor: pointer; transition: all .15s; }
.check input:checked { background: var(--brand); border-color: var(--brand); }
.check input:disabled { opacity: .6; cursor: not-allowed; }
.check input:focus-visible { box-shadow: 0 0 0 4px var(--ring); outline: none; }
.check svg { position: absolute; width: 13px; height: 13px; color: var(--on-brand); pointer-events: none; opacity: 0; transform: scale(.6); transition: all .15s; stroke-width: 3; }
.check input:checked + svg { opacity: 1; transform: none; }

/* Segmentli seçici */
.segmented {
  display: inline-flex;
  padding: 4px;
  gap: 2px;
  border-radius: 12px;
  background: var(--surface-3);
  border: 1px solid var(--border);
}
.segmented button, .segmented label {
  height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text-2);
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all .15s;
  white-space: nowrap;
}
.segmented button:hover, .segmented label:hover { color: var(--text); }
.segmented button.active, .segmented input:checked + label {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm), 0 0 0 1px var(--border);
}
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented .n { font-size: 11.5px; font-weight: 700; color: var(--text-3); }

/* ---------- Araç çubuğu ---------- */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.toolbar .search { width: 300px; max-width: 100%; }
@media (max-width: 640px) {
  .toolbar .search { width: 100%; }
  .toolbar .segmented { width: 100%; overflow-x: auto; }
}

/* ---------- Tablo ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.table th {
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 12px 18px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table th:first-child { border-top-left-radius: var(--radius-lg); }
.table th:last-child { border-top-right-radius: var(--radius-lg); }
.table td { padding: 14px 18px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: var(--surface-2); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .actions { display: flex; justify-content: flex-end; gap: 4px; }
.table tr.is-muted td > * { opacity: .6; }
.person { display: flex; align-items: center; gap: 12px; min-width: 0; }
.person .meta { min-width: 0; line-height: 1.35; }
.person .name { font-weight: 650; color: var(--text); }
.person .sub { font-size: 12.5px; color: var(--text-3); }

/* ---------- İlerleme ---------- */
.progress { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand) 0%, color-mix(in srgb, var(--brand) 70%, #53e0b3) 100%); transition: width .5s var(--ease); }
.progress.sm { height: 6px; }
.progress-meta { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--text-3); margin-bottom: 7px; font-weight: 550; }
.progress-meta strong { color: var(--text); font-weight: 700; }

/* ---------- Boş durum ---------- */
.empty {
  text-align: center;
  padding: 56px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.empty .empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand);
  margin-bottom: 8px;
}
.empty .empty-icon svg { width: 28px; height: 28px; }
.empty h3 { font-size: 17px; font-weight: 700; }
.empty p { color: var(--text-2); max-width: 420px; }
.empty .btn { margin-top: 10px; }

/* ---------- Modal ---------- */
dialog.modal {
  border: 0;
  padding: 0;
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  border-radius: var(--radius-xl);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
dialog.modal:not([open]) { display: none; }
dialog.modal.wide { width: min(720px, calc(100vw - 32px)); }
dialog.modal[open] { animation: modal-in .28s var(--ease); }
dialog.modal::backdrop { background: rgba(8, 16, 12, .5); backdrop-filter: blur(3px); animation: fade-in .2s ease; }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
@keyframes fade-in { from { opacity: 0; } }
/* Form sarmalıyorsa da gövde kaydırılabilsin: başlık ve alt bar sabit, yalnızca .modal-body kayar */
dialog.modal > form { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.modal-header { display: flex; align-items: flex-start; gap: 14px; padding: 22px 24px 6px; }
.modal-header h2 { font-size: 18px; font-weight: 750; }
.modal-header p { color: var(--text-2); font-size: 14px; margin-top: 4px; }
.modal-header .close { margin-left: auto; margin-top: -4px; margin-right: -8px; }
.modal-body { padding: 18px 24px; overflow-y: auto; flex: 1 1 auto; min-height: 0; overscroll-behavior: contain; }
.modal-header, .modal-footer { flex-shrink: 0; }
.modal-footer { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 16px 24px 22px; }
.modal-footer .left { margin-right: auto; font-size: 13px; color: var(--text-3); font-weight: 550; }
.confirm-icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--rose-soft); color: var(--rose); flex-shrink: 0; }
/* Not: .brand kenar çubuğu logosunun sınıfı (padding'li); ikon kutusu için is-brand kullanın */
.confirm-icon.is-brand { background: var(--brand-soft); color: var(--brand); }

/* ---------- Toast ---------- */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 280px;
  max-width: 420px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--text);
  color: var(--bg);
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  font-weight: 550;
  animation: toast-in .35s var(--ease);
}
.toast.leaving { animation: toast-out .25s ease forwards; }
.toast .ti { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; background: #34c398; color: #04261c; }
.toast.error .ti { background: #ff7d9d; color: #3b0613; }
.toast .ti svg { width: 14px; height: 14px; stroke-width: 3; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(.96); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px) scale(.96); } }
@media (max-width: 560px) { .toasts { left: 16px; right: 16px; } .toast { min-width: 0; max-width: none; } }

/* ---------- Açılır menü ---------- */
.dropdown { position: relative; }
.menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 200px;
  padding: 6px;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--border);
  z-index: 50;
  display: none;
  animation: modal-in .18s var(--ease);
}
.dropdown.open .menu { display: block; }
.menu a, .menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 550;
  text-align: left;
  cursor: pointer;
}
.menu a:hover, .menu button:hover { background: var(--surface-3); color: var(--text); }
.menu .danger { color: var(--rose); }
.menu .danger:hover { background: var(--rose-soft); color: var(--rose); }
.menu hr { border: 0; border-top: 1px solid var(--border); margin: 6px 0; }

/* ---------- Sekmeler ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 22px; overflow-x: auto; }
.tabs button {
  position: relative;
  height: 44px;
  padding: 0 14px;
  border: 0;
  background: none;
  font-weight: 650;
  color: var(--text-3);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.tabs button:hover { color: var(--text); }
.tabs button.active { color: var(--text); }
.tabs button.active::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--brand); }
.tabs .n { font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); }

/* ---------- Uyarı bandı ---------- */
.notice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 14px;
  font-weight: 550;
}
.notice.success { background: var(--brand-soft); color: var(--brand-ink); }
.notice.warn { background: var(--amber-soft); color: var(--amber); }
.notice.danger { background: var(--rose-soft); color: var(--rose); }
.notice .grow p { color: inherit; opacity: .85; font-weight: 500; margin-top: 2px; }

/* ==========================================================================
   Giriş sayfası
   ========================================================================== */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); background: var(--surface); }
.auth-art {
  position: relative;
  overflow: hidden;
  padding: 48px 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #eafff6;
  background:
    radial-gradient(900px 500px at 110% -10%, rgba(83, 224, 179, .35), transparent 60%),
    radial-gradient(700px 520px at -20% 110%, rgba(18, 164, 128, .5), transparent 60%),
    linear-gradient(160deg, #0a3d33 0%, #0b5a49 55%, #0f8468 100%);
}
.auth-art::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 75%);
}
.auth-art > * { position: relative; }
.auth-art .brand { padding: 0; color: #fff; }
.auth-art .brand-sub { color: rgba(234, 255, 246, .7); }
.auth-art .brand-mark { background: rgba(255, 255, 255, .14); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); backdrop-filter: blur(6px); }
.auth-hero h1 { font-size: 40px; font-weight: 750; letter-spacing: -0.035em; line-height: 1.12; max-width: 520px; }
.auth-hero p { margin-top: 16px; font-size: 16px; color: rgba(234, 255, 246, .78); max-width: 460px; }
.auth-points { display: grid; gap: 12px; margin-top: 36px; }
.auth-point {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .07);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1);
  backdrop-filter: blur(8px);
  max-width: 440px;
  font-weight: 550;
}
.auth-point .ico { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: rgba(255, 255, 255, .12); flex-shrink: 0; }
.auth-foot { font-size: 13px; color: rgba(234, 255, 246, .6); }
.auth-form-wrap { display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.auth-form { width: 100%; max-width: 380px; }
.auth-form h2 { font-size: 26px; font-weight: 750; letter-spacing: -0.025em; }
.auth-form .lead { color: var(--text-2); margin-top: 8px; margin-bottom: 28px; }
.auth-form .mobile-brand { display: none; margin-bottom: 32px; padding: 0; }
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .auth-form .mobile-brand { display: flex; }
}

/* ==========================================================================
   Genel bakış
   ========================================================================== */
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; margin-top: 20px; }
@media (max-width: 1100px) { .dash-grid { grid-template-columns: 1fr; } }
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 14px; padding: 14px 22px; border-bottom: 1px solid var(--border); color: inherit; transition: background .12s; }
.list-item:last-child { border-bottom: 0; }
a.list-item:hover { background: var(--surface-2); color: inherit; }
.list-item .meta { flex: 1; min-width: 0; }
.list-item .title { font-weight: 650; }
.list-item .sub { font-size: 12.5px; color: var(--text-3); }
.report-progress { flex: 0 0 160px; }
@media (max-width: 640px) { .report-progress { flex-basis: 96px; } }
.welcome {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  padding: 28px 30px;
  margin-bottom: 20px;
  color: #eafff6;
  background:
    radial-gradient(600px 300px at 100% 0%, rgba(83, 224, 179, .35), transparent 60%),
    linear-gradient(135deg, #0a4a3d 0%, #0f8468 100%);
}
.welcome::after {
  content: '';
  position: absolute;
  right: -40px;
  bottom: -60px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  border: 40px solid rgba(255, 255, 255, .06);
}
.welcome h1 { font-size: 26px; font-weight: 750; letter-spacing: -0.02em; }
.welcome p { margin-top: 6px; color: rgba(234, 255, 246, .8); max-width: 560px; }
.welcome .actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; position: relative; z-index: 1; }
.welcome .btn { --btn-bg: rgba(255,255,255,.12); --btn-fg: #fff; --btn-border: rgba(255,255,255,.2); box-shadow: none; }
.welcome .btn:hover { background: rgba(255,255,255,.2); color: #fff; }
.welcome .btn-white { --btn-bg: #fff; --btn-fg: #0a4a3d; --btn-border: transparent; }
.welcome .btn-white:hover { background: #effff8; color: #0a4a3d; }

/* ==========================================================================
   Rapor kartları (yönetici listesi + kullanıcının raporları)
   ========================================================================== */
.report-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
@media (max-width: 400px) { .report-grid { grid-template-columns: 1fr; } }
.report-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .2s, transform .2s var(--ease);
}
.report-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow); transform: translateY(-2px); }
.report-card .rc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; min-height: 34px; }
.report-card h3 { font-size: 16.5px; font-weight: 700; letter-spacing: -0.01em; }
.report-card h3 a { color: var(--text); }
.report-card h3 a::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.report-card h3 a:hover { color: var(--brand); }
.report-card .desc { color: var(--text-2); font-size: 13.5px; margin-top: 6px; min-height: 42px; }
.report-card .rc-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 16px; font-size: 13px; color: var(--text-3); font-weight: 550; }
.report-card .rc-meta span { display: inline-flex; align-items: center; gap: 6px; }
.report-card .rc-meta .overdue { color: var(--rose); }
.report-card .rc-meta .soon { color: var(--amber); }
.report-card .rc-progress { margin-top: 18px; }
.report-card .rc-foot { display: flex; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); position: relative; z-index: 1; }
.report-card .dropdown { position: relative; z-index: 2; }
.report-card.is-submitted { background: var(--surface-2); }

.new-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 250px;
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background: transparent;
  color: var(--text-2);
  font-weight: 650;
  cursor: pointer;
  transition: all .15s;
}
.new-card:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.new-card .plus { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; background: var(--surface); box-shadow: var(--shadow-sm), 0 0 0 1px var(--border); }

/* ==========================================================================
   Soru oluşturucu
   ========================================================================== */
.builder-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  margin: -36px -40px 28px;
  padding: 14px 40px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.builder-bar .crumb { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 650; }
.builder-bar .crumb a { color: var(--text-3); display: inline-flex; align-items: center; gap: 6px; }
.builder-bar .crumb a:hover { color: var(--text); }
.builder-bar .crumb .cur { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.builder-bar .spacer { flex: 1; }
.save-state { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--text-3); white-space: nowrap; }
.save-state .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.save-state.dirty { color: var(--amber); }
.save-state.dirty .dot { background: var(--amber); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
@media (max-width: 1024px) {
  .builder-bar { top: 60px; margin: -24px -16px 20px; padding: 12px 16px; }
  .builder-bar .crumb .cur, .builder-bar .save-state .txt { display: none; }
}

.builder { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
@media (max-width: 1100px) { .builder { grid-template-columns: 1fr; } .builder-side { order: -1; } }
.builder-side { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 1100px) { .builder-side { position: static; } }

.title-card { padding: 26px 28px; border-top: 5px solid var(--brand); }
.title-input {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 26px;
  font-weight: 750;
  letter-spacing: -0.025em;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: border-color .15s;
}
.title-input:focus { border-bottom-color: var(--brand); }
.desc-input {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  resize: none;
  color: var(--text-2);
  font-size: 15px;
  padding: 6px 0;
  margin-top: 6px;
  line-height: 1.55;
  border-bottom: 1px solid transparent;
  overflow: hidden;
}
.desc-input:focus { border-bottom-color: var(--border-strong); }
.title-input::placeholder, .desc-input::placeholder { color: var(--text-3); }

.q-list { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.q-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 18px 20px 14px 18px;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 4px 12px;
  transition: border-color .15s, box-shadow .2s;
}
.q-card::before {
  content: '';
  position: absolute;
  left: -1px;
  top: 14px;
  bottom: 14px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--brand);
  opacity: 0;
  transition: opacity .15s;
}
.q-card:focus-within { border-color: var(--border-strong); box-shadow: var(--shadow); }
.q-card:focus-within::before { opacity: 1; }
.q-card.has-error { border-color: var(--rose); }
.q-handle {
  grid-row: 1 / span 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding-top: 8px;
}
.q-num { font-size: 12px; font-weight: 750; color: var(--text-3); font-variant-numeric: tabular-nums; }
.q-grip { cursor: grab; color: var(--text-3); padding: 4px; border-radius: 6px; border: 0; background: none; display: grid; }
.q-grip:hover { background: var(--surface-3); color: var(--text); }
.q-grip:active { cursor: grabbing; }
.q-head { display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: 12px; align-items: start; }
@media (max-width: 640px) { .q-head { grid-template-columns: 1fr; } }
.q-label {
  width: 100%;
  min-height: 42px;
  padding: 10px 13px;
  border-radius: 11px;
  border: 1px solid transparent;
  background: var(--surface-2);
  font-size: 15px;
  font-weight: 600;
  outline: none;
  resize: none;
  overflow: hidden;
  line-height: 1.45;
  transition: all .15s;
}
.q-label:hover { border-color: var(--border); }
.q-label:focus { background: var(--surface); border-color: var(--brand); box-shadow: 0 0 0 4px var(--ring); }
.q-type { position: relative; }
.q-type .select { padding-left: 38px; font-weight: 600; font-size: 14px; }
.q-type > svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--brand); pointer-events: none; }
.q-desc {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text-2);
  font-size: 13.5px;
  padding: 6px 13px;
  border-bottom: 1px dashed var(--border);
}
.q-desc:focus { border-bottom-color: var(--brand); }
.q-body { padding: 6px 0 2px; }
.q-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
  border-radius: 11px;
  border: 1px dashed var(--border-strong);
  color: var(--text-3);
  font-size: 13.5px;
  font-weight: 550;
}
.q-preview .stars { display: flex; gap: 4px; color: var(--amber); }
.q-preview .yn { display: flex; gap: 8px; }
.q-preview .yn span { padding: 3px 12px; border-radius: 8px; background: var(--surface-3); }

.opts { display: flex; flex-direction: column; gap: 6px; }
.opt { display: flex; align-items: center; gap: 10px; }
.opt .mark { width: 18px; height: 18px; flex-shrink: 0; border: 1.5px solid var(--border-strong); border-radius: 50%; }
.opt .mark.sq { border-radius: 5px; }
.opt .mark.num { border: 0; width: 18px; font-size: 12.5px; font-weight: 700; color: var(--text-3); text-align: center; line-height: 18px; }
.opt .input { height: 38px; border-color: transparent; background: transparent; padding: 0 10px; font-size: 14px; }
.opt .input:hover { border-color: var(--border); }
.opt .input:focus { border-color: var(--brand); background: var(--surface); }
.opt .rm { opacity: 0; transition: opacity .15s; }
.opt:hover .rm, .opt:focus-within .rm { opacity: 1; }
.add-opt { display: inline-flex; align-items: center; gap: 8px; margin-top: 4px; margin-left: 28px; padding: 6px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--brand); font-weight: 650; font-size: 13.5px; cursor: pointer; }
.add-opt:hover { background: var(--brand-soft); }

.q-foot { grid-column: 2; display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.q-foot .switch { margin-right: auto; }
.q-foot .sep { width: 1px; height: 22px; background: var(--border); margin: 0 6px; }

.sortable-ghost { opacity: .35; }
.sortable-chosen { box-shadow: var(--shadow-lg) !important; }

.add-q {
  margin-top: 14px;
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 18px;
  background: transparent;
}
.add-q .add-q-title { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; color: var(--text-2); margin-bottom: 12px; }
.type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.type-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  transition: all .15s;
  text-align: left;
}
.type-btn:hover { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); transform: translateY(-1px); }
.type-btn svg { color: var(--brand); }

.side-card .card-body { padding: 18px 20px; }
.side-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.side-stat { padding: 12px 10px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); text-align: center; }
.side-stat b { display: block; font-size: 20px; font-weight: 750; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.side-stat span { font-size: 11.5px; color: var(--text-3); font-weight: 600; }
.status-options { display: grid; gap: 8px; }
.status-opt {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all .15s;
}
.status-opt:hover { border-color: var(--border-strong); }
.status-opt input { position: absolute; opacity: 0; pointer-events: none; }
.status-opt .radio { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--border-strong); margin-top: 2px; flex-shrink: 0; transition: all .15s; }
.status-opt .t { font-weight: 650; font-size: 14px; }
.status-opt .d { font-size: 12.5px; color: var(--text-3); margin-top: 1px; }
.status-opt:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.status-opt:has(input:checked) .radio { border: 5px solid var(--brand); }
.status-opt:has(input:focus-visible) { box-shadow: 0 0 0 4px var(--ring); }

/* ==========================================================================
   Rapor doldurma (kullanıcı) + salt okunur yanıt görünümü
   ========================================================================== */
.fill-head { padding: 28px 30px; border-top: 5px solid var(--brand); }
.fill-head h1 { font-size: 26px; font-weight: 750; letter-spacing: -0.025em; }
.fill-head .desc { color: var(--text-2); margin-top: 8px; white-space: pre-line; }
.fill-head .meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

.fill-progress {
  position: sticky;
  top: 0;
  z-index: 15;
  margin: 16px 0;
  padding: 12px 18px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
@media (max-width: 1024px) { .fill-progress { top: 68px; } }

.question {
  scroll-margin-top: 110px;
  padding: 22px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .2s;
}
.question + .question { margin-top: 14px; }
.question:focus-within { border-color: var(--border-strong); box-shadow: var(--shadow); }
.question.has-error { border-color: var(--rose); box-shadow: 0 0 0 4px var(--rose-soft); }
.question .q-title { display: flex; gap: 12px; align-items: flex-start; }
.question .q-no {
  flex-shrink: 0;
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border-radius: 9px;
  background: var(--surface-3);
  color: var(--text-2);
  display: grid;
  place-items: center;
  font-size: 12.5px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  transition: all .2s;
}
.question.is-answered .q-no { background: var(--brand); color: var(--on-brand); }
.question .q-text { font-size: 15.5px; font-weight: 650; line-height: 1.45; padding-top: 3px; }
.question .q-text .req { color: var(--rose); margin-left: 3px; }
.question .q-help { color: var(--text-3); font-size: 13.5px; margin-top: 4px; }
.question .q-input { margin-top: 16px; padding-left: 40px; }
@media (max-width: 560px) { .question { padding: 18px; } .question .q-input { padding-left: 0; } }
.question .error-text { margin-top: 10px; padding-left: 40px; }
@media (max-width: 560px) { .question .error-text { padding-left: 0; } }

.choices { display: grid; gap: 8px; }
.choice {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  font-weight: 550;
  transition: all .15s;
}
.choice:hover { border-color: var(--border-strong); background: var(--surface-2); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice .ind {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  display: grid;
  place-items: center;
  transition: all .15s;
  background: var(--surface);
}
.choice .ind.sq { border-radius: 6px; }
.choice .ind svg { width: 13px; height: 13px; stroke-width: 3; color: var(--on-brand); opacity: 0; transform: scale(.5); transition: all .15s; }
.choice:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); }
.choice:has(input:checked) .ind { border-color: var(--brand); background: var(--brand); }
.choice:has(input:checked) .ind:not(.sq) { background: var(--surface); border-width: 6px; }
.choice:has(input:checked) .ind svg { opacity: 1; transform: none; }
.choice:has(input:focus-visible) { box-shadow: 0 0 0 4px var(--ring); }
.choice:has(input:disabled) { cursor: default; }
.choice:has(input:disabled):not(:has(input:checked)) { opacity: .6; }

.yesno { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 360px; }
.yesno .choice { justify-content: center; font-weight: 650; }
.yesno .choice .ind { display: none; }

.rating { display: flex; gap: 6px; flex-direction: row-reverse; justify-content: flex-end; }
.rating input { position: absolute; opacity: 0; pointer-events: none; }
.rating label {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--border-strong);
  cursor: pointer;
  transition: all .12s;
}
.rating label svg { width: 22px; height: 22px; }
.rating label:hover, .rating label:hover ~ label,
.rating input:checked ~ label { color: #f5a524; border-color: color-mix(in srgb, #f5a524 45%, var(--border)); background: color-mix(in srgb, #f5a524 10%, var(--surface)); }
.rating input:checked ~ label svg, .rating label:hover svg, .rating label:hover ~ label svg { fill: currentColor; }
.rating input:focus-visible + label { box-shadow: 0 0 0 4px var(--ring); }
.rating.readonly label { cursor: default; pointer-events: none; }
.rating-caption { font-size: 12.5px; color: var(--text-3); margin-top: 8px; font-weight: 550; }

.answer-view { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); white-space: pre-line; font-weight: 550; }
.answer-view.empty-answer { color: var(--text-3); font-style: italic; font-weight: 500; }

.fill-actions {
  position: sticky;
  bottom: 16px;
  z-index: 15;
  margin-top: 20px;
  padding: 12px 12px 12px 20px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}
.fill-actions .save-state { margin-right: auto; }
@media (max-width: 560px) {
  .fill-actions { flex-wrap: wrap; padding: 12px; }
  .fill-actions .save-state { width: 100%; justify-content: center; }
  .fill-actions .btn { flex: 1; }
}

.success-state { text-align: center; padding: 64px 24px; }
.success-state .big-check {
  width: 84px;
  height: 84px;
  margin: 0 auto 22px;
  border-radius: 28px;
  display: grid;
  place-items: center;
  background: var(--brand);
  color: var(--on-brand);
  box-shadow: 0 18px 40px -12px color-mix(in srgb, var(--brand) 70%, transparent);
  animation: pop .5s var(--ease);
}
.success-state .big-check svg { width: 40px; height: 40px; stroke-width: 2.6; }
.success-state h2 { font-size: 24px; font-weight: 750; letter-spacing: -0.02em; }
.success-state p { color: var(--text-2); margin-top: 8px; }
.success-state .btn { margin-top: 24px; }
@keyframes pop { 0% { transform: scale(.5); opacity: 0; } 60% { transform: scale(1.08); } }

/* ==========================================================================
   Yanıt özeti
   ========================================================================== */
.summary-grid { display: grid; gap: 16px; }
.sum-card .card-header { align-items: flex-start; }
.sum-card .q-type-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 650; color: var(--text-3); margin-top: 4px; }
.bars { display: grid; gap: 12px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; }
.bar-row .lbl { font-weight: 600; font-size: 14px; }
.bar-row .val { font-size: 13px; color: var(--text-2); font-weight: 650; font-variant-numeric: tabular-nums; }
.bar-row .val small { color: var(--text-3); font-weight: 550; margin-left: 4px; }
.bar-row .bar { grid-column: 1 / -1; height: 10px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.bar-row .bar span { display: block; height: 100%; border-radius: inherit; background: var(--brand); min-width: 2px; }
.bar-row.top .bar span { background: linear-gradient(90deg, var(--brand), color-mix(in srgb, var(--brand) 60%, #53e0b3)); }
.big-number { display: flex; align-items: baseline; gap: 8px; }
.big-number b { font-size: 40px; font-weight: 750; letter-spacing: -0.03em; line-height: 1; }
.big-number span { color: var(--text-3); font-weight: 600; }
.num-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 640px) { .num-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.num-tile { padding: 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.num-tile span { font-size: 12px; font-weight: 650; color: var(--text-3); }
.num-tile b { display: block; font-size: 20px; font-weight: 750; margin-top: 2px; font-variant-numeric: tabular-nums; }
.text-answers { display: grid; gap: 8px; max-height: 360px; overflow-y: auto; }
.text-answer { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.text-answer .who { font-size: 12px; font-weight: 650; color: var(--text-3); margin-bottom: 3px; }
.text-answer .what { white-space: pre-line; }
.rating-layout { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 24px; align-items: center; }
@media (max-width: 640px) { .rating-layout { grid-template-columns: 1fr; } }

/* ---------- Kullanıcı seçici (atama) ---------- */
.pick-list { display: flex; flex-direction: column; max-height: 380px; overflow-y: auto; margin: 12px -8px 0; padding: 0 8px; }
.pick {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: background .12s;
}
.pick:hover { background: var(--surface-2); }
.pick.is-checked { background: var(--brand-soft); }
.pick.is-locked { cursor: default; }
.pick .meta { flex: 1; min-width: 0; line-height: 1.35; }
.pick .name { font-weight: 650; }
.pick .sub { font-size: 12.5px; color: var(--text-3); }
.pick-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-top: 10px; }
.pick-filters .select { height: 38px; font-size: 14px; }
.pick-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; font-size: 13px; }
.linklike { border: 0; background: none; padding: 0; color: var(--brand); font-weight: 650; cursor: pointer; font-size: 13px; }
.linklike:hover { text-decoration: underline; }

/* ---------- Panel Yönetimi (modül kartları) ---------- */
.module-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
@media (max-width: 400px) { .module-grid { grid-template-columns: 1fr; } }
.module-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 190px;
  padding: 28px 20px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  color: var(--text);
  transition: border-color .15s, box-shadow .2s, transform .2s var(--ease);
}
.module-card:hover { border-color: var(--brand-soft-2); box-shadow: var(--shadow); transform: translateY(-2px); }
.module-card:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--ring); }
.module-icon {
  width: 60px;
  height: 60px;
  margin-bottom: 12px;
  border-radius: var(--radius-lg);
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand);
  transition: background .15s, color .15s;
}
.module-icon svg { width: 26px; height: 26px; }
.module-card:hover .module-icon { background: var(--brand); color: var(--on-brand); }
.module-title { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.module-sub { font-size: 13px; color: var(--text-3); font-weight: 550; }
.cell-title { font-weight: 650; }

/* ---------- Profil ---------- */
.profile-head { display: flex; align-items: center; gap: 18px; }
.profile-head h2 { font-size: 20px; font-weight: 750; }
.profile-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; margin-top: 20px; align-items: start; }
@media (max-width: 900px) { .profile-grid { grid-template-columns: 1fr; } }

/* ---------- Hata sayfası ---------- */
.error-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; text-align: center; }
.error-page .code { font-size: 84px; font-weight: 800; letter-spacing: -0.05em; line-height: 1; background: linear-gradient(135deg, var(--brand), #53e0b3); -webkit-background-clip: text; background-clip: text; color: transparent; }
.error-page h1 { font-size: 22px; margin-top: 12px; }
.error-page p { color: var(--text-2); margin-top: 8px; }
.error-page .btn { margin-top: 24px; }

/* ---------- Önizleme bandı ---------- */
.preview-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 14px;
  margin-bottom: 16px;
  background: repeating-linear-gradient(-45deg, var(--violet-soft), var(--violet-soft) 12px, color-mix(in srgb, var(--violet-soft) 60%, var(--surface)) 12px, color-mix(in srgb, var(--violet-soft) 60%, var(--surface)) 24px);
  color: var(--violet);
  font-weight: 650;
  font-size: 14px;
}

/* Hareket azaltma tercihine saygı */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Tema düğmesi: açık temada ay, koyu temada güneş */
[data-theme-toggle] .theme-light { display: none; }
:root[data-theme="dark"] [data-theme-toggle] .theme-dark { display: none; }
:root[data-theme="dark"] [data-theme-toggle] .theme-light { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) [data-theme-toggle] .theme-dark { display: none; }
  :root:not([data-theme="light"]) [data-theme-toggle] .theme-light { display: block; }
}

/* Açık menüsü olan kart komşularının üstünde kalsın */
.report-card:has(.dropdown.open) { z-index: 5; }
.q-card > :not(.q-handle) { grid-column: 2; }
.meta-line { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 13px; color: var(--text-3); font-weight: 550; }
.meta-line span { display: inline-flex; align-items: center; gap: 6px; }
svg.star-fill { fill: currentColor; }
.report-card .rc-meta .editable-until { color: var(--brand); }
