/* Yuvamız — design tokens */
:root {
  --bg: #fbf7f3;
  --bg-2: #f4ece5;
  --surface: #ffffff;
  --surface-2: #faf5f1;
  --border: #ece2da;
  --border-strong: #ddcfc4;
  --text: #2b2125;
  --text-2: #5d4f55;
  --muted: #8b7d82;
  --primary: #b4475f;
  --primary-2: #9a3a50;
  --primary-soft: #f8e6ea;
  --gold: #b88a2e;
  --gold-soft: #f7eedb;
  --good: #23845f;
  --good-soft: #e2f3ea;
  --warn: #b5701b;
  --warn-soft: #fbefdc;
  --urgent: #c0392b;
  --urgent-soft: #fbe4e1;
  --info: #3767ad;
  --info-soft: #e5edf8;
  --shadow: 0 1px 2px rgba(60, 30, 40, 0.04), 0 6px 22px rgba(60, 30, 40, 0.06);
  --shadow-lg: 0 18px 50px rgba(50, 20, 30, 0.18);
  --radius: 18px;
  --radius-sm: 12px;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --nav-w: 248px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #17121a; --bg-2: #1e1822; --surface: #221b26; --surface-2: #2a222f; --border: #3a3040; --border-strong: #4a3e52;
    --text: #f4edf1; --text-2: #d3c7cd; --muted: #a596a0; --primary: #e47d96; --primary-2: #f095ab; --primary-soft: #3d2530;
    --gold: #e2bd6b; --gold-soft: #3a3020; --good: #5cc79a; --good-soft: #1d3329; --warn: #e8a751; --warn-soft: #3a2d1b;
    --urgent: #f07a6c; --urgent-soft: #3d2220; --info: #7fa9e8; --info-soft: #1f2a3c;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25); color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #17121a; --bg-2: #1e1822; --surface: #221b26; --surface-2: #2a222f; --border: #3a3040; --border-strong: #4a3e52;
  --text: #f4edf1; --text-2: #d3c7cd; --muted: #a596a0; --primary: #e47d96; --primary-2: #f095ab; --primary-soft: #3d2530;
  --gold: #e2bd6b; --gold-soft: #3a3020; --good: #5cc79a; --good-soft: #1d3329; --warn: #e8a751; --warn-soft: #3a2d1b;
  --urgent: #f07a6c; --urgent-soft: #3d2220; --info: #7fa9e8; --info-soft: #1f2a3c;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25); color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
body.no-scroll { overflow: hidden; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
h1 { font-family: var(--display); font-weight: 600; font-size: 30px; letter-spacing: -0.01em; }
h2 { font-family: var(--display); font-weight: 600; font-size: 21px; }
h3 { font-size: 16px; font-weight: 700; }
p { margin: 0 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.strong { font-weight: 700; }
.num { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.ic { flex: none; vertical-align: -3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }

/* ── Layout ── */
.app { display: grid; grid-template-columns: var(--nav-w) 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; padding: 22px 14px; border-right: 1px solid var(--border);
  background: var(--surface-2); display: flex; flex-direction: column; gap: 4px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; }
.brand-logo { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(135deg, var(--primary), var(--gold)); color: #fff; font-size: 20px; box-shadow: var(--shadow); }
.brand-name { font-family: var(--display); font-size: 22px; font-weight: 600; }
.brand-sub { font-size: 12px; color: var(--muted); margin-top: -2px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--text-2); font-weight: 600; font-size: 14.5px;
}
.nav a:hover { background: var(--bg-2); text-decoration: none; color: var(--text); }
.nav a.active { background: var(--primary-soft); color: var(--primary); }
.nav .badge { margin-left: auto; }
.sidebar-foot { margin-top: auto; padding: 12px 8px 0; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 8px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; background: var(--primary); font-size: 14px; flex: none; }
.avatar.alt { background: var(--gold); }
.main { min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 12px 28px;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid transparent;
}
.topbar .title { font-family: var(--display); font-size: 19px; font-weight: 600; display: none; }
.topbar .spacer { flex: 1; }
.page { max-width: 1180px; margin: 0 auto; padding: 8px 28px 64px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 6px 0 20px; flex-wrap: wrap; }
.page-head p { color: var(--muted); margin: 4px 0 0; }
.tabbar { display: none; }

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .topbar { padding: 10px 16px; }
  .topbar .title { display: block; }
  .page { padding: 4px 16px 110px; }
  h1 { font-size: 25px; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
    background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(12px); border-top: 1px solid var(--border);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 600; color: var(--muted); padding: 4px 0; position: relative; }
  .tabbar a.active { color: var(--primary); }
  .tabbar a:hover { text-decoration: none; }
  .tabbar .dot { position: absolute; top: 2px; right: calc(50% - 16px); }
}

/* ── Cards & grid ── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h2, .card-head h3 { display: flex; align-items: center; gap: 8px; }
.card.flat { box-shadow: none; }
.card.tight { padding: 14px; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); } .span2 { grid-column: auto; } }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.stack.lg { gap: 18px; }
.mt { margin-top: 14px; }
.mt-lg { margin-top: 24px; }
.divider { height: 1px; background: var(--border); margin: 14px 0; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 15px; border-radius: 12px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font: 600 14px var(--font); cursor: pointer; white-space: nowrap; transition: background 0.15s, border-color 0.15s, transform 0.05s;
}
.btn:hover { background: var(--bg-2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-2); border-color: var(--primary-2); }
.btn-good { background: var(--good); border-color: var(--good); color: #fff; }
.btn-good:hover { filter: brightness(1.06); background: var(--good); }
.btn-danger { color: var(--urgent); border-color: color-mix(in srgb, var(--urgent) 35%, var(--border)); }
.btn-danger:hover { background: var(--urgent-soft); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--bg-2); }
.btn-sm { padding: 6px 11px; font-size: 13px; border-radius: 10px; }
.btn-xs { padding: 3px 8px; font-size: 12px; border-radius: 8px; }
.btn-block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; border: 1px solid transparent; background: transparent; color: var(--text-2); cursor: pointer; position: relative; }
.icon-btn:hover { background: var(--bg-2); color: var(--text); }
.icon-btn.sm { width: 30px; height: 30px; border-radius: 9px; }
.spin { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Chips & badges ── */
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; line-height: 1.5; }
.chip-good { background: var(--good-soft); color: var(--good); }
.chip-warn { background: var(--warn-soft); color: var(--warn); }
.chip-urgent { background: var(--urgent-soft); color: var(--urgent); }
.chip-info { background: var(--info-soft); color: var(--info); }
.chip-muted { background: var(--bg-2); color: var(--muted); }
.chip-gold { background: var(--gold-soft); color: var(--gold); }
.chip-rose { background: var(--primary-soft); color: var(--primary); }
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--primary); color: #fff; font-size: 11px; font-weight: 800; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--primary); display: inline-block; }
.prio { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.prio-1 { background: var(--primary); }
.prio-2 { background: var(--gold); }
.prio-3 { background: var(--border-strong); }

/* ── Forms ── */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span, .label { font-size: 13px; font-weight: 700; color: var(--text-2); }
.field small { color: var(--muted); font-size: 12px; }
.input, .select, .textarea {
  width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: 15px var(--font);
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.textarea { min-height: 80px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 600px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; font-size: 14px; }
.switch input { appearance: none; width: 40px; height: 23px; border-radius: 999px; background: var(--border-strong); position: relative; cursor: pointer; transition: background 0.2s; flex: none; margin: 0; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; transition: transform 0.2s; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); }
.switch input:checked { background: var(--primary); }
.switch input:checked::after { transform: translateX(17px); }
.seg { display: inline-flex; padding: 4px; background: var(--bg-2); border-radius: 13px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 7px 13px; border-radius: 10px; font: 600 13.5px var(--font); color: var(--text-2); cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.search { position: relative; flex: 1; min-width: 180px; max-width: 360px; }
.search .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search .input { padding-left: 36px; }

/* ── Progress ── */
.bar { height: 8px; border-radius: 999px; background: var(--bg-2); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), var(--gold)); transition: width 0.6s ease; }
.bar.good > span { background: var(--good); }
.bar.thin { height: 5px; }
.ring-bg { stroke: var(--bg-2); }
.ring-fg { stroke: url(#ringGrad); stroke: var(--primary); transition: stroke-dashoffset 0.9s ease; }
.ring-num { font-family: var(--display); font-size: 30px; font-weight: 600; fill: var(--text); }
.ring-label { font-size: 11px; fill: var(--muted); font-weight: 600; }

/* ── Dashboard ── */
.hero {
  position: relative; overflow: hidden; border-radius: 24px; padding: 26px 28px; color: #fff;
  background: radial-gradient(1200px 400px at 110% -40%, rgba(255, 220, 160, 0.35), transparent 60%), linear-gradient(135deg, #a13c55, #c4637a 55%, #c99a4a);
  box-shadow: var(--shadow-lg); display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center;
}
.hero h1 { color: #fff; }
.hero p { color: rgba(255, 255, 255, 0.86); margin: 6px 0 0; }
.hero .counts { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.count-pill { background: rgba(255, 255, 255, 0.16); border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 16px; padding: 10px 16px; backdrop-filter: blur(4px); }
.count-pill b { font-family: var(--display); font-size: 26px; font-weight: 600; display: block; line-height: 1.1; }
.count-pill span { font-size: 12.5px; opacity: 0.9; }
.hero .ring-num { fill: #fff; }
.hero .ring-bg { stroke: rgba(255, 255, 255, 0.2); }
.hero .ring-fg { stroke: #fff; }
.hero .ring-label { fill: rgba(255, 255, 255, 0.85); }
@media (max-width: 700px) { .hero { grid-template-columns: 1fr; padding: 22px; } .hero .ring { display: none; } }
.section-progress { display: grid; gap: 12px; }
.sp-row { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: center; }
.sp-row .lbl { display: flex; justify-content: space-between; font-size: 13.5px; font-weight: 600; margin-bottom: 5px; }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat b { font-family: var(--display); font-size: 24px; font-weight: 600; line-height: 1.2; }
.stat span { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.stat.good b { color: var(--good); }
.stat.warn b { color: var(--warn); }

.rec { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.rec:hover { border-color: var(--border-strong); background: var(--surface-2); }
.rec-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; background: var(--bg-2); }
.rec-title { font-weight: 700; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rec-reason { color: var(--text-2); font-size: 13px; margin-top: 2px; }
.rec-price { text-align: right; }
.rec-price b { font-size: 15px; display: block; }
.rec-price span { font-size: 12px; color: var(--muted); }
@media (max-width: 600px) { .rec { grid-template-columns: auto 1fr; } .rec-price { grid-column: 2; text-align: left; } }

.alert-row { display: flex; gap: 10px; padding: 10px 2px; border-bottom: 1px solid var(--border); }
.alert-row:last-child { border-bottom: 0; }
.alert-row .t { font-weight: 700; font-size: 14px; }
.alert-row .b { font-size: 13px; color: var(--text-2); }
.alert-row.unread .t::after { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--primary); margin-left: 6px; vertical-align: 2px; }
.camp { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.camp:last-child { border-bottom: 0; }
.camp-date { width: 52px; text-align: center; border-radius: 12px; background: var(--gold-soft); color: var(--gold); padding: 6px 0; flex: none; }
.camp-date b { display: block; font-family: var(--display); font-size: 20px; line-height: 1.1; }
.camp-date span { font-size: 11px; font-weight: 700; }
.feed { display: flex; flex-direction: column; }
.feed-row { display: flex; gap: 10px; padding: 8px 0; font-size: 13.5px; border-bottom: 1px dashed var(--border); }
.feed-row:last-child { border-bottom: 0; }
.feed-row .ic-em { width: 24px; text-align: center; flex: none; }

/* ── Checklist ── */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.cat { margin-bottom: 14px; padding: 0; overflow: hidden; }
.cat-head { display: grid; grid-template-columns: auto 1fr auto auto; gap: 14px; align-items: center; padding: 16px 18px; cursor: pointer; user-select: none; }
.cat-head:hover { background: var(--surface-2); }
.cat-emoji { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; font-size: 22px; background: var(--bg-2); }
.cat-name { font-weight: 800; font-size: 15.5px; }
.cat-meta { font-size: 12.5px; color: var(--muted); font-weight: 600; margin-top: 4px; display: flex; gap: 10px; align-items: center; }
.cat-meta .bar { width: 160px; }
.cat-pct { font-family: var(--display); font-size: 22px; font-weight: 600; }
.cat.done .cat-pct { color: var(--good); }
.cat .chev { transition: transform 0.2s; color: var(--muted); }
.cat.open .chev { transform: rotate(180deg); }
.cat-body { display: none; border-top: 1px solid var(--border); }
.cat.open .cat-body { display: block; }
.item-row { display: grid; grid-template-columns: auto 1fr auto auto; gap: 12px; align-items: center; padding: 11px 18px; border-bottom: 1px solid var(--border); cursor: pointer; }
.item-row:last-child { border-bottom: 0; }
.item-row:hover { background: var(--surface-2); }
.item-row.is-done { opacity: 0.72; }
.item-row.is-done .item-name { text-decoration: line-through; text-decoration-color: var(--muted); }
.check { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--border-strong); display: grid; place-items: center; background: var(--surface); color: transparent; cursor: pointer; transition: all 0.15s; flex: none; }
.check:hover { border-color: var(--good); color: var(--good); }
.check.on { background: var(--good); border-color: var(--good); color: #fff; }
.check.part { border-color: var(--good); color: var(--good); font-size: 10px; font-weight: 800; }
.item-name { font-weight: 650; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.item-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.item-price { text-align: right; font-size: 13px; }
.item-price b { font-size: 14px; }
@media (max-width: 640px) {
  .item-row { grid-template-columns: auto 1fr auto; padding: 11px 14px; }
  .item-row .item-price { display: none; }
  .cat-head { grid-template-columns: auto 1fr auto; padding: 14px; }
  .cat-head .chev { display: none; }
  .cat-meta .bar { width: 90px; }
}
.done-toggle { padding: 10px 18px; font-size: 13px; color: var(--muted); font-weight: 600; cursor: pointer; background: var(--surface-2); border-top: 1px solid var(--border); }
.done-toggle:hover { color: var(--text); }

/* ── Drawer ── */
#drawer { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
#drawer.open { pointer-events: auto; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(30, 15, 22, 0.42); opacity: 0; transition: opacity 0.25s; }
#drawer.open .drawer-backdrop { opacity: 1; }
.drawer {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(720px, 100vw); background: var(--bg); box-shadow: var(--shadow-lg);
  transform: translateX(100%); transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1); overflow-y: auto; overscroll-behavior: contain;
}
#drawer.open .drawer { transform: none; }
.drawer-inner { padding: 0 0 40px; }
.drawer-head { position: sticky; top: 0; z-index: 2; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); padding: 16px 22px; border-bottom: 1px solid var(--border); display: flex; gap: 12px; align-items: flex-start; }
.drawer-head h2 { font-size: 22px; }
.drawer-body { padding: 18px 22px; display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 600px) { .drawer-head, .drawer-body { padding-left: 16px; padding-right: 16px; } }

.rec-box { border-radius: 16px; padding: 14px 16px; display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--border); background: var(--surface); }
.rec-box.good { background: var(--good-soft); border-color: transparent; }
.rec-box.warn { background: var(--warn-soft); border-color: transparent; }
.rec-box.urgent { background: var(--urgent-soft); border-color: transparent; }
.rec-box.info { background: var(--info-soft); border-color: transparent; }
.rec-box ul { margin: 6px 0 0; padding-left: 18px; font-size: 13.5px; color: var(--text-2); }
.tip { display: flex; gap: 10px; font-size: 13.5px; color: var(--text-2); background: var(--gold-soft); border-radius: 14px; padding: 12px 14px; }

.cand { border: 1px solid var(--border); border-radius: 16px; background: var(--surface); overflow: hidden; }
.cand.chosen { border-color: var(--good); box-shadow: 0 0 0 2px var(--good-soft); }
.cand.rejected { opacity: 0.6; }
.cand-main { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 14px; padding: 14px; }
.cand-img { width: 76px; height: 76px; border-radius: 12px; background: var(--surface-2) center / contain no-repeat; border: 1px solid var(--border); display: grid; place-items: center; font-size: 28px; }
.cand-title { font-weight: 800; font-size: 15px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cand-sum { font-size: 13px; color: var(--text-2); margin-top: 4px; }
.cand-price { text-align: right; max-width: 200px; }
.cand-price .p { font-family: var(--display); font-size: 22px; font-weight: 600; }
.cand-price .s { font-size: 12px; color: var(--muted); }
.score { display: inline-grid; place-items: center; min-width: 38px; height: 24px; border-radius: 8px; font-size: 12px; font-weight: 800; background: var(--info-soft); color: var(--info); padding: 0 6px; }
.score.hi { background: var(--good-soft); color: var(--good); }
.pc { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; margin-top: 8px; font-size: 12.5px; }
.pc ul { margin: 0; padding-left: 16px; }
.pc .pro li::marker { color: var(--good); }
.pc .con li::marker { color: var(--urgent); }
@media (max-width: 600px) { .cand-main { grid-template-columns: 56px minmax(0, 1fr); } .cand-img { width: 56px; height: 56px; } .cand-price { grid-column: 1 / -1; text-align: left; max-width: none; } .pc { grid-template-columns: 1fr; } }
.cand-foot { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 10px 14px; border-top: 1px solid var(--border); background: var(--surface-2); }
.offers { border-top: 1px solid var(--border); }
.offer { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 10px 14px; border-bottom: 1px dashed var(--border); font-size: 13.5px; }
.offer:last-child { border-bottom: 0; }
.offer .store { font-weight: 700; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.offer .meta { font-size: 12px; color: var(--muted); }
.offer .price { font-weight: 800; text-align: right; }
.offer .price s { color: var(--muted); font-weight: 500; font-size: 12px; margin-right: 4px; }
.vote { display: inline-flex; align-items: center; gap: 4px; padding: 5px 9px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font: 600 12.5px var(--font); color: var(--text-2); }
.vote.on.up { background: var(--good-soft); color: var(--good); border-color: transparent; }
.vote.on.dn { background: var(--urgent-soft); color: var(--urgent); border-color: transparent; }
.love { color: var(--primary); font-weight: 800; font-size: 12.5px; }
.stages { display: flex; gap: 4px; flex-wrap: wrap; }
.stages button { border: 1px solid var(--border); background: var(--surface); padding: 4px 9px; border-radius: 9px; font: 600 12px var(--font); color: var(--text-2); cursor: pointer; }
.stages button.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.progress-log { font-size: 13px; color: var(--text-2); display: flex; flex-direction: column; gap: 4px; max-height: 180px; overflow: auto; }
.pchart { width: 100%; height: 150px; display: block; }
.pchart-lbl { font-size: 11px; fill: var(--muted); font-weight: 600; }
.pchart-lbl.low { fill: var(--good); }
.pchart-min { stroke: var(--good); stroke-dasharray: 4 4; opacity: 0.6; }
.pchart-low { fill: var(--good); }
.spark-line { stroke: var(--primary); stroke-width: 2; }
.spark-fill { fill: color-mix(in srgb, var(--primary) 12%, transparent); }
.spark-dot { fill: var(--primary); }
.chart-empty { font-size: 13px; color: var(--muted); padding: 14px; text-align: center; background: var(--surface-2); border-radius: 12px; }

/* ── Verdicts, focus, coupons ── */
.verdict { display: inline-block; padding: 5px 11px; border-radius: 10px; font-weight: 800; font-size: 13.5px; margin-bottom: 4px; white-space: nowrap; }
.verdict.v-kesin { background: var(--good); color: #fff; }
.verdict.v-alinabilir { background: var(--info-soft); color: var(--info); }
.verdict.v-bekle { background: var(--warn-soft); color: var(--warn); }
.verdict.big { font-size: 15px; padding: 7px 14px; }
.verdict-why { font-size: 12.5px; margin-top: 6px; padding: 6px 10px; border-radius: 10px; background: var(--surface-2); }
.verdict-why.tone-good { background: var(--good-soft); }
.verdict-why.tone-warn { background: var(--warn-soft); }
.verdict-why.tone-info { background: var(--info-soft); }
.pos { position: relative; height: 6px; border-radius: 999px; margin-top: 8px; background: linear-gradient(90deg, var(--good), var(--gold), var(--urgent)); min-width: 110px; }
.pos span { position: absolute; top: -4px; width: 4px; height: 14px; border-radius: 2px; background: var(--text); transform: translateX(-2px); }
.btn-focus-on { background: var(--gold-soft); color: var(--gold); border-color: transparent; }
.coupon { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px dashed var(--border); }
.coupon:last-of-type { border-bottom: 0; }
.code { font: 800 12.5px ui-monospace, Consolas, monospace; letter-spacing: 0.05em; padding: 5px 9px; border-radius: 8px; border: 1.5px dashed var(--gold); background: var(--gold-soft); color: var(--text); cursor: pointer; }
.focus-row { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.focus-row:last-child { border-bottom: 0; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 600px) {
  .focus-sub { display: none; }
  .focus-row { grid-template-columns: 42px minmax(0, 1fr) auto; gap: 10px; }
  .focus-row .deal-img { width: 42px; height: 42px; }
  .focus-row .verdict { font-size: 12px; padding: 4px 8px; }
}

/* ── User experience & analyses ── */
.ux { margin-top: 8px; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); font-size: 13px; }
.ux summary { cursor: pointer; font-size: 13px; }
.analysis > summary { cursor: pointer; list-style: none; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.analysis > summary::-webkit-details-marker { display: none; }
.alt-row { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px dashed var(--border); }
.alt-row:last-child { border-bottom: 0; }
.table.cmp td, .table.cmp th { font-size: 12.5px; vertical-align: top; min-width: 110px; }
.table.cmp td:first-child { min-width: 90px; }
.table.cmp td.best { background: var(--good-soft); font-weight: 700; }

/* ── In-store mode ── */
.fab { display: none; }
@media (max-width: 900px) {
  .fab { display: grid; place-items: center; position: fixed; right: 16px; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 35; width: 56px; height: 56px; border-radius: 18px; font-size: 26px; background: linear-gradient(135deg, var(--primary), var(--gold)); box-shadow: var(--shadow-lg); text-decoration: none; }
  .fab:hover { text-decoration: none; }
  body[data-route='magaza'] .fab, body[data-route='asistan'] .fab { display: none; }
}
.store-page { max-width: 720px; }
.store-hero { text-align: center; display: flex; flex-direction: column; gap: 10px; align-items: center; margin-top: 12px; }
.store-hero .form-grid { width: 100%; }
.store-cam { width: 76px; height: 76px; border-radius: 24px; display: grid; place-items: center; font-size: 38px; background: var(--primary-soft); color: var(--primary); }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.thumb { width: 92px; height: 92px; border-radius: 14px; background: var(--surface-2) center / cover no-repeat; border: 1px solid var(--border); position: relative; }
.thumb .icon-btn { position: absolute; top: 4px; right: 4px; background: rgba(0, 0, 0, 0.55); color: #fff; }
.verdict-card { margin-top: 12px; border-width: 2px; }
.verdict-card.tone-good { border-color: var(--good); background: linear-gradient(180deg, var(--good-soft), var(--surface) 75%); }
.verdict-card.tone-warn { border-color: var(--warn); background: linear-gradient(180deg, var(--warn-soft), var(--surface) 75%); }
.verdict-card.tone-info { border-color: var(--info); background: linear-gradient(180deg, var(--info-soft), var(--surface) 75%); }
.verdict-card.tone-urgent { border-color: var(--urgent); background: linear-gradient(180deg, var(--urgent-soft), var(--surface) 75%); }

/* ── Modal & toasts ── */
#modal { position: fixed; inset: 0; z-index: 80; display: none; }
#modal.open { display: grid; place-items: center; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(30, 15, 22, 0.45); animation: fade 0.18s; }
.modal { position: relative; width: min(540px, calc(100vw - 24px)); max-height: calc(100vh - 40px); overflow: auto; background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-lg); animation: pop 0.2s cubic-bezier(0.2, 0.8, 0.2, 1); }
.modal.modal-wide { width: min(760px, calc(100vw - 24px)); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.modal-body { padding: 18px 20px 20px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
@media (max-width: 600px) {
  #modal.open { place-items: end center; }
  .modal { width: 100vw; border-radius: 20px 20px 0 0; max-height: 92vh; animation: up 0.24s cubic-bezier(0.2, 0.8, 0.2, 1); }
}
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(0.96) translateY(6px); } }
@keyframes up { from { transform: translateY(40px); opacity: 0.4; } }
#toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
@media (max-width: 900px) { #toasts { bottom: 86px; } }
.toast { pointer-events: auto; display: flex; gap: 12px; align-items: center; padding: 11px 16px; border-radius: 14px; background: var(--text); color: var(--bg); font-weight: 600; font-size: 14px; box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(10px); transition: all 0.22s; max-width: min(520px, calc(100vw - 32px)); }
.toast.in { opacity: 1; transform: none; }
.toast-error { background: var(--urgent); color: #fff; }
.toast-good { background: var(--good); color: #fff; }
.toast-act { background: rgba(255, 255, 255, 0.18); color: inherit; border: 0; padding: 5px 10px; border-radius: 9px; font: 700 13px var(--font); cursor: pointer; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 120; }

/* ── Login ── */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(900px 500px at 10% -10%, var(--primary-soft), transparent 60%), radial-gradient(800px 500px at 110% 110%, var(--gold-soft), transparent 60%), var(--bg); }
.auth-card { width: min(460px, 100%); }
.auth-card.wide { width: min(760px, 100%); }
.auth-brand { text-align: center; margin-bottom: 18px; }
.auth-brand .brand-logo { width: 58px; height: 58px; font-size: 30px; margin: 0 auto 12px; border-radius: 18px; }
.auth-brand h1 { font-size: 34px; }
.auth-brand p { color: var(--muted); margin-top: 6px; }
.form-section { font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--primary); margin: 6px 0 2px; grid-column: 1 / -1; }

/* ── Deals ── */
.deal { display: grid; grid-template-columns: 56px 1fr 130px auto; gap: 14px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); cursor: pointer; }
.deal:hover { background: var(--surface-2); }
.deal:last-child { border-bottom: 0; }
.deal-img { width: 56px; height: 56px; border-radius: 12px; background: var(--surface-2) center / contain no-repeat; border: 1px solid var(--border); display: grid; place-items: center; font-size: 22px; }
.deal-price { text-align: right; }
.deal-price b { font-size: 16px; display: block; }
.chg-down { color: var(--good); font-weight: 700; font-size: 12.5px; }
.chg-up { color: var(--urgent); font-weight: 700; font-size: 12.5px; }
@media (max-width: 700px) { .deal { grid-template-columns: 48px 1fr auto; } .deal .spark { display: none; } .deal-img { width: 48px; height: 48px; } }

/* ── Wedding ── */
.season { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.month { border-radius: 12px; padding: 9px 8px; font-size: 12px; font-weight: 700; text-align: center; border: 1px solid var(--border); position: relative; }
.month small { display: block; font-weight: 600; opacity: 0.8; font-size: 11px; }
.month.low { background: var(--good-soft); color: var(--good); border-color: transparent; }
.month.mid { background: var(--gold-soft); color: var(--gold); border-color: transparent; }
.month.high { background: var(--urgent-soft); color: var(--urgent); border-color: transparent; }
.month.wed { outline: 2px solid var(--primary); outline-offset: 1px; }
.month .star { position: absolute; top: 3px; right: 5px; font-size: 10px; }
.vendor { display: flex; flex-direction: column; gap: 10px; cursor: pointer; transition: border-color 0.15s; }
.vendor:hover { border-color: var(--border-strong); }
.vendor.done { background: linear-gradient(180deg, var(--good-soft), var(--surface) 70%); }
.vendor-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.vendor-cands { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.vendor-cands div { display: flex; justify-content: space-between; gap: 8px; }

/* ── Budget ── */
.budget-big { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .budget-big { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.hbar { display: grid; grid-template-columns: 150px 1fr 110px; gap: 10px; align-items: center; font-size: 13.5px; padding: 6px 0; }
.hbar .track { height: 12px; border-radius: 999px; background: var(--bg-2); overflow: hidden; display: flex; }
.hbar .track span { display: block; height: 100%; }
.hbar .s1 { background: var(--primary); }
.hbar .s2 { background: color-mix(in srgb, var(--gold) 55%, transparent); }
@media (max-width: 600px) { .hbar { grid-template-columns: 1fr; gap: 4px; } }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); font-weight: 600; flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.months { display: flex; align-items: flex-end; gap: 8px; height: 140px; padding-top: 10px; overflow-x: auto; }
.months .m { flex: 1; min-width: 40px; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); font-weight: 700; }
.months .m span.b { width: 100%; max-width: 38px; border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, var(--primary), var(--gold)); min-height: 3px; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.table td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; }

/* ── Chat ── */
/* Full-screen chat: fills the space between the top bar and the tab bar (height set in chat.js). */
body.chat-mode { overflow: hidden; }
.chat-page { display: flex; height: calc(100dvh - 61px); border-top: 1px solid var(--border); }
.chat { flex: 1; display: grid; grid-template-rows: auto 1fr auto; min-height: 0; overflow: hidden; background: var(--surface); }
.chat-head { padding: 10px 16px; border-bottom: 1px solid var(--border); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.chat-log { overflow-y: auto; overscroll-behavior: contain; padding: 18px max(16px, calc((100% - 860px) / 2)); display: flex; flex-direction: column; gap: 14px; background: var(--surface-2); min-height: 0; }
.chat-input { padding: 10px max(12px, calc((100% - 860px) / 2)) !important; }
@media (max-width: 900px) {
  .chat-head { padding: 8px 12px; }
  .chat-log { padding: 14px 12px; }
  .msg { max-width: 92% !important; }
  .chat .empty { padding: 16px 4px; }
  .chat .suggest { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start !important; padding-bottom: 4px; scrollbar-width: none; }
  .chat .suggest button { white-space: nowrap; flex: none; }
}
.msg { max-width: 82%; display: flex; flex-direction: column; gap: 4px; }
.msg .who { font-size: 12px; color: var(--muted); font-weight: 700; }
.msg .bubble { padding: 11px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); font-size: 14.5px; }
.msg.me { align-self: flex-end; align-items: flex-end; }
.msg.me .bubble { background: var(--primary); color: #fff; border-color: transparent; border-bottom-right-radius: 6px; white-space: pre-wrap; }
.msg.other-user .bubble { background: var(--gold-soft); border-color: transparent; white-space: pre-wrap; }
.msg.bot .bubble { border-bottom-left-radius: 6px; }
.msg .sources { font-size: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.msg .sources a { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 2px 8px; color: var(--text-2); }
.typing { font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 3px; }
.chat-input { display: flex; gap: 10px; padding: 12px; border-top: 1px solid var(--border); background: var(--surface); }
.chat-input textarea { min-height: 46px; max-height: 160px; }
.suggest { display: flex; gap: 8px; flex-wrap: wrap; }
.suggest button { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 7px 12px; font: 600 13px var(--font); color: var(--text-2); cursor: pointer; }
.suggest button:hover { border-color: var(--primary); color: var(--primary); }

/* ── Markdown ── */
.md { font-size: 14.5px; line-height: 1.6; }
.md h2, .md h3, .md h4, .md h5 { font-family: var(--font); font-size: 15.5px; font-weight: 800; margin: 14px 0 6px; }
.md p { margin: 0 0 8px; }
.md ul, .md ol { margin: 4px 0 10px; padding-left: 20px; }
.md li { margin: 2px 0; }
.md table { border-collapse: collapse; font-size: 13px; margin: 6px 0 12px; width: 100%; }
.md th, .md td { border: 1px solid var(--border); padding: 6px 8px; text-align: left; vertical-align: top; }
.md th { background: var(--surface-2); }
.md code { background: var(--bg-2); padding: 1px 5px; border-radius: 5px; font-size: 13px; }
.md blockquote { margin: 6px 0; padding: 6px 12px; border-left: 3px solid var(--gold); color: var(--text-2); }
.md hr { border: 0; border-top: 1px solid var(--border); margin: 12px 0; }
.report { max-height: 420px; overflow: auto; padding: 4px 4px 4px 0; }

/* ── Misc ── */
.empty { text-align: center; padding: 34px 16px; color: var(--muted); }
.empty .em { font-size: 40px; margin-bottom: 8px; }
.empty h3 { color: var(--text); margin-bottom: 4px; }
.skel { background: linear-gradient(90deg, var(--bg-2), var(--surface-2), var(--bg-2)); background-size: 200% 100%; animation: sh 1.2s infinite; border-radius: 12px; }
@keyframes sh { to { background-position: -200% 0; } }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--info-soft); color: var(--text); font-size: 13.5px; }
.notice.warn { background: var(--warn-soft); }
.notice.good { background: var(--good-soft); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 13.5px; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; }
.match-line { padding: 10px 0; border-bottom: 1px solid var(--border); }
.check-list { max-height: 50vh; overflow: auto; border: 1px solid var(--border); border-radius: 14px; }
.check-list label { display: grid; grid-template-columns: auto 1fr 110px; gap: 10px; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--border); font-size: 14px; cursor: pointer; }
.check-list label:last-child { border-bottom: 0; }
.check-list .grp { padding: 8px 12px; background: var(--surface-2); font-weight: 800; font-size: 12.5px; color: var(--text-2); border-bottom: 1px solid var(--border); }
.check-list input[type='checkbox'] { width: 18px; height: 18px; accent-color: var(--good); }
.check-list .input { padding: 6px 8px; font-size: 13px; }
.menu { position: relative; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 6px); min-width: 210px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 40; display: none; }
.menu.open .menu-pop { display: block; }
.menu-pop button, .menu-pop a { display: flex; width: 100%; gap: 10px; align-items: center; text-align: left; padding: 9px 11px; border: 0; background: none; border-radius: 10px; font: 600 14px var(--font); color: var(--text); cursor: pointer; }
.menu-pop button:hover, .menu-pop a:hover { background: var(--bg-2); text-decoration: none; }
.alerts-panel { position: absolute; right: 0; top: calc(100% + 8px); width: min(400px, calc(100vw - 24px)); max-height: 70vh; overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 8px 16px 12px; z-index: 50; display: none; }
.menu.open .alerts-panel { display: block; }
/* Phones: pin dropdowns to the screen edges instead of the button, so nothing slides off-screen. */
@media (max-width: 600px) {
  .alerts-panel, .menu-pop {
    position: fixed; top: 64px; left: 12px; right: 12px; width: auto; min-width: 0;
    max-height: calc(100vh - 160px); overflow-y: auto; z-index: 70;
  }
  .alerts-panel .t, .alerts-panel .b { overflow-wrap: anywhere; }
}
.footer-note { text-align: center; color: var(--muted); font-size: 12px; margin-top: 30px; }

/* ── Ev Tasarımı ── */
.link-btn { background: none; border: 0; padding: 0; color: var(--primary); cursor: pointer; font: inherit; font-size: 13px; text-align: left; display: inline-block; margin-top: 8px; }
.link-btn:hover { text-decoration: underline; }
.chip-btn { border: 1px solid var(--border); background: var(--surface); color: var(--text-2); border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.chip-btn:hover { background: var(--bg-2); }
.chip-btn.on { background: var(--primary-soft); color: var(--primary); border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); font-weight: 600; }
.input.xs, .select.xs { width: 64px; padding: 4px 6px; font-size: 12px; border-radius: 8px; display: inline-block; }
.select.xs { width: auto; }
.design-start { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.start-opt { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; }
.start-opt .em { font-size: 38px; }
.start-opt h3 { margin: 0; }
.start-opt p { margin: 0; }
.plan-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.plan-tile { display: flex; flex-direction: column; gap: 8px; color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px; }
.plan-tile:hover { text-decoration: none; background: var(--bg-2); }
.plan-thumb { height: 120px; border-radius: 10px; background: var(--surface-2) center / contain no-repeat; display: grid; place-items: center; font-size: 34px; }
.plan-name { font-family: var(--display); font-size: 24px; font-weight: 600; border-color: transparent; background: transparent; padding: 2px 6px; margin-top: 4px; max-width: 460px; }
.plan-name:hover { border-color: var(--border); }
.plan-wrap { background: var(--surface-2); border-radius: var(--radius-sm); padding: 8px; }
.plan-svg { width: 100%; height: auto; max-height: 360px; display: block; }
.plan-room { cursor: pointer; }
.plan-room:hover > rect:first-child { filter: brightness(0.96); }
.plan-room.active > rect:first-child { stroke: #b4475f; stroke-width: 10; }
.room-chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0 6px; }
.design-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; align-items: start; }
.room-tools { margin-bottom: 10px; }
.room-canvas { background: var(--surface-2); border-radius: var(--radius-sm); overflow: hidden; }
.room-canvas svg { width: 100%; height: auto; max-height: 70vh; display: block; user-select: none; -webkit-user-select: none; }
.room-canvas .furn { cursor: grab; touch-action: none; }
.room-canvas .furn:active { cursor: grabbing; }
.warn-list { display: flex; flex-direction: column; gap: 4px; }
.warn-row { text-align: left; border: 0; border-radius: 10px; padding: 7px 10px; font: inherit; font-size: 13px; cursor: pointer; background: var(--warn-soft, #fff4dc); color: var(--text); }
.warn-row.error { background: var(--urgent-soft); }
.furn-list { display: flex; flex-direction: column; gap: 4px; }
.furn-row { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 10px; cursor: pointer; border: 1px solid transparent; }
.furn-row:hover { background: var(--bg-2); }
.furn-row.sel { border-color: var(--primary); background: var(--primary-soft); }
.furn-row .sw { width: 14px; height: 14px; border-radius: 4px; border: 1px solid #5b4d55; flex: none; }
.src-item { padding: 10px 0; border-bottom: 1px dashed var(--border); }
.src-item:last-of-type { border-bottom: 0; }
.src-cand { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; }
.src-cand .chip { margin-top: 4px; }
.open-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.room-settings summary { cursor: pointer; list-style: none; }
.room-settings summary::-webkit-details-marker { display: none; }
.render-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.render-tile { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0; overflow: hidden; background: var(--surface-2); cursor: pointer; display: flex; flex-direction: column; text-align: left; font: inherit; color: var(--muted); }
.render-tile img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.render-tile span { padding: 6px 10px; }
.kroki-img { width: 100%; height: auto; border-radius: var(--radius-sm); display: block; }
.thumb.sm { width: 52px; height: 52px; display: inline-block; border-radius: 10px; }
@media (max-width: 900px) {
  .design-start, .design-grid { grid-template-columns: 1fr; }
  .plan-name { font-size: 20px; }
}
.notice.urgent { background: var(--urgent-soft); }

/* ── Ev Tasarımı: plan map, selected-piece bar, tabs (phones), full-screen drawing ── */
.plan-map > summary { cursor: pointer; list-style: none; color: var(--primary); font-weight: 600; padding: 2px 0 8px; }
.plan-map > summary::-webkit-details-marker { display: none; }
.plan-card .room-chips { margin: 0 0 8px; }
.sel-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 10px; padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--primary) 45%, var(--border)); background: var(--surface); border-radius: var(--radius-sm); box-shadow: var(--shadow); }
.sel-info { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1 1 160px; }
.sel-info .sw { width: 14px; height: 14px; border-radius: 4px; border: 1px solid #5b4d55; flex: none; }
.sel-close { margin-left: auto; }
.sel-actions { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.sel-actions .nudge { display: flex; gap: 2px; margin-right: 4px; }
.sel-btn { width: 40px; height: 40px; border: 1px solid var(--border); background: var(--surface-2); font-size: 17px; font-weight: 700; color: var(--text); }
.sel-btn.danger { color: var(--urgent); }
.dtabs { display: none; }
.fd-text { display: none; }
.empty-room { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
/* Full-screen drawing (all screen sizes): covers the page; only the drawing, tools and the selection bar stay. */
.room-card.full { position: fixed; inset: 0; z-index: 70; border-radius: 0; border: 0; padding: 12px 12px calc(12px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; overflow: auto; }
.room-card.full .room-canvas { margin: 0; flex: 1; display: grid; place-items: center; }
.room-card.full .room-canvas svg { max-height: calc(100dvh - 230px); }
.room-card.full .room-hint, .room-card.full .dtabs, .room-card.full .dpanel { display: none !important; }
.room-card.full .sel-bar { position: static; }
body.design-full { overflow: hidden; }

@media (max-width: 900px) {
  body[data-route='tasarim'] .fab { display: none; }
  .design-page .plan-card { padding: 12px; }
  .plan-card .room-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -4px 6px; padding: 0 4px 4px; }
  .plan-card .room-chips::-webkit-scrollbar { display: none; }
  .plan-card .room-chips .chip-btn { flex: none; padding: 8px 14px; font-size: 14px; }
  .design-grid { gap: 12px; margin-top: 12px; }
  .room-card { padding: 12px; }
  .room-card .card-head { margin-bottom: 8px; }
  .room-tools { gap: 6px; margin-bottom: 8px; }
  .room-hint { flex-basis: 100%; }
  .room-canvas { margin: 0 -6px; }
  .room-canvas svg { max-height: 58vh; }
  /* Selected-piece bar stays reachable above the bottom navigation while scrolling. */
  .sel-bar { position: sticky; bottom: calc(74px + env(safe-area-inset-bottom)); z-index: 20; gap: 6px; padding: 6px 8px; }
  .sel-info .sel-close { width: 34px; height: 34px; }
  .sel-actions { width: 100%; justify-content: space-between; flex-wrap: nowrap; gap: 3px; }
  .sel-actions .nudge { gap: 3px; margin-right: 0; }
  .sel-btn { width: 39px; height: 40px; font-size: 16px; }
  /* One panel at a time under the drawing. */
  .dtabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 12px -4px 4px; padding: 4px; background: var(--bg-2); border-radius: 14px; scroll-margin-top: 70px; }
  .dtab { border: 0; background: transparent; border-radius: 10px; padding: 8px 2px; font: inherit; font-size: 12px; font-weight: 600; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 1px; cursor: pointer; }
  .dtab .em { font-size: 18px; line-height: 1.1; position: relative; }
  .dtab .n { position: absolute; top: -4px; left: calc(100% - 2px); min-width: 16px; padding: 1px 4px; border-radius: 8px; background: var(--primary); color: #fff; font-size: 10px; line-height: 1.2; }
  .dtab.on { background: var(--surface); color: var(--primary); box-shadow: var(--shadow); }
  .design-page .dpanel { display: none; }
  .design-page[data-tab='furn'] .dpanel[data-panel='furn'],
  .design-page[data-tab='add'] .dpanel[data-panel='add'],
  .design-page[data-tab='room'] .dpanel[data-panel='room'],
  .design-page[data-tab='render'] .dpanel[data-panel='render'] { display: block; }
  .design-page .design-side > .dpanel.mt { margin-top: 12px; }
  .design-page .design-side > .dpanel[data-panel='room'] { margin-top: 0; }
  .design-page .render-card { margin-top: 0; }
  .furn-row { padding: 10px 8px; }
  .fd-edit { display: none; }
  .fd-text { display: inline; }
  .src-cand { flex-wrap: wrap; }
  .src-cand .btn-xs { padding: 7px 12px; font-size: 13px; }
}

/* ── Rehber ── */
.guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.guide-card { display: flex; flex-direction: column; }
.guide-card .btn { align-self: flex-start; margin-top: auto; }
.guide-card .card-head { margin-bottom: 8px; }
.guide-n { width: 26px; height: 26px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: inline-grid; place-items: center; font-size: 13px; font-weight: 700; flex: none; }
.guide-list { margin: 0 0 12px; padding-left: 18px; display: flex; flex-direction: column; gap: 7px; font-size: 14px; color: var(--text-2); line-height: 1.5; }
.guide-list b { color: var(--text); }
@media (max-width: 900px) { .guide-grid { grid-template-columns: 1fr; } }

/* ── Fotoğraflar ── */
.has-photo { cursor: zoom-in; position: relative; background-size: cover !important; }
.cand-img.wide { width: 120px; height: 90px; }
.cand-main:has(.cand-img.wide) { grid-template-columns: 120px minmax(0, 1fr) auto; }
button.cand-img { cursor: pointer; font: inherit; flex-direction: column; gap: 0; color: var(--muted); padding: 0; }
button.cand-img .tiny { font-size: 10px; }
.photo-count { position: absolute; right: 4px; bottom: 4px; background: rgba(0, 0, 0, 0.6); color: #fff; font-size: 11px; font-weight: 700; border-radius: 8px; padding: 1px 6px; }
.gallery img { width: 100%; max-height: 68vh; object-fit: contain; border-radius: var(--radius-sm); background: var(--surface-2); display: block; }
.gallery-strip { display: flex; gap: 6px; overflow-x: auto; margin-top: 10px; }
.gallery-strip button { flex: none; width: 74px; height: 56px; border-radius: 8px; border: 2px solid transparent; background: var(--surface-2) center / cover no-repeat; cursor: pointer; padding: 0; }
.gallery-strip button.on { border-color: var(--primary); }
.vc-title { display: flex; align-items: center; gap: 6px; min-width: 0; }
.vc-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vc-thumb { width: 26px; height: 26px; border-radius: 6px; flex: none; background: var(--surface-2) center / cover no-repeat; }
@media (max-width: 600px) { .cand-img.wide { width: 76px; height: 76px; } .cand-main:has(.cand-img.wide) { grid-template-columns: 76px minmax(0, 1fr); } }

/* ── Sade ürün kartı & mobil düzen ── */
.drawer-body { overflow-x: hidden; }
.drawer-body > * { min-width: 0; }
.cand-tools { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.drawer-body .row.between:has(> .cand-tools) { flex-wrap: wrap; gap: 8px; }
.cand { position: relative; }
.cand.decided { border-color: var(--good); box-shadow: 0 0 0 2px var(--good-soft); }
.cand-collapse { position: absolute; top: 8px; right: 8px; z-index: 1; border: 0; background: var(--surface-2); color: var(--muted); border-radius: 8px; padding: 3px 8px; font: inherit; font-size: 12px; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; }
.cc-main { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; padding: 12px 12px 6px; cursor: pointer; align-items: start; }
.cc-img { width: 64px; height: 64px; border-radius: 12px; background: var(--surface-2) center / contain no-repeat; border: 1px solid var(--border); display: grid; place-items: center; font-size: 24px; position: relative; }
.cc-img.has-photo { background-size: cover; }
.cc-body { min-width: 0; display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.cc-title { font-weight: 700; font-size: 14.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cc-price { text-align: right; font-family: var(--display); font-size: 18px; white-space: nowrap; }
.cc-sum { padding: 0 12px; font-size: 13px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cc-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; padding: 8px 12px 10px; }
.verdict.sm { font-size: 12px; padding: 2px 8px; margin: 2px 0 0; }
@media (max-width: 600px) {
  .cc-main { grid-template-columns: 56px minmax(0, 1fr) auto; gap: 10px; }
  .cc-img { width: 56px; height: 56px; }
  .cc-price { font-size: 16px; }
  .cand-tools { justify-content: flex-start; }
  .cand-foot form[data-form="quote"] { margin-left: 0 !important; }
}
.cand:has(> .cand-collapse) > .cand-main { padding-top: 36px; }

/* ── Kupon detayı ── */
.coupon[data-act="coupon"] { cursor: pointer; border-radius: 10px; padding-left: 6px; padding-right: 6px; margin: 0 -6px; }
.coupon[data-act="coupon"]:hover { background: var(--bg-2); }
.coupon-detail .notice { margin-bottom: 10px; }
.coupon-code { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border: 2px dashed var(--gold, #c99a4a); border-radius: 14px; margin-bottom: 12px; background: var(--surface-2); }
.coupon-code b { font-size: 20px; letter-spacing: 1px; font-family: ui-monospace, monospace; flex: 1; }
.facts { display: grid; grid-template-columns: minmax(110px, auto) 1fr; gap: 6px 14px; margin: 0; font-size: 13.5px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
