/* Kayalar — Brand-faithful design system from prototype JSX */
:root {
  --k-green: #46A05A;
  --k-green-600: #3a8a4c;
  --k-green-700: #2f7a40;
  --k-green-50: #ecf6ef;
  --k-green-100: #d8edde;
  --ink: #161918;
  --ink-2: #2a2f2d;
  --ink-3: #4a504d;
  --muted: #6b736f;
  --muted-2: #9aa19d;
  --line: #e6e3dd;
  --line-soft: #efece6;
  --paper: #faf8f3;
  --card: #ffffff;
  --sys-astar: #2563eb;
  --sys-astar-bg: #eef4ff;
  --sys-boya: #d62828;
  --sys-boya-bg: #fdecec;
  --sys-dolgu: #c97a08;
  --sys-dolgu-bg: #fcf2e0;
  --sys-vernik: #46A05A;
  --sys-vernik-bg: #ecf6ef;
  --warn-fg: #a35d05;
  --warn-bg: #fcf2e0;
  --danger: #d62828;

  --font-display: "Inter Tight", "Inter", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-text:    "Inter", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "SF Mono", monospace;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: #1a1d1a;
  color: var(--ink);
  font-family: var(--font-text);
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
  font-size: 15px;
  text-rendering: optimizeLegibility;
}
[x-cloak] { display: none !important; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.025em;
  margin: 0;
}
.tabular { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); }
.uppercase-label {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--muted); font-weight: 700;
}

button { font-family: inherit; }
input, select, textarea {
  font-family: inherit;
  font-size: 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: white;
  outline: none;
  color: var(--ink);
  width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--ink); }
label { font-size: 12px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; }

/* ─── Phone canvas (desktop centered, mobile fullscreen) ─── */
.phone {
  position: relative;
  width: 100%;
  max-width: 430px;
  height: 100dvh;
  margin: 0 auto;
  background: var(--paper);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
@media (min-width: 700px) and (max-width: 1099px) {
  body {
    background: radial-gradient(ellipse at top, #2a2f2d 0%, #1a1d1a 80%);
    padding: 30px 0;
  }
  .phone {
    height: 844px;
    max-height: calc(100dvh - 60px);
    border-radius: 44px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.4), 0 0 0 8px #15191c, 0 0 0 9px #2a2f33;
  }
}

/* ─── E-posta chip input (Outlook-style) ─── */
.chip-input {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  border: 1px solid var(--line); border-radius: 14px;
  padding: 8px 10px; background: white; cursor: text; min-height: 46px;
}
.chip-input:focus-within { border-color: var(--ink); }
.email-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--k-green-50); color: var(--k-green-700);
  border: 1px solid var(--k-green-100);
  border-radius: 999px; padding: 4px 6px 4px 12px;
  font-size: 13px; font-weight: 500; white-space: nowrap;
}
.email-chip button {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 999px;
  background: rgba(47,122,64,0.12); border: none; cursor: pointer;
  color: var(--k-green-700); padding: 0;
}
.email-chip button:hover { background: var(--k-green); color: white; }
.email-chip.saved {
  background: var(--line-soft); color: var(--ink-2); border-color: var(--line);
}
.email-chip.saved button { background: rgba(0,0,0,0.06); color: var(--ink-3); }
.email-chip.saved button:hover { background: var(--danger); color: white; }
.chip-text-input {
  flex: 1; min-width: 160px; border: none !important; outline: none;
  padding: 4px !important; font-size: 14px; background: transparent; border-radius: 0 !important;
}
.chip-text-input:focus { box-shadow: none !important; }

/* ─── Brand logo (consistent aspect across all placements) ─── */
.brand-logo {
  display: block;
  width: auto !important;
  max-width: none !important;
  min-width: 0;
  flex-shrink: 0;
  object-fit: contain;
  /* Native asset is 223×57 (≈3.91:1) — height is the master dimension */
}

/* ─── Sidebar (desktop ≥1100px) ─── */
.desktop-sidebar { display: none; }
.app-shell { display: block; }
.app-main { display: block; }

/* On mobile/tablet: keep horizontal desktop-nav hidden, phone is the whole shell */
@media (max-width: 1099px) {
  .desktop-nav { display: none; }
}

