/* ==========================================================================
   BeSoft — tasarım sistemi
   Sade, sıcak nötrler + şampanya/bronz vurgu. Açık ve koyu tema.
   ========================================================================== */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/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: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/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 {
  color-scheme: light;
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'SF Mono', 'Cascadia Code', Menlo, Consolas, monospace;

  --bg: #f6f5f1;
  --surface: #ffffff;
  --surface-2: #f9f8f5;
  --surface-3: #f2f0eb;
  --surface-sunken: #efede7;
  --border: #e8e5de;
  --border-strong: #dcd8ce;
  --border-hover: #c9c4b8;
  --text: #1b1a17;
  --text-2: #56534c;
  --text-3: #8a867d;
  --text-4: #aeaaa0;
  --ink: #17181b;
  --ink-hover: #2c2e33;
  --on-ink: #ffffff;
  --gold: #a4804a;
  --gold-strong: #8a6a37;
  --gold-soft: #f5eee2;
  --gold-line: #e6d7bd;
  --focus-ring: 0 0 0 3px rgba(164, 128, 74, 0.22);

  --green: #1d7a4b;
  --green-soft: #e6f4ec;
  --red: #b3372b;
  --red-soft: #fbece9;
  --amber: #a5680f;
  --amber-soft: #fbf1de;
  --blue: #2757c2;
  --blue-soft: #eaf0fc;
  --slate: #5d6472;
  --slate-soft: #eef0f3;
  --wa: #1faa59;
  --wa-strong: #128c4a;
  --wa-soft: #e5f7ec;

  --chat-bg: #efe8dd;
  --chat-bubble: #d9fdd3;
  --chat-text: #111b21;
  --chat-meta: #667781;
  --chat-tick: #53bdeb;

  --shadow-xs: 0 1px 1px rgba(24, 20, 12, 0.04);
  --shadow-sm: 0 1px 2px rgba(24, 20, 12, 0.05), 0 0 0 0.5px rgba(24, 20, 12, 0.02);
  --shadow: 0 1px 2px rgba(24, 20, 12, 0.04), 0 6px 20px -6px rgba(24, 20, 12, 0.08);
  --shadow-lg: 0 24px 64px -12px rgba(24, 20, 12, 0.22), 0 4px 12px rgba(24, 20, 12, 0.06);
  --shadow-pop: 0 12px 32px -8px rgba(24, 20, 12, 0.2), 0 2px 6px rgba(24, 20, 12, 0.06), 0 0 0 1px rgba(24, 20, 12, 0.05);

  --r-xs: 6px;
  --r-sm: 8px;
  --r: 10px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;

  --sidebar-w: 256px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #0f1012;
  --surface: #17181b;
  --surface-2: #1b1c20;
  --surface-3: #222328;
  --surface-sunken: #131416;
  --border: #2a2b30;
  --border-strong: #34363c;
  --border-hover: #464850;
  --text: #eeede9;
  --text-2: #b8b5ad;
  --text-3: #8a877f;
  --text-4: #66645e;
  --ink: #eeede9;
  --ink-hover: #ffffff;
  --on-ink: #151619;
  --gold: #c9a66d;
  --gold-strong: #dcbb84;
  --gold-soft: #2a2419;
  --gold-line: #4a3e29;
  --focus-ring: 0 0 0 3px rgba(201, 166, 109, 0.28);

  --green: #4cc38a;
  --green-soft: #14271d;
  --red: #f0766a;
  --red-soft: #2e1714;
  --amber: #e5a94a;
  --amber-soft: #2c2213;
  --blue: #7ea4f5;
  --blue-soft: #172039;
  --slate: #a1a8b5;
  --slate-soft: #22252b;
  --wa: #25d366;
  --wa-strong: #3ddc7e;
  --wa-soft: #11261a;

  --chat-bg: #0b141a;
  --chat-bubble: #005c4b;
  --chat-text: #e9edef;
  --chat-meta: #8ea4ad;
  --chat-tick: #53bdeb;

  --shadow-xs: 0 1px 1px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px -8px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 24px 64px -12px rgba(0, 0, 0, 0.7), 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-pop: 0 12px 32px -8px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.06);
}

/* ---------- Temel ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: -0.006em;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv11', 'ss03';
}
h1, h2, h3, h4 { margin: 0; font-weight: 620; letter-spacing: -0.02em; line-height: 1.25; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; }
::selection { background: rgba(164, 128, 74, 0.22); }
[hidden] { display: none !important; }
.icon { flex-shrink: 0; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-3); }
.subtle { color: var(--text-2); }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--r-sm); }

kbd {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 5px;
  font: 500 11px/1 var(--font);
  color: var(--text-3);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 5px;
}

/* ---------- Uygulama iskeleti ---------- */
.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.nav-overlay { display: none; }

.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  padding: 18px 14px 14px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  z-index: 40;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 2px 6px 18px; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 11px;
  display: grid; place-items: center;
  font-weight: 700; font-size: 14px; letter-spacing: 0.02em; color: #fff;
  background: linear-gradient(145deg, #c19b62 0%, #9a763f 55%, #7d5e2e 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 2px 6px -2px rgba(125, 94, 46, 0.55);
  flex-shrink: 0;
}
.brand-mark svg { width: 62%; height: 62%; }
.brand-name { display: block; font-size: 16px; line-height: 1.15; }
.brand-sub { display: block; font-size: 11.5px; color: var(--text-3); letter-spacing: 0.02em; margin-top: 1px; white-space: nowrap; }
.wordmark { font-weight: 700; letter-spacing: -0.03em; color: var(--text); }
.wordmark span { color: var(--gold-strong); }
:root[data-theme='dark'] .wordmark span { color: var(--gold); }

.nav-cta { margin: 2px 0 14px; }
.nav-cta .btn { width: 100%; justify-content: flex-start; }
.nav-cta .btn kbd { margin-left: auto; background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.16); color: rgba(255, 255, 255, 0.72); }
:root[data-theme='dark'] .nav-cta .btn kbd { background: rgba(0, 0, 0, 0.06); border-color: rgba(0, 0, 0, 0.14); color: rgba(0, 0, 0, 0.55); }

.nav-label { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-4); padding: 14px 10px 6px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  height: 38px; padding: 0 10px;
  border-radius: 10px;
  color: var(--text-2);
  font-weight: 520;
  transition: background 0.15s, color 0.15s;
  position: relative;
}
.nav-item .icon { color: var(--text-3); transition: color 0.15s; }
.nav-item:hover { background: var(--surface-3); color: var(--text); }
.nav-item.active { background: var(--surface-3); color: var(--text); font-weight: 600; }
.nav-item.active .icon { color: var(--gold); }
.nav-item .nav-count {
  margin-left: auto; min-width: 22px; height: 20px; padding: 0 6px;
  border-radius: 999px; display: grid; place-items: center;
  font-size: 11.5px; font-weight: 600; color: var(--amber); background: var(--amber-soft);
}
.nav-item .nav-dot { margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: var(--text-4); }
.nav-item .nav-dot.on { background: var(--wa); box-shadow: 0 0 0 3px var(--wa-soft); }
.nav-item .nav-dot.warn { background: var(--amber); box-shadow: 0 0 0 3px var(--amber-soft); }

