/* Ekipart Emlak Asistanı — temel sistem ve uygulama kabuğu.
   Dosya sırası: style.css (bu dosya) → studio.css → dashboard.css → pages.css → admin.css → social.css.
   Her dosya yalnız kendi seçicilerini tanımlar; bir dosya diğerinin kuralını ezmez.
   Bu dosya: değişkenler, sıfırlama, yazı, düğme/giriş/rozet bileşenleri, menü, dock,
   sayfa çerçevesi (workspace-overlay), giriş, kurulum sihirbazı, onay diyaloğu, bildirim, açılış. */

@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("assets/fonts/inter-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("assets/fonts/instrument-serif-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("assets/fonts/instrument-serif-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("assets/fonts/instrument-serif-latin-ext-400-italic.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("assets/fonts/instrument-serif-latin-400-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("assets/fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Renk: yeşil yalnız vurgu. --green ofis markasıyla JavaScript'ten değiştirilebilir. */
  --green: #174f41;
  --green-deep: #123e32;
  --green-soft: #e4efe9;
  --green-tint: #f1f6f3;
  --green-text: #1d5b4b;
  --ink: #1b2a24;
  --ink-2: #44554c;
  --muted: #687a70;
  --line: #e9e6df;
  --line-2: #d9d4c8;
  --canvas: #f7f6f2;
  --surface: #ffffff;
  --surface-2: #f3f1ea;
  --lime: #c9e84a;
  --font-display: "Instrument Serif", Georgia, "Times New Roman", serif;
  --amber: #8a5a00; --amber-bg: #fff7e6; --amber-line: #efd9a6;
  --red: #a4332e; --red-bg: #fdf0ef; --red-line: #f0c4c1;
  --grey-bg: #eef1ef; --grey-text: #55655c;
  /* Eski adlar (JavaScript ve diğer dosyalar için takma ad) */
  --forest: var(--green); --forest-deep: var(--green-deep); --mint: var(--green-soft);
  --ink-soft: var(--ink-2); --paper: var(--surface); --danger: var(--red); --warning: var(--amber);
  --line-strong: var(--line-2); --color-primary: var(--green); --color-border: var(--line);
  --color-text: var(--ink); --color-text-secondary: var(--ink-2); --color-text-muted: var(--muted);
  --color-surface: var(--surface); --color-app-bg: var(--canvas); --color-danger: var(--red);
  --color-focus: var(--green); --panel-border: 1px solid var(--line); --panel-radius: var(--radius);
  --control-radius: var(--radius-sm); --control-height: 40px; --green-bright: #2b7a64;
  /* Yazı */
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --text-12: 12px; --text-13: 13px; --text-14: 14px; --text-15: 15px; --text-16: 16px;
  --text-18: 18px; --text-22: 22px; --text-28: 28px;
  --text-xs: var(--text-12); --text-sm: var(--text-13); --text-md: var(--text-15); --text-lg: var(--text-18);
  /* Boşluk, köşe, gölge, hareket */
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 20px; --space-6: 24px; --space-8: 32px;
  --radius-sm: 10px; --radius: 16px; --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(27, 42, 36, .06);
  --shadow-card: 0 1px 0 rgba(19, 32, 26, .03), 0 12px 32px -20px rgba(19, 32, 26, .18);
  --shadow-pop: 0 8px 24px rgba(27, 42, 36, .12), 0 1px 2px rgba(27, 42, 36, .06);
  --shadow-modal: 0 24px 64px rgba(27, 42, 36, .22);
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --dur-fast: 120ms; --dur: 180ms;
  /* Kabuk ölçüleri */
  --nav-w: 248px; --rail-w: 64px; --dock-h: 64px; --topbar-h: 56px;
  --gutter: clamp(16px, 3vw, 32px); --page-gutter: var(--gutter);
  --focus-ring: 0 0 0 3px var(--green-soft);
}

/* ---------- Sıfırlama ve yazı ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body {
  min-width: 320px; overflow: hidden; color: var(--ink); background: var(--canvas);
  font-family: var(--font); font-size: var(--text-14); line-height: 1.5;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  font-feature-settings: "cv11", "ss01"; isolation: isolate;
}
h1, h2, h3, h4 { font-weight: 600; line-height: 1.3; color: var(--ink); letter-spacing: 0; }
h1 { font-family: var(--font-display); font-weight: 400; font-size: 30px; line-height: 1.15; letter-spacing: 0; }
h1 em, .display em { font-style: italic; color: var(--green-text); }
.display { font-family: var(--font-display); font-weight: 400; letter-spacing: 0; }
h2 { font-size: var(--text-16); }
h3 { font-size: var(--text-15); }
p { line-height: 1.55; }
a { color: var(--green-text); text-underline-offset: 2px; }
b, strong { font-weight: 600; }
small { font-size: var(--text-13); }
code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .92em; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { -webkit-tap-highlight-color: transparent; touch-action: manipulation; cursor: pointer; background: none; border: 0; }
button:disabled { cursor: not-allowed; opacity: .55; }
button svg, a svg { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--green-soft); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.menu-glyph { width: 18px; height: 18px; display: inline-block; position: relative; }
.menu-glyph::before, .menu-glyph::after { content: ""; position: absolute; left: 1px; right: 1px; border-top: 1.8px solid currentColor; }
.menu-glyph::before { top: 4px; box-shadow: 0 5px 0 0 currentColor; }
.menu-glyph::after { bottom: 3px; }

/* ---------- Düğmeler ---------- */
.btn {
  min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0 16px; border: 1px solid transparent; border-radius: var(--radius-sm);
  font-size: var(--text-14); font-weight: 600; line-height: 1.2; text-decoration: none; white-space: nowrap;
  transition: background var(--dur-fast) ease, border-color var(--dur-fast) ease, transform var(--dur-fast) ease;
}
.btn:active:not(:disabled) { transform: scale(.98); }
.btn.primary { color: #fff; background: var(--green); border-color: var(--green); }
.btn.primary:hover { background: var(--green-deep); border-color: var(--green-deep); }
.btn.ghost { color: var(--ink); background: var(--surface); border-color: var(--line-2); }
.btn.ghost:hover { background: var(--surface-2); border-color: var(--line-2); }
.btn.danger { color: var(--red); background: var(--red-bg); border-color: var(--red-line); }
.btn.danger:hover { background: #fbe4e2; }
.btn.big { min-height: 48px; width: 100%; font-size: var(--text-15); }
.btn.compact { min-height: 36px; padding: 0 12px; font-size: var(--text-13); }
.btn.icon-only { width: 40px; padding: 0; }
.btn.icon-only.compact { width: 36px; }
.btn > span { font: inherit; color: inherit; }
.mini {
  min-height: 32px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 0 10px; color: var(--ink); background: var(--surface); border: 1px solid var(--line-2);
  border-radius: var(--radius-sm); font-size: var(--text-13); font-weight: 500; white-space: nowrap;
  transition: background var(--dur-fast) ease, border-color var(--dur-fast) ease;
}
.mini:hover { background: var(--surface-2); }
.mini.primary-mini { color: var(--green-text); background: var(--green-soft); border-color: transparent; }
.mini.primary-mini:hover { background: #d6e7dd; }
.mini.del, .danger-btn { color: var(--red); background: var(--red-bg); border: 1px solid var(--red-line); border-radius: var(--radius-sm); }
.mini.del:hover, .danger-btn:hover { background: #fbe4e2; }
select.mini { padding-right: 28px; }
.text-btn {
  min-height: 36px; display: inline-flex; align-items: center; gap: 6px; padding: 0 8px; margin: 0 -8px;
  color: var(--green-text); border-radius: 6px; font-size: var(--text-13); font-weight: 600; white-space: nowrap;
}
.text-btn:hover { background: var(--green-tint); }
.x {
  width: 40px; height: 40px; flex: 0 0 40px; display: grid; place-items: center;
  color: var(--ink-2); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius-sm);
}
.x:hover { color: var(--ink); background: var(--surface-2); }
.x svg { width: 18px; height: 18px; }

/* ---------- Giriş alanları ---------- */
input:where(:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="file"])), select, textarea {
  width: 100%; min-height: var(--control-height); padding: 8px 12px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  font-size: var(--text-14); line-height: 1.4; transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}
textarea { resize: vertical; line-height: 1.5; }
select {
  appearance: none; padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2344554c' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 18px;
}
input::placeholder, textarea::placeholder { color: #93a299; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: var(--green); box-shadow: var(--focus-ring); }
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--red); }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; flex: 0 0 18px; margin: 0; accent-color: var(--green); }
input[type="color"] { width: 56px; height: 40px; padding: 2px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--surface); }
input[type="file"] { font-size: var(--text-13); }
label { font-size: var(--text-13); font-weight: 500; color: var(--ink-2); }
.field { display: flex; flex-direction: column; gap: 6px; }
.lbl { display: block; font-size: var(--text-13); font-weight: 500; color: var(--ink-2); }
.form-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hint { color: var(--muted); font-size: var(--text-13); line-height: 1.55; }
.hint.centered { text-align: center; }
.err { min-height: 0; color: var(--red); font-size: var(--text-13); line-height: 1.5; }
.err:empty { display: none; }