@media (min-width: 1100px) {
  body { background: var(--paper); padding: 0; }
  .app-shell {
    display: grid;
    grid-template-columns: 252px 1fr;
    min-height: 100dvh;
  }
  .app-main {
    min-width: 0;
    min-height: 100dvh;
    display: block;
    position: relative;
  }
  .desktop-sidebar {
    display: flex; flex-direction: column;
    background: white; border-right: 1px solid var(--line);
    height: 100dvh; position: sticky; top: 0;
    padding: 22px 14px 14px;
    z-index: 30;
  }
  .sb-brand { padding: 4px 12px 22px; }
  .sb-nav {
    display: flex; flex-direction: column; gap: 3px;
    flex: 1; overflow-y: auto;
  }
  .sb-link {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border-radius: 12px;
    color: var(--ink-2); text-decoration: none;
    font-weight: 500; font-size: 14px; cursor: pointer;
    line-height: 1.1; border: none; background: transparent; text-align: left;
  }
  .sb-link .icon { width: 18px; height: 18px; flex-shrink: 0; color: var(--muted); }
  .sb-link:hover { background: var(--line-soft); }
  .sb-link.active { background: var(--k-green-50); color: var(--k-green-700); font-weight: 600; }
  .sb-link.active .icon { color: var(--k-green-700); }
  .sb-link.accent {
    background: var(--ink); color: white; font-weight: 600;
    margin: 6px 0;
  }
  .sb-link.accent .icon { color: white; }
  .sb-link.accent:hover { background: var(--ink-2); }
  .sb-section { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
  .sb-hdr {
    font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.5px;
    color: var(--muted); font-weight: 700;
    padding: 0 12px 6px;
  }
  .sb-foot {
    border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px;
    display: flex; gap: 8px; align-items: center;
  }
  .sb-user {
    flex: 1; display: flex; align-items: center; gap: 10px;
    background: transparent; border: none; cursor: pointer; text-align: left;
    padding: 6px 8px; border-radius: 10px; min-width: 0;
  }
  .sb-user:hover, .sb-user.active { background: var(--line-soft); }
  .sb-avatar {
    width: 36px; height: 36px; border-radius: 12px;
    background: var(--k-green); color: white;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 13px; flex-shrink: 0;
  }
  .sb-user-meta { display: flex; flex-direction: column; min-width: 0; }
  .sb-user-meta strong {
    font-size: 13px; color: var(--ink);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 130px;
  }
  .sb-user-meta span { font-size: 11px; color: var(--muted); }
  .sb-logout {
    width: 36px; height: 36px; border-radius: 10px;
    background: transparent; border: 1px solid var(--line);
    color: var(--ink-3); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
  }
  .sb-logout .icon { width: 16px; height: 16px; }
  .sb-logout:hover { color: var(--danger); border-color: var(--danger); }

  /* Phone canvas adjustments on desktop: no frame, full width/height */
  .phone {
    max-width: none; width: 100%; height: 100dvh;
    border-radius: 0; box-shadow: none;
    background: var(--paper);
  }
  /* Hide floating mobile tabbar — sidebar replaces it */
  .phone .tabbar { display: none; }

  /* Wider, calmer spacings throughout */
  .body-scroll { padding: 8px 40px 60px; }
  .body-scroll.no-tab { padding: 24px 40px 60px; }
  .topbar { padding: 20px 40px 14px; }
  .study-header { padding: 16px 40px 18px; }
  .tabs-row { padding: 16px 40px 12px; }
  .save-bar { padding: 16px 40px; }
  .profile-hero { padding: 24px 40px 28px; }

  /* Hide the page-internal top header on dashboard (sidebar has brand+avatar) */
  /* Keep bell + avatar visible for parity — they trigger notifications/profile */
  /* (The page-internal logo image is small enough; leave it.) */

  /* Center wider page content for readability */
  .greet, .stat-trio, .body-scroll > .section-label,
  .body-scroll > .list-stack {
    max-width: 1100px;
    margin-left: auto; margin-right: auto;
  }

  /* Larger headlines on desktop */
  .greet h1 { font-size: 32px; }
  .stat .v { font-size: 30px; }

  /* Dashboard study cards: subtle hover */
  .study-card { transition: transform 0.15s, box-shadow 0.15s; }
  .study-card:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0,0,0,0.05); }

  /* Admin shell: padding aware of sidebar */
  .admin-shell {
    max-width: 1200px; margin: 0 auto;
    padding: 32px 40px;
    box-shadow: none;
    min-height: 100dvh;
  }
  .admin-back { display: none; } /* sidebar nav replaces it */

  /* Wizard centered, framed */
  .wizard-page-frame { max-width: 760px; margin: 0 auto; }

  /* Old horizontal desktop nav strip (replaced by sidebar) */
  .desktop-nav { display: none !important; }

  /* Login on desktop: stays mobile-centered */
  .login-page { max-width: 460px; margin: 0 auto; }

  /* Search bars / filter chips at study list look nicer with a max width */
  .body-scroll > div > .filters-scroll,
  .body-scroll > div > .search-bar { max-width: 1100px; margin-left: auto; margin-right: auto; }
}

/* Tablet view (700–1099): keep phone-frame device look */
@media (min-width: 700px) and (max-width: 1099px) {
  .desktop-nav { display: none !important; }
}

/* ─── Admin-wide canvas ─── */
.admin-shell {
  max-width: 1100px;
  margin: 0 auto;
  background: var(--paper);
  min-height: 100dvh;
  padding: 24px 20px 40px;
}
@media (min-width: 700px) {
  .admin-shell { box-shadow: 0 10px 40px rgba(0,0,0,0.15); }
}

/* ─── Top bar ─── */
.topbar {
  padding: 14px 18px 12px;
  display: flex; align-items: center; justify-content: space-between;
  background: transparent;
}
.topbar-back, .topbar-action {
  width: 38px; height: 38px; border-radius: 12px;
  background: #fff; border: 1px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--ink); position: relative;
}
.topbar-action.notif::after {
  content: ""; position: absolute; top: 8px; right: 9px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--k-green); border: 2px solid #fff;
}
.topbar-title {
  flex: 1; text-align: center; padding: 0 8px;
}
.topbar-title .t { font-weight: 600; font-size: 15px; letter-spacing: -0.2px; }
.topbar-title .s { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.topbar .placeholder { width: 38px; height: 38px; }

/* ─── Body scroll area ─── */
.body-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 20px 110px;
  -webkit-overflow-scrolling: touch;
}
.body-scroll.no-tab { padding-bottom: 28px; }

/* ─── Section label (uppercase tracked + count chip) ─── */
.section-label {
  display: flex; align-items: center; justify-content: space-between;
  margin: 20px 0 10px;
}
.section-label h2 {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.6px;
  color: var(--muted); font-weight: 700;
}
.section-label .count {
  font-size: 10.5px; font-weight: 700; color: var(--ink-3);
  background: var(--line-soft); padding: 2px 7px; border-radius: 99px;
  margin-left: 8px;
}
.section-label .action {
  font-size: 11.5px; color: var(--k-green-700); font-weight: 600; cursor: pointer;
}

/* ─── Cards ─── */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 20px; padding: 16px;
}
.card.tight { padding: 12px 14px; }
.card.dark {
  background: #1b1f1d; color: white; border: none;
}
.card-group {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 20px; overflow: hidden;
}
.card-group .row {
  padding: 14px 16px;
  border-top: 1px solid var(--line-soft);
}
.card-group .row:first-child { border-top: none; }
.card-group .row.kv {
  display: flex; align-items: center; justify-content: space-between;
}
.card-group .row.kv .v {
  font-family: var(--font-display); font-size: 20px; font-weight: 600;
  letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
}
.card-group .row.kv .v .u { font-size: 12px; color: var(--muted); font-weight: 500; margin-left: 4px; }