.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.user-chip {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 8px; border-radius: 12px;
  text-align: left;
  transition: background 0.15s;
}
.user-chip:hover { background: var(--surface-3); }
.user-chip .who { min-width: 0; flex: 1; }
.user-chip .who b { display: block; font-weight: 600; font-size: 13.5px; }
.user-chip .who span { display: block; font-size: 12px; color: var(--text-3); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: none; }
.view { flex: 1; }
.page { max-width: 1320px; margin: 0 auto; padding: 30px 36px 72px; }
.page-narrow { max-width: 1120px; }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-title { font-size: 26px; font-weight: 650; letter-spacing: -0.028em; }
.page-subtitle { color: var(--text-3); margin-top: 5px; font-size: 14px; }
.page-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold); margin-bottom: 6px; }

/* ---------- Avatar ---------- */
.avatar {
  --size: 32px;
  width: var(--size); height: var(--size); border-radius: 50%;
  display: inline-grid; place-items: center; flex-shrink: 0;
  font-size: calc(var(--size) * 0.38); font-weight: 650; letter-spacing: 0.01em;
  color: var(--gold-strong); background: var(--gold-soft);
  box-shadow: inset 0 0 0 1px var(--gold-line);
}
.avatar.sm { --size: 24px; }
.avatar.lg { --size: 40px; }
.avatar.xl { --size: 52px; }
.avatar.tone-1 { color: #8a6a37; background: #f5eee2; box-shadow: inset 0 0 0 1px #e8dac1; }
.avatar.tone-2 { color: #2f5c8a; background: #e8f0f8; box-shadow: inset 0 0 0 1px #d2e0ee; }
.avatar.tone-3 { color: #2e6b52; background: #e5f2ec; box-shadow: inset 0 0 0 1px #cfe5da; }
.avatar.tone-4 { color: #7b4a6b; background: #f5e9f1; box-shadow: inset 0 0 0 1px #e8d3e1; }
.avatar.tone-5 { color: #6b5b2e; background: #f1eedf; box-shadow: inset 0 0 0 1px #e1dcc2; }
.avatar.tone-6 { color: #4b5563; background: #eef0f3; box-shadow: inset 0 0 0 1px #dde1e6; }
:root[data-theme='dark'] .avatar { filter: saturate(0.9) brightness(0.92); }
:root[data-theme='dark'] .avatar.tone-1, :root[data-theme='dark'] .avatar { color: #e0c28f; background: #2a2419; box-shadow: inset 0 0 0 1px #4a3e29; }
:root[data-theme='dark'] .avatar.tone-2 { color: #9cc0ea; background: #17243a; box-shadow: inset 0 0 0 1px #26395a; }
:root[data-theme='dark'] .avatar.tone-3 { color: #8fd4b3; background: #13271f; box-shadow: inset 0 0 0 1px #21443a; }
:root[data-theme='dark'] .avatar.tone-4 { color: #e2a9cf; background: #2a1824; box-shadow: inset 0 0 0 1px #47293d; }
:root[data-theme='dark'] .avatar.tone-5 { color: #d8c98e; background: #26231a; box-shadow: inset 0 0 0 1px #433d29; }
:root[data-theme='dark'] .avatar.tone-6 { color: #b9c0cc; background: #22252b; box-shadow: inset 0 0 0 1px #363a42; }

/* ---------- Butonlar ---------- */
.btn {
  --h: 38px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h); padding: 0 15px;
  border-radius: var(--r);
  border: 1px solid transparent;
  font-weight: 560; font-size: 13.5px; letter-spacing: -0.005em;
  white-space: nowrap; user-select: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s, transform 0.08s, opacity 0.15s;
}
.btn:active:not(:disabled) { transform: translateY(0.5px) scale(0.995); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--ink); color: var(--on-ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 1px 2px rgba(0, 0, 0, 0.18), 0 2px 8px -2px rgba(0, 0, 0, 0.18); }
.btn-primary:hover:not(:disabled) { background: var(--ink-hover); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); box-shadow: var(--shadow-xs); }
.btn-secondary:hover:not(:disabled) { background: var(--surface-2); border-color: var(--border-hover); }
.btn-ghost { color: var(--text-2); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-3); color: var(--text); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover:not(:disabled) { filter: brightness(1.06); }
.btn-danger-ghost { color: var(--red); }
.btn-danger-ghost:hover:not(:disabled) { background: var(--red-soft); }
.btn-wa { background: var(--wa-strong); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 1px 2px rgba(18, 140, 74, 0.35); }
:root[data-theme='dark'] .btn-wa { background: #1c9a53; }
.btn-wa:hover:not(:disabled) { filter: brightness(1.06); }
.btn-gold { background: var(--gold); color: #fff; }
.btn-sm { --h: 32px; padding: 0 11px; font-size: 13px; border-radius: 9px; gap: 6px; }
.btn-xs { --h: 26px; padding: 0 8px; font-size: 12.5px; border-radius: 7px; gap: 5px; }
.btn-lg { --h: 46px; padding: 0 20px; font-size: 14.5px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn-icon { width: var(--h); padding: 0; }
.btn .spinner { width: 15px; height: 15px; }
.btn-group { display: inline-flex; gap: 8px; }

.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: spin 0.7s linear infinite; opacity: 0.8; flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

.link { color: var(--gold-strong); font-weight: 560; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
:root[data-theme='dark'] .link { color: var(--gold); }

/* ---------- Kartlar ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); min-height: 60px; }
.card-header.plain { border-bottom: 0; padding-bottom: 4px; }
.card-title { font-size: 15px; font-weight: 620; letter-spacing: -0.012em; display: flex; align-items: center; gap: 9px; }
.card-title .icon { color: var(--text-3); }
.card-sub { font-size: 13px; color: var(--text-3); margin-top: 2px; font-weight: 400; letter-spacing: 0; }
.card-body { padding: 20px; }
.card-body.tight { padding: 12px; }
.card-footer { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.section-title { font-size: 13px; font-weight: 620; color: var(--text); display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.section-title .icon { color: var(--text-3); }
.section-title .hint { font-weight: 450; color: var(--text-3); }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.divider { height: 1px; background: var(--border); margin: 18px 0; border: 0; }

/* ---------- Form ---------- */
.form-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.span-all { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.label { display: block; font-size: 13px; font-weight: 580; color: var(--text-2); line-height: 1.4; }
.label .req { color: var(--gold); font-weight: 700; margin-left: 2px; }
.label .lbl-hint { color: var(--text-4); font-weight: 450; margin-left: 3px; }
.label .auto-tag { float: right; margin-left: 8px; }
.input, .select, .textarea {
  width: 100%; height: 42px; padding: 0 13px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: var(--r);
  font-size: 14px; letter-spacing: -0.005em;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  box-shadow: var(--shadow-xs);
}
.input::placeholder, .textarea::placeholder { color: var(--text-4); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--border-hover); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--gold); box-shadow: var(--focus-ring); }
.input.invalid, .select.invalid, .textarea.invalid { border-color: var(--red); box-shadow: 0 0 0 3px rgba(179, 55, 43, 0.12); }
.input.is-auto, .select.is-auto { background: var(--gold-soft); border-color: var(--gold-line); }
.input-sm { height: 34px; font-size: 13.5px; border-radius: 9px; padding: 0 11px; }
.input-lg { height: 48px; font-size: 16px; border-radius: 12px; }
.textarea { height: auto; min-height: 92px; padding: 11px 13px; resize: vertical; line-height: 1.5; }
.textarea.autosize { resize: none; overflow: hidden; }
.select {
  appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238a867d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center;
}
.field-error { font-size: 12.5px; color: var(--red); display: flex; align-items: center; gap: 5px; }
.field-hint { font-size: 12.5px; color: var(--text-3); }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap > .icon { position: absolute; left: 13px; color: var(--text-3); pointer-events: none; }
.input-wrap > .input { padding-left: 40px; }
.input-wrap .suffix { position: absolute; right: 12px; color: var(--text-3); font-size: 13px; pointer-events: none; }
.input-wrap .suffix-btn { position: absolute; right: 6px; }
.input-wrap .input.has-suffix { padding-right: 44px; }

.check { display: inline-flex; align-items: flex-start; gap: 10px; cursor: pointer; user-select: none; }
.check input { appearance: none; margin: 1px 0 0; width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--border-hover); background: var(--surface); display: grid; place-items: center; flex-shrink: 0; transition: background 0.15s, border-color 0.15s; cursor: pointer; }
.check input:checked { background: var(--ink); border-color: var(--ink); }
.check input:checked::after { content: ''; width: 5px; height: 9px; border: solid var(--on-ink); border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }
.check input:focus-visible { box-shadow: var(--focus-ring); }
.check .check-text b { display: block; font-weight: 560; font-size: 13.5px; }
.check .check-text span { display: block; font-size: 12.5px; color: var(--text-3); }

.switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; user-select: none; }
.switch input { appearance: none; margin: 0; width: 38px; height: 22px; border-radius: 999px; background: var(--border-strong); position: relative; transition: background 0.2s; cursor: pointer; flex-shrink: 0; }
.switch input::after { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); transition: transform 0.22s var(--ease); }
.switch input:checked { background: var(--ink); }
.switch input:checked::after { transform: translateX(16px); }
.switch input:checked.wa { background: var(--wa-strong); }
.switch input:focus-visible { box-shadow: var(--focus-ring); }
:root[data-theme='dark'] .switch input:checked::after { background: var(--on-ink); }
:root[data-theme='dark'] .switch input:checked.wa::after { background: #fff; }
.switch-text b { display: block; font-weight: 580; font-size: 13.5px; }
.switch-text span { display: block; font-size: 12.5px; color: var(--text-3); }

/* Segmentli seçim */
.segmented { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; padding: 3px; background: var(--surface-sunken); border-radius: 12px; border: 1px solid var(--border); }
.segmented button { height: 34px; padding: 0 16px; border-radius: 9px; font-weight: 560; color: var(--text-2); display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: background 0.15s, color 0.15s, box-shadow 0.15s; }
.segmented button:hover { color: var(--text); }
.segmented button[aria-pressed='true'] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(24, 20, 12, 0.1), 0 0 0 1px var(--border); }
.segmented button[aria-pressed='true'] .icon { color: var(--gold); }
:root[data-theme='dark'] .segmented button[aria-pressed='true'] { background: var(--surface-3); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 0 0 1px var(--border-hover); }
:root[data-theme='dark'] .pill-tabs button[aria-pressed='true'] { background: var(--surface-3); box-shadow: 0 0 0 1px var(--border-hover); }
.segmented.lg button { height: 42px; font-size: 14.5px; padding: 0 22px; }
.segmented.sm button { height: 28px; padding: 0 11px; font-size: 12.5px; }
.segmented.block { display: grid; width: 100%; }
.segmented.invalid { border-color: var(--red); box-shadow: 0 0 0 3px rgba(179, 55, 43, 0.12); }

/* Seçim çipleri */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-2); font-weight: 530; font-size: 13.5px;
  transition: border-color 0.15s, background 0.15s, color 0.15s, box-shadow 0.15s;
  box-shadow: var(--shadow-xs);
}
.chip:hover { border-color: var(--border-hover); color: var(--text); }
.chip[aria-pressed='true'] { background: var(--ink); border-color: var(--ink); color: var(--on-ink); box-shadow: 0 2px 8px -3px rgba(0, 0, 0, 0.35); }
.chip.has-avatar { padding-left: 5px; }
.chip.has-avatar .avatar { --size: 26px; }
.chip[aria-pressed='true'] .avatar { background: rgba(255, 255, 255, 0.16); color: #fff; box-shadow: none; filter: none; }
:root[data-theme='dark'] .chip[aria-pressed='true'] .avatar { background: rgba(0, 0, 0, 0.12); color: var(--on-ink); }
.chips.invalid .chip { border-color: rgba(179, 55, 43, 0.45); }
.chip-sm { height: 28px; padding: 0 10px; font-size: 12.5px; }

/* ---------- Rozetler ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 9px;
  border-radius: 999px;
  font-size: 12px; font-weight: 580; white-space: nowrap;
  background: var(--surface-3); color: var(--text-2);
}
.badge .icon { width: 13px; height: 13px; }
.badge.dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.outline { background: transparent; box-shadow: inset 0 0 0 1px var(--border-strong); }
.badge.sm { height: 20px; padding: 0 7px; font-size: 11.5px; }
.tone-amber { color: var(--amber); background: var(--amber-soft); }
.tone-green { color: var(--green); background: var(--green-soft); }
.tone-red { color: var(--red); background: var(--red-soft); }
.tone-blue { color: var(--blue); background: var(--blue-soft); }
.tone-slate { color: var(--slate); background: var(--slate-soft); }
.tone-gold { color: var(--gold-strong); background: var(--gold-soft); }
.tone-wa { color: var(--wa-strong); background: var(--wa-soft); }
.tone-ink { color: var(--on-ink); background: var(--ink); }
:root[data-theme='dark'] .tone-gold { color: var(--gold); }
.type-satilik { color: var(--gold-strong); background: var(--gold-soft); }
.type-kiralik { color: var(--blue); background: var(--blue-soft); }
:root[data-theme='dark'] .type-satilik { color: var(--gold); }

.tag { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 520; color: var(--text-2); background: var(--surface-3); white-space: nowrap; }
.tag .icon { width: 12px; height: 12px; color: var(--text-3); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.auto-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 560; color: var(--gold-strong); }
.auto-tag .icon { width: 12px; height: 12px; }
:root[data-theme='dark'] .auto-tag { color: var(--gold); }

/* ---------- Uyarı kutuları ---------- */
.alert { display: flex; gap: 11px; padding: 12px 14px; border-radius: var(--r-md); font-size: 13.5px; line-height: 1.45; border: 1px solid transparent; }
.alert > .icon { margin-top: 1px; }
.alert b { font-weight: 600; }
.alert.info { background: var(--blue-soft); color: var(--blue); }
.alert.warn { background: var(--amber-soft); color: var(--amber); }
.alert.error { background: var(--red-soft); color: var(--red); }
.alert.success { background: var(--green-soft); color: var(--green); }
.alert.neutral { background: var(--surface-2); color: var(--text-2); border-color: var(--border); }
.alert.gold { background: var(--gold-soft); color: var(--gold-strong); border-color: var(--gold-line); }
.alert .alert-body { flex: 1; min-width: 0; }
.alert .alert-actions { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }

/* ---------- Tablo ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; }
.table th {
  text-align: left; white-space: nowrap;
  font-size: 11.5px; font-weight: 620; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--text-3); background: var(--surface-2);
  padding: 11px 16px; border-bottom: 1px solid var(--border);
}
.table th:first-child { border-top-left-radius: var(--r-lg); }
.table th:last-child { border-top-right-radius: var(--r-lg); }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr.clickable { cursor: pointer; transition: background 0.12s; }
.table tbody tr.clickable:hover { background: var(--surface-2); }
.table tbody tr.selected { background: var(--gold-soft); }
.table .right { text-align: right; }
.table .center { text-align: center; }
.table .cell-main { font-weight: 580; color: var(--text); }
.table .cell-sub { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.table.compact td { padding: 10px 16px; }

/* ---------- Boş durum ---------- */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 56px 24px; }
.empty-icon { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; color: var(--gold); background: var(--gold-soft); box-shadow: inset 0 0 0 1px var(--gold-line); margin-bottom: 16px; }
.empty h3 { font-size: 16px; font-weight: 620; }
.empty p { color: var(--text-3); margin-top: 6px; max-width: 380px; }
.empty .btn { margin-top: 18px; }
.empty.sm { padding: 32px 16px; }
.empty.sm .empty-icon { width: 44px; height: 44px; border-radius: 13px; }

/* ---------- İskelet yükleme ---------- */
.skeleton { background: linear-gradient(90deg, var(--surface-3) 0%, var(--surface-2) 50%, var(--surface-3) 100%); background-size: 200% 100%; animation: shimmer 1.4s ease-in-out infinite; border-radius: 8px; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.sk-line { height: 12px; }
.sk-block { height: 96px; border-radius: var(--r-lg); }

/* ---------- Açılır menü / popover ---------- */
.popover {
  position: fixed; z-index: 200;
  min-width: 220px; max-width: min(360px, calc(100vw - 24px));
  background: var(--surface); border-radius: 14px;
  box-shadow: var(--shadow-pop);
  padding: 6px;
  opacity: 0; transform: translateY(-4px) scale(0.98); transform-origin: top left;
  transition: opacity 0.14s, transform 0.16s var(--ease);
}
.popover.open { opacity: 1; transform: none; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 9px; font-size: 13.5px; color: var(--text); text-align: left; }
.menu-item:hover, .menu-item.focused { background: var(--surface-3); }
.menu-item .icon { color: var(--text-3); }
.menu-item.danger { color: var(--red); }
.menu-item.danger .icon { color: var(--red); }
.menu-item .menu-check { margin-left: auto; color: var(--gold); }
.menu-sep { height: 1px; background: var(--border); margin: 6px 4px; }
.menu-label { font-size: 11px; font-weight: 620; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-4); padding: 8px 10px 4px; }
.popover-search { padding: 4px 4px 6px; }
.popover-list { max-height: 280px; overflow-y: auto; }
.popover-footer { display: flex; justify-content: space-between; gap: 8px; padding: 8px 4px 2px; border-top: 1px solid var(--border); margin-top: 6px; }
.opt { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 9px; font-size: 13.5px; text-align: left; cursor: pointer; }
.opt:hover { background: var(--surface-3); }
.opt .box { width: 17px; height: 17px; border-radius: 5px; border: 1.5px solid var(--border-hover); display: grid; place-items: center; flex-shrink: 0; transition: background 0.12s, border-color 0.12s; }
.opt.on .box { background: var(--ink); border-color: var(--ink); }
.opt.on .box::after { content: ''; width: 4px; height: 8px; border: solid var(--on-ink); border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }
.opt.radio .box { border-radius: 50%; }
.opt.radio.on .box { background: var(--surface); border: 5px solid var(--ink); }
.opt.radio.on .box::after { display: none; }
.opt .opt-count { margin-left: auto; font-size: 12px; color: var(--text-4); }

/* ---------- Filtre çubuğu ---------- */
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.toolbar .search { flex: 1 1 280px; min-width: 220px; max-width: 420px; }
.search .input { padding-right: 40px; }
.search kbd { position: absolute; right: 11px; }
.filter-btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 38px; padding: 0 12px;
  border-radius: var(--r);
  border: 1px dashed var(--border-hover);
  color: var(--text-2); font-weight: 540; font-size: 13.5px;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  background: var(--surface);
}
.filter-btn:hover { background: var(--surface-2); color: var(--text); }
.filter-btn.active { border-style: solid; border-color: var(--gold-line); background: var(--gold-soft); color: var(--gold-strong); }
:root[data-theme='dark'] .filter-btn.active { color: var(--gold); }
.filter-btn .count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--gold); color: #fff; font-size: 11px; font-weight: 650; display: grid; place-items: center; }
.filter-btn .val { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { display: inline-flex; align-items: center; gap: 7px; height: 42px; padding: 0 12px; color: var(--text-3); font-weight: 550; font-size: 13.5px; position: relative; white-space: nowrap; transition: color 0.15s; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); }
.tab.active::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px 2px 0 0; background: var(--ink); }
.tab .tab-count { font-size: 12px; font-weight: 600; color: var(--text-4); font-variant-numeric: tabular-nums; }
.tab.active .tab-count { color: var(--text-3); }
.tab .dot { width: 7px; height: 7px; border-radius: 50%; }

.pill-tabs { display: inline-flex; gap: 4px; padding: 3px; border-radius: 11px; background: var(--surface-sunken); border: 1px solid var(--border); }
.pill-tabs button { height: 30px; padding: 0 12px; border-radius: 8px; font-size: 13px; font-weight: 550; color: var(--text-2); }
.pill-tabs button[aria-pressed='true'] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(24, 20, 12, 0.1), 0 0 0 1px var(--border); }

.pagination { display: flex; align-items: center; gap: 8px; }
.pagination .info { color: var(--text-3); font-size: 13px; }

/* ---------- Çekmece ---------- */
.overlay { position: fixed; inset: 0; z-index: 100; background: rgba(20, 18, 14, 0.32); opacity: 0; transition: opacity 0.22s; backdrop-filter: blur(1.5px); }
.overlay.open { opacity: 1; }
:root[data-theme='dark'] .overlay { background: rgba(0, 0, 0, 0.55); }
.drawer {
  position: fixed; z-index: 101; top: 0; right: 0; bottom: 0;
  width: min(600px, 100vw);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
  transform: translateX(104%);
  transition: transform 0.32s var(--ease);
}
.drawer.open { transform: none; }
.drawer-header { display: flex; align-items: flex-start; gap: 12px; padding: 20px 22px 16px; border-bottom: 1px solid var(--border); }
.drawer-body { flex: 1; overflow-y: auto; padding: 22px; overscroll-behavior: contain; }
.drawer-footer { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; background: var(--surface); }
.drawer-section + .drawer-section { margin-top: 26px; }

/* ---------- Modal ---------- */
.modal-root > .overlay { z-index: 149; }
.modal-wrap { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; padding: 20px; overflow-y: auto; }
.modal {
  width: min(480px, 100%);
  background: var(--surface); border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(8px) scale(0.985);
  transition: opacity 0.18s, transform 0.22s var(--ease);
  display: flex; flex-direction: column; max-height: calc(100vh - 40px);
}
.modal.wide { width: min(640px, 100%); }
.modal.open { opacity: 1; transform: none; }
.modal-header { padding: 22px 24px 6px; display: flex; align-items: flex-start; gap: 14px; }
.modal-header h2 { font-size: 18px; }
.modal-header p { color: var(--text-3); margin-top: 4px; font-size: 13.5px; }
.modal-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; }
.modal-body { padding: 16px 24px; overflow-y: auto; }
.modal-footer { padding: 14px 24px 20px; display: flex; justify-content: flex-end; gap: 10px; }
.modal-close { margin-left: auto; margin-top: -4px; margin-right: -8px; }

/* ---------- Bildirimler ---------- */
.toasts { position: fixed; z-index: 300; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; pointer-events: none; }
.toast {
  pointer-events: auto;
  display: flex; align-items: center; gap: 11px;
  min-width: 280px; max-width: 440px;
  padding: 12px 12px 12px 14px;
  border-radius: 14px;
  background: #1b1c20; color: #f3f2ee;
  box-shadow: 0 18px 40px -10px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.05);
  font-size: 13.5px;
  opacity: 0; transform: translateY(10px) scale(0.98);
  transition: opacity 0.2s, transform 0.26s var(--ease);
}
:root[data-theme='dark'] .toast { background: #26272c; }
.toast.open { opacity: 1; transform: none; }
.toast .toast-icon { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; }
.toast.success .toast-icon { background: rgba(76, 195, 138, 0.16); color: #5fd49a; }
.toast.error .toast-icon { background: rgba(240, 118, 106, 0.16); color: #f38a7f; }
.toast.info .toast-icon { background: rgba(201, 166, 109, 0.18); color: #d9b57a; }
.toast.wa .toast-icon { background: rgba(37, 211, 102, 0.16); color: #3ddc7e; }
.toast .toast-body { flex: 1; min-width: 0; }
.toast .toast-body b { display: block; font-weight: 600; }
.toast .toast-body span { display: block; color: #b9b7b0; font-size: 12.5px; margin-top: 1px; }
.toast .toast-action { color: #e2c48f; font-weight: 600; padding: 6px 8px; border-radius: 8px; white-space: nowrap; }
.toast .toast-action:hover { background: rgba(255, 255, 255, 0.08); }
.toast .toast-close { color: #8f8d86; padding: 4px; border-radius: 6px; }
.toast .toast-close:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }

/* ---------- WhatsApp önizleme ---------- */
.wa-chat {
  position: relative;
  border-radius: 14px;
  padding: 18px 14px 16px;
  background-color: var(--chat-bg);
  background-image: radial-gradient(rgba(120, 100, 70, 0.09) 1px, transparent 1.2px);
  background-size: 14px 14px;
  min-height: 150px;
  overflow: hidden;
}
:root[data-theme='dark'] .wa-chat { background-image: radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1.2px); }
.wa-chat-head { display: flex; align-items: center; gap: 10px; margin: -18px -14px 14px; padding: 10px 14px; background: rgba(255, 255, 255, 0.55); backdrop-filter: blur(6px); border-bottom: 1px solid rgba(0, 0, 0, 0.05); }
:root[data-theme='dark'] .wa-chat-head { background: rgba(32, 44, 51, 0.9); border-bottom-color: rgba(255, 255, 255, 0.05); }
.wa-chat-head .wa-av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #dfe5e7; color: #fff; }
:root[data-theme='dark'] .wa-chat-head .wa-av { background: #6a7175; }
.wa-chat-head b { display: block; font-size: 13px; font-weight: 600; color: var(--chat-text); }
.wa-chat-head span { display: block; font-size: 11.5px; color: var(--chat-meta); }
.wa-bubble {
  position: relative;
  margin-left: auto;
  width: fit-content; max-width: 92%;
  padding: 7px 9px 7px 10px;
  border-radius: 9px 0 9px 9px;
  background: var(--chat-bubble);
  color: var(--chat-text);
  font-size: 14px; line-height: 1.38;
  white-space: pre-wrap; word-break: break-word;
  box-shadow: 0 1px 0.5px rgba(11, 20, 26, 0.13);
  letter-spacing: 0;
}
.wa-bubble::after {
  content: ''; position: absolute; top: 0; right: -8px;
  width: 8px; height: 13px;
  background: var(--chat-bubble);
  clip-path: polygon(0 0, 100% 0, 0 100%);
}
.wa-bubble .phone-line { color: #027eb5; }
:root[data-theme='dark'] .wa-bubble .phone-line { color: #53bdeb; }
.wa-meta { float: right; display: inline-flex; align-items: center; gap: 3px; margin: 6px 0 -4px 14px; font-size: 11px; color: var(--chat-meta); line-height: 1; }
.wa-meta .icon { color: var(--chat-tick); }
.wa-bubble.placeholder { color: var(--chat-meta); font-style: italic; }
.wa-edited { font-style: italic; margin-right: 2px; }

/* ---------- KPI ---------- */
.kpi { padding: 18px 20px 18px; display: flex; flex-direction: column; min-height: 132px; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; }
.kpi-label { font-size: 13px; font-weight: 550; color: var(--text-2); }
.kpi-icon { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: var(--gold-strong); background: var(--gold-soft); box-shadow: inset 0 0 0 1px var(--gold-line); }
:root[data-theme='dark'] .kpi-icon { color: var(--gold); }
.kpi-value { font-size: 32px; font-weight: 650; letter-spacing: -0.035em; margin-top: 10px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi-value small { font-size: 18px; font-weight: 600; color: var(--text-3); margin-left: 2px; letter-spacing: -0.01em; }
.kpi-foot { margin-top: auto; padding-top: 8px; font-size: 12.5px; color: var(--text-3); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.delta { display: inline-flex; align-items: center; gap: 2px; font-weight: 620; font-size: 12px; padding: 1px 6px; border-radius: 6px; }
.delta.up { color: var(--green); background: var(--green-soft); }
.delta.down { color: var(--red); background: var(--red-soft); }
.delta.flat { color: var(--text-3); background: var(--surface-3); }

/* ---------- Grafikler ---------- */
.chart { position: relative; }
.chart svg { width: 100%; height: auto; overflow: visible; }
.chart .gridline { stroke: var(--border); stroke-dasharray: 2 4; }
.chart .axis-label { fill: var(--text-4); font-size: 11px; font-family: var(--font); }
.chart .bar-sale { fill: var(--ink); }
.chart .bar-rent { fill: var(--gold); }
.chart .bar-hit { fill: transparent; cursor: pointer; }
.chart .bar-group:hover .bar-sale { fill: var(--ink-hover); }
.chart .bar-group.dim .bar-sale, .chart .bar-group.dim .bar-rent { opacity: 0.35; }
.chart-tip {
  position: absolute; z-index: 5; pointer-events: none;
  background: #1b1c20; color: #f3f2ee; border-radius: 10px; padding: 8px 11px;
  font-size: 12.5px; box-shadow: 0 10px 24px -8px rgba(0, 0, 0, 0.45);
  transform: translate(-50%, calc(-100% - 10px)); white-space: nowrap;
  opacity: 0; transition: opacity 0.12s;
}
.chart-tip.show { opacity: 1; }
.chart-tip b { display: block; font-weight: 600; margin-bottom: 3px; }
.chart-tip .li { display: flex; align-items: center; gap: 7px; color: #cfcdc6; }
.chart-tip .sw { width: 8px; height: 8px; border-radius: 2px; }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }

.hbar-list { display: flex; flex-direction: column; gap: 14px; }
.hbar-row .hbar-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 13.5px; margin-bottom: 7px; }
.hbar-row .hbar-top b { font-weight: 560; }
.hbar-row .hbar-top span { color: var(--text-3); font-variant-numeric: tabular-nums; font-size: 12.5px; }
.hbar-track { height: 7px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.hbar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--gold) 0%, #c7a36c 100%); transition: width 0.6s var(--ease); }
.stackbar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--surface-3); gap: 2px; }
.stackbar > span { height: 100%; transition: width 0.6s var(--ease); }
.fill-amber { background: var(--amber); }
.fill-blue { background: var(--blue); }
.fill-green { background: var(--green); }
.fill-red { background: var(--red); }
.fill-slate { background: var(--slate); }

.status-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin-top: 16px; }
.status-legend .it { display: flex; align-items: center; gap: 9px; font-size: 13px; }
.status-legend .it i { width: 8px; height: 8px; border-radius: 50%; }
.status-legend .it b { margin-left: auto; font-weight: 620; font-variant-numeric: tabular-nums; }

/* ---------- Listeler ---------- */
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--border); transition: background 0.12s; }
.list-item:last-child { border-bottom: 0; }
a.list-item:hover, button.list-item:hover, .list-item.clickable:hover { background: var(--surface-2); }
.list-item .li-main { flex: 1; min-width: 0; }
.list-item .li-title { font-weight: 580; display: flex; align-items: center; gap: 8px; }
.list-item .li-sub { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.list-item .li-side { text-align: right; font-size: 12.5px; color: var(--text-3); flex-shrink: 0; }
button.list-item { width: 100%; text-align: left; }

/* ---------- Zaman çizelgesi ---------- */
.timeline { position: relative; display: flex; flex-direction: column; gap: 16px; }
.timeline::before { content: ''; position: absolute; left: 13px; top: 8px; bottom: 8px; width: 1px; background: var(--border); }
.tl-item { display: flex; gap: 12px; position: relative; }
.tl-dot { width: 27px; height: 27px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); box-shadow: 0 0 0 1px var(--border-strong); color: var(--text-3); flex-shrink: 0; z-index: 1; }
.tl-dot .icon { width: 14px; height: 14px; }
.tl-dot.tone-green { box-shadow: 0 0 0 1px rgba(29, 122, 75, 0.25); }
.tl-dot.tone-red { box-shadow: 0 0 0 1px rgba(179, 55, 43, 0.25); }
.tl-dot.tone-wa { box-shadow: 0 0 0 1px rgba(18, 140, 74, 0.25); }
.tl-body { flex: 1; min-width: 0; padding-top: 3px; }
.tl-body .tl-title { font-size: 13.5px; }
.tl-body .tl-title b { font-weight: 600; }
.tl-body .tl-meta { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.tl-body .tl-note { margin-top: 8px; padding: 9px 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; font-size: 13px; color: var(--text-2); white-space: pre-wrap; }

/* ---------- Kayıt detayı ---------- */
.detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; }
.detail-grid > div { background: var(--surface); padding: 11px 13px; min-width: 0; }
.detail-grid dt { font-size: 11.5px; color: var(--text-3); font-weight: 560; margin-bottom: 3px; }
.detail-grid dd { margin: 0; font-weight: 560; font-size: 13.5px; overflow-wrap: anywhere; }
.detail-grid dd.empty-val { color: var(--text-4); font-weight: 450; }
.status-picker { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.status-opt {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  height: 70px; border-radius: 12px; border: 1px solid var(--border-strong);
  font-size: 12.5px; font-weight: 580; color: var(--text-2); background: var(--surface);
  transition: border-color 0.15s, background 0.15s, color 0.15s, box-shadow 0.15s;
  text-align: center; padding: 0 4px;
}
.status-opt:hover { border-color: var(--border-hover); color: var(--text); }
.status-opt .icon { color: var(--text-3); }
.status-opt[aria-pressed='true'] { border-color: transparent; box-shadow: 0 0 0 1.5px currentColor inset, 0 0 0 3px color-mix(in srgb, currentColor 16%, transparent); }
.status-opt[aria-pressed='true'] .icon { color: currentColor; }
.status-opt.tone-amber[aria-pressed='true'] { color: var(--amber); background: var(--amber-soft); }
.status-opt.tone-blue[aria-pressed='true'] { color: var(--blue); background: var(--blue-soft); }
.status-opt.tone-green[aria-pressed='true'] { color: var(--green); background: var(--green-soft); }
.status-opt.tone-red[aria-pressed='true'] { color: var(--red); background: var(--red-soft); }
.status-opt.tone-slate[aria-pressed='true'] { color: var(--slate); background: var(--slate-soft); }

.record-hero { display: flex; gap: 14px; align-items: flex-start; }
.record-hero h2 { font-size: 19px; letter-spacing: -0.02em; }
.record-hero .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; color: var(--text-3); font-size: 13px; }
.phone-link { font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.phone-link:hover { color: var(--gold-strong); }

.msg-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.msg-row:last-child { border-bottom: 0; }
.msg-row .target-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--wa-soft); color: var(--wa-strong); flex-shrink: 0; }
.msg-row .mr-main { flex: 1; min-width: 0; }
.msg-row .mr-main b { font-weight: 580; font-size: 13.5px; display: block; }
.msg-row .mr-main span { font-size: 12.5px; color: var(--text-3); display: block; }
.msg-row .mr-main .err { color: var(--red); }

/* ---------- Kayıt formu ---------- */
.form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 22px; align-items: start; }
.form-aside { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 16px; }
.form-card { padding: 22px 24px; }
.form-card + .form-card { margin-top: 16px; }
.form-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.form-card-head .step { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; font-weight: 650; font-size: 13px; color: var(--gold-strong); background: var(--gold-soft); box-shadow: inset 0 0 0 1px var(--gold-line); flex-shrink: 0; }
:root[data-theme='dark'] .form-card-head .step { color: var(--gold); }
.form-card-head h3 { font-size: 15.5px; font-weight: 620; }
.form-card-head p { font-size: 12.5px; color: var(--text-3); margin-top: 1px; }
.form-card-head .head-side { margin-left: auto; }
.price-hint { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-3); flex-wrap: wrap; }
.price-hint b { color: var(--text-2); font-weight: 600; }
.history-box { border: 1px solid var(--gold-line); background: var(--gold-soft); border-radius: var(--r-md); padding: 12px 14px; }
.history-box .hb-head { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--gold-strong); font-size: 13.5px; }
:root[data-theme='dark'] .history-box .hb-head { color: var(--gold); }
.history-box .hb-item { display: flex; align-items: center; gap: 10px; padding: 8px 0 0; font-size: 13px; }
.history-box .hb-item + .hb-item { border-top: 1px dashed var(--gold-line); margin-top: 8px; }
.history-box .hb-item .hb-desc { flex: 1; min-width: 0; color: var(--text-2); }
.detected { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.detected .lbl { font-size: 12px; color: var(--gold-strong); font-weight: 600; display: inline-flex; align-items: center; gap: 5px; margin-right: 2px; }
:root[data-theme='dark'] .detected .lbl { color: var(--gold); }
.detected .tag { background: var(--gold-soft); color: var(--gold-strong); box-shadow: inset 0 0 0 1px var(--gold-line); }
:root[data-theme='dark'] .detected .tag { color: var(--gold); }
.suffix-chips { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.target-list { display: flex; flex-direction: column; gap: 6px; }
.target-opt { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 11px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; transition: border-color 0.15s, background 0.15s; user-select: none; }
.target-opt:hover { border-color: var(--border-hover); }
.target-opt.on { border-color: rgba(18, 140, 74, 0.45); background: var(--wa-soft); }
.target-opt .t-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-3); flex-shrink: 0; }
.target-opt.on .t-ic { background: var(--wa-strong); color: #fff; }
.target-opt .t-main { flex: 1; min-width: 0; }
.target-opt .t-main b { display: block; font-size: 13.5px; font-weight: 580; }
.target-opt .t-main span { display: block; font-size: 12px; color: var(--text-3); }
.target-opt .box { width: 18px; height: 18px; border-radius: 6px; border: 1.5px solid var(--border-hover); display: grid; place-items: center; flex-shrink: 0; }
.target-opt.on .box { background: var(--wa-strong); border-color: var(--wa-strong); }
.target-opt.on .box::after { content: ''; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }
.conn-line { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-3); }
.conn-line .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-4); flex-shrink: 0; }
.conn-line .dot.on { background: var(--wa); box-shadow: 0 0 0 3px var(--wa-soft); }
.conn-line .dot.warn { background: var(--amber); box-shadow: 0 0 0 3px var(--amber-soft); }
.shortcut-hint { display: flex; align-items: center; justify-content: center; gap: 5px; font-size: 12px; color: var(--text-3); margin-top: 10px; }

/* ---------- WhatsApp sayfası ---------- */
.qr-frame { width: 256px; height: 256px; border-radius: 18px; padding: 14px; background: #fff; box-shadow: 0 0 0 1px var(--border), var(--shadow); display: grid; place-items: center; position: relative; }
.qr-frame img { width: 100%; height: 100%; image-rendering: pixelated; }
.qr-frame .qr-logo { position: absolute; width: 44px; height: 44px; border-radius: 12px; background: #fff; display: grid; place-items: center; box-shadow: 0 0 0 4px #fff; }
.qr-frame .qr-logo span { width: 36px; height: 36px; border-radius: 10px; background: var(--wa-strong); display: grid; place-items: center; color: #fff; }
.qr-placeholder { width: 256px; height: 256px; border-radius: 18px; border: 1.5px dashed var(--border-hover); display: grid; place-items: center; color: var(--text-3); background: var(--surface-2); }
.steps { display: flex; flex-direction: column; gap: 14px; counter-reset: step; }
.steps li { list-style: none; display: flex; gap: 12px; font-size: 13.5px; color: var(--text-2); }
.steps li::before { counter-increment: step; content: counter(step); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 650; color: var(--text); background: var(--surface-3); flex-shrink: 0; }
.steps li b { color: var(--text); font-weight: 600; }
.steps ol, ol.steps { padding: 0; margin: 0; }
.connect-hero { display: flex; gap: 28px; align-items: center; }
.wa-status-hero { display: flex; align-items: center; gap: 16px; }
.wa-status-hero .ring { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--wa-soft); color: var(--wa-strong); position: relative; }
.wa-status-hero .ring::after { content: ''; position: absolute; right: -3px; bottom: -3px; width: 14px; height: 14px; border-radius: 50%; background: var(--wa); box-shadow: 0 0 0 3px var(--surface); }
.wa-connected { display: flex; align-items: center; gap: 20px 28px; flex-wrap: wrap; }
.wa-stats { display: flex; gap: 10px; margin-left: auto; flex-wrap: wrap; }
.wa-stat { min-width: 140px; padding: 10px 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.wa-stat span { display: block; font-size: 12px; color: var(--text-3); }
.wa-stat b { display: block; font-size: 20px; font-weight: 620; margin-top: 2px; }
.connect-hero .steps { max-width: 460px; }
.placeholder-list { display: flex; flex-wrap: wrap; gap: 6px; }
.ph-chip { height: 26px; padding: 0 9px; border-radius: 7px; font-family: var(--mono); font-size: 12px; background: var(--surface-3); color: var(--text-2); border: 1px solid var(--border); transition: background 0.12s, border-color 0.12s; }
.ph-chip:hover { background: var(--gold-soft); border-color: var(--gold-line); color: var(--gold-strong); }
.template-input { font-family: var(--mono); font-size: 13px; line-height: 1.6; min-height: 176px; }

/* ---------- Ayarlar ---------- */
.settings-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; align-items: start; }
.settings-nav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 24px; }
.settings-nav a { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 12px; border-radius: 10px; color: var(--text-2); font-weight: 530; }
.settings-nav a:hover { background: var(--surface-3); color: var(--text); }
.settings-nav a.active { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: var(--shadow-sm), 0 0 0 1px var(--border); }
.settings-nav a.active .icon { color: var(--gold); }
.settings-nav .icon { color: var(--text-3); }
.lookup-row { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--border); }
.lookup-row:last-child { border-bottom: 0; }
.lookup-row.inactive .lr-main { opacity: 0.55; }
.lookup-row .lr-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; }
.lookup-row .lr-name { font-weight: 580; }
.lookup-row .lr-sub { font-size: 12.5px; color: var(--text-3); }
.lookup-row .lr-actions { display: flex; align-items: center; gap: 4px; }
.order-btns { display: flex; flex-direction: column; }
.order-btns button { height: 16px; width: 22px; display: grid; place-items: center; color: var(--text-4); border-radius: 4px; }
.order-btns button:hover:not(:disabled) { color: var(--text); background: var(--surface-3); }
.order-btns button:disabled { opacity: 0.3; cursor: default; }
.role-cards { display: grid; gap: 8px; }
.role-card { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border-strong); cursor: pointer; transition: border-color 0.15s, background 0.15s; text-align: left; width: 100%; }
.role-card:hover { border-color: var(--border-hover); }
.role-card[aria-pressed='true'] { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink) inset; background: var(--surface-2); }
.role-card .rc-radio { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--border-hover); margin-top: 1px; flex-shrink: 0; }
.role-card[aria-pressed='true'] .rc-radio { border: 5px solid var(--ink); }
.role-card b { display: block; font-size: 13.5px; font-weight: 600; color: var(--text); }
.role-card span { display: block; font-size: 12.5px; color: var(--text-3); margin-top: 1px; }