/* ---------- Rozetler, segmentler, kutular ---------- */
.badge, .sbadge, .person-role, .quality-badge, .step {
  display: inline-flex; align-items: center; gap: 4px; min-height: 22px; padding: 0 8px;
  border-radius: 999px; font-size: var(--text-12); font-weight: 600; line-height: 1; white-space: nowrap;
  color: var(--grey-text); background: var(--grey-bg);
}
.badge { color: var(--green-text); background: var(--green-soft); }
.s-active, .quality-badge.good, .person-role, .step.done { color: var(--green-text); background: var(--green-soft); }
.s-sold { color: var(--grey-text); background: var(--grey-bg); }
.s-reserved, .quality-badge, .person-role.admin { color: var(--amber); background: var(--amber-bg); }
.s-draft { color: var(--grey-text); background: var(--grey-bg); }
.step.active { color: #fff; background: var(--green); }
.filters, .seg, .tabs { display: flex; gap: 2px; padding: 3px; border-radius: var(--radius-sm); background: var(--surface-2); }
.fbtn, .seg-btn, .tab {
  flex: 0 0 auto; min-height: 34px; padding: 0 12px; color: var(--ink-2); border-radius: 6px;
  font-size: var(--text-13); font-weight: 500; white-space: nowrap;
  transition: background var(--dur-fast) ease, color var(--dur-fast) ease;
}
.seg-btn, .tab { flex: 1 1 0; }
.fbtn:hover, .seg-btn:hover, .tab:hover { color: var(--ink); }
.fbtn.active, .seg-btn.active, .tab.active { color: var(--ink); background: var(--surface); box-shadow: var(--shadow-sm); font-weight: 600; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.modal-head-actions { display: flex; align-items: center; gap: 8px; }
.panel-box { display: flex; flex-direction: column; gap: 12px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-card); }
.panel-box > h3, .section-title { font-family: var(--font-display); font-size: 22px; font-weight: 400; line-height: 1.2; color: var(--ink); }
.section-title { margin: 0 0 4px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-card); }
.stat { min-height: 76px; display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 14px 18px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat b { font-family: var(--font-display); font-size: 34px; font-weight: 400; line-height: 1.05; font-variant-numeric: tabular-nums; color: var(--ink); }
.stat span { font-size: var(--text-13); color: var(--muted); }
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 140px; padding: 28px 20px; text-align: center; color: var(--muted); font-size: var(--text-14); }
.empty strong { font-size: var(--text-15); font-weight: 600; color: var(--ink); }
.empty small { max-width: 360px; font-size: var(--text-14); line-height: 1.55; color: var(--muted); }
.empty-icon { width: 44px; height: 44px; display: grid; place-items: center; margin-bottom: 8px; color: var(--green-text); background: var(--green-soft); border-radius: var(--radius); }
.empty-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.help { padding: 0 14px; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: var(--text-13); }
.help summary { min-height: 40px; display: flex; align-items: center; color: var(--green-text); font-weight: 600; cursor: pointer; }
.help ol, .help-list { margin: 4px 0 12px 18px; color: var(--ink-2); font-size: var(--text-13); line-height: 1.6; }
.help-list { margin: 0 0 0 18px; }
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }

/* ---------- Uygulama ızgarası ---------- */
.app {
  width: 100%; height: var(--workspace-height, 100dvh); display: grid; overflow: hidden;
  grid-template-columns: var(--rail-w) minmax(0, 1fr) minmax(360px, 420px); gap: 0; padding: 0;
}
body.nav-expanded .app { grid-template-columns: var(--nav-w) minmax(0, 1fr) minmax(360px, 420px); }
body:is(.dashboard-active, .workspace-page-active) .app { grid-template-columns: var(--rail-w) minmax(0, 1fr); }
body.nav-expanded:is(.dashboard-active, .workspace-page-active) .app { grid-template-columns: var(--nav-w) minmax(0, 1fr); }

/* ---------- Sol menü ---------- */
.side-nav {
  min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden;
  padding: 12px 10px 10px; color: var(--ink); background: var(--surface); border-right: 1px solid var(--line);
}
.side-brand { position: relative; min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 0 2px; }
.side-office { display: none; min-width: 0; }
.side-office b { display: block; overflow: hidden; font-size: var(--text-14); font-weight: 600; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.side-office small { display: block; color: var(--muted); font-size: var(--text-12); line-height: 1.3; }
.side-goal { display: none; margin: 0 0 6px; padding: 10px 12px 8px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.side-goal > span { display: block; color: var(--ink-2); font-size: var(--text-12); font-weight: 500; }
.side-goal b { display: block; margin-top: 0; font-family: var(--font-display); font-weight: 400; font-size: 22px; line-height: 1.1; color: var(--ink); font-variant-numeric: tabular-nums; }
.side-goal b small { font-family: var(--font); font-size: var(--text-12); color: var(--muted); margin-left: 4px; }
.side-goal i { display: block; height: 4px; margin: 6px 0 5px; overflow: hidden; border-radius: 999px; background: #e6e2d8; }
.side-goal i em { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--green); }
.side-goal > small { display: block; color: var(--muted); font-size: var(--text-12); }
.side-logo { width: 40px; height: 40px; flex: 0 0 40px; display: grid; place-items: center; color: var(--green-text); background: var(--green-soft); border-radius: 10px; font-size: var(--text-13); font-weight: 700; }
.side-brand-copy { display: none; min-width: 0; }
.side-brand-copy img { width: 176px; height: auto; }
.side-collapse { display: none; position: absolute; right: -2px; top: 50%; width: 28px; height: 28px; transform: translateY(-50%); place-items: center; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.side-collapse:hover { color: var(--ink); }
.side-collapse svg { width: 16px; height: 16px; }
.mobile-nav-close { display: none; }
.side-links { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 1px; margin-top: 12px; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; }
.side-link {
  position: relative; width: 100%; min-height: 42px; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 0 8px;
  color: var(--ink-2); border-radius: var(--radius-sm); text-align: left; text-decoration: none;
  transition: background var(--dur-fast) ease, color var(--dur-fast) ease;
}
.side-link i { width: 28px; height: 28px; flex: 0 0 28px; display: grid; place-items: center; color: inherit; font-style: normal; }
.side-link i svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.side-link span { display: block; min-width: 0; position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.side-link span b { display: block; font-size: var(--text-14); font-weight: 500; line-height: 1.3; color: inherit; }
.side-link span small { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.side-link:hover { color: var(--ink); background: var(--surface-2); }
.side-link.active { color: var(--green-text); background: var(--green-soft); }
.side-link.active span b { font-weight: 600; }
.side-separator { position: relative; display: flex; align-items: center; min-height: 28px; margin-top: 8px; padding: 0 8px; color: var(--muted); font-size: var(--text-12); font-weight: 600; }
.side-separator span { display: block; position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.side-bottom { flex: 0 0 auto; display: flex; flex-direction: column; gap: 2px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); }
.side-user { position: relative; min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 4px 8px; border-radius: var(--radius-sm); }
.side-user > span { width: 32px; height: 32px; flex: 0 0 32px; display: grid; place-items: center; color: var(--green-text); background: var(--green-soft); border-radius: 8px; font-size: var(--text-12); font-weight: 700; }
.side-user > div { display: block; min-width: 0; position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.side-user b { display: block; overflow: hidden; font-size: var(--text-14); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.side-user small { display: block; color: var(--muted); font-size: var(--text-12); }
.side-logout { position: relative; min-height: 40px; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 0 8px; color: var(--muted); border-radius: var(--radius-sm); }
.side-logout i { width: 28px; flex: 0 0 28px; display: grid; place-items: center; font-style: normal; }
.side-logout i svg { width: 18px; height: 18px; }
.side-logout span { display: block; font-size: var(--text-13); font-weight: 500; position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.side-logout:hover { color: var(--red); background: var(--red-bg); }
.nav-scrim { display: none; }
.mobile-global-menu { display: none; }
/* Geniş menü */
body.nav-expanded .side-nav { padding-inline: 12px; }
body.nav-expanded .side-brand { justify-content: flex-start; padding-left: 6px; }
body.nav-expanded .side-logo { display: none; }
body.nav-expanded .side-brand-copy { display: block; }
body.nav-expanded .side-office { display: block; }
body.nav-expanded .side-goal:not([hidden]) { display: block; }
body.nav-expanded .side-brand { flex-direction: column; align-items: flex-start; gap: 6px; padding: 4px 6px 8px; }
body.nav-expanded .side-brand-copy img { width: 148px; }
@media (max-height: 820px) { body.nav-expanded .side-goal > small { display: none; } body.nav-expanded .side-office small { display: none; } }
body.nav-expanded .side-collapse { top: 10px; transform: none; }
body.nav-expanded .side-collapse { display: grid; }
body.nav-expanded .side-link, body.nav-expanded .side-user, body.nav-expanded .side-logout { justify-content: flex-start; }
body.nav-expanded .side-link span, body.nav-expanded .side-user > div, body.nav-expanded .side-logout span, body.nav-expanded .side-separator span { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; }
body.nav-expanded .side-separator { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 8px; min-height: 34px; }
body.nav-expanded .side-link.active { box-shadow: none; }

/* ---------- Mobil dock ---------- */
.mobile-dock { display: none; }

/* ---------- Tam sayfa katmanlar ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; overflow-y: auto;
  background: rgba(27, 42, 36, .45);
}
.card {
  width: min(440px, 100%); display: flex; flex-direction: column; gap: 14px; padding: 28px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-modal);
}
.card .brand { font-family: var(--font-display); font-size: 28px; font-weight: 400; line-height: 1.2; letter-spacing: 0; color: var(--ink); }
.card.wide { width: min(560px, 100%); max-height: calc(100dvh - 40px); overflow-y: auto; }
.card.board { width: min(960px, 100%); max-height: calc(100dvh - 40px); overflow: hidden; }
.steps { display: flex; gap: 6px; }
.steps .step { flex: 1 1 0; justify-content: center; min-height: 28px; border-radius: 6px; }
.wiz { display: flex; flex-direction: column; gap: 12px; }
.done-icon { width: 56px; height: 56px; display: grid; place-items: center; margin: 8px auto 0; color: var(--green-text); background: var(--green-soft); border-radius: 50%; }
.done-icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* Yönetim sayfaları: menünün sağında tam boy, sayfa bütün olarak kayar, başlık üstte sabit. */
.workspace-overlay { inset: 0 0 0 var(--rail-w); z-index: 40; display: block; padding: 0; overflow: hidden; background: var(--canvas); }
body.nav-expanded .workspace-overlay { left: var(--nav-w); }
.workspace-overlay > .card {
  width: 100%; max-width: none; height: 100%; max-height: none; gap: 20px; padding: 0 0 40px;
  overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-width: thin;
  border: 0; border-radius: 0; background: var(--canvas); box-shadow: none;
}
.workspace-overlay > .card > * { flex: 0 0 auto; margin-inline: var(--gutter); min-width: 0; }
.workspace-overlay > .card > .row-between:first-child {
  position: sticky; top: 0; z-index: 5; min-height: 64px; align-items: center; margin: 0; padding: 12px var(--gutter);
  background: rgba(255, 255, 255, .96); border-bottom: 1px solid var(--line); backdrop-filter: blur(8px);
}
.workspace-overlay > .card > .row-between:first-child > div:first-child { min-width: 0; }
.workspace-overlay .brand { font-family: var(--font-display); font-size: 30px; font-weight: 400; line-height: 1.15; letter-spacing: 0; color: var(--ink); }
.workspace-overlay .draft-lead { margin-top: 2px; color: var(--muted); font-size: var(--text-13); line-height: 1.5; }
.workspace-overlay .draft-lead a { color: var(--green-text); }
@keyframes pageIn { from { opacity: 0; transform: translateY(6px); } }
.workspace-overlay > .card { animation: pageIn var(--dur) var(--ease-out); }

/* ---------- Giriş ekranı ---------- */
#authOverlay { padding: 24px; background: var(--canvas); }
.auth-shell {
  width: min(1040px, 100%); min-height: min(640px, calc(100dvh - 48px)); display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(380px, .9fr);
  overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-pop);
}
.auth-showcase { display: flex; flex-direction: column; justify-content: space-between; gap: 40px; padding: 40px 44px; background: var(--green-tint); border-right: 1px solid var(--line); }
.showcase-brand img { width: 220px; height: auto; }
.showcase-copy { max-width: 440px; }
.showcase-copy h1 { font-size: 40px; line-height: 1.12; color: var(--ink); }
.showcase-copy p { margin-top: 12px; color: var(--ink-2); font-size: var(--text-15); line-height: 1.6; }
.showcase-trust { list-style: none; display: grid; gap: 10px; margin-top: 24px; color: var(--ink-2); font-size: var(--text-14); }
.showcase-trust li { display: flex; align-items: flex-start; gap: 10px; }
.showcase-trust li::before { content: ""; flex: 0 0 18px; width: 18px; height: 18px; margin-top: 1px; border-radius: 50%; background: var(--green-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231d5b4b' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 11px no-repeat; }
.auth-card { width: 100%; justify-content: center; gap: 14px; padding: clamp(28px, 5vw, 56px); border: 0; border-radius: 0; box-shadow: none; }
.mobile-brand { display: none; }
.mobile-brand img { width: 180px; height: auto; }
.auth-heading { margin-bottom: 6px; }
.auth-heading h2 { font-family: var(--font-display); font-weight: 400; font-size: 34px; line-height: 1.15; letter-spacing: 0; }
.auth-heading p { margin-top: 6px; color: var(--muted); font-size: var(--text-14); }
.auth-card .tabs { margin-bottom: 6px; }
.auth-card .tab { min-height: 36px; }
.auth-card input { min-height: 44px; font-size: var(--text-15); }
.auth-card .btn.big { margin-top: 4px; }
.auth-card .err { text-align: center; }
.auth-note { margin-top: 4px; color: var(--muted); text-align: center; font-size: var(--text-12); }

/* ---------- Onay diyaloğu ---------- */
.confirm-overlay { z-index: 2000 !important; background: rgba(27, 42, 36, .5); }
.confirm-dialog { width: min(420px, 100%); padding: 24px; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-modal); }
.confirm-symbol, .confirm-kicker { display: none; }
.confirm-dialog h2 { font-family: var(--font-display); font-weight: 400; font-size: 24px; line-height: 1.25; }
.confirm-dialog p { margin-top: 8px; color: var(--ink-2); font-size: var(--text-14); line-height: 1.6; }
.confirm-fields { display: grid; gap: 6px; margin-top: 16px; text-align: left; }
.confirm-fields label { font-size: var(--text-13); }
.confirm-fields input { min-height: 44px; }
.confirm-feedback { margin-top: 10px; color: var(--red); font-size: var(--text-13); font-weight: 500; }
.confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
.confirm-actions .btn { min-height: 44px; }
.danger-mode .btn.primary.danger, .btn.primary.danger { color: #fff; background: var(--red); border-color: var(--red); }
.danger-mode .btn.primary.danger:hover, .btn.primary.danger:hover { background: #8d2b27; border-color: #8d2b27; }
@media (prefers-reduced-motion: no-preference) {
  .confirm-dialog { animation: dialogIn var(--dur) var(--ease-out); }
  @keyframes dialogIn { from { opacity: 0; transform: translateY(8px) scale(.98); } }
}

/* ---------- Bildirim ve açılış ---------- */
.app-notice {
  position: fixed; z-index: 1200; right: 20px; bottom: 20px; max-width: min(380px, calc(100vw - 32px)); padding: 12px 16px;
  padding-left: 34px; color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-pop); font-size: var(--text-14); font-weight: 500; line-height: 1.45;
}
.app-notice::before { content: ""; position: absolute; left: 14px; top: 19px; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.app-notice.error::before { background: var(--red); }
.boot-overlay { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; background: var(--canvas); }
.boot-card { width: min(340px, 100%); display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 32px 28px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.boot-mark { width: 44px; height: 44px; display: grid; place-items: center; color: var(--green-text); background: var(--green-soft); border-radius: var(--radius); font-size: var(--text-13); font-weight: 700; }
.boot-spinner { width: 22px; height: 22px; margin: 16px 0 12px; border: 2px solid var(--green-soft); border-top-color: var(--green); border-radius: 50%; animation: bootSpin .7s linear infinite; }
.boot-card b { font-size: var(--text-15); font-weight: 600; }
.boot-card p { color: var(--muted); font-size: var(--text-13); }
.boot-card .btn { margin-top: 14px; }
.boot-overlay.is-error .boot-spinner { animation: none; border-color: var(--red-line); border-top-color: var(--red); }
@keyframes bootSpin { to { transform: rotate(360deg); } }

/* ---------- Aktarım yardımcı sayfaları (sahibinden-*.html) ---------- */
body.import-guide-page { overflow: auto; font-size: var(--text-15); }
.import-guide { max-width: 900px; margin: 0 auto; padding: 36px 24px; }
.import-guide h1 { font-size: var(--text-28); line-height: 1.25; }
.import-guide .card, .capture-card, .chrome-card, .import-guide form { border-color: var(--line); border-radius: var(--radius); box-shadow: none; }
.import-guide p, .import-guide li { line-height: 1.6; }
.import-guide input:where(:not([type="checkbox"]):not([type="radio"])), .import-guide select, .import-guide textarea, .import-guide .btn { min-height: 48px; font-size: var(--text-16); }

/* ---------- Tablet: 761–900 px ---------- */
@media (max-width: 900px) {
  .app, body.nav-expanded .app { grid-template-columns: var(--rail-w) minmax(0, 1fr); grid-template-rows: 48px minmax(0, 1fr); }
  body:is(.dashboard-active, .workspace-page-active) .app, body.nav-expanded:is(.dashboard-active, .workspace-page-active) .app { grid-template-columns: var(--rail-w) minmax(0, 1fr); }
  .side-nav { grid-column: 1; grid-row: 1 / -1; }
  body.nav-expanded .side-nav { padding-inline: 10px; }
  body.nav-expanded .side-brand { justify-content: center; padding-left: 0; }
  body.nav-expanded .side-logo { display: grid; }
  body.nav-expanded .side-brand-copy, body.nav-expanded .side-collapse, body.nav-expanded .side-office, body.nav-expanded .side-goal { display: none; }
  body.nav-expanded .side-brand { flex-direction: row; padding: 0 2px; }
  body.nav-expanded .side-link span, body.nav-expanded .side-user > div, body.nav-expanded .side-logout span, body.nav-expanded .side-separator span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  body.nav-expanded .side-link, body.nav-expanded .side-user, body.nav-expanded .side-logout { justify-content: center; }
  body.nav-expanded .side-separator { border-top: 0; margin-top: 12px; padding-top: 0; min-height: 32px; }
  .workspace-overlay, body.nav-expanded .workspace-overlay { left: var(--rail-w); }
}

/* ---------- Telefon: ≤760 px ---------- */
@media (max-width: 760px) {
  :root { --gutter: 16px; --mobile-nav-height: calc(var(--dock-h) + env(safe-area-inset-bottom, 0px)); --control-height: 44px; }
  body { font-size: var(--text-15); }
  input:where(:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="file"])), select, textarea { font-size: var(--text-16); }
  .btn { min-height: 44px; }
  .btn.compact { min-height: 40px; }
  .btn.icon-only { width: 44px; }
  .mini { min-height: 40px; }
  .x { width: 44px; height: 44px; flex-basis: 44px; }
  .fbtn, .seg-btn, .tab { min-height: 40px; }
  .text-btn { min-height: 40px; }
  .app, body.nav-expanded .app, body:is(.dashboard-active, .workspace-page-active) .app, body.nav-expanded:is(.dashboard-active, .workspace-page-active) .app {
    display: flex; flex-direction: column; height: calc(var(--workspace-height, 100dvh) - var(--mobile-nav-height)); padding: 0; gap: 0;
  }
  body.keyboard-open .app { height: var(--workspace-height, 100dvh); }
  /* Sol çekmece */
  .side-nav {
    position: fixed; z-index: 70; left: 8px; top: calc(8px + env(safe-area-inset-top, 0px)); bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    width: min(320px, calc(100vw - 16px)); padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-modal);
    transform: translateX(calc(-100% - 16px)); transition: transform 220ms var(--ease-out); visibility: hidden;
  }
  body.nav-open .side-nav { transform: translateX(0); visibility: visible; }
  .side-brand, body.nav-expanded .side-brand { justify-content: flex-start; gap: 10px; padding-left: 4px; }
  .side-logo, body.nav-expanded .side-logo { display: none; }
  .side-brand-copy, body.nav-expanded .side-brand-copy { display: block; }
  .side-office, body.nav-expanded .side-office { display: none; }
  .side-goal:not([hidden]), body.nav-expanded .side-goal:not([hidden]) { display: block; }
  .side-brand, body.nav-expanded .side-brand { flex-direction: row; align-items: center; padding: 0 4px; }
  .side-brand-copy img { width: 140px; }
  .side-collapse, body.nav-expanded .side-collapse { display: none; }
  .mobile-nav-close { display: grid; place-items: center; width: 44px; height: 44px; flex: 0 0 44px; margin-left: auto; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius-sm); }
  .mobile-nav-close svg { width: 18px; height: 18px; }
  .side-links { margin-top: 12px; overscroll-behavior: contain; }
  .side-link, .side-user, .side-logout, body.nav-expanded .side-link, body.nav-expanded .side-user, body.nav-expanded .side-logout { justify-content: flex-start; }
  .side-link span, .side-user > div, .side-logout span, .side-separator span,
  body.nav-expanded .side-link span, body.nav-expanded .side-user > div, body.nav-expanded .side-logout span, body.nav-expanded .side-separator span { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; }
  .side-link { min-height: 46px; }
  .side-link span b { font-size: var(--text-15); }
  .side-separator, body.nav-expanded .side-separator { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 10px; min-height: 40px; }
  .nav-scrim { position: fixed; z-index: 60; inset: 0; display: none; width: 100%; height: 100%; background: rgba(27, 42, 36, .4); }
  body.nav-open .nav-scrim { display: block; }
  body.nav-open { overflow: hidden; }
  .mobile-global-menu {
    position: fixed; z-index: 46; left: 12px; top: calc(12px + env(safe-area-inset-top, 0px)); width: 44px; height: 44px; display: grid; place-items: center;
    color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  }
  .mobile-global-menu svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
  body:not(.dashboard-active):not(.workspace-page-active) .mobile-global-menu { top: calc(60px + env(safe-area-inset-top, 0px)); }
  body.nav-open .mobile-global-menu { opacity: 0; pointer-events: none; }
  /* Alt dock */
  .mobile-dock {
    position: fixed; z-index: 45; inset: auto 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; height: var(--mobile-nav-height);
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px)); background: var(--surface); border-top: 1px solid var(--line);
  }
  .mobile-dock button { display: grid; place-items: center; align-content: center; gap: 3px; min-height: 52px; color: var(--muted); border-radius: var(--radius-sm); font-size: 11px; font-weight: 500; }
  .mobile-dock button i { width: 24px; height: 24px; display: grid; place-items: center; font-style: normal; }
  .mobile-dock button i svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .mobile-dock button.active { color: var(--green-text); background: var(--green-soft); font-weight: 600; }
  .mobile-dock button span { line-height: 1; }
  body.keyboard-open .mobile-dock { display: none; }
  /* Sayfa çerçevesi */
  .workspace-overlay, body.nav-expanded .workspace-overlay { left: 0; bottom: var(--mobile-nav-height); }
  .workspace-overlay > .card { padding-bottom: 28px; gap: 16px; }
  .workspace-overlay > .card > .row-between:first-child { min-height: 68px; padding: 10px 12px 10px 68px; gap: 8px; }
  .workspace-overlay .brand { font-size: var(--text-18); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .workspace-overlay .draft-lead { display: none; }
  .workspace-overlay .modal-head-actions .btn.compact { padding-inline: 10px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { min-height: 68px; padding: 12px 14px; }
  .stat:nth-child(2n) { border-right: 0; }
  .stat:nth-last-child(n+3) { border-bottom: 1px solid var(--line); }
  .stat b { font-size: var(--text-18); }
  .stats:has(> :nth-child(3):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stats:has(> :nth-child(3):last-child) .stat { padding: 12px 10px; border-bottom: 0; border-right: 1px solid var(--line); }
  .stats:has(> :nth-child(3):last-child) .stat:last-child { border-right: 0; }
  .form-two { grid-template-columns: 1fr; }
  .panel-box { padding: 16px; }
  /* Giriş */
  #authOverlay { padding: 0; background: var(--surface); }
  .auth-shell { min-height: 100dvh; grid-template-columns: 1fr; border: 0; border-radius: 0; box-shadow: none; }
  .auth-showcase { display: none; }
  .auth-card { justify-content: flex-start; padding: 32px 24px 40px; }
  .mobile-brand { display: block; margin: 8px 0 24px; }
  .auth-heading h2 { font-size: var(--text-22); }
  .overlay { padding: 12px; }
  .card { padding: 22px 18px; }
  .card.wide, .card.board { max-height: calc(100dvh - 24px); }
  .confirm-actions { grid-template-columns: 1fr; }
  .confirm-actions .btn.primary { grid-row: 1; }
  .app-notice { right: 12px; left: 12px; bottom: calc(var(--mobile-nav-height) + 12px); max-width: none; }
}
@media (max-width: 760px) and (max-height: 500px) {
  .side-nav { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