/* ─── Buttons ─── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 12px 16px; border-radius: 14px;
  border: 1px solid transparent; background: var(--ink); color: white;
  font-weight: 600; font-size: 15px; cursor: pointer; min-height: 46px;
  letter-spacing: -0.1px;
  transition: opacity 0.15s;
}
.btn:hover { opacity: 0.92; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.accent { background: var(--k-green); color: white; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.soft { background: var(--k-green-50); color: var(--k-green-700); border: none; }
.btn.danger { background: white; color: var(--danger); border-color: var(--danger); }
.btn.sm { padding: 8px 12px; font-size: 13px; min-height: 34px; border-radius: 11px; }
.btn.lg { padding: 14px 18px; font-size: 16px; min-height: 54px; }
.btn.icon-only { width: 46px; padding: 0; }
.btn.full { width: 100%; }

/* ─── System badge ─── */
.sysbadge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 9px;
  font-family: var(--font-display); font-weight: 700; font-size: 12px;
  letter-spacing: -0.5px; flex-shrink: 0;
}
.sysbadge.md { width: 32px; height: 32px; font-size: 14px; }
.sysbadge.lg { width: 44px; height: 44px; font-size: 17px; border-radius: 11px; }
.sysbadge.astar  { background: var(--sys-astar-bg);  color: var(--sys-astar); }
.sysbadge.boya   { background: var(--sys-boya-bg);   color: var(--sys-boya); }
.sysbadge.dolgu  { background: var(--sys-dolgu-bg);  color: var(--sys-dolgu); }
.sysbadge.vernik { background: var(--sys-vernik-bg); color: var(--sys-vernik); }

/* ─── Status chip ─── */
.status-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600;
}
.status-chip::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor;
}
.status-chip.taslak { background: #eceae4; color: var(--ink-3); }
.status-chip.brief { background: var(--warn-bg); color: var(--warn-fg); }
.status-chip.uygulama { background: var(--sys-astar-bg); color: var(--sys-astar); }
.status-chip.tamam { background: var(--k-green-50); color: var(--k-green-700); }
.status-chip.arsiv { background: #f0eee9; color: var(--muted); }

/* ─── Bottom tab bar (mobile-style floating) ─── */
.tabbar {
  position: absolute; left: 12px; right: 12px; bottom: 14px;
  height: 64px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-radius: 26px;
  box-shadow: 0 12px 30px rgba(20,30,15,0.10), 0 0 0 1px rgba(0,0,0,0.04);
  display: flex; align-items: center; padding: 0 10px; z-index: 20;
}
.tabbar .tab {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  gap: 3px; background: transparent; border: none; cursor: pointer;
  color: var(--muted-2); padding: 6px 0;
}
.tabbar .tab.active { color: var(--ink); }
.tabbar .tab.active .label { font-weight: 600; }
.tabbar .tab .label { font-size: 10.5px; font-weight: 500; letter-spacing: -0.05px; }
.tabbar .tab.big-wrap {
  flex: 1; display: flex; justify-content: center;
}
.tabbar .tab-big {
  width: 52px; height: 52px; border-radius: 16px;
  background: var(--k-green); color: white; border: none;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 18px rgba(70,160,90,0.45);
  margin-top: -22px; cursor: pointer;
}

/* ─── Login page ─── */
.login-page {
  flex: 1; padding: 64px 28px 24px;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--paper) 0%, var(--k-green-50) 100%);
}
.login-tag {
  margin-bottom: 12px; display: flex; align-items: center; gap: 12px;
}
.login-tag .bar { width: 4px; height: 22px; background: var(--k-green); border-radius: 2px; }
.login-tag span {
  font-size: 12px; letter-spacing: 0.5px; color: var(--muted);
  text-transform: uppercase; font-weight: 600;
}
.login-page h1 { font-size: 32px; line-height: 1.08; margin-bottom: 6px; }
.login-page .lede { color: var(--ink-3); font-size: 14px; line-height: 1.5; margin-bottom: 38px; }
.login-input {
  background: white; border: 1px solid var(--line); border-radius: 16px;
  padding: 14px 16px; display: flex; align-items: center; justify-content: space-between;
}
.login-input .field-label {
  font-size: 11px; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.4px;
}
.login-input input {
  border: none; padding: 0; margin-top: 4px;
  font-size: 16px; color: var(--ink); background: transparent; border-radius: 0;
}
.login-input input:focus { box-shadow: none; }

/* ─── Greeting ─── */
.greet { padding-top: 6px; margin-bottom: 18px; }
.greet .date { color: var(--muted); font-size: 13px; }
.greet h1 { font-size: 28px; line-height: 1.1; margin-top: 2px; }

/* ─── Stat trio ─── */
.stat-trio { display: flex; gap: 10px; margin-bottom: 22px; }
.stat-trio .stat {
  flex: 1; background: var(--card); border-radius: 18px;
  border: 1px solid var(--line); padding: 12px 14px; cursor: pointer;
}
.stat .v {
  font-family: var(--font-display); font-size: 26px; font-weight: 600;
  line-height: 1; letter-spacing: -0.04em; font-variant-numeric: tabular-nums;
}
.stat .v.green { color: var(--k-green-700); }
.stat .v.amber { color: var(--warn-fg); }
.stat .l { font-size: 11.5px; color: var(--muted); margin-top: 4px; }

/* ─── Study card ─── */
.study-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 20px;
  padding: 16px; display: flex; flex-direction: column; gap: 12px; cursor: pointer;
}
.study-card-head { display: flex; align-items: flex-start; gap: 12px; }
.study-card-head .meta { flex: 1; min-width: 0; }
.study-card .code-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.study-card .code {
  font-size: 11.5px; font-family: var(--font-mono); color: var(--muted); font-weight: 600;
}
.study-card .dot { font-size: 11px; color: var(--muted-2); }
.study-card .sub { font-size: 11.5px; color: var(--muted); }
.study-card .name {
  font-size: 15px; font-weight: 600; color: var(--ink); line-height: 1.3; margin-top: 2px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; text-overflow: ellipsis;
}
.study-card-foot {
  display: flex; align-items: center; justify-content: space-between;
}
.study-card .due { font-size: 11.5px; color: var(--ink-3); font-weight: 500; }

/* ─── List items ─── */
.list-stack { display: flex; flex-direction: column; gap: 10px; }
.list-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  cursor: pointer;
}
.list-row:hover { border-color: var(--ink-3); }
.list-row .main { flex: 1; min-width: 0; }
.list-row .main .t { font-size: 14px; font-weight: 500; color: var(--ink); }
.list-row .main .s { font-size: 12px; color: var(--muted); margin-top: 1px; }