/* ---------- Giriş / Kurulum ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); background: var(--surface); }
.auth-aside {
  position: relative; overflow: hidden;
  background: #121316;
  color: #efeee9;
  padding: 44px 52px;
  display: flex; flex-direction: column;
}
.auth-aside::before {
  content: ''; position: absolute; inset: -20% -10% auto auto; width: 620px; height: 620px;
  background: radial-gradient(closest-side, rgba(193, 155, 98, 0.26), rgba(193, 155, 98, 0) 70%);
  pointer-events: none;
}
.auth-aside::after {
  content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 70% 30%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 70% 30%, #000 0%, transparent 70%);
  pointer-events: none;
}
.auth-aside > * { position: relative; z-index: 1; }
.auth-aside .wordmark { color: #fff; }
.auth-aside .wordmark span { color: #e3c48f; }
.auth-aside .brand-sub { color: #9d9a92; }
.auth-hero { margin-top: auto; margin-bottom: auto; max-width: 480px; padding: 40px 0; }
.auth-hero h1 { font-size: 40px; font-weight: 650; letter-spacing: -0.035em; line-height: 1.1; color: #fff; }
.auth-hero h1 em { font-style: normal; background: linear-gradient(90deg, #e3c48f, #b98f55); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-hero p { margin-top: 16px; color: #a9a69f; font-size: 15px; line-height: 1.6; }
.auth-features { display: flex; flex-direction: column; gap: 16px; margin-top: 34px; }
.auth-feature { display: flex; gap: 14px; align-items: flex-start; }
.auth-feature .af-ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); color: #e3c48f; flex-shrink: 0; }
.auth-feature b { display: block; color: #f5f4ef; font-weight: 600; font-size: 14px; }
.auth-feature span { display: block; color: #8f8c85; font-size: 13px; margin-top: 2px; }
.auth-foot { color: #6e6c66; font-size: 12.5px; }
.auth-main { display: grid; place-items: center; padding: 40px 24px; background: var(--bg); }
.auth-card { width: min(400px, 100%); }
.auth-card h2 { font-size: 26px; font-weight: 650; letter-spacing: -0.03em; }
.auth-card .sub { color: var(--text-3); margin-top: 6px; }
.auth-card form { margin-top: 28px; display: flex; flex-direction: column; gap: 16px; }
.auth-mobile-brand { display: none; margin-bottom: 26px; }

/* ---------- Başlangıç rehberi ---------- */
.onboarding { position: relative; overflow: hidden; }
.onboarding::before { content: ''; position: absolute; right: -80px; top: -120px; width: 360px; height: 360px; background: radial-gradient(closest-side, rgba(193, 155, 98, 0.16), transparent 70%); pointer-events: none; }
.ob-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.ob-step { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); transition: border-color 0.15s, background 0.15s; }
a.ob-step:hover { border-color: var(--border-hover); background: var(--surface); }
.ob-step .ob-check { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; border: 1.5px dashed var(--border-hover); color: transparent; }
.ob-step.done .ob-check { border: 0; background: var(--green); color: #fff; }
.ob-step b { display: block; font-weight: 600; font-size: 13.5px; }
.ob-step span { display: block; font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.ob-step.done b { text-decoration: line-through; text-decoration-color: var(--text-4); color: var(--text-3); }

/* ---------- Yardımcılar ---------- */
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-5 { margin-top: 20px; } .mt-6 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; }
.ml-auto { margin-left: auto; }
.w-full { width: 100%; }
.text-sm { font-size: 13px; }
.text-xs { font-size: 12px; }
.fw-600 { font-weight: 600; }
.fade-in { animation: fadeIn 0.28s var(--ease) both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.flash { animation: flash 1.6s var(--ease); }
@keyframes flash { 0% { background: var(--gold-soft); } 100% { background: transparent; } }

/* ---------- Duyarlı tasarım ---------- */
@media (max-width: 1180px) {
  .form-layout { grid-template-columns: minmax(0, 1fr) 340px; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1024px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; width: 280px;
    transform: translateX(-100%); transition: transform 0.28s var(--ease);
    box-shadow: var(--shadow-lg);
  }
  .app.nav-open .sidebar { transform: none; }
  .app.nav-open .nav-overlay { display: block; }
  .nav-overlay { display: none; position: fixed; inset: 0; background: rgba(20, 18, 14, 0.35); z-index: 39; }
  .topbar {
    display: flex; align-items: center; gap: 10px;
    position: sticky; top: 0; z-index: 30;
    height: 58px; padding: 0 12px;
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    backdrop-filter: saturate(1.4) blur(10px);
    border-bottom: 1px solid var(--border);
  }
  .topbar .brand { padding: 0; }
  .topbar .brand-mark { width: 30px; height: 30px; border-radius: 9px; }
  .topbar .brand-name { font-size: 15px; }
  .topbar .spacer { flex: 1; }
  .page { padding: 22px 20px 64px; }
  .form-layout { grid-template-columns: minmax(0, 1fr); }
  .form-aside { position: static; }
  .settings-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .settings-nav { position: static; flex-direction: row; overflow-x: auto; padding-bottom: 2px; }
  .settings-nav a { white-space: nowrap; }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-aside { display: none; }
  .auth-mobile-brand { display: flex; }
}

@media (max-width: 760px) {
  body { font-size: 14px; }
  .page { padding: 18px 16px 88px; }
  .page-title { font-size: 22px; }
  .page-header { align-items: flex-start; margin-bottom: 18px; }
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .form-grid, .form-grid.cols-3 { grid-template-columns: minmax(0, 1fr); }
  .form-grid.cols-3.keep-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .span-2 { grid-column: auto; }
  .form-card { padding: 18px 16px; }
  .kpi { padding: 14px 14px; min-height: 116px; }
  .kpi-value { font-size: 26px; }
  .card-header { padding: 14px 16px; }
  .card-body { padding: 16px; }
  .list-item { padding: 12px 16px; }
  .toolbar .search { max-width: none; flex-basis: 100%; }
  .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .status-picker { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ob-steps { grid-template-columns: minmax(0, 1fr); }
  .connect-hero { flex-direction: column; align-items: stretch; }
  .connect-hero .qr-frame, .connect-hero .qr-placeholder { margin: 0 auto; }
  .drawer-header, .drawer-body { padding-left: 16px; padding-right: 16px; }
  .toasts { left: 12px; right: 12px; bottom: 12px; align-items: stretch; }
  .toast { min-width: 0; max-width: none; }
  .modal-wrap { align-items: end; padding: 0; }
  .modal { width: 100%; border-radius: 20px 20px 0 0; max-height: 92vh; }
  .modal.wide { width: 100%; }

  /* Tabloyu karta dönüştür */
  .table.responsive thead { display: none; }
  .table.responsive, .table.responsive tbody, .table.responsive tr, .table.responsive td { display: block; width: 100%; }
  .table.responsive tr { padding: 14px 16px; border-bottom: 1px solid var(--border); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; }
  .table.responsive td { padding: 0; border: 0; width: auto !important; max-width: none !important; min-width: 0 !important; }
  .table.responsive td[data-m='hide'] { display: none; }
  .table.responsive td[data-m='main'] { grid-column: 1; grid-row: 1; }
  .table.responsive td[data-m='side'] { grid-column: 2; grid-row: 1; text-align: right; }
  .table.responsive td[data-m='full'] { grid-column: 1 / -1; grid-row: 2; }
}

/* ---------- Ek düzen yardımcıları ---------- */
.m-only { display: none !important; }
.grid-main-side { display: grid; gap: 16px; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
@media (max-width: 1024px) {
  .grid-main-side { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .tag.m-only { display: inline-flex !important; }
  div.m-only { display: block !important; }
  .hide-sm { display: none !important; }
  .section-title .hint { display: none; }
  .record-hero h2 { font-size: 17px; }
  .drawer-header { gap: 8px; }
}