/* ─── Wizard ─── */
.stepper {
  display: flex; align-items: center; gap: 6px; padding: 0 20px; margin-bottom: 22px;
}
.stepper .seg {
  height: 4px; border-radius: 99px; background: var(--line);
  flex: 1; transition: all 0.3s;
}
.stepper .seg.done { background: var(--ink); }
.stepper .seg.active { flex: 2; background: var(--ink); }
.stepper .num { font-size: 11px; color: var(--muted); font-weight: 600; margin-left: 6px; letter-spacing: 0.4px; font-variant-numeric: tabular-nums; }

.wiz-h1 { font-size: 26px; line-height: 1.15; margin-bottom: 8px; }
.wiz-sub { color: var(--muted); font-size: 13.5px; line-height: 1.5; margin-bottom: 24px; }

.system-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.system-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 20px; padding: 16px; text-align: left; cursor: pointer;
  position: relative; min-height: 168px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.system-card.selected {
  background: white; border: 2px solid var(--ink);
}
.system-card .name {
  font-size: 17px; font-weight: 600; color: var(--ink);
  font-family: var(--font-display); margin-bottom: 2px;
}
.system-card .desc { font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.system-card .stats { display: flex; gap: 10px; font-size: 11.5px; color: var(--ink-3); }
.system-card .check {
  position: absolute; top: 12px; right: 12px;
  width: 22px; height: 22px; border-radius: 99px;
  background: var(--ink); color: white;
  display: flex; align-items: center; justify-content: center;
}

.purpose-row {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; padding: 14px 16px;
  display: flex; align-items: center; gap: 14px; cursor: pointer;
}
.purpose-row.selected { background: white; border: 2px solid var(--ink); padding: 13px 15px; }
.purpose-row .radio {
  width: 22px; height: 22px; border-radius: 99px; border: 1.5px solid var(--line);
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  color: white;
}
.purpose-row.selected .radio { border: none; background: var(--ink); }
.purpose-row .name { font-size: 15.5px; font-weight: 600; color: var(--ink); }
.purpose-row .desc { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.hot-tag {
  font-size: 10.5px; font-weight: 700; color: var(--k-green-700);
  background: var(--k-green-50); padding: 3px 8px; border-radius: 99px;
  letter-spacing: 0.4px;
}

.product-row {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 14px;
  display: flex; align-items: center; gap: 12px;
}
.product-row .bar { width: 6px; height: 26px; border-radius: 2px; flex-shrink: 0; }
.product-row .bar.ref { background: var(--muted-2); }
.product-row .bar.den { background: var(--k-green); }
.product-row .bar.rakip { background: var(--danger); }
.product-row .bar.uretim { background: var(--sys-astar); }
.bar.ref { background: var(--muted-2); }
.bar.den { background: var(--k-green); }
.bar.rakip { background: var(--danger); }
.bar.uretim { background: var(--sys-astar); }
.product-row .code { font-size: 14px; font-family: var(--font-mono); font-weight: 600; }
.product-row .label { font-size: 12px; color: var(--muted); margin-top: 1px; }
.product-row .tag {
  font-size: 10px; font-weight: 700; color: var(--ink-3);
  padding: 3px 7px; border-radius: 6px; background: var(--line-soft);
  letter-spacing: 0.4px;
}
.add-row {
  width: 100%; padding: 14px; border-radius: 14px;
  background: transparent; border: 1.5px dashed var(--line);
  color: var(--ink-3); font-weight: 600; font-size: 14px;
  display: flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer;
}

/* ─── Sticky footer (wizard) ─── */
.sticky-foot {
  position: absolute; left: 0; right: 0; bottom: 8px;
  padding: 16px;
  background: linear-gradient(180deg, transparent, var(--paper) 30%);
  z-index: 10;
}
.sticky-foot .row { display: flex; gap: 10px; }

/* ─── Study header (study detail) ─── */
.study-header {
  padding: 4px 20px 14px;
  background: white;
  border-bottom: 1px solid var(--line);
}
.study-header .head { display: flex; align-items: flex-start; gap: 12px; }
.study-header .head .meta { flex: 1; min-width: 0; }
.study-header h1 { font-size: 19px; line-height: 1.2; margin-top: 2px; }
.study-header .footrow { display: flex; align-items: center; gap: 8px; margin-top: 10px; }

/* ─── Tabs row (chip-style) ─── */
.tabs-row {
  display: flex; gap: 4px; padding: 12px 16px 10px;
  background: white; border-bottom: 1px solid var(--line);
  overflow-x: auto;
}
.tabs-row::-webkit-scrollbar { display: none; }
.tabs-row .tab {
  padding: 7px 14px; border-radius: 99px;
  font-size: 13.5px; font-weight: 600;
  background: transparent; color: var(--ink-3);
  border: 1px solid var(--line); white-space: nowrap; cursor: pointer;
}
.tabs-row .tab.active {
  background: var(--ink); color: white; border-color: var(--ink);
}

/* ─── Brief: author row ─── */
.author-row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.author-row .av {
  width: 36px; height: 36px; border-radius: 99px;
  background: var(--warn-bg); color: var(--warn-fg);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
}
.author-row .meta { flex: 1; }
.author-row .name { font-size: 14px; font-weight: 600; }
.author-row .sub { font-size: 11.5px; color: var(--muted); }
.version-pill {
  font-size: 11px; font-weight: 700; color: var(--k-green-700);
  background: var(--k-green-50); padding: 4px 10px; border-radius: 99px;
}

/* ─── Brief: condition cards ─── */
.condition-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.condition-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; padding: 14px;
}
.condition-card .head {
  display: flex; align-items: center; gap: 6px;
  color: var(--muted); font-size: 12px; margin-bottom: 6px;
}
.condition-card .v {
  font-family: var(--font-display); font-size: 24px; font-weight: 600;
  letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
}
.condition-card .v .u { font-size: 13px; color: var(--muted); font-weight: 500; }

.notes-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; padding: 14px 16px;
  font-size: 14px; line-height: 1.55; color: var(--ink-2);
}

/* ─── Application form fields ─── */
.product-chips {
  display: flex; gap: 6px; padding: 0 8px 8px; overflow-x: auto;
}
.product-chips::-webkit-scrollbar { display: none; }
.product-chips .chip {
  padding: 8px 12px; border-radius: 12px; font-size: 13px;
  background: white; color: var(--ink-2); border: 1px solid var(--line);
  display: flex; align-items: center; gap: 6px; white-space: nowrap;
  font-family: var(--font-mono); font-weight: 600; cursor: pointer;
}
.product-chips .chip.selected { background: var(--ink); color: white; border-color: var(--ink); }
.product-chips .chip .tag {
  font-size: 9.5px; font-weight: 700; color: var(--muted-2); letter-spacing: 0.4px;
}
.product-chips .chip.selected .tag { color: rgba(255,255,255,0.6); }

.env-card {
  background: linear-gradient(135deg, #f4faf5 0%, #ecf6ef 100%);
  border: 1px solid var(--k-green-100); border-radius: 18px;
  padding: 12px 14px; margin-bottom: 10px;
}
.env-card .head {
  display: flex; align-items: center; justify-content: space-between;
}
.env-card .lbl {
  font-size: 11.5px; font-weight: 700; color: var(--k-green-700);
  text-transform: uppercase; letter-spacing: 0.5px;
}
.env-card .act { font-size: 11.5px; color: var(--k-green-700); font-weight: 600; cursor: pointer; }
.env-card .grid {
  display: flex; gap: 14px; margin-top: 8px;
}
.env-card .grid > div { flex: 1; }
.env-card .grid .sep { width: 1px; background: var(--k-green-100); flex: 0 0 1px; }
.env-card .grid .l { font-size: 11px; color: var(--muted); }
.env-card .grid .v {
  font-family: var(--font-display); font-size: 22px; font-weight: 600;
  letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
}
.env-card .grid .v .u { font-size: 12px; color: var(--muted); font-weight: 500; }

.timer-card {
  background: #1b1f1d; color: white; border-radius: 18px;
  padding: 14px 16px; display: flex; align-items: center; gap: 14px;
}
.timer-card .ico {
  width: 42px; height: 42px; border-radius: 12px;
  background: rgba(255,255,255,0.08); color: var(--k-green);
  display: flex; align-items: center; justify-content: center;
}
.timer-card .lbl {
  font-size: 11px; color: rgba(255,255,255,0.55);
  text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600;
}
.timer-card .v {
  font-family: var(--font-display); font-size: 22px; font-weight: 600;
  letter-spacing: -0.01em; font-variant-numeric: tabular-nums; margin-top: 1px;
}
.timer-card button {
  padding: 8px 14px; border-radius: 10px;
  background: rgba(255,255,255,0.12); color: white; border: none;
  font-weight: 600; font-size: 13px; cursor: pointer;
}
.timer-card button.running { background: var(--k-green); }
.timer-card button:disabled { opacity: 0.4; cursor: not-allowed; }
.timer-field {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; padding: 12px 14px;
}

/* ─── Interaktif rapor önizleme ─── */
.report-preview {
  background: white; border: 1px solid var(--line); border-radius: 14px;
  padding: 22px 24px; margin-bottom: 14px;
  max-height: 560px; overflow-y: auto;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.rp-head { display:flex; justify-content:space-between; align-items:flex-start;
  border-bottom: 2px solid var(--k-green); padding-bottom: 10px; margin-bottom: 14px; }
.rp-head .rp-logo { height: 26px; }
.rp-head .rp-title { text-align:right; }
.rp-head .rp-title .t { font-family: var(--font-display); font-weight:700; font-size:16px; color: var(--ink); }
.rp-head .rp-title .c { font-family: var(--font-mono); font-size:12px; color: var(--k-green-700); margin-top:2px; }
.rp-secname { font-family: var(--font-display); font-weight:700; font-size:13px; color: var(--k-green-700);
  border-bottom: 1px solid var(--k-green); padding-bottom:3px; margin: 16px 0 8px; }
.rp-secname:first-child { margin-top: 0; }
.rp-table { width:100%; border-collapse: collapse; font-size: 12px; margin-bottom: 4px; }
.rp-table th { background: var(--k-green-700); color:white; padding:5px 8px; text-align:center; font-weight:600; font-size:11px; }
.rp-table th:first-child, .rp-table td:first-child { text-align:left; }
.rp-table td { padding:5px 8px; border:1px solid var(--line); text-align:center; }
.rp-table tr:nth-child(even) td { background: var(--k-green-50); }
.rp-table td.best { background: var(--k-best, #D5E8D4) !important; font-weight:700; color: var(--k-green-700); }
.rp-table tr.overall td { background: var(--k-green-700); color:white; font-weight:700; }
.rp-table tr.overall td.best { background: #2f7a40 !important; color:white; }
.rp-kv { display:flex; font-size:12.5px; padding:3px 0; }
.rp-kv .k { width: 160px; font-weight:600; color: var(--ink-2); }
.rp-note { font-size:12.5px; color: var(--ink-2); line-height:1.5; }
.rp-conclude { background: var(--k-green-50); border:1px solid var(--k-green-100);
  border-radius:10px; padding:10px 12px; font-size:12.5px; color: var(--ink-2); }
.rp-muted { font-size:11px; color: var(--muted); font-style:italic; margin-top:2px; }

/* Number field row */
.field-num {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; padding: 12px 14px;
  display: flex; align-items: center; gap: 12px;
}
.field-num .meta { flex: 1; min-width: 0; }
.field-num .meta .lbl { font-size: 13.5px; font-weight: 500; color: var(--ink-2); }
.field-num .meta .hint { font-size: 11.5px; color: var(--muted); margin-top: 2px; font-variant-numeric: tabular-nums; }
.field-num .stepper-btn {
  width: 36px; height: 36px; border-radius: 11px;
  background: white; border: 1px solid var(--line); color: var(--ink-3);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 600; cursor: pointer; flex-shrink: 0;
}
.field-num .val-wrap {
  min-width: 88px; height: 44px; border-radius: 12px;
  border: 2px solid var(--line); background: white;
  display: flex; align-items: baseline; justify-content: center;
  gap: 3px; padding: 0 8px;
}
.field-num.ok .val-wrap { border-color: var(--k-green-700); }
.field-num.warn .val-wrap { border-color: var(--warn-fg); }
.field-num.out .val-wrap { border-color: var(--danger); }
.field-num .val-wrap input {
  border: none; padding: 0; margin: 0; background: transparent;
  font-family: var(--font-display); font-size: 19px; font-weight: 600;
  color: var(--ink); letter-spacing: -0.01em; text-align: center;
  font-variant-numeric: tabular-nums; width: 60px; outline: none; border-radius: 0;
}
.field-num .val-wrap .u { font-size: 11.5px; color: var(--muted); font-weight: 500; }

/* Auto-computed field */
.field-auto {
  background: white; border: 1px dashed var(--line); border-radius: 16px;
  padding: 12px 14px; display: flex; align-items: center; gap: 10px;
}
.field-auto .meta { flex: 1; font-size: 13.5px; color: var(--muted); }
.field-auto .meta .t { font-weight: 600; color: var(--ink-2); }
.field-auto .meta .s { font-size: 11px; }
.field-auto .v {
  font-family: var(--font-display); font-size: 22px; font-weight: 600;
  letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
}
.field-auto .v .u { font-size: 12px; color: var(--muted); font-weight: 500; }

/* Score (1-10) slider field */
.field-score {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; padding: 14px 16px;
}
.field-score .head {
  display: flex; align-items: baseline; justify-content: space-between;
}
.field-score .lbl { font-size: 13.5px; font-weight: 500; color: var(--ink-2); }
.field-score .hint { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.field-score .v {
  font-family: var(--font-display); font-size: 22px; font-weight: 600;
  letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
}
.field-score .v.high { color: var(--k-green-700); }
.field-score .v.mid { color: var(--ink); }
.field-score .v.low { color: var(--warn-fg); }
.field-score .v small { font-size: 12px; color: var(--muted); font-weight: 500; }
.field-score .track {
  position: relative; margin-top: 12px; height: 24px;
  display: flex; align-items: center;
}
.field-score .track .rail {
  position: absolute; left: 0; right: 0; height: 6px;
  border-radius: 99px; background: var(--line-soft);
}
.field-score .track .fill {
  position: absolute; left: 0; height: 6px;
  border-radius: 99px; background: var(--ink);
}
.field-score input[type=range] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; padding: 0;
}
.field-score .knob {
  position: absolute; width: 22px; height: 22px; border-radius: 99px;
  background: white; border: 2.5px solid var(--ink);
  box-shadow: 0 2px 6px rgba(0,0,0,0.12); pointer-events: none;
  transform: translateX(-11px);
}
.field-score .labels {
  display: flex; justify-content: space-between; margin-top: 4px;
  font-size: 10.5px; color: var(--muted-2); letter-spacing: 0.3px;
}

/* Photo attachments grid */
.photo-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
}
.photo-tile {
  aspect-ratio: 1; border-radius: 14px;
  border: 1px solid var(--line); position: relative; overflow: hidden;
  background: linear-gradient(135deg, #d2c4a0 0%, #b39c6e 100%);
}
.photo-tile .cap {
  position: absolute; bottom: 6px; left: 8px;
  font-size: 9.5px; color: white; font-weight: 600; letter-spacing: 0.3px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}
.photo-add {
  aspect-ratio: 1; border-radius: 14px;
  background: transparent; border: 1.5px dashed var(--line);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; color: var(--ink-3); cursor: pointer;
}
.photo-add .l { font-size: 10.5px; font-weight: 600; }

.audio-btn {
  margin-top: 8px; width: 100%; padding: 12px 14px; border-radius: 14px;
  background: white; border: 1px solid var(--line); color: var(--ink-2);
  display: flex; align-items: center; gap: 10px; font-weight: 500; font-size: 14px; cursor: pointer;
}

/* ─── Save bar (form sticky) ─── */
.save-bar {
  position: absolute; left: 0; right: 0; bottom: 8px;
  padding: 14px;
  background: rgba(250,248,243,0.92);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}
.save-bar .row { display: flex; gap: 10px; align-items: center; }
.save-bar .status {
  flex: 1; font-size: 11.5px; color: var(--ink-3);
  display: inline-flex; align-items: center; gap: 4px; font-weight: 500;
}

/* ─── Output accordion (cross-product scoring) ─── */
.acc-item {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; overflow: hidden;
}
.acc-head {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 14px 14px; background: white; border: none; cursor: pointer;
  text-align: left;
}
.acc-head .lbl { font-size: 14px; font-weight: 600; color: var(--ink); }
.acc-head .summary {
  font-size: 11.5px; color: var(--muted); font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.acc-head .chev {
  transition: transform 0.2s; color: var(--muted-2); flex-shrink: 0;
}
.acc-head .chev.open { transform: rotate(180deg); }
.acc-head .acc-remove {
  width: 22px; height: 22px; border-radius: 99px; background: white;
  border: 1px solid var(--line); color: var(--muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.acc-body {
  padding: 4px 14px 14px; display: flex; flex-direction: column; gap: 10px;
  border-top: 1px solid var(--line-soft);
}
.acc-prod {
  display: flex; align-items: center; gap: 10px;
}
.acc-prod .pcode {
  min-width: 84px; font-family: var(--font-mono); font-size: 12px;
  font-weight: 600; color: var(--ink-2); flex-shrink: 0;
}
.acc-prod .ctrl { flex: 1; }
.acc-prod .score-num {
  min-width: 48px; text-align: right;
  font-family: var(--font-display); font-size: 18px; font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.acc-prod .score-num.high { color: var(--k-green-700); }
.acc-prod .score-num.mid { color: var(--ink); }
.acc-prod .score-num.low { color: var(--warn-fg); }
.acc-prod .mini-track {
  position: relative; height: 22px; display: flex; align-items: center;
}
.acc-prod .mini-track .rail {
  position: absolute; left: 0; right: 0; height: 6px;
  border-radius: 99px; background: var(--line-soft);
}
.acc-prod .mini-track .fill {
  position: absolute; left: 0; height: 6px; border-radius: 99px; background: var(--ink);
}
.acc-prod .mini-track input[type=range] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; padding: 0; margin: 0;
}
.acc-prod .mini-track .knob {
  position: absolute; width: 18px; height: 18px; border-radius: 99px;
  background: white; border: 2.5px solid var(--ink);
  box-shadow: 0 1px 4px rgba(0,0,0,0.15); pointer-events: none;
  transform: translateX(-9px);
}

/* Copy-to-others button */
.copy-btn {
  width: 100%; margin-top: 12px; padding: 12px 14px; border-radius: 14px;
  background: var(--k-green-50); border: 1px solid var(--k-green-100);
  color: var(--k-green-700); font-weight: 600; font-size: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}

/* Pulse for "live recording" indicator */
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.2); }
}
.pulse-dot { animation: pulse 1.6s infinite; }

@keyframes blink { 50% { opacity: 0; } }

/* ─── Compare radar + table ─── */
.compare-card { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 14px; margin-bottom: 14px; }
.compare-card .head { display: flex; align-items: center; justify-content: space-between; }
.compare-card .head .uppercase-label { letter-spacing: 0.4px; font-size: 12.5px; }
.compare-card .head .name { font-size: 15.5px; font-weight: 600; color: var(--ink); margin-top: 1px; }
.view-toggle {
  display: flex; gap: 4px; padding: 3px; background: var(--line-soft); border-radius: 10px;
}
.view-toggle span {
  padding: 5px 12px; border-radius: 8px; font-size: 11.5px; font-weight: 600;
  color: var(--muted); cursor: pointer;
}
.view-toggle span.active {
  background: white; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
.legend { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.legend-row { display: flex; align-items: center; gap: 10px; }
.legend-row .swatch { width: 14px; height: 3px; border-radius: 2px; flex-shrink: 0; }
.legend-row .nm { flex: 1; font-size: 13px; font-weight: 600; font-family: var(--font-mono); }
.legend-row .tag {
  font-size: 9.5px; font-weight: 700; color: var(--ink-3);
  background: var(--line-soft); padding: 2px 6px; border-radius: 5px; letter-spacing: 0.3px;
}
.legend-row .sc {
  font-family: var(--font-display); font-size: 15px; font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.compare-row {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 10px 12px;
  display: flex; align-items: center; gap: 8px;
}
.compare-row .lbl { flex: 1.4; }
.compare-row .lbl .nm { font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.compare-row .lbl .target { font-size: 10.5px; color: var(--muted); }
.compare-row .val {
  flex: 1; text-align: center;
  font-family: var(--font-display); font-size: 14px; font-weight: 600;
  font-variant-numeric: tabular-nums;
  padding: 4px 0; border-radius: 8px;
}
.compare-row .val.best { color: var(--k-green-700); background: var(--k-green-50); }
.compare-row .val .u { font-size: 9.5px; color: var(--muted); font-weight: 500; margin-left: 2px; }

.compare-hd { display: flex; align-items: center; gap: 8px; padding: 0 12px; margin-bottom: 8px; }
.compare-hd .lbl-h { flex: 1.4; }
.compare-hd .val-h {
  flex: 1; text-align: center; font-size: 11px; color: var(--muted);
  font-weight: 700; font-family: var(--font-mono);
}

.insight {
  background: var(--k-green-50); border: 1px solid var(--k-green-100);
  border-radius: 16px; padding: 12px 14px;
  display: flex; gap: 10px; margin-top: 18px;
}
.insight .ico { color: var(--k-green-700); flex-shrink: 0; }
.insight .txt { font-size: 12.5px; line-height: 1.5; color: var(--ink-3); }
.insight .txt b { color: var(--ink); }

/* ─── Report screen ─── */
.doc-preview {
  background: var(--paper); padding: 14px; border-radius: 0;
}
.doc-paper {
  background: white; border-radius: 8px; padding: 18px 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06), 0 0 0 1px rgba(0,0,0,0.04);
  font-family: var(--font-display);
}
.doc-paper .hd { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 12px; }
.doc-paper .hd .meta { font-size: 8px; color: var(--muted); font-family: var(--font-mono); }
.doc-paper h3 { font-size: 11px; font-weight: 700; color: var(--ink); letter-spacing: -0.02em; }
.doc-paper .sub { font-size: 8.5px; color: var(--muted); margin-top: 2px; font-family: var(--font-text); }
.doc-paper .doc-table {
  margin-top: 10px; display: grid; gap: 1px;
  background: var(--line); border: 1px solid var(--line);
}
.doc-paper .doc-table .th, .doc-paper .doc-table .td {
  background: white; padding: 3px 6px; font-size: 7.5px;
}
.doc-paper .doc-table .th { background: #f4f1ea; font-weight: 700; text-transform: uppercase; }
.doc-paper .doc-conclude { margin-top: 8px; font-size: 8px; color: var(--ink-3); font-family: var(--font-text); line-height: 1.45; }

.toggle {
  width: 38px; height: 22px; border-radius: 99px; background: var(--line);
  position: relative; cursor: pointer; flex-shrink: 0;
}
.toggle.on { background: var(--k-green); }
.toggle::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; border-radius: 99px; background: white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.18); transition: left 0.18s;
}
.toggle.on::after { left: 18px; }

.version-row {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 14px;
  display: flex; align-items: center; gap: 12px; cursor: pointer;
}
.version-row .bar { width: 4px; height: 26px; border-radius: 2px; background: var(--line); flex-shrink: 0; }
.version-row.current .bar { background: var(--k-green); }
.version-row .v { font-family: var(--font-mono); font-weight: 700; font-size: 12.5px; color: var(--ink); }
.active-tag {
  font-size: 9.5px; font-weight: 700; color: var(--k-green-700);
  background: var(--k-green-50); padding: 1px 7px;
  border-radius: 99px; letter-spacing: 0.3px;
}

/* ─── History / search ─── */
.search-bar {
  height: 46px; background: white; border: 1px solid var(--line);
  border-radius: 14px; padding: 0 14px;
  display: flex; align-items: center; gap: 10px;
}
.search-bar input {
  flex: 1; border: none; padding: 0; font-size: 14.5px; color: var(--ink); background: transparent;
}
.search-bar input:focus { box-shadow: none; }
.filters-scroll {
  padding: 0 14px 6px; display: flex; gap: 6px; overflow-x: auto;
}
.filters-scroll::-webkit-scrollbar { display: none; }
.filter-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 99px; font-size: 12.5px;
  background: white; color: var(--ink-3);
  border: 1px solid var(--line); white-space: nowrap; font-weight: 600; cursor: pointer;
}
.filter-chip.active { background: var(--ink); color: white; border-color: var(--ink); }

mark { background: #fdf3a8; padding: 0 2px; border-radius: 3px; color: var(--ink); }

/* ─── Profile ─── */
.profile-hero {
  padding: 16px 20px 28px;
  background: linear-gradient(180deg, var(--k-green-50) 0%, var(--paper) 100%);
}
.profile-hero .top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.profile-hero .id { display: flex; align-items: center; gap: 14px; }
.profile-hero .av {
  width: 64px; height: 64px; border-radius: 20px;
  background: var(--k-green); color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 22px; letter-spacing: -0.02em;
  font-family: var(--font-display); box-shadow: 0 6px 16px rgba(70,160,90,0.35);
}
.profile-hero h1 { font-size: 22px; line-height: 1.15; }
.profile-hero .role { font-size: 13px; color: var(--muted); margin-top: 2px; }
.profile-hero .org { font-size: 11px; color: var(--k-green-700); font-weight: 600; margin-top: 4px; letter-spacing: 0.3px; }

.stat-row3 { display: flex; gap: 10px; margin-top: 20px; }
.stat-row3 .item {
  flex: 1; text-align: center; padding: 10px 0;
  background: white; border-radius: 14px; border: 1px solid var(--line);
}
.stat-row3 .v {
  font-family: var(--font-display); font-size: 20px; font-weight: 600;
  letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
}
.stat-row3 .l { font-size: 11px; color: var(--muted); margin-top: 2px; }

.sync-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
}
.sync-card .ico {
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--k-green-50); color: var(--k-green-700);
  display: flex; align-items: center; justify-content: center;
}
.sync-card .meta { flex: 1; }
.sync-card .t { font-size: 14px; font-weight: 600; }
.sync-card .s { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.sync-card .act { font-size: 12px; color: var(--k-green-700); font-weight: 600; cursor: pointer; }

/* settings list */
.settings-group { margin-bottom: 18px; }
.settings-group h2 {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--muted); font-weight: 700; padding: 0 6px 8px;
}
.settings-group .list {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; overflow: hidden;
}
.settings-row {
  display: flex; align-items: center; padding: 14px 16px; gap: 10px;
  border-top: 1px solid var(--line-soft); cursor: pointer;
}
.settings-row:first-child { border-top: none; }
.settings-row .lbl { flex: 1; font-size: 14.5px; color: var(--ink); }
.settings-row .lbl.danger { color: var(--danger); }
.settings-row .val { font-size: 13px; color: var(--muted); }
.settings-row .val.danger { color: var(--danger); }

/* ─── Toast ─── */
.toast {
  position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: white; padding: 12px 20px;
  border-radius: 100px; z-index: 200; box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  font-size: 14px; font-weight: 500; max-width: 90%;
}
.toast.error { background: var(--danger); }
.toast.success { background: var(--k-green); }

/* ─── Install banner ─── */
.install-banner {
  position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: white; padding: 12px 20px;
  border-radius: 100px; z-index: 60;
  display: flex; align-items: center; gap: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25); cursor: pointer;
}
.install-banner button {
  background: var(--k-green); color: white; border: none;
  padding: 6px 14px; border-radius: 100px; font-weight: 600; cursor: pointer;
}

/* ─── Modal ─── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 100; padding: 16px;
}
.modal {
  background: var(--card); border-radius: 22px;
  max-width: 600px; width: 100%; max-height: 90vh; overflow-y: auto;
  padding: 24px;
}
.modal h2 { margin-bottom: 14px; }
.modal .field-list { display: flex; flex-direction: column; gap: 14px; }

/* ─── Loading / empty ─── */
.loading-box {
  display: flex; align-items: center; justify-content: center;
  padding: 40px; color: var(--muted);
}
.spinner {
  width: 24px; height: 24px;
  border: 3px solid var(--line); border-top-color: var(--k-green);
  border-radius: 50%; animation: spin 0.6s linear infinite;
}
.spinner.white { border-top-color: white; }
@keyframes spin { to { transform: rotate(360deg); } }

.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty h3 { color: var(--ink-2); margin-bottom: 8px; }

/* ─── Admin tables ─── */
.admin-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--ink-3); cursor: pointer;
  background: white; border: 1px solid var(--line); border-radius: 12px;
  padding: 8px 12px; margin-bottom: 12px;
}
.admin-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; flex-wrap: wrap; gap: 10px; }
.admin-head h1 { font-size: 26px; }

.admin-table {
  background: white; border-radius: 18px; border: 1px solid var(--line);
  overflow: hidden;
}
.admin-table table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td {
  padding: 12px 14px; text-align: left; font-size: 14px;
  border-top: 1px solid var(--line-soft);
}
.admin-table thead th {
  background: #f8f6f0; font-size: 11.5px; text-transform: uppercase;
  letter-spacing: 0.4px; color: var(--muted); font-weight: 700; border-top: none;
}
.admin-table tr:first-child td { border-top: none; }
.admin-table .mono { font-family: var(--font-mono); font-size: 12px; }

.admin-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.admin-card { background: white; border: 1px solid var(--line); border-radius: 20px; padding: 20px; }

/* ─── KPI / Personel Analizi ─── */
.kpi-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.kpi-card { background: white; border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; }
.kpi-card .v { font-family: var(--font-display); font-size: 28px; font-weight: 700; color: var(--ink); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.kpi-card .l { font-size: 12px; color: var(--muted); margin-top: 2px; }
.kpi-timeline { background: white; border: 1px solid var(--line); border-radius: 16px; padding: 14px; overflow-x: auto; }
.kpi-timeline svg { display: block; }
.admin-card h3 { margin-bottom: 6px; }
.admin-card p { color: var(--muted); font-size: 13px; margin: 4px 0 14px; }

/* helpers */
.muted { color: var(--muted); }
.row-flex { display: flex; align-items: center; gap: 10px; }
.flex-1 { flex: 1; }
.gap-8 { gap: 8px; }
.gap-10 { gap: 10px; }
.mt-10 { margin-top: 10px; }
.mt-14 { margin-top: 14px; }
.mt-18 { margin-top: 18px; }
.mb-14 { margin-bottom: 14px; }

/* Inline SVG icon helper */
.icon { display: inline-flex; vertical-align: middle; flex-shrink: 0; }
