/* ==========================================================================
   Defterim — panel tasarım sistemi
   Derleme gerektirmez. Renkler :root değişkenleriyle, koyu tema
   [data-theme="dark"] ile tanımlıdır.
   ========================================================================== */

:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --surface-3: #eef0f3;
  --border: #e3e6ea;
  --border-strong: #cfd4da;
  --text: #121826;
  --text-2: #3d4554;
  --muted: #6b7382;
  --faint: #9aa1ad;

  --primary: #0f766e;
  --primary-hover: #0b5f58;
  --primary-soft: #e3f4f1;
  --primary-text: #0b5f58;
  --on-primary: #ffffff;

  --success: #15803d;
  --success-soft: #e5f5ea;
  --warning: #b45309;
  --warning-soft: #fdf1e2;
  --danger: #c2261d;
  --danger-soft: #fdeceb;
  --info: #1d5fd1;
  --info-soft: #e8f0fd;

  --sidebar-bg: #ffffff;
  --sidebar-text: #3d4554;
  --sidebar-strong: #121826;
  --sidebar-muted: #8a92a0;
  --sidebar-hover: #f1f3f6;
  --sidebar-active: #e3f4f1;
  --sidebar-active-text: #0b5f58;
  --sidebar-border: #e3e6ea;
  --sidebar-btn-bg: #f6f7f9;
  --sidebar-menu-bg: #ffffff;
  --admin-active: rgba(109, 91, 208, 0.12);
  --admin-active-text: #5b49c9;

  --admin-accent: #6d5bd0;

  /* Köşe merdiveni. Her değer tek yerde tanımlı; tema değiştirmek bu merdiveni yeniden
     eşlemekten ibaret (ör. --radius-10: 16px). Değerler eskisiyle birebir aynı. */
  --radius-2: 2px;   --radius-3: 3px;   --radius-4: 4px;   --radius-5: 5px;
  --radius-6: 6px;   --radius-7: 7px;   --radius-8: 8px;   --radius-9: 9px;
  --radius-10: 10px; --radius-11: 11px; --radius-12: 12px; --radius-13: 13px;
  --radius-14: 14px; --radius-16: 16px; --radius-18: 18px; --radius-20: 20px;
  --radius-22: 22px; --radius-24: 24px;
  --radius-hap: 99px;    /* küçük rozet / nokta */
  --radius-tam: 999px;   /* tam yuvarlak uç */
  /* Eski adlar merdivene bağlandı; mevcut kurallar bozulmadan çalışır. */
  --radius-sm: var(--radius-6);
  --radius: var(--radius-10);
  --radius-lg: var(--radius-14);

  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow: 0 1px 3px rgba(16, 24, 40, 0.06), 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, 0.14);
  --ring: 0 0 0 3px rgba(15, 118, 110, 0.22);

  --sidebar-w: 264px;
  --topbar-h: 60px;
  --bottomnav-h: 64px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0b111b;
  --surface: #121a27;
  --surface-2: #161f2e;
  --surface-3: #1c2637;
  --border: #243044;
  --border-strong: #33415a;
  --text: #e8ecf2;
  --text-2: #c2c9d5;
  --muted: #8d97a8;
  --faint: #667185;

  --primary: #2bb5a6;
  --primary-hover: #3fcabb;
  --primary-soft: rgba(43, 181, 166, 0.14);
  --primary-text: #5fd6c8;
  --on-primary: #06231f;

  --success: #4ade80;
  --success-soft: rgba(74, 222, 128, 0.12);
  --warning: #f5b34a;
  --warning-soft: rgba(245, 179, 74, 0.13);
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, 0.13);
  --info: #74a7ff;
  --info-soft: rgba(116, 167, 255, 0.13);

  --sidebar-bg: #0a0f18;
  --sidebar-text: #c3cad6;
  --sidebar-strong: #ffffff;
  --sidebar-muted: #7c8696;
  --sidebar-hover: rgba(255, 255, 255, 0.06);
  --sidebar-active: rgba(45, 212, 191, 0.14);
  --sidebar-active-text: #5eead4;
  --sidebar-border: rgba(255, 255, 255, 0.07);
  --sidebar-btn-bg: rgba(255, 255, 255, 0.04);
  --sidebar-menu-bg: #172133;
  --admin-active: rgba(157, 141, 250, 0.16);
  --admin-active-text: #c4baff;
  --admin-accent: #9d8dfa;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
  --ring: 0 0 0 3px rgba(43, 181, 166, 0.3);

  color-scheme: dark;
}

/* ---- Temel ------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary-text); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; color: var(--text); }
h1 { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: 1.15rem; font-weight: 650; }
h3 { font-size: 1rem; font-weight: 650; }
p { margin: 0 0 0.75rem; }
p:last-child { margin-bottom: 0; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1.25rem 0; }
code, .mono { font-family: var(--mono); font-size: 0.9em; }
[x-cloak] { display: none !important; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 0.85rem; }
.xsmall { font-size: 0.78rem; }
.strong { font-weight: 600; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-right { text-align: right; }
.icon { width: 18px; height: 18px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 15px; height: 15px; }
.icon-lg { width: 22px; height: 22px; }

/* ---- Yerleşim ---------------------------------------------------------- */
.app { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w);
  background: var(--sidebar-bg); color: var(--sidebar-text); border-right: 1px solid var(--sidebar-border);
  display: flex; flex-direction: column; z-index: 40;
  transition: transform 0.22s ease;
}
.main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; transition: margin-left 0.22s ease; }
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--topbar-h);
  display: flex; align-items: center; gap: 12px; padding: 0 24px;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar-title { font-weight: 650; font-size: 1rem; min-width: 0; }
.topbar-spacer { flex: 1; }
.content { padding: 24px; width: 100%; max-width: 1240px; margin: 0 auto; flex: 1; }
.content-narrow { max-width: 760px; }


/* ---- Daraltılmış kenar menü (masaüstü) --------------------------------- */
@media (min-width: 901px) {
  .sidebar { transition: width 0.22s ease, transform 0.22s ease; }
  html[data-sidebar="collapsed"] .sidebar { width: 72px; }
  html[data-sidebar="collapsed"] .main { margin-left: 72px; }
  html[data-sidebar="collapsed"] .brand { justify-content: center; padding-left: 0; padding-right: 0; }
  html[data-sidebar="collapsed"] .brand > span:not(.brand-mark),
  html[data-sidebar="collapsed"] .nav-label,
  html[data-sidebar="collapsed"] .nav-soon,
  html[data-sidebar="collapsed"] .book-switcher-name,
  html[data-sidebar="collapsed"] .book-switcher-btn > .icon,
  html[data-sidebar="collapsed"] .user-chip-text,
  html[data-sidebar="collapsed"] .admin-ribbon { display: none; }
  html[data-sidebar="collapsed"] .sidebar-scroll { padding-left: 10px; padding-right: 10px; overflow: visible; }
  html[data-sidebar="collapsed"] .nav-section { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--sidebar-border); }
  html[data-sidebar="collapsed"] .nav-link { font-size: 0; justify-content: center; padding: 10px 0; gap: 0; }
  html[data-sidebar="collapsed"] .nav-link .badge { display: none; }
  html[data-sidebar="collapsed"] .book-switcher-btn { justify-content: center; padding: 8px 0; }
  html[data-sidebar="collapsed"] .book-switcher-menu { right: auto; width: 260px; left: calc(100% + 8px); top: 0; }
  html[data-sidebar="collapsed"] .sidebar-footer { padding: 10px 6px; }
  html[data-sidebar="collapsed"] .sidebar-footer .row { flex-direction: column; gap: 4px; }
  html[data-sidebar="collapsed"] .user-chip { justify-content: center; }
}

/* ---- Kenar menü -------------------------------------------------------- */
.brand {
  display: flex; align-items: center; gap: 10px; padding: 18px 20px 14px;
  color: var(--sidebar-strong); font-weight: 700; font-size: 1.05rem; letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 32px; height: 32px; border-radius: var(--radius-9); display: grid; place-items: center;
  background: #2A2F35; color: #fff;
}
.brand-mark .icon { stroke-width: 2.2; }
.brand-mark .brand-glyph { width: 70%; height: 70%; }
.sidebar-scroll { flex: 1; overflow-y: auto; padding: 4px 12px 16px; }
.nav-section { margin-top: 18px; }
.nav-label { padding: 0 10px 6px; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sidebar-muted); }
.nav-link {
  display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: var(--radius-8);
  color: var(--sidebar-text); font-size: 0.92rem; font-weight: 500;
}
.nav-link:hover { background: var(--sidebar-hover); color: var(--sidebar-strong); text-decoration: none; }
.nav-link.active { background: var(--sidebar-active); color: var(--sidebar-active-text); }
.nav-link .badge { margin-left: auto; }
.nav-link.disabled { opacity: 0.45; pointer-events: none; }
.nav-soon { margin-left: auto; font-size: 0.68rem; color: var(--sidebar-muted); border: 1px solid var(--sidebar-border); border-radius: var(--radius-tam); padding: 0 7px; }

.book-switcher { position: relative; margin: 2px 0 4px; }
.book-switcher-btn {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px;
  background: var(--sidebar-btn-bg); border: 1px solid var(--sidebar-border); border-radius: var(--radius-10);
  color: var(--sidebar-strong); cursor: pointer; text-align: left; font: inherit;
}
.book-switcher-btn:hover { background: var(--sidebar-hover); }
.book-switcher-name { flex: 1; min-width: 0; font-weight: 600; font-size: 0.9rem; }
.book-switcher-sub { display: block; font-size: 0.74rem; color: var(--sidebar-muted); font-weight: 400; }
.book-switcher-menu {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 50;
  background: var(--sidebar-menu-bg); border: 1px solid var(--sidebar-border); border-radius: var(--radius-10);
  box-shadow: var(--shadow-lg); padding: 6px; max-height: 320px; overflow-y: auto;
}
.book-switcher-menu a { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--radius-7); color: var(--sidebar-text); font-size: 0.88rem; }
.book-switcher-menu a:hover { background: var(--sidebar-hover); color: var(--sidebar-strong); text-decoration: none; }
.book-switcher-menu a.current { color: var(--sidebar-active-text); }

.sidebar-footer { border-top: 1px solid var(--sidebar-border); padding: 12px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: var(--radius-9); color: var(--sidebar-text); }
.user-chip:hover { background: var(--sidebar-hover); text-decoration: none; color: var(--sidebar-strong); }
.user-chip-text { flex: 1; min-width: 0; line-height: 1.25; }
.user-chip-name { font-size: 0.88rem; font-weight: 600; color: var(--sidebar-strong); }
.user-chip-mail { font-size: 0.75rem; color: var(--sidebar-muted); }

.sidebar.admin-mode .brand-mark { background: linear-gradient(135deg, #a89bff, #5b49c9); color: #fff; }
.sidebar.admin-mode .nav-link.active { background: var(--admin-active); color: var(--admin-active-text); }
.admin-ribbon { margin: 0 12px 4px; padding: 6px 10px; border-radius: var(--radius-8); font-size: 0.75rem; font-weight: 600; color: var(--admin-active-text); background: var(--admin-active); display: flex; gap: 8px; align-items: center; }

.overlay { display: none; }

/* ---- Alt menü (mobil) -------------------------------------------------- */
.bottom-nav { display: none; }

/* ---- Avatar ------------------------------------------------------------ */
.avatar {
  width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; flex-shrink: 0;
  font-size: 0.8rem; font-weight: 700; color: #fff; background: var(--primary);
}
.avatar-sm { width: 28px; height: 28px; font-size: 0.72rem; }
.avatar-lg { width: 52px; height: 52px; font-size: 1.05rem; }

/* Defter renkleri */
.book-dot { width: 34px; height: 34px; border-radius: var(--radius-9); display: inline-grid; place-items: center; flex-shrink: 0; color: #fff; }
.book-dot-sm { width: 26px; height: 26px; border-radius: var(--radius-7); }
.book-dot-sm .icon { width: 15px; height: 15px; }
.c-teal { background: #0f9488; } .c-blue { background: #2563eb; } .c-indigo { background: #4f46e5; }
.c-violet { background: #7c3aed; } .c-rose { background: #e11d48; } .c-orange { background: #ea580c; }
.c-amber { background: #d97706; } .c-green { background: #16a34a; } .c-slate { background: #475569; }

/* ---- Sayfa başlığı ----------------------------------------------------- */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head-text { min-width: 0; }
.page-head p { color: var(--muted); margin-top: 4px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.breadcrumb { display: flex; gap: 6px; align-items: center; font-size: 0.82rem; color: var(--muted); margin-bottom: 6px; }
.breadcrumb a { color: var(--muted); }

/* ---- Kart -------------------------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.card + .card { margin-top: 16px; }
.grid > .card { margin-top: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.card-head p { color: var(--muted); font-size: 0.86rem; margin: 2px 0 0; }
.card-body { padding: 20px; }
.card-foot { padding: 14px 20px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius-lg) var(--radius-lg); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.card-danger { border-color: color-mix(in srgb, var(--danger) 35%, var(--border)); }
.card-danger .card-head h2 { color: var(--danger); }

.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)); }
.grid-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; align-items: center; gap: 10px; }
.row-wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: 6px; } .mt-2 { margin-top: 12px; } .mt-3 { margin-top: 20px; } .mt-4 { margin-top: 28px; }
.mb-2 { margin-bottom: 12px; } .mb-3 { margin-bottom: 20px; }

/* ---- İstatistik -------------------------------------------------------- */
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px 18px; box-shadow: var(--shadow-sm); }
.stat-label { font-size: 0.8rem; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.stat-value { font-size: 1.6rem; font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.stat-sub { font-size: 0.78rem; color: var(--muted); margin-top: 2px; }
.stat-icon { width: 30px; height: 30px; border-radius: var(--radius-8); display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-text); }
.stat-icon.warn { background: var(--warning-soft); color: var(--warning); }
.stat-icon.danger { background: var(--danger-soft); color: var(--danger); }
.stat-icon.info { background: var(--info-soft); color: var(--info); }

/* ---- Düğmeler ---------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 15px; border-radius: var(--radius-9); border: 1px solid transparent;
  font: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
  text-decoration: none !important; user-select: none;
}
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn:disabled, .btn.disabled { opacity: 0.55; cursor: not-allowed; pointer-events: none; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.btn-secondary:hover { background: var(--surface-2); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-3); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(0.93); }
.btn-danger-ghost { background: transparent; color: var(--danger); }
.btn-danger-ghost:hover { background: var(--danger-soft); }
.btn-sm { height: 32px; padding: 0 11px; font-size: 0.84rem; border-radius: var(--radius-8); }
.btn-icon { width: 38px; padding: 0; }
.btn-icon.btn-sm { width: 32px; }
.btn-block { width: 100%; }
.btn-admin { background: var(--admin-accent); color: #fff; }

/* ---- Formlar ----------------------------------------------------------- */
.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
.label { display: block; font-size: 0.86rem; font-weight: 600; margin-bottom: 6px; color: var(--text-2); }
.label .optional { font-weight: 400; color: var(--faint); }
.input, .select, .textarea {
  width: 100%; height: 40px; padding: 0 12px; border-radius: var(--radius-9);
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  font: inherit; font-size: 0.93rem; transition: border-color 0.15s, box-shadow 0.15s;
}
.textarea { height: auto; min-height: 96px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.select { appearance: none; padding-right: 34px; 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='%236b7382' 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 10px center; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input.is-invalid, .select.is-invalid, .textarea.is-invalid { border-color: var(--danger); }
.help { font-size: 0.8rem; color: var(--muted); margin-top: 5px; }
.error { font-size: 0.82rem; color: var(--danger); margin-top: 5px; }
.input-group { display: flex; }
.input-group .input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group .btn { border-top-left-radius: 0; border-bottom-left-radius: 0; height: 40px; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: 0.92rem; }
.check input { width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--primary); flex-shrink: 0; }
.check-sub { display: block; font-size: 0.8rem; color: var(--muted); }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.code-input { font-family: var(--mono); font-size: 1.4rem; letter-spacing: 0.35em; text-align: center; height: 52px; }

.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.choice { position: relative; display: flex; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 9px 11px; border: 1px solid var(--border-strong); border-radius: var(--radius-9); cursor: pointer; font-size: 0.88rem; background: var(--surface); }
.choice span > svg, .choice span > .ico { flex: none; }
.choice input:checked + span { border-color: var(--primary); box-shadow: var(--ring); background: var(--primary-soft); }
.choice input:focus-visible + span { box-shadow: var(--ring); }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch input { position: absolute; opacity: 0; }
.swatch span { width: 32px; height: 32px; border-radius: 50%; display: block; cursor: pointer; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--border-strong); }
.swatch input:checked + span { box-shadow: 0 0 0 2px var(--text); }

.role-option { display: block; padding: 11px 13px; border: 1px solid var(--border-strong); border-radius: var(--radius-10); cursor: pointer; }
.role-option + .role-option { margin-top: 8px; }
.role-option:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.role-option input { accent-color: var(--primary); }

.perm-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.perm-table th, .perm-table td { padding: 8px 6px; border-bottom: 1px solid var(--border); text-align: left; }
.perm-table td .select { height: 34px; font-size: 0.85rem; }

/* ---- Rozet ------------------------------------------------------------- */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: var(--radius-tam); font-size: 0.74rem; font-weight: 600; white-space: nowrap; background: var(--surface-3); color: var(--text-2); }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-muted { background: var(--surface-2); color: var(--muted, #6b7280); }
.badge-primary { background: var(--primary-soft); color: var(--primary-text); }
.badge-admin { background: color-mix(in srgb, var(--admin-accent) 16%, transparent); color: var(--admin-accent); }
.badge-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ---- Uyarı ------------------------------------------------------------- */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius); font-size: 0.9rem; border: 1px solid transparent; margin-bottom: 16px; }
.alert .icon { margin-top: 1px; }
.alert-body { flex: 1; min-width: 0; overflow-wrap: anywhere; } /* uzun hata metni (JSON) telefonda sayfayı yana taşırmasın */
.alert-title { font-weight: 650; }
.alert-success { background: var(--success-soft); color: var(--success); border-color: color-mix(in srgb, var(--success) 25%, transparent); }
.alert-danger { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 25%, transparent); }
.alert-warning { background: var(--warning-soft); color: var(--warning); border-color: color-mix(in srgb, var(--warning) 25%, transparent); }
.alert-info { background: var(--info-soft); color: var(--info); border-color: color-mix(in srgb, var(--info) 25%, transparent); }
.alert .alert-body p, .alert .alert-body { color: var(--text-2); }
.alert .alert-title { color: inherit; }
.alert-close { background: none; border: 0; color: inherit; cursor: pointer; padding: 2px; opacity: 0.7; }
.alert-close:hover { opacity: 1; }

/* ---- Tablo ------------------------------------------------------------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.table th { text-align: left; font-size: 0.76rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); padding: 10px 16px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.table .actions { text-align: right; white-space: nowrap; }
.table-link { color: var(--text); font-weight: 600; }

/* ---- Liste ------------------------------------------------------------- */
.list { list-style: none; margin: 0; padding: 0; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 13px 20px; border-bottom: 1px solid var(--border); }
.list-item:last-child { border-bottom: 0; }
.list-item-main { flex: 1; min-width: 0; }
.list-item-title { font-weight: 600; }
.list-item-sub { font-size: 0.82rem; color: var(--muted); }
a.list-item { color: var(--text); }
a.list-item:hover { background: var(--surface-2); text-decoration: none; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline-item { display: flex; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--border); }
.timeline-item:last-child { border-bottom: 0; }
.timeline-text { flex: 1; min-width: 0; font-size: 0.9rem; }
.timeline-meta { font-size: 0.78rem; color: var(--muted); margin-top: 2px; display: flex; gap: 8px; flex-wrap: wrap; }
.changes { margin-top: 6px; font-size: 0.8rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-8); padding: 6px 10px; }
.changes div + div { margin-top: 2px; }
.changes del { color: var(--danger); text-decoration-color: color-mix(in srgb, var(--danger) 60%, transparent); }
.changes ins { color: var(--success); text-decoration: none; }

/* ---- Defter kartları --------------------------------------------------- */
.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.book-card { display: flex; flex-direction: column; gap: 14px; padding: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); color: var(--text); box-shadow: var(--shadow-sm); transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s; }
a.book-card:hover { text-decoration: none; border-color: var(--border-strong); box-shadow: var(--shadow); transform: translateY(-1px); }
.book-card-head { display: flex; gap: 12px; align-items: center; }
.book-card-name { font-weight: 650; font-size: 1rem; }
.book-card-desc { font-size: 0.85rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em; }
.book-card-foot { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--muted); margin-top: auto; }
.book-card.new { border-style: dashed; align-items: center; justify-content: center; color: var(--muted); min-height: 150px; box-shadow: none; }
.book-card.new:hover { color: var(--primary-text); border-color: var(--primary); }

.module-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.module-tile { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px dashed var(--border-strong); border-radius: var(--radius-10); color: var(--muted); font-size: 0.86rem; }
.module-tile .icon { color: var(--faint); }

/* ---- Sekmeler ---------------------------------------------------------- */
.tabs { position: relative; display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
/* Geniş ekranda sekmeler sığmazsa alt satıra iner (sonuncusu kesilip gizlenmesin) */
@media (min-width: 768px) {
  .tabs { flex-wrap: wrap; overflow: visible; row-gap: 0; }
}
/* Dar ekranda yatay kayar; devamı olduğunu kenardaki solma gösterir */
@media (max-width: 767.98px) {
  .tabs.more-right { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); }
  .tabs.more-left { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 36px), transparent); }
  .tabs.more-left.more-right { -webkit-mask-image: linear-gradient(to right, transparent, #000 36px, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to right, transparent, #000 36px, #000 calc(100% - 36px), transparent); }
}
.tab { padding: 10px 14px; font-size: 0.9rem; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: flex; align-items: center; gap: 7px; }
.tab:hover { color: var(--text); text-decoration: none; }
.tab.active { color: var(--primary-text); border-bottom-color: var(--primary); }

.seg { display: inline-flex; background: var(--surface-3); border-radius: var(--radius-9); padding: 3px; gap: 2px; }
.seg button, .seg a { border: 0; background: none; font: inherit; font-size: 0.82rem; font-weight: 600; color: var(--muted); padding: 5px 10px; border-radius: var(--radius-7); cursor: pointer; display: flex; align-items: center; gap: 6px; }
.seg .on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

/* ---- Açılır menü ------------------------------------------------------- */
.dropdown { position: relative; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 220px; z-index: 60; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-11); box-shadow: var(--shadow-lg); padding: 6px; }
.dropdown-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: var(--radius-7); border: 0; background: none; font: inherit; font-size: 0.88rem; color: var(--text); text-align: left; cursor: pointer; }
.dropdown-item:hover { background: var(--surface-3); text-decoration: none; }
.dropdown-item.danger { color: var(--danger); }
.dropdown-sep { height: 1px; background: var(--border); margin: 6px 0; }
.dropdown-head { padding: 8px 10px; font-size: 0.8rem; color: var(--muted); }

/* ---- Pencere (modal) --------------------------------------------------- */
.modal { border: 0; padding: 0; border-radius: var(--radius-lg); background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); width: min(520px, calc(100vw - 24px)); max-height: calc(100vh - 40px); }
.modal::backdrop { background: rgba(8, 12, 20, 0.55); backdrop-filter: blur(2px); }
.modal-head { padding: 18px 20px 0; display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.modal-body { padding: 14px 20px 20px; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; background: var(--surface-2); }
.modal-wide { width: min(720px, calc(100vw - 24px)); }

/* ---- Boş durum --------------------------------------------------------- */
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty-icon { width: 52px; height: 52px; border-radius: var(--radius-14); background: var(--surface-3); display: inline-grid; place-items: center; margin-bottom: 12px; color: var(--muted); }
.empty h3 { color: var(--text); margin-bottom: 4px; }

/* ---- Duyuru şeridi ----------------------------------------------------- */
.announce { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: var(--radius); margin-bottom: 12px; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-sm); border-left: 4px solid var(--info); }
.announce-success { border-left-color: var(--success); }
.announce-warning { border-left-color: var(--warning); }
.announce-danger { border-left-color: var(--danger); }

/* ---- Grafik (CSS çubuk) ------------------------------------------------ */
.bars { display: flex; align-items: flex-end; gap: 3px; height: 140px; padding-top: 8px; }
.bar { flex: 1; background: var(--primary); border-radius: var(--radius-3) var(--radius-3) 0 0; min-height: 2px; opacity: 0.85; position: relative; }
.bar:hover { opacity: 1; }
.bar.zero { background: var(--surface-3); }
.bars-axis { display: flex; justify-content: space-between; font-size: 0.72rem; color: var(--faint); margin-top: 6px; }

/* ---- Sayfalama --------------------------------------------------------- */
.pagination { display: flex; gap: 4px; align-items: center; justify-content: center; flex-wrap: wrap; padding: 14px; }
.pagination a, .pagination span { min-width: 34px; height: 34px; padding: 0 8px; display: inline-grid; place-items: center; border-radius: var(--radius-8); font-size: 0.86rem; font-weight: 600; color: var(--text-2); border: 1px solid var(--border); background: var(--surface); }
.pagination a:hover { background: var(--surface-3); text-decoration: none; }
.pagination .current { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.pagination .disabled { opacity: 0.45; }

/* ---- Kimlik doğrulama sayfaları ---------------------------------------
   Her zaman açık renk. Üç tasarım (.auth-d1/2/3) Süper Admin > Site bilgilerinden seçilir:
   1 ortada kart · 2 iki bölme, tanıtım solda · 3 form solda, sistemler sağda */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); background: var(--bg); }
.auth-side {
  background: linear-gradient(160deg, #e3f4f1 0%, #f1f7f6 55%, #f8f9fb 100%);
  color: var(--text-2); padding: 48px; display: flex; flex-direction: column; justify-content: space-between;
  border-right: 1px solid var(--border);
}
.auth-side h2 { color: var(--text); font-size: 1.9rem; line-height: 1.2; letter-spacing: -0.02em; max-width: 420px; }
.auth-side p { color: var(--muted); max-width: 420px; }
.auth-side > .small { color: var(--muted); }
.auth-points { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.auth-points li { display: flex; gap: 12px; align-items: flex-start; color: var(--text-2); font-size: 0.94rem; }
.auth-points .icon { color: var(--primary); margin-top: 2px; }
.auth-systems { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 10px; max-width: 440px; }
.auth-systems li { display: flex; gap: 14px; align-items: center; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-12); }
.auth-systems li > span { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: var(--radius-10); background: var(--primary-soft); color: var(--primary); }
.auth-systems b { display: block; color: var(--text); font-size: 0.96rem; }
.auth-systems small { color: var(--muted); font-size: 0.85rem; }
/* 1: tek sütun, marka kartın üstünde */
.auth-d1 { grid-template-columns: minmax(0, 1fr); }
.auth-d1 .auth-side { display: none; }
.auth-d1 .auth-mobile-brand { display: flex; justify-content: center; margin-bottom: 26px; }
.auth-d1 .auth-mobile-brand .auth-brand { color: var(--text); }
/* 3: form solda, sistemler sağda düz zeminde */
.auth-d3 { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.auth-d3 .auth-side { order: 2; background: var(--surface-2); border-right: 0; border-left: 1px solid var(--border); }
.auth-d3 .auth-main { background: var(--surface); }
.auth-d3 .auth-card { border: 0; padding: 0; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.auth-card { width: 100%; max-width: 410px; }
.auth-card h1 { margin-bottom: 6px; }
.auth-card .lead { color: var(--muted); margin-bottom: 24px; }
.auth-brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 1.1rem; }
.auth-foot { margin-top: 22px; text-align: center; font-size: 0.9rem; color: var(--muted); }
.auth-mobile-brand { display: none; }
.divider-text { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 0.8rem; margin: 18px 0; }
.divider-text::before, .divider-text::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; font-family: var(--mono); font-size: 0.98rem; padding: 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-10); }
.codes span { text-align: center; padding: 4px; }
.qr-box { display: inline-block; padding: 12px; background: #fff; border-radius: var(--radius-12); border: 1px solid var(--border); line-height: 0; }
.qr-box img, .qr-box svg { width: 184px; height: 184px; }
.secret { font-family: var(--mono); font-size: 0.95rem; letter-spacing: 0.08em; padding: 10px 12px; background: var(--surface-2); border: 1px dashed var(--border-strong); border-radius: var(--radius-9); word-break: break-all; }

.copy-field { display: flex; gap: 8px; }
.copy-field .input { font-family: var(--mono); font-size: 0.82rem; }

.legal-content { white-space: pre-line; line-height: 1.7; color: var(--text-2); }

/* ---- Duyarlı ----------------------------------------------------------- */
@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-main { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 960px) {
  .auth, .auth-d3 { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .auth-mobile-brand { display: flex; justify-content: center; margin-bottom: 26px; }
  .auth-mobile-brand .auth-brand { color: var(--text); }
}

@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); box-shadow: none; width: min(300px, 86vw); }
  .app.menu-open .sidebar { transform: none; box-shadow: var(--shadow-lg); }
  .app.menu-open .overlay { display: block; position: fixed; inset: 0; background: rgba(8, 12, 20, 0.5); z-index: 35; }
  .main { margin-left: 0; padding-bottom: calc(var(--bottomnav-h) + env(safe-area-inset-bottom)); }
  .menu-toggle { display: inline-flex; }
  .topbar { padding: 0 10px; gap: 6px; }
  .content { padding: 16px 14px 24px; }
  .grid-3, .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .form-row { grid-template-columns: minmax(0, 1fr); }
  .page-head { margin-bottom: 16px; }
  h1 { font-size: 1.3rem; }

  .bottom-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    height: calc(var(--bottomnav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: var(--surface); border-top: 1px solid var(--border);
    box-shadow: 0 -4px 16px rgba(16, 24, 40, 0.06);
  }
  .bottom-nav a, .bottom-nav button {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    font: inherit; font-size: 0.68rem; font-weight: 600; color: var(--muted); background: none; border: 0; cursor: pointer;
  }
  .bottom-nav a:hover { text-decoration: none; }
  .bottom-nav .active { color: var(--primary-text); }
  .bottom-nav .icon { width: 22px; height: 22px; }

  /* Tablolar mobilde kart görünümüne geçer */
  .table-cards thead { display: none; }
  .table-cards, .table-cards tbody, .table-cards tr, .table-cards td { display: block; width: 100%; }
  .table-cards tr { padding: 12px 14px; border-bottom: 1px solid var(--border); }
  .table-cards tr:last-child { border-bottom: 0; }
  .table-cards td { padding: 3px 0; border: 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  .table-cards td::before { content: attr(data-label); font-size: 0.78rem; color: var(--muted); text-align: left; font-weight: 600; }
  .table-cards td.primary-cell { text-align: left; display: block; margin-bottom: 4px; }
  .table-cards td.primary-cell::before { display: none; }
  .table-cards td.actions { justify-content: flex-end; padding-top: 8px; }
  .table-cards td.actions::before { display: none; }

  .card-head, .card-body { padding-left: 16px; padding-right: 16px; }
  .list-item, .timeline-item { padding-left: 16px; padding-right: 16px; }
  .hide-mobile { display: none !important; }
}

@media (min-width: 901px) {
  .show-mobile { display: none !important; }
}

@media (max-width: 520px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 13px 14px; }
  .stat-value { font-size: 1.3rem; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; }
  .page-actions .btn-icon { flex: 0 0 38px; }
  .book-grid { grid-template-columns: minmax(0, 1fr); }
}

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

/* ==========================================================================
   Finans ekranları (2. aşama)
   ========================================================================== */
.amt-pos { color: var(--success); }
.amt-neg { color: var(--danger); }
.amt-zero { color: var(--muted); }
.amt { font-variant-numeric: tabular-nums; font-weight: 650; white-space: nowrap; }
.amt-lg { font-size: 1.6rem; font-weight: 750; letter-spacing: -0.02em; }

.hero-stat { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-end; }
.hero-stat .label { margin-bottom: 2px; font-weight: 500; color: var(--muted); font-size: 0.82rem; }

/* Hesap listesi */
.acc-group + .acc-group { margin-top: 16px; }
.acc-row { display: flex; align-items: center; gap: 12px; padding: 13px 20px; border-bottom: 1px solid var(--border); color: var(--text); }
.acc-row:last-child { border-bottom: 0; }
a.acc-row:hover { background: var(--surface-2); text-decoration: none; }
.acc-row-main { flex: 1; min-width: 0; }
.acc-row-title { font-weight: 600; display: flex; gap: 8px; align-items: center; }
.acc-row-sub { font-size: 0.8rem; color: var(--muted); }
.acc-row-right { text-align: right; }
.acc-row-right .acc-row-sub { margin-top: 1px; }

.meter { height: 6px; background: var(--surface-3); border-radius: var(--radius-tam); overflow: hidden; margin-top: 6px; }
.meter > span { display: block; height: 100%; background: var(--primary); border-radius: var(--radius-tam); }
.meter.warn > span { background: var(--warning); }
.meter.danger > span { background: var(--danger); }

/* İşlem listesi */
.tx-day { display: flex; justify-content: space-between; align-items: center; padding: 8px 20px; background: var(--surface-2); border-bottom: 1px solid var(--border); font-size: 0.8rem; font-weight: 600; color: var(--muted); position: sticky; top: var(--topbar-h); z-index: 2; }
.tx-row { display: flex; align-items: center; gap: 12px; padding: 11px 20px; border-bottom: 1px solid var(--border); }
.tx-row:hover { background: var(--surface-2); }
.tx-row:last-child { border-bottom: 0; }
.tx-check { width: 18px; height: 18px; accent-color: var(--primary); flex-shrink: 0; }
.tx-icon { width: 36px; height: 36px; border-radius: var(--radius-10); display: grid; place-items: center; flex-shrink: 0; color: #fff; }
.tx-icon.transfer { background: var(--surface-3); color: var(--text-2); }
.tx-main { flex: 1; min-width: 0; }
.tx-title { font-weight: 600; color: var(--text); display: block; }
a.tx-title:hover { text-decoration: none; color: var(--primary-text); }
.tx-meta { font-size: 0.78rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 2px; align-items: center; }
.tx-meta .dot::before { content: "·"; margin-right: 6px; }
.tx-right { text-align: right; flex-shrink: 0; }
.tx-by { font-size: 0.72rem; color: var(--faint); margin-top: 2px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 0 7px; height: 20px; border-radius: var(--radius-tam); font-size: 0.72rem; font-weight: 600; background: var(--surface-3); color: var(--text-2); }
.chip-pending { background: var(--warning-soft); color: var(--warning); }

.totals-bar { display: flex; flex-wrap: wrap; gap: 8px 24px; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.totals-bar .t-label { font-size: 0.75rem; color: var(--muted); }
.totals-bar .t-value { font-weight: 700; font-variant-numeric: tabular-nums; }

.period-nav { display: inline-flex; align-items: center; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-10); padding: 3px; }
.period-nav .period-label { min-width: 130px; text-align: center; font-weight: 650; font-size: 0.92rem; padding: 0 6px; }
.branch-filter { display: inline-flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-10); padding: 3px 3px 3px 10px; max-width: 100%; }
.branch-filter-label { display: inline-flex; align-items: center; gap: 5px; font-size: 0.82rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.branch-filter .select { border: 0; min-width: 150px; max-width: 100%; }

.filter-panel { padding: 16px 20px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.filter-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 12px; }
.filter-grid .field { margin-bottom: 10px; }
.filter-grid .input, .filter-grid .select { height: 36px; font-size: 0.88rem; }

.bulk-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 20px; border-bottom: 1px solid var(--border); background: var(--primary-soft); }
.bulk-bar .select, .bulk-bar .input { height: 32px; font-size: 0.85rem; width: auto; min-width: 160px; }

/* İşlem formu */
.type-switch { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; background: var(--surface-3); padding: 4px; border-radius: var(--radius-12); margin-bottom: 18px; }
.type-switch label { position: relative; }
.type-switch input { position: absolute; opacity: 0; pointer-events: none; }
.type-switch span { display: flex; align-items: center; justify-content: center; gap: 6px; height: 40px; border-radius: var(--radius-9); font-weight: 650; font-size: 0.92rem; color: var(--muted); cursor: pointer; }
.type-switch input:checked + span { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.type-switch input:checked + span.t-expense { color: var(--danger); }
.type-switch input:checked + span.t-income { color: var(--success); }
.type-switch input:checked + span.t-transfer { color: var(--info); }
.type-switch input:focus-visible + span { box-shadow: var(--ring); }

.amount-input { font-size: 1.6rem; font-weight: 700; height: 56px; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.amount-wrap { position: relative; }
.amount-wrap .unit { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; }

.split-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1.5fr) 36px; gap: 8px; align-items: start; margin-bottom: 8px; }
.split-row .input, .split-row .select { height: 38px; font-size: 0.88rem; }
.split-sum { font-size: 0.85rem; margin-top: 4px; }

.attach-list { display: flex; flex-wrap: wrap; gap: 8px; }
.attach-item { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--radius-9); background: var(--surface-2); font-size: 0.84rem; max-width: 100%; }
.attach-item img { width: 40px; height: 40px; object-fit: cover; border-radius: var(--radius-6); }

.detail-list { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 10px 16px; font-size: 0.92rem; }
.detail-list dt { color: var(--muted); }
.detail-list dd { margin: 0; }

/* Kategoriler */
.cat-tree { list-style: none; margin: 0; padding: 0; }
.cat-item { display: flex; align-items: center; gap: 10px; padding: 10px 20px; border-bottom: 1px solid var(--border); }
.cat-item.child { padding-left: 52px; }
.cat-item:last-child { border-bottom: 0; }
.cat-item.archived { opacity: 0.55; }
.cat-dot { width: 28px; height: 28px; border-radius: var(--radius-8); display: grid; place-items: center; color: #fff; flex-shrink: 0; }
.cat-dot .icon { width: 15px; height: 15px; }

.cond-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.4fr) 36px; gap: 8px; margin-bottom: 8px; }

/* İçe aktarma önizleme */
.preview-table { font-size: 0.8rem; }
.preview-table td, .preview-table th { padding: 6px 10px; white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }

/* Mobil hızlı ekleme düğmesi */
.fab { display: none; }

@media (max-width: 1100px) {
  .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .tx-row, .acc-row, .cat-item { padding-left: 14px; padding-right: 14px; }
  .cat-item.child { padding-left: 40px; }
  .tx-day { padding-left: 14px; padding-right: 14px; }
  .tx-icon { width: 32px; height: 32px; }
  .filter-panel, .totals-bar, .bulk-bar { padding-left: 14px; padding-right: 14px; }
  .split-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 36px; }
  .split-row .split-note { grid-column: 1 / 3; }
  .cond-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 36px; }
  .cond-row .cond-value { grid-column: 1 / 3; }
  .detail-list { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .detail-list dd { margin-bottom: 10px; }
  .fab {
    display: grid; place-items: center; position: fixed; right: 16px; z-index: 31;
    bottom: calc(var(--bottomnav-h) + 16px + env(safe-area-inset-bottom));
    width: 56px; height: 56px; border-radius: 50%; background: var(--primary); color: var(--on-primary);
    box-shadow: var(--shadow-lg);
  }
  .fab .icon { width: 26px; height: 26px; }
  .tx-check { display: none; }
}

@media (max-width: 520px) {
  .filter-grid { grid-template-columns: minmax(0, 1fr); }
  .amt-lg { font-size: 1.35rem; }
  .period-nav .period-label { min-width: 100px; }
}

/* ===================== Aşama 2b ===================== */

/* Üst çubuk: arama, hızlı düğmeler, tutar gizleme */
.topbar-search { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px; min-width: 220px; max-width: 360px; flex: 1;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-10); color: var(--muted); }
.topbar-search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.topbar-search input { border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 0.9rem; flex: 1; min-width: 0; }
.topbar-search kbd { font: 600 0.72rem/1 inherit; padding: 3px 6px; border-radius: var(--radius-5); border: 1px solid var(--border-strong); color: var(--muted); }
.btn-soft { background: var(--primary-soft); color: var(--primary-text); }
.btn-soft:hover { background: color-mix(in srgb, var(--primary) 18%, var(--surface)); }
@media (max-width: 1180px) { .hide-tablet { display: none !important; } }

/* ---- Üst çubuk taşması ------------------------------------------------- */
/* Telefonda simge düğmeleri 390px'e sığmıyordu (ölçüm: sağ kenar 407).
   "Tam ekran" menüleri gizlemek içindir; telefonda menüler zaten gizli. */
@media (max-width: 900px) { .topbar [data-tam-ekran] { display: none !important; } }
/* Dar telefonlarda hiçbir düğmeyi kaldırmadan sığdır: aralık ve kenar payı küçülür. */
@media (max-width: 400px) { .topbar { padding: 0 6px; gap: 3px; } }
/* Menünün tamamı üst çubukta olan düzenlerde yer dar: arama kutusu küçülsün,
   ikincil kısayollar daha erken gizlensin (mega'da 51px, mini'de 18px taşıyordu). */
@media (min-width: 901px) {
  html:is([data-layout="ust"], [data-layout="serit"], [data-layout="mega"], [data-layout="mini"]) .topbar-search { flex: 0 1 200px; min-width: 0; }
  html:is([data-layout="ust"], [data-layout="serit"], [data-layout="mega"], [data-layout="mini"]) .topbar-search .input { min-width: 0; }
}
@media (min-width: 901px) and (max-width: 1560px) {
  html:is([data-layout="ust"], [data-layout="serit"], [data-layout="mega"], [data-layout="mini"]) .topbar > .btn-soft { display: none !important; }
}

.privacy-on { display: none; }
html[data-privacy="on"] .privacy-on { display: inline-flex; }
html[data-privacy="on"] .privacy-off { display: none; }
html[data-privacy="on"] .amt, html[data-privacy="on"] .stat-value, html[data-privacy="on"] .money,
html[data-privacy="on"] .tx-by.num { filter: blur(7px); user-select: none; }
html[data-privacy="on"] .amount-input input { filter: none; }

/* İşlem türü etiketi (defter.net tarzı) */
.tx-type { font-size: 0.68rem; font-weight: 750; letter-spacing: 0.04em; text-transform: uppercase; padding: 2px 6px; border-radius: var(--radius-5); white-space: nowrap; }
.tx-type.t-income, .tx-type.t-collection { color: var(--success); background: var(--success-soft); }
.tx-type.t-expense, .tx-type.t-payment { color: var(--danger); background: var(--danger-soft); }
.tx-type.t-transfer { color: var(--info); background: var(--info-soft); }
.tx-type.t-debit, .tx-type.t-credit { color: var(--warning); background: var(--warning-soft); }
.tx-time { font-size: 0.74rem; color: var(--faint); font-variant-numeric: tabular-nums; }
.tx-meta a { color: var(--primary-text); }

/* Aylık özet satırı */
.tx-month { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 6px 14px; align-items: center; padding: 10px 20px;
  background: var(--surface-2); border-bottom: 1px solid var(--border); font-size: 0.82rem; color: var(--muted); }
.tx-month strong { color: var(--text); }
.tx-total { display: flex; justify-content: flex-end; gap: 14px; align-items: baseline; padding: 14px 20px; font-size: 0.88rem; color: var(--muted); }
.tx-total .amt { font-size: 1.15rem; font-weight: 750; }

/* Hesap grubu toplamı */
.group-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.group-total { font-weight: 650; font-size: 0.9rem; }

/* Yan yana hesap görünümü (masaüstü) */
.acc-split { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start; }
.acc-split-list { position: sticky; top: calc(var(--topbar-h) + 16px); max-height: calc(100vh - var(--topbar-h) - 32px); overflow: auto; margin: 0; }
.acc-split-list .acc-group { padding: 8px 14px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted);
  background: var(--surface-2); border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; gap: 8px; }
.acc-mini { display: flex; justify-content: space-between; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); color: var(--text); font-size: 0.88rem; }
.acc-mini:hover { background: var(--surface-2); text-decoration: none; }
.acc-mini.active { background: var(--primary-soft); box-shadow: inset 3px 0 0 var(--primary); }
.acc-mini small { display: block; color: var(--muted); font-size: 0.74rem; }
@media (max-width: 1100px) { .acc-split { grid-template-columns: minmax(0, 1fr); } .acc-split-list { display: none; } }

/* Hızlı işlem satırı */
.quick-add { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) 150px; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--border); background: var(--surface-2); }
.quick-add .qa-row2 { grid-column: 1 / -1; display: grid; grid-template-columns: 150px 100px minmax(0, 1fr) auto auto; gap: 8px; }
.quick-add .input, .quick-add .select { height: 40px; }
.quick-add .btn-in { background: var(--success-soft); color: var(--success); font-weight: 700; }
.quick-add .btn-out { background: var(--danger-soft); color: var(--danger); font-weight: 700; }
.quick-add .qa-error { grid-column: 1 / -1; color: var(--danger); font-size: 0.82rem; }
@media (max-width: 700px) {
  .quick-add { grid-template-columns: minmax(0, 1fr) 120px; padding: 12px 14px; }
  .quick-add .qa-desc { grid-column: 1 / -1; }
  .quick-add .qa-row2 { grid-template-columns: minmax(0, 1fr) 90px; }
  .quick-add .qa-row2 .qa-cat { grid-column: 1 / -1; }
}

/* Cari */
.contact-avatar { width: 38px; height: 38px; border-radius: var(--radius-10); display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 0.85rem; flex-shrink: 0; }
.contact-row { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--border); color: var(--text); }
.contact-row:hover { background: var(--surface-2); text-decoration: none; }
.contact-row:last-child { border-bottom: 0; }
.contact-row-main { flex: 1; min-width: 0; }
.contact-row-title { font-weight: 600; display: flex; gap: 8px; align-items: center; }
.contact-row-sub { font-size: 0.8rem; color: var(--muted); }
.contact-row-right { text-align: right; }
.bal-label { font-size: 0.74rem; font-weight: 600; }
.bal-label.pos { color: var(--success); } .bal-label.neg { color: var(--danger); } .bal-label.zero { color: var(--muted); }
.action-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.action-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px 14px; border-radius: var(--radius-12); border: 1px solid var(--border);
  background: var(--surface); cursor: pointer; text-align: left; font: inherit; color: var(--text); box-shadow: var(--shadow-sm); }
.action-tile:hover { border-color: var(--primary); }
.action-tile strong { font-size: 0.92rem; }
.action-tile span { font-size: 0.76rem; color: var(--muted); line-height: 1.35; }
.action-tile .icon { color: var(--primary-text); }
@media (max-width: 760px) { .action-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.due-chip { font-size: 0.72rem; padding: 2px 7px; border-radius: var(--radius-tam); background: var(--warning-soft); color: var(--warning); font-weight: 600; white-space: nowrap; }
.due-chip.late { background: var(--danger-soft); color: var(--danger); }

/* Ekstre (yazdırma) */
.statement { background: var(--surface); }
.statement-head { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 18px; }
.statement table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.statement th, .statement td { padding: 7px 8px; border-bottom: 1px solid var(--border); text-align: left; }
.statement th { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.statement .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.statement tfoot td { font-weight: 700; border-top: 2px solid var(--border-strong); }

/* Arama sonuçları */
.search-group-title { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin: 18px 0 8px; }

@media print {
  .sidebar, .topbar, .bottom-nav, .fab, .page-actions, .no-print, .quick-add, .announce, .alert-close, .overlay { display: none !important; }
  .main { margin-left: 0 !important; }
  .content { padding: 0 !important; max-width: none !important; }
  .card { box-shadow: none !important; border-color: #ccc !important; break-inside: avoid; }
  html[data-privacy="on"] .amt, html[data-privacy="on"] .stat-value { filter: none !important; }
  body { background: #fff !important; color: #000 !important; }
  .acc-split { grid-template-columns: 1fr !important; }
  .acc-split-list { display: none !important; }
}
.type-switch-sm { grid-template-columns: repeat(4, 1fr); margin-bottom: 4px; }
.type-switch-sm span { height: 34px; font-size: 0.84rem; }
.type-switch input:checked + span.t-collection { color: var(--success); }
.type-switch input:checked + span.t-payment { color: var(--danger); }
.type-switch input:checked + span.t-debit, .type-switch input:checked + span.t-credit { color: var(--warning); }
@media (max-width: 520px) { .type-switch-sm { grid-template-columns: repeat(2, 1fr); } }
.seg { flex-wrap: wrap; }

/* Aşama 3: bütçe, hedef */
.text-warning { color: var(--warning); }
.budget-card { margin-bottom: 12px; }
.cat-picker { max-height: 340px; overflow: auto; border: 1px solid var(--border); border-radius: var(--radius-10); padding: 10px 12px; display: grid; gap: 6px; background: var(--surface); }
.goal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.goal-card { display: block; color: var(--text); padding: 18px; }
.goal-card:hover { text-decoration: none; border-color: var(--primary); }
.goal-ring { --p: 0; width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto;
  background: conic-gradient(var(--primary) calc(var(--p) * 1%), var(--surface-3) 0); }
.goal-ring > div { width: 94px; height: 94px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-weight: 750; font-size: 1.3rem; }
.goal-ring.done { background: conic-gradient(var(--success) 100%, var(--surface-3) 0); }
.text-center { text-align: center; }
.nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--radius-tam); background: var(--danger); color: #fff; font-size: 0.72rem; font-weight: 700; display: inline-grid; place-items: center; }
html[data-sidebar="collapsed"] .nav-badge { position: absolute; top: 4px; right: 6px; margin: 0; min-width: 16px; height: 16px; font-size: 0.62rem; padding: 0 4px; }
.nav-link { position: relative; }

/* Aşama 4: araç, gayrimenkul, belge */
.validity-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.validity-card { border: 1px solid var(--border); border-radius: var(--radius-12); padding: 12px 14px; background: var(--surface); box-shadow: var(--shadow-sm); border-left-width: 4px; }
.validity-card.v-ok { border-left-color: var(--success); }
.validity-card.v-soon { border-left-color: var(--warning); background: color-mix(in srgb, var(--warning-soft) 50%, var(--surface)); }
.validity-card.v-expired { border-left-color: var(--danger); background: color-mix(in srgb, var(--danger-soft) 50%, var(--surface)); }
.validity-card.v-none { border-left-color: var(--border-strong); }
.chip-on { background: var(--primary); color: var(--on-primary); }
a.chip { text-decoration: none; }
.asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.asset-card { display: block; color: var(--text); margin: 0; }
.asset-card:hover { text-decoration: none; border-color: var(--primary); }
.asset-card .badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.vbadge { font-size: 0.72rem; font-weight: 600; padding: 3px 8px; border-radius: var(--radius-tam); background: var(--surface-3); color: var(--muted); }
.vbadge.v-ok { background: var(--success-soft); color: var(--success); }
.vbadge.v-soon { background: var(--warning-soft); color: var(--warning); }
.vbadge.v-expired { background: var(--danger-soft); color: var(--danger); }
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.doc-card { border: 1px solid var(--border); border-radius: var(--radius-12); overflow: hidden; background: var(--surface); display: flex; flex-direction: column; }
.doc-thumb { height: 120px; background: var(--surface-3); display: grid; place-items: center; color: var(--muted); }
.doc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.doc-body { padding: 10px 12px; flex: 1; }
.doc-body .title { font-weight: 600; font-size: 0.9rem; }
.doc-actions { display: flex; gap: 4px; padding: 6px 8px; border-top: 1px solid var(--border); justify-content: flex-end; }

/* Aşama 5: bildirimler */
.bell-btn { position: relative; }
.bell-count { position: absolute; top: 2px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: var(--radius-tam); background: var(--danger); color: #fff; font-size: 0.66rem; font-weight: 700; display: grid; place-items: center; }
/* Destek erişimi */
.support-btn { position: relative; }
.support-btn.is-on { color: var(--success, #16a34a); }
.support-dot { position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--success, #16a34a); box-shadow: 0 0 0 2px var(--surface); }
.support-menu { width: 320px; max-width: calc(100vw - 24px); }
.support-menu-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.support-menu-body p { margin: 0; white-space: normal; }
.support-banner { display: flex; align-items: center; gap: 10px; padding: 8px 16px; background: #b45309; color: #fff; font-size: 0.88rem; }
.support-banner-text { flex: 1; min-width: 0; }
.support-banner-btn { background: rgba(255, 255, 255, 0.16); color: #fff; border: 1px solid rgba(255, 255, 255, 0.45); }
.support-banner-btn:hover { background: rgba(255, 255, 255, 0.28); color: #fff; }
.notif-menu { width: 340px; max-width: calc(100vw - 24px); max-height: 70vh; overflow: auto; }
.notif-row { display: flex; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--border); color: var(--text); }
.notif-row:hover { background: var(--surface-2); text-decoration: none; }
.notif-row.unread { background: color-mix(in srgb, var(--primary-soft) 55%, var(--surface)); }
.notif-row:last-child { border-bottom: 0; }
.notif-items { margin: 6px 0 0; padding-left: 18px; font-size: 0.84rem; }

/* Grafikler (raporlar) */
:root { --series-1: #2a78d6; --series-2: #eb6834; --viz-grid: #e7e6e2; --viz-axis: #6b6a66; }
@media (prefers-color-scheme: dark) { :root:where(:not([data-theme="light"])) { --series-1: #3987e5; --series-2: #d95926; --viz-grid: #2c2c2a; --viz-axis: #a3a29a; } }
:root[data-theme="dark"] { --series-1: #3987e5; --series-2: #d95926; --viz-grid: #2c2c2a; --viz-axis: #a3a29a; }
.viz { width: 100%; }
.viz-svg { width: 100%; height: auto; display: block; overflow: visible; }
.viz-svg .grid { stroke: var(--viz-grid); stroke-width: 1; }
.viz-svg .grid.base { stroke: var(--viz-axis); opacity: .5; }
.viz-svg .axis { fill: var(--viz-axis); font-size: 11px; font-variant-numeric: tabular-nums; }
.viz-svg .mark.s1, .viz-svg .dot.s1 { fill: var(--series-1); }
.viz-svg .mark.s2 { fill: var(--series-2); }
.viz-svg .line.s1 { fill: none; stroke: var(--series-1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.viz-svg .area.s1 { fill: var(--series-1); opacity: .08; }
.viz-svg .dot { stroke: var(--surface); stroke-width: 2; }
.viz-svg .hit { fill: transparent; }
.viz-svg .viz-hit:hover .hit, .viz-svg .viz-hit:focus .hit { fill: var(--viz-grid); opacity: .45; }
.viz-svg .viz-hit:focus { outline: none; }
.viz-legend { display: flex; gap: 16px; font-size: 0.82rem; color: var(--text-2); margin-bottom: 6px; flex-wrap: wrap; }
.viz-legend .sw { display: inline-block; width: 10px; height: 10px; border-radius: var(--radius-3); margin-right: 6px; vertical-align: -1px; }
.viz-legend .sw.s1 { background: var(--series-1); } .viz-legend .sw.s2 { background: var(--series-2); }
.viz-tip { position: fixed; z-index: 200; pointer-events: none; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-8);
  box-shadow: var(--shadow-lg); padding: 8px 10px; font-size: 0.8rem; white-space: pre-line; max-width: 260px; font-variant-numeric: tabular-nums; }
.hbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 8px 0; }
.hbar .meter { grid-column: 1 / -1; margin-top: 0; height: 8px; }
.hbar .meter > span { background: var(--series-1); }
.hbar.sub { padding: 4px 0 4px 18px; font-size: 0.85rem; }
.hbar.sub .meter { height: 5px; }
.hbar.sub .meter > span { background: color-mix(in srgb, var(--series-1) 55%, var(--surface)); }
.report-table td, .report-table th { text-align: right; }
.report-table td:first-child, .report-table th:first-child { text-align: left; }

/* Notlar */
.note-grid { columns: 280px; column-gap: 14px; }
.note-card { break-inside: avoid; margin-bottom: 14px; border-radius: var(--radius-12); padding: 14px 16px 8px; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-sm); border-top: 4px solid var(--nc, var(--border-strong)); }
.note-card.focus { box-shadow: 0 0 0 3px var(--primary-soft), var(--shadow-sm); }
.note-body { white-space: pre-wrap; word-break: break-word; font-size: 0.92rem; margin-top: 6px; color: var(--text-2); max-height: 420px; overflow: auto; }
.note-remind { margin-top: 8px; font-size: 0.78rem; color: var(--warning); display: flex; gap: 6px; align-items: center; }
.note-foot { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-top: 8px; border-top: 1px dashed var(--border); padding-top: 4px; }
.nc-teal { --nc: #14b8a6; } .nc-blue { --nc: #3b82f6; } .nc-indigo { --nc: #6366f1; } .nc-violet { --nc: #8b5cf6; } .nc-rose { --nc: #f43f5e; }
.nc-orange { --nc: #f97316; } .nc-amber { --nc: #f59e0b; } .nc-green { --nc: #22c55e; } .nc-slate { --nc: #64748b; }

/* Randevular */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--border); border-left: 1px solid var(--border); }
.cal-h { padding: 6px 8px; font-size: 0.72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--surface-2); }
.cal-d { min-height: 96px; padding: 4px 6px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); font-size: 0.78rem; }
.cal-d.out { background: var(--surface-2); color: var(--faint); }
.cal-d.today .cal-n { background: var(--primary); color: var(--on-primary); border-radius: var(--radius-tam); }
.cal-n { display: inline-grid; place-items: center; min-width: 22px; height: 22px; font-weight: 600; }
.cal-ev { display: block; margin-top: 3px; padding: 2px 5px; border-radius: var(--radius-5); background: var(--primary-soft); color: var(--primary-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-ev:hover { text-decoration: none; filter: brightness(.97); }
.cal-ev.st-done { opacity: .55; } .cal-ev.st-cancelled { text-decoration: line-through; opacity: .5; }
@media (max-width: 700px) { .cal-d { min-height: 64px; padding: 2px 3px; } .cal-ev { font-size: 0.66rem; padding: 1px 3px; } }
.appt-time { text-align: center; min-width: 58px; flex-shrink: 0; }
.appt-time .d { font-size: 1.3rem; font-weight: 750; line-height: 1; }
.appt-time .m { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; }
.appt-time .t { font-size: 0.78rem; font-weight: 600; margin-top: 3px; }
.remind-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.remind-chips label { position: relative; }
.remind-chips input { position: absolute; opacity: 0; }
.remind-chips span { display: inline-block; padding: 6px 10px; border-radius: var(--radius-tam); border: 1px solid var(--border-strong); font-size: 0.82rem; cursor: pointer; }
.remind-chips input:checked + span { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.remind-chips input:focus-visible + span { box-shadow: var(--ring); }

/* Anlık bildirim daveti */
.push-banner { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 14px; margin-bottom: 16px; border-radius: var(--radius); background: var(--primary-soft, var(--surface-2)); border: 1px solid color-mix(in srgb, var(--primary, #14b8a6) 30%, transparent); font-size: 0.9rem; }
.push-banner[hidden] { display: none; }
.push-banner > svg { flex: none; color: var(--primary, currentColor); }
.push-banner-text { flex: 1; min-width: 0; }
@media (max-width: 560px) { .push-banner { flex-wrap: wrap; } .push-banner-text { flex-basis: calc(100% - 70px); } }

/* ==========================================================================
   Renk temaları (data-accent), gece siyahı (data-black), sıkı görünüm (data-density)
   ========================================================================== */
:root[data-accent="blue"] {
  --primary: #1d4ed8; --primary-hover: #1e40af; --primary-soft: #e7eefc; --primary-text: #1e40af; --on-primary: #ffffff;
  --sidebar-active: #e7eefc; --sidebar-active-text: #1e40af; --ring: 0 0 0 3px rgba(29, 78, 216, 0.22);
}
:root[data-theme="dark"][data-accent="blue"] {
  --primary: #5b8def; --primary-hover: #7aa4f5; --primary-soft: rgba(91, 141, 239, 0.15); --primary-text: #93b6ff; --on-primary: #071a3d;
  --sidebar-active: rgba(91, 141, 239, 0.15); --sidebar-active-text: #93b6ff; --ring: 0 0 0 3px rgba(91, 141, 239, 0.3);
}
:root[data-accent="violet"] {
  --primary: #6d28d9; --primary-hover: #5b21b6; --primary-soft: #efe9fc; --primary-text: #5b21b6; --on-primary: #ffffff;
  --sidebar-active: #efe9fc; --sidebar-active-text: #5b21b6; --ring: 0 0 0 3px rgba(109, 40, 217, 0.22);
}
:root[data-theme="dark"][data-accent="violet"] {
  --primary: #a78bfa; --primary-hover: #c4b5fd; --primary-soft: rgba(167, 139, 250, 0.15); --primary-text: #c4b5fd; --on-primary: #1d0f3d;
  --sidebar-active: rgba(167, 139, 250, 0.15); --sidebar-active-text: #c4b5fd; --ring: 0 0 0 3px rgba(167, 139, 250, 0.3);
}
:root[data-accent="rose"] {
  --primary: #be185d; --primary-hover: #9d174d; --primary-soft: #fce8f1; --primary-text: #9d174d; --on-primary: #ffffff;
  --sidebar-active: #fce8f1; --sidebar-active-text: #9d174d; --ring: 0 0 0 3px rgba(190, 24, 93, 0.22);
}
:root[data-theme="dark"][data-accent="rose"] {
  --primary: #f472b6; --primary-hover: #f9a8d4; --primary-soft: rgba(244, 114, 182, 0.14); --primary-text: #f9a8d4; --on-primary: #3b0820;
  --sidebar-active: rgba(244, 114, 182, 0.14); --sidebar-active-text: #f9a8d4; --ring: 0 0 0 3px rgba(244, 114, 182, 0.3);
}
:root[data-accent="forest"] {
  --primary: #15803d; --primary-hover: #166534; --primary-soft: #e5f4ea; --primary-text: #166534; --on-primary: #ffffff;
  --sidebar-active: #e5f4ea; --sidebar-active-text: #166534; --ring: 0 0 0 3px rgba(21, 128, 61, 0.22);
}
:root[data-theme="dark"][data-accent="forest"] {
  --primary: #4ade80; --primary-hover: #86efac; --primary-soft: rgba(74, 222, 128, 0.13); --primary-text: #86efac; --on-primary: #052e14;
  --sidebar-active: rgba(74, 222, 128, 0.13); --sidebar-active-text: #86efac; --ring: 0 0 0 3px rgba(74, 222, 128, 0.3);
}
:root[data-accent="amber"] {
  --primary: #b45309; --primary-hover: #92400e; --primary-soft: #fdf0e1; --primary-text: #92400e; --on-primary: #ffffff;
  --sidebar-active: #fdf0e1; --sidebar-active-text: #92400e; --ring: 0 0 0 3px rgba(180, 83, 9, 0.22);
}
:root[data-theme="dark"][data-accent="amber"] {
  --primary: #f5a524; --primary-hover: #fbbf4d; --primary-soft: rgba(245, 165, 36, 0.14); --primary-text: #fcc96b; --on-primary: #2d1a02;
  --sidebar-active: rgba(245, 165, 36, 0.14); --sidebar-active-text: #fcc96b; --ring: 0 0 0 3px rgba(245, 165, 36, 0.3);
}
:root[data-accent="graphite"] {
  --primary: #334155; --primary-hover: #1e293b; --primary-soft: #eceff3; --primary-text: #1e293b; --on-primary: #ffffff;
  --sidebar-active: #eceff3; --sidebar-active-text: #1e293b; --ring: 0 0 0 3px rgba(51, 65, 85, 0.22);
}
:root[data-theme="dark"][data-accent="graphite"] {
  --primary: #94a3b8; --primary-hover: #cbd5e1; --primary-soft: rgba(148, 163, 184, 0.15); --primary-text: #cbd5e1; --on-primary: #0f172a;
  --sidebar-active: rgba(148, 163, 184, 0.15); --sidebar-active-text: #cbd5e1; --ring: 0 0 0 3px rgba(148, 163, 184, 0.3);
}
:root[data-theme="dark"][data-black="on"] {
  --bg: #000000; --surface: #0b0b0c; --surface-2: #111113; --surface-3: #18181b;
  --border: #222226; --border-strong: #303036;
  --sidebar-bg: #000000; --sidebar-menu-bg: #141416; --sidebar-border: rgba(255, 255, 255, 0.08);
}

/* Sıkı görünüm: daha az boşluk, ekrana daha çok satır */
:root[data-density="compact"] body { font-size: 14px; }
:root[data-density="compact"] .content { padding: 16px 18px; }
:root[data-density="compact"] .card-head { padding: 11px 16px; }
:root[data-density="compact"] .card-body { padding: 14px 16px; }
:root[data-density="compact"] .list-item, :root[data-density="compact"] .acc-row { padding: 9px 16px; }
:root[data-density="compact"] .tx-row { padding: 7px 16px; }
:root[data-density="compact"] .field { margin-bottom: 12px; }
:root[data-density="compact"] .nav-link { padding-top: 6px; padding-bottom: 6px; }
:root[data-density="compact"] .nav-section { margin-top: 12px; }
:root[data-density="compact"] .card + .card, :root[data-density="compact"] .mt-3 { margin-top: 12px; }

/* Görünüm ayarları */
.swatch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.swatch { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); cursor: pointer; font-size: 0.85rem; color: var(--text-2); }
.swatch:hover { border-color: var(--border-strong); }
.swatch input { position: absolute; opacity: 0; pointer-events: none; }
.swatch-dot { width: 30px; height: 30px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35); display: grid; place-items: center; color: #fff; }
.swatch-dot .icon { opacity: 0; width: 16px; height: 16px; }
.swatch:has(input:checked) { border-color: var(--primary); box-shadow: var(--ring); color: var(--text); }
.swatch:has(input:checked) .swatch-dot .icon { opacity: 1; }
.swatch:has(input:focus-visible) { box-shadow: var(--ring); }
.mode-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mode-card { position: relative; border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; cursor: pointer; background: var(--surface); font-size: 0.88rem; text-align: center; }
.mode-card input { position: absolute; opacity: 0; pointer-events: none; }
.mode-card:has(input:checked) { border-color: var(--primary); box-shadow: var(--ring); }
.mode-prev { height: 54px; border-radius: var(--radius-8); margin-bottom: 8px; display: flex; overflow: hidden; border: 1px solid var(--border); }
.mode-prev i { display: block; }
.mode-prev .p-side { width: 30%; }
.mode-prev .p-main { flex: 1; padding: 8px; display: flex; flex-direction: column; gap: 5px; }
.mode-prev .p-main b { display: block; height: 7px; border-radius: var(--radius-4); }
.mode-light .p-side { background: #f1f3f6; } .mode-light .p-main { background: #fff; } .mode-light b { background: #e3e6ea; } .mode-light b:first-child { background: var(--primary); width: 50%; }
.mode-dark .p-side { background: #0a0f18; } .mode-dark .p-main { background: #121a27; } .mode-dark b { background: #243044; } .mode-dark b:first-child { background: var(--primary); width: 50%; }
.mode-system .p-side { background: linear-gradient(180deg, #f1f3f6 50%, #0a0f18 50%); } .mode-system .p-main { background: linear-gradient(180deg, #fff 50%, #121a27 50%); } .mode-system b { background: #8d97a8; } .mode-system b:first-child { background: var(--primary); width: 50%; }

/* Menü düzenleyici */
.nav-edit-link { display: flex; align-items: center; gap: 8px; margin: 14px 10px 4px; font-size: 0.78rem; color: var(--sidebar-muted); }
.nav-edit-link:hover { color: var(--sidebar-strong); text-decoration: none; }
html[data-sidebar="collapsed"] .nav-edit-link { font-size: 0; justify-content: center; }
.menu-editor { display: grid; gap: 12px; }
.me-group { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.me-group-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.me-group-head .input { height: 34px; font-weight: 600; max-width: 280px; }
.me-list { list-style: none; margin: 0; padding: 6px; min-height: 46px; display: grid; gap: 4px; }
.me-list:empty::after { content: attr(data-empty); display: block; padding: 10px; text-align: center; font-size: 0.82rem; color: var(--faint); border: 1px dashed var(--border-strong); border-radius: var(--radius-8); }
.me-item { display: flex; align-items: center; gap: 8px; padding: 4px 6px 4px 4px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-8); }
.me-item .input { height: 32px; font-size: 0.88rem; border-color: transparent; background: transparent; padding-left: 6px; }
.me-item .input:hover, .me-item .input:focus { border-color: var(--border); background: var(--surface); }
.me-handle { cursor: grab; touch-action: none; display: grid; place-items: center; width: 30px; height: 32px; color: var(--faint); border-radius: var(--radius-6); flex: none; }
.me-handle:hover { background: var(--surface-3); color: var(--text-2); }
.me-item > .icon { flex: none; color: var(--muted); }
.me-ghost { opacity: 0.4; }
.me-chosen { box-shadow: var(--shadow-lg); }
.me-hidden { background: transparent; border-style: dashed; }
.me-hidden .me-item { opacity: 0.7; }
.me-bottom { display: flex; flex-wrap: wrap; gap: 8px; }
.me-bottom label { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--radius-tam); font-size: 0.85rem; cursor: pointer; background: var(--surface); }
.me-bottom label:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-text); }
.me-bottom input { accent-color: var(--primary); }

.accent-row { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 12px 8px; }
.accent-dot { width: 24px; height: 24px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; background: linear-gradient(135deg, var(--c1) 50%, var(--c2) 50%); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.3); }
.accent-dot:hover { transform: scale(1.12); }
.accent-dot:focus-visible { outline: none; box-shadow: var(--ring); }
.btn-link { background: none; border: 0; padding: 0; height: auto; color: var(--primary-text); font: inherit; font-size: 0.9rem; cursor: pointer; }
.btn-link:hover { text-decoration: underline; }
.otp-row { display: flex; gap: 8px; align-items: flex-end; }
.otp-row .field { flex: 1; margin-bottom: 0; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius); padding: 3px; background: var(--surface-2); gap: 3px; width: 100%; }
.seg label { flex: 1; text-align: center; padding: 8px 10px; border-radius: var(--radius-8); cursor: pointer; font-size: 0.9rem; font-weight: 500; color: var(--text-2); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
/* Hesap türü: kişisel yeşil, kurumsal siyah (koyu temada ters çevrilir) */
.seg label:has(input[name="account_type"]:checked) { font-weight: 600; color: var(--bg); }
.seg label:has(input[name="account_type"][value="personal"]:checked) { background: var(--success); }
.seg label:has(input[name="account_type"][value="corporate"]:checked) { background: var(--text); }

/* Abonelik */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.plan-card { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; display: flex; flex-direction: column; gap: 8px; background: var(--surface); }
.plan-card.current { border-color: var(--primary); box-shadow: var(--ring); }
.plan-card h3 { font-size: 1.05rem; }
.plan-price { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.01em; }
.plan-price span { font-size: 0.85rem; font-weight: 500; color: var(--muted); margin-left: 2px; }
.plan-features { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; font-size: 0.86rem; color: var(--text-2); flex: 1; }
.plan-features li { display: flex; gap: 6px; align-items: flex-start; }
.plan-features .icon { color: var(--success); flex: none; margin-top: 3px; }
.plan-actions { display: grid; gap: 6px; margin-top: 6px; }
.sms-packs { display: grid; gap: 8px; margin-top: 10px; }
.sms-pack { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); }
.pay-frame { width: 100%; min-height: 640px; border: 0; }
.summary-list { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; font-size: 0.92rem; }
.summary-list .total { font-size: 1.1rem; font-weight: 700; border-top: 1px solid var(--border); padding-top: 8px; }
.text-right { text-align: right; }
.legal-box { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 8px; background: var(--surface-2); }
.legal-box summary { cursor: pointer; padding: 10px 14px; font-weight: 600; font-size: 0.9rem; }
.legal-box-body { max-height: 260px; overflow: auto; padding: 0 14px 12px; font-size: 0.85rem; color: var(--text-2); }
.legal-box-body h2 { font-size: 0.95rem; margin: 12px 0 4px; }
.card.is-off { opacity: .6; }

/* Destek talepleri */
.ticket-row { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); color: var(--text); }
.ticket-row:last-child { border-bottom: 0; }
.ticket-row:hover { background: var(--surface-2); text-decoration: none; }
.ticket-row.unread .strong { font-weight: 700; }
.dot-new { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); margin-right: 6px; vertical-align: middle; }
.thread { display: flex; flex-direction: column; gap: 14px; }
.thread-msg { border: 1px solid var(--border); border-radius: var(--radius-12); padding: 12px 14px; max-width: 92%; }
.thread-msg.from-user { align-self: flex-end; background: var(--surface-2); }
.thread-msg.from-staff { align-self: flex-start; background: var(--primary-soft); border-color: transparent; }
.thread-meta { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; font-size: 0.82rem; margin-bottom: 6px; }
.thread-body { white-space: normal; overflow-wrap: anywhere; line-height: 1.55; }
.thread-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip-file { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: var(--radius-8); background: var(--surface); border: 1px solid var(--border); font-size: 0.8rem; color: var(--text-2); }

/* Yardım merkezi (uygulama içi) */
.help-search { display: flex; gap: 8px; margin-bottom: 20px; }
.help-search .input { flex: 1; }
.help-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.help-cat h2 { display: flex; align-items: center; gap: 8px; font-size: 1rem; margin: 0 0 8px; }
.help-cat ul { list-style: none; margin: 0; padding: 0; }
.help-cat li { padding: 6px 0; border-bottom: 1px dashed var(--border); }
.help-cat li:last-child { border-bottom: 0; }
.help-cat li span { display: block; font-size: 0.8rem; color: var(--muted); }
.help-start { display: flex; gap: 14px; align-items: center; padding: 18px; border-radius: var(--radius-14); background: var(--primary-soft); margin-bottom: 20px; color: var(--text); }
.help-start:hover { text-decoration: none; filter: brightness(0.98); }
.help-article { line-height: 1.7; }
.help-article h2 { font-size: 1.15rem; margin: 1.4em 0 0.5em; }
.help-article h3 { font-size: 1rem; margin: 1.2em 0 0.4em; }
.help-article ol, .help-article ul { padding-left: 1.4em; }
.help-article li { margin: 0.3em 0; }
.help-article table { width: 100%; border-collapse: collapse; margin: 0.8em 0 1.2em; font-size: 0.92em; }
.help-article th, .help-article td { border-bottom: 1px solid var(--border, #e5e7eb); padding: 0.45em 0.6em; text-align: left; vertical-align: top; }
.help-article th { font-weight: 600; background: var(--surface-2, rgba(0,0,0,.03)); }
.help-article .tip { padding: 10px 14px; border-radius: var(--radius-10); background: var(--surface-2); border-left: 3px solid var(--primary); margin: 1em 0; }
.help-nav { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.help-more { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border); font-size: 0.92rem; }
.perm-table th.perm-group { background: var(--surface-2); font-size: 0.75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }

/* İşletme: personel, kasa, stok */
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 0.82rem; color: #fff; flex-shrink: 0; }
.avatar-lg { width: 52px; height: 52px; font-size: 1.05rem; }
.staff-row { color: var(--text); }
.staff-row:hover { background: var(--surface-2); text-decoration: none; }
.stats-row .stat { min-width: 0; }
.stats-row a.stat:hover { text-decoration: none; border-color: var(--border-strong); }
@media (max-width: 900px) { .stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.att-wrap { overflow-x: auto; }
.att-table { border-collapse: separate; border-spacing: 0; font-size: 0.78rem; min-width: 100%; }
.att-table th, .att-table td { border-bottom: 1px solid var(--border); padding: 3px 2px; text-align: center; white-space: nowrap; }
.att-table th.name, .att-table td.name { text-align: left; position: sticky; left: 0; background: var(--surface); z-index: 1; padding: 6px 10px; min-width: 150px; max-width: 200px; overflow: hidden; text-overflow: ellipsis; }
.att-table th.off { color: var(--muted); background: var(--surface-2); }
.att-table th.today { color: var(--primary-text); }
.att-cell { width: 34px; height: 30px; border: 1px solid transparent; border-radius: var(--radius-6); background: var(--surface-2); color: var(--text); font: inherit; font-size: 0.72rem; font-weight: 700; text-align: center; padding: 0; appearance: none; -webkit-appearance: none; cursor: pointer; }
.att-cell:focus { outline: 2px solid var(--primary); }
.att-cell[data-s="present"] { background: var(--success-soft); color: var(--success); }
.att-cell[data-s="half"] { background: color-mix(in srgb, var(--success-soft) 60%, var(--surface-2)); color: var(--success); }
.att-cell[data-s="absent"] { background: var(--danger-soft); color: var(--danger); }
.att-cell[data-s="annual"], .att-cell[data-s="excuse"], .att-cell[data-s="maternity"] { background: var(--info-soft); color: var(--info); }
.att-cell[data-s="sick"] { background: var(--warning-soft); color: var(--warning); }
.att-cell[data-s="unpaid"] { background: var(--surface-3); color: var(--text-2); }
.att-cell[data-s="weekly_off"], .att-cell[data-s="holiday"] { background: transparent; color: var(--muted); border-color: var(--border); }
.att-cell[data-s="holiday_work"] { background: var(--primary-soft); color: var(--primary-text); }
.att-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 0.78rem; color: var(--muted); }
.att-legend b { display: inline-block; min-width: 24px; text-align: center; border-radius: var(--radius-5); padding: 1px 4px; margin-right: 4px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-grid .dow { font-size: 0.72rem; color: var(--muted); text-align: center; }
.cal-day { border: 1px solid var(--border); border-radius: var(--radius-8); padding: 6px; min-height: 52px; font-size: 0.75rem; }
.cal-day .n { font-weight: 700; }
.cal-day.off { background: var(--surface-2); color: var(--muted); }
.cal-day .lbl { display: block; margin-top: 4px; font-size: 0.7rem; font-weight: 600; }
.money-input { text-align: right; font-variant-numeric: tabular-nums; }
.table-compact td, .table-compact th { padding: 6px 8px; }
.table-compact .input { height: 32px; font-size: 0.85rem; padding: 0 8px; }
.list-item.highlight { background: var(--success-soft); }
.z-report { font-variant-numeric: tabular-nums; }
.z-report h3 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 16px 0 6px; }
@media print {
  .sidebar, .topbar, .tabs, .page-actions, .no-print, .bottom-nav, .alert { display: none !important; }
  .content { padding: 0 !important; max-width: none !important; }
  .card { box-shadow: none !important; border: 0 !important; }
}
.btn-lg { height: 48px; padding: 0 20px; font-size: 1rem; }
/* Genel bakış: hızlı işlemler ve modül kartları */
.quick-actions { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.quick-actions::-webkit-scrollbar { display: none; }
.quick-action { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px; border-radius: var(--radius-tam); border: 1px solid var(--border); background: var(--surface); color: var(--text); font-weight: 600; font-size: 0.88rem; white-space: nowrap; }
.quick-action:hover { border-color: var(--primary); color: var(--primary-text); text-decoration: none; }
.quick-action.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.quick-action.primary:hover { background: var(--primary-hover); color: #fff; }
.module-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.module-card { display: flex; flex-direction: column; }
.module-card-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px 6px; color: var(--text); }
.module-card-head strong { flex: 1; }
.module-card-head:hover { text-decoration: none; color: var(--primary-text); }
.module-card-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: 8px; padding: 6px 16px 10px; }
.module-card-stats div { display: flex; flex-direction: column; min-width: 0; }
.module-card-stats strong { font-size: 1.02rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.module-card-lines { list-style: none; margin: 0; padding: 0 16px 10px; font-size: 0.84rem; }
.module-card-lines li { padding: 5px 0; border-top: 1px dashed var(--border); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.module-card-foot { margin-top: auto; padding: 0 16px 14px; }

/* ---------- Genel Bakış: Yaklaşan ödemeler paneli ---------- */
.upc-panel { padding: 0; overflow: hidden; }
.upc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; padding: 18px 20px 14px; border-bottom: 1px solid var(--border); }
.upc-title { margin: 0 0 2px; font-size: 1.1rem; display: flex; align-items: center; gap: 8px; }
.upc-head-side { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.upc-total { display: flex; gap: 14px; flex-wrap: wrap; }
.upc-total-item { display: inline-flex; align-items: baseline; gap: 6px; }
.upc-strip { display: flex; gap: 8px; flex-wrap: wrap; padding: 14px 20px 0; }
.upc-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: var(--radius-tam); border: 1px solid var(--border); background: var(--surface); color: inherit; text-decoration: none; font-size: 0.85rem; }
.upc-chip:hover { border-color: currentColor; }
.upc-chip-label { font-weight: 600; }
.upc-chip-count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--radius-tam); display: inline-grid; place-items: center; font-size: 0.75rem; font-weight: 700; background: var(--surface-2, rgba(127,127,127,.12)); }
.upc-chip-amt { font-size: 0.8rem; opacity: .85; }
.upc-chip.tone-danger { color: var(--danger); background: var(--danger-soft); border-color: transparent; }
.upc-chip.tone-warning { color: var(--warning); background: var(--warning-soft); border-color: transparent; }
.upc-chip.tone-primary { color: var(--primary); }
.upc-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; padding: 14px 20px 20px; }
.upc-group { border: 1px solid var(--border); border-radius: var(--radius-12); overflow: hidden; display: flex; flex-direction: column; border-top: 3px solid var(--border); }
.upc-group.tone-danger { border-top-color: var(--danger); }
.upc-group.tone-warning { border-top-color: var(--warning); }
.upc-group.tone-primary { border-top-color: var(--primary); }
.upc-group-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; font-weight: 600; font-size: 0.9rem; }
.upc-group.tone-danger .upc-group-head { color: var(--danger); }
.upc-group.tone-warning .upc-group-head { color: var(--warning); }
.upc-group-count { font-size: 0.75rem; color: var(--muted); font-weight: 600; }
.upc-list { list-style: none; margin: 0; padding: 0; }
.upc-list li + li { border-top: 1px solid var(--border); }
.upc-item { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 14px; color: inherit; text-decoration: none; }
.upc-item:hover { background: var(--surface-2, rgba(127,127,127,.06)); }
.upc-date { width: 44px; height: 44px; border-radius: var(--radius-10); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; background: var(--primary-soft, rgba(127,127,127,.1)); color: var(--primary); }
.upc-item.is-late .upc-date { background: var(--danger-soft); color: var(--danger); }
.upc-day { font-size: 1.05rem; font-weight: 700; }
.upc-mon { font-size: 0.68rem; text-transform: uppercase; margin-top: 2px; letter-spacing: .03em; }
.upc-body { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.upc-name { font-weight: 600; font-size: 0.92rem; }
.upc-sub { font-size: 0.78rem; color: var(--muted); }
.upc-flag { display: inline-block; font-size: 0.7rem; font-weight: 600; padding: 1px 6px; border-radius: var(--radius-tam); background: var(--surface-2, rgba(127,127,127,.12)); color: var(--muted); margin-right: 4px; }
.upc-flag.late { background: var(--danger-soft); color: var(--danger); }
.upc-flag.today { background: var(--warning-soft); color: var(--warning); }
.upc-amount { text-align: right; white-space: nowrap; font-weight: 600; font-size: 0.92rem; }
.upc-more { display: block; padding: 9px 14px; font-size: 0.82rem; border-top: 1px solid var(--border); margin-top: auto; text-align: center; }
.upc-empty { display: flex; gap: 12px; align-items: center; padding: 20px; color: var(--success, inherit); }
.upc-empty > div { color: var(--text, inherit); }
@media (max-width: 640px) {
    .upc-head, .upc-strip, .upc-groups { padding-left: 14px; padding-right: 14px; }
    .upc-groups { grid-template-columns: 1fr; }
}

/* ---------- İçe aktarma önizlemesi ---------- */
.rv-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.rv-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.rv-filter { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: var(--surface); color: inherit; border-radius: var(--radius-tam); padding: 4px 11px; font-size: 0.82rem; cursor: pointer; }
.rv-filter span { color: var(--muted); font-weight: 600; }
.rv-filter.on { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.rv-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.rv-table td { vertical-align: top; padding-top: 8px; padding-bottom: 8px; }
.rv-table .rv-c-on { width: 32px; text-align: center; }
.rv-desc { min-width: 220px; max-width: 360px; }
.rv-text { font-weight: 600; font-size: 0.88rem; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; }
.rv-meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 3px; font-size: 0.74rem; }
.rv-src { font-weight: 700; border-radius: var(--radius-4); padding: 1px 6px; font-size: 0.7rem; }
.s-teal { background: rgba(15, 148, 136, .13); color: #0f9488; } .rv-dot.s-teal { background: #0f9488; }
.s-blue { background: rgba(37, 99, 235, .12); color: #2563eb; } .rv-dot.s-blue { background: #2563eb; }
.s-violet { background: rgba(124, 58, 237, .12); color: #7c3aed; } .rv-dot.s-violet { background: #7c3aed; }
.s-amber { background: rgba(217, 119, 6, .14); color: #b45309; } .rv-dot.s-amber { background: #d97706; }
.s-gray { background: rgba(100, 116, 139, .14); color: var(--muted); } .rv-dot.s-gray { background: #64748b; }
.s-red { background: var(--danger-soft); color: var(--danger); } .rv-dot.s-red { background: var(--danger); }
.rv-detail { min-width: 200px; }
.rv-detail .select, .rv-table .rv-kind { min-width: 150px; }
.select-sm, .input-sm { padding: 5px 8px; font-size: 0.84rem; min-height: 32px; }
.rv-row .rv-contact, .rv-row .rv-acc { display: none; }
.rv-row[data-kind="contact"] .rv-contact { display: block; margin-top: 4px; }
.rv-row[data-kind="transfer"] .rv-acc { display: block; }
.rv-row[data-kind="transfer"] .rv-cat { display: none; }
.rv-row.is-dup { opacity: .55; }
.rv-row.is-match { background: var(--surface-2); }
.rv-row.is-none .rv-text { color: var(--text); }
.rv-row.is-none td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
.rv-rule { min-width: 150px; }
.rv-rule .rv-phrase { display: none; margin-top: 4px; width: 100%; }
.rv-row.rule-on .rv-phrase { display: block; }
.rv-foot { position: sticky; bottom: 0; background: var(--surface); z-index: 2; gap: 8px; }
.rv-foot #rv-summary { margin-right: auto; }
.ai-card .ai-consent { background: var(--surface-2); border-radius: var(--radius-10); padding: 12px 14px; font-size: 0.86rem; margin: 10px 0; }
.ai-card .ai-consent ul { margin: 6px 0 0 18px; padding: 0; }
.rv-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rv-tools #rv-search { width: 190px; }
.rv-row .rv-newcat, .rv-row .rv-newcontact { display: none; margin-top: 4px; }
.rv-row[data-newcat="1"]:not([data-kind="transfer"]) .rv-newcat { display: block; }
.rv-row[data-kind="contact"][data-newc="1"] .rv-newcontact { display: block; }
.rv-row.is-possible { background: color-mix(in srgb, var(--warning-soft) 55%, transparent); }
.rv-foot #rv-flash { color: var(--primary); }
@media (max-width: 640px) { .rv-tools #rv-search { width: 100%; } }

/* ---------- Yapay zekâ ile işlem girme ---------- */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ai-entry { padding: 14px 16px; border: 1px dashed color-mix(in srgb, var(--primary) 45%, var(--border)); background: color-mix(in srgb, var(--primary-soft) 45%, var(--surface)); }
.ai-entry-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.ai-entry-receipt label { cursor: pointer; margin: 0; }
.ai-entry-text { display: flex; gap: 8px; flex: 1 1 320px; min-width: 0; }
.ai-entry-input { position: relative; flex: 1; min-width: 0; }
.ai-entry-input .input { padding-right: 44px; width: 100%; }
.ai-entry-input .ai-mic { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); }
.ai-mic.is-on { color: var(--danger); animation: ai-pulse 1s infinite; }
.is-busy { opacity: .7; pointer-events: none; }
@keyframes ai-pulse { 50% { opacity: .4; } }
.ai-banner { display: flex; gap: 10px; align-items: flex-start; }
@media (max-width: 640px) { .ai-entry-text { flex-basis: 100%; } .ai-entry-receipt, .ai-entry-receipt label { width: 100%; } .ai-entry-receipt label { justify-content: center; } }

/* ---- Akıllı analiz (Aşama 22) ---- */
.mb-0 { margin-bottom: 0 !important; }
.ask-card .ai-entry-input .input { height: 46px; font-size: 1rem; }
.ask-examples { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ask-chip { border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); border-radius: var(--radius-tam); padding: 4px 11px; font-size: 0.8rem; cursor: pointer; }
.ask-chip:hover { border-color: var(--primary); color: var(--primary-text); }
.ask-item { margin-top: 10px; }
.ask-q { display: flex; align-items: center; gap: 6px; font-weight: 600; color: var(--text-2); }
.ask-a { margin-top: 6px; font-size: 1rem; line-height: 1.5; }
.insight-item { align-items: center; }
.insight-icon { flex: 0 0 32px; width: 32px; height: 32px; border-radius: var(--radius-9); display: inline-flex; align-items: center; justify-content: center; background: var(--surface-3); color: var(--text-2); }
.insight-icon.tone-danger { background: var(--danger-soft); color: var(--danger); }
.insight-icon.tone-warning { background: var(--warning-soft); color: var(--warning); }
.insight-icon.tone-info { background: var(--info-soft); color: var(--info); }
.summary-text { font-size: 1rem; line-height: 1.6; margin: 0; white-space: pre-line; }
.summary-tips { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 6px; }
.summary-tips li { display: flex; gap: 8px; align-items: flex-start; background: var(--primary-soft); color: var(--primary-text); border-radius: var(--radius-10); padding: 8px 12px; font-size: 0.9rem; }
.insight-card .module-card-lines li.tone-warning { color: var(--warning); }
.budget-suggest td .input { max-width: 140px; text-align: right; }
.rem-text { width: 100%; min-height: 130px; }
@media (max-width: 640px) {
  .insight-item { flex-wrap: wrap; }
  .insight-item > .row, .insight-item > form { margin-left: 42px; }
}
.ai-plan { border: 1px dashed var(--primary); background: var(--primary-soft); border-radius: var(--radius-12); padding: 12px 14px; }
.ai-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 18px; }
@media (max-width: 700px) { .ai-tools { grid-template-columns: 1fr; } }
.cf-chart { width: 100%; height: auto; display: block; }
.cf-line { fill: none; stroke: var(--primary); stroke-width: 2.4; stroke-linejoin: round; }
.cf-area { fill: var(--primary-soft); opacity: .7; }
.cf-zero { stroke: var(--danger); stroke-dasharray: 5 4; stroke-width: 1.2; }
.cf-min { fill: var(--surface); stroke: var(--danger); stroke-width: 2.4; }
.cf-label { font-size: 11px; fill: var(--muted); }
.cc-card .card-head h2 a { color: inherit; }
.cc-bar { height: 8px; border-radius: var(--radius-hap); background: var(--surface-3); overflow: hidden; }
.cc-bar span { display: block; height: 100%; background: var(--primary); border-radius: var(--radius-hap); }
.cc-bar span.is-warn { background: var(--warning); }
.cc-bar span.is-danger { background: var(--danger); }
.cc-dl { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin: 0; font-size: 0.86rem; }
.cc-dl dt { color: var(--muted); }
.cc-dl dd { margin: 0; text-align: right; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.calc-result { background: var(--primary-soft); color: var(--text); border-radius: var(--radius-10); padding: 10px 12px; font-size: 0.92rem; margin-top: 6px; }
.calc-list { max-height: 220px; overflow-y: auto; }
.vat-box { border: 1px solid var(--border); border-radius: var(--radius-10); padding: 8px 12px; margin-bottom: 14px; }
.vat-box summary { cursor: pointer; font-weight: 600; font-size: 0.9rem; color: var(--text-2); }

/* ---- İçe aktarma 2.0 ---- */
.drop-zone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 26px 16px; border: 2px dashed var(--border-strong); border-radius: var(--radius-14); background: var(--surface-2); cursor: pointer; color: var(--text-2); }
.drop-zone:hover, .drop-zone.is-over { border-color: var(--primary); background: var(--primary-soft); }
.drop-zone.has-files { border-style: solid; border-color: var(--primary); }
.drop-zone.is-invalid { border-color: var(--danger, #dc2626); }
.stmt-facts { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 0.85rem; color: var(--text-2); }
.stmt-facts b { color: var(--text); font-weight: 600; }
.recon { display: grid; gap: 8px; }
.recon-row { display: flex; gap: 10px; align-items: flex-start; font-size: 0.9rem; }
.recon-row .ok { color: var(--success); }
.recon-row .bad { color: var(--warning); }
.progress-dots { display: inline-flex; gap: 6px; margin-top: 10px; }
.progress-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); animation: pdot 1s infinite alternate; }
.progress-dots span:nth-child(2) { animation-delay: .2s; } .progress-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes pdot { from { opacity: .25; } to { opacity: 1; } }
.rv-recon { border-bottom: 1px solid var(--border); background: var(--surface-2); }
.rv-text { position: relative; }
.rv-editbtn { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 0 4px; vertical-align: middle; opacity: .6; }
.rv-row:hover .rv-editbtn, .rv-editbtn:focus { opacity: 1; color: var(--primary); }
.rv-groupbtn { border: 1px solid var(--primary); background: var(--primary-soft); color: var(--primary-text); border-radius: var(--radius-tam); font-size: 0.72rem; padding: 0 8px; cursor: pointer; margin-left: 4px; }
.rv-row.rv-member { background: var(--surface-2); }
.rv-row.rv-member td:nth-child(3) { padding-left: 22px; }
.rv-row.is-edited .rv-desc-text::after { content: " ✎"; color: var(--primary); }
.rv-row.is-split .rv-cat { opacity: .45; pointer-events: none; }
.rv-row.is-cursor { outline: 2px solid var(--primary); outline-offset: -2px; }
.rv-row:focus { outline: none; }
.rv-editrow td { background: var(--surface-2); }
.rv-edit { display: grid; gap: 6px; padding: 4px 0; }
.rv-edit .field { margin: 0; flex: 1; }
.rv-edit .ed-split { margin-top: 4px; }
.rv-keys { padding: 0 16px 10px; margin: 0; }
kbd { border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: var(--radius-4); padding: 0 4px; font-size: 0.72rem; background: var(--surface); }
@media (max-width: 760px) {
  .rv-table thead { display: none; }
  .rv-table, .rv-table tbody, .rv-table tr, .rv-table td { display: block; width: 100%; }
  .rv-table tr.rv-row { display: grid; grid-template-columns: 34px 1fr auto; gap: 2px 8px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
  .rv-table tr.rv-row td { padding: 0; border: 0; min-width: 0; max-width: none; }
  .rv-table td.rv-c-on { grid-row: span 2; }
  .rv-table td.rv-date { grid-column: 2; font-size: 0.75rem; color: var(--muted); }
  .rv-table td.amt { grid-column: 3; grid-row: 1 / span 2; }
  .rv-table td.rv-desc { grid-column: 2 / span 2; }
  .rv-table td:nth-child(5), .rv-table td.rv-detail, .rv-table td.rv-rule { grid-column: 2 / span 2; }
  .rv-detail .select, .rv-table .rv-kind { width: 100%; min-width: 0; }
  .rv-tools #rv-search { width: 100%; }
  .rv-keys { display: none; }
}
.cc-stmt { border-top: 1px dashed var(--border); padding-top: 8px; }

/* Kiracı cari bağlantısı */
.tenant-ledger { padding: 4px 16px 12px 60px; border-bottom: 1px solid var(--border); }
.tenant-ledger-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.tenant-ledger-bal { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.tenant-ledger-bal strong { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.tenant-ledger-list { list-style: none; margin: 6px 0 0; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-10); background: var(--surface); }
.tenant-ledger-list li { display: grid; grid-template-columns: 82px 1fr auto; gap: 8px; align-items: center; padding: 7px 10px; font-size: 0.82rem; border-bottom: 1px solid var(--border); }
.tenant-ledger-list li:last-child { border-bottom: 0; display: block; }
.tenant-ledger-list .amt { font-variant-numeric: tabular-nums; }
.rent-table td, .rent-table th { white-space: nowrap; }
.rent-table .st-new { color: var(--primary); font-weight: 600; }
.rent-table .st-change { color: var(--warning); font-weight: 600; }
.rent-table .st-skipped { color: var(--muted); }
.rent-steps .rent-step { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: end; margin-bottom: 8px; }
@media (max-width: 640px) {
    .tenant-ledger { padding-left: 16px; }
    .tenant-ledger-list li { grid-template-columns: 70px 1fr auto; }
}

/* Tablolarda sağa yaslı sütunlar (başlık da hizalı) */
.table th.text-right, .table td.text-right, .table th.num, .table td.num { text-align: right; }
.table td.num, .table th.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.rent-table { table-layout: auto; }
.rent-table tfoot th { background: var(--surface-2); border-top: 1px solid var(--border); text-transform: none; letter-spacing: 0; font-size: 0.84rem; color: var(--text); }
.pay-chip { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: var(--radius-tam); font-size: 0.75rem; font-weight: 600; white-space: nowrap; background: var(--surface-3); color: var(--text-2); }
.pay-ok { background: var(--success-soft, color-mix(in srgb, var(--success) 14%, transparent)); color: var(--success); }
.pay-late { background: var(--danger-soft, color-mix(in srgb, var(--danger) 14%, transparent)); color: var(--danger); }
.pay-part { background: var(--warning-soft); color: var(--warning); }
.pay-wait { background: var(--surface-3); color: var(--muted); }

/* Mobil: bildirim menüsü zil düğmesine göre değil ekrana göre açılır (sola taşmasın) */
@media (max-width: 640px) {
    .support-menu { position: fixed; left: 10px; right: 10px; top: calc(var(--topbar-h) - 2px); width: auto; max-width: none; }
    .notif-menu { position: fixed; left: 10px; right: 10px; top: calc(var(--topbar-h) - 2px); width: auto; max-width: none; max-height: calc(100vh - var(--topbar-h) - 24px); }
    .rent-table th, .rent-table td { padding: 8px 8px; }
}

/* Pazaryerleri */
.mp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.mp-tile { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 10px; border: 1px solid var(--border); border-radius: var(--radius-14); background: var(--surface); color: inherit; text-align: center; text-decoration: none; }
a.mp-tile:hover { border-color: var(--primary); background: var(--primary-soft); text-decoration: none; }
.mp-logo { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 40px; height: 40px; border-radius: var(--radius-11); font-weight: 800; font-size: 1.1rem; color: #fff; background: #64748b; }
.mp-logo.mp-lg { width: 52px; height: 52px; border-radius: var(--radius-14); font-size: 1.4rem; }
.mp-trendyol { background: #f27a1a; }
.mp-hepsiburada { background: #ff6000; }
.mp-n11 { background: #6b21a8; }
.mp-amazon { background: #232f3e; }
.mp-ciceksepeti { background: #0e9f8f; }
.mp-pazarama { background: #2563eb; }
.mp-pttavm { background: #d4a106; }
.mp-idefix { background: #e11d48; }
.mp-shopphp { background: #0f766e; }
.mp-card { display: block; color: inherit; text-decoration: none; transition: border-color 0.15s, box-shadow 0.15s; }
.mp-card:hover { text-decoration: none; box-shadow: var(--shadow); }
.mp-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.mp-badges { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.mp-figures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.mp-card:hover { border-color: var(--border-strong); }
.mp-figures .amt { font-size: 1.05rem; }
.mp-api-box { border: 1px dashed var(--border-strong); border-radius: var(--radius-12); padding: 12px 14px; margin-bottom: 14px; background: var(--surface-2); }
.mp-net { margin-top: 6px; padding: 12px 14px; border-radius: var(--radius-12); background: var(--surface-2); font-size: 0.95rem; }
@media (max-width: 640px) { .mp-figures { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Stok kartları */
.stock-thumb { width: 38px; height: 38px; border-radius: var(--radius-8); object-fit: cover; flex: none; background: var(--surface-2); border: 1px solid var(--border); }
.stock-thumb-lg { width: 64px; height: 64px; border-radius: var(--radius-12); }
.stock-thumb-empty { display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.stock-images { display: flex; flex-wrap: wrap; gap: 10px; }
.stock-image { display: flex; flex-direction: column; gap: 4px; width: 92px; }
.stock-image img { width: 92px; height: 92px; object-fit: cover; border-radius: var(--radius-10); border: 1px solid var(--border); }
.picker-results { position: absolute; z-index: 30; left: 0; right: 0; top: 100%; margin-top: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-10); box-shadow: var(--shadow-lg, 0 10px 30px rgba(0,0,0,.12)); max-height: 320px; overflow: auto; }
.picker-item { display: flex; justify-content: space-between; gap: 10px; width: 100%; text-align: left; padding: 9px 12px; border: 0; background: none; color: inherit; cursor: pointer; font: inherit; }
.picker-item:hover, .picker-item.on { background: var(--primary-soft); }
input.flash { outline: 2px solid var(--primary); background: var(--primary-soft); }

/* Lot düzenleme açılır kutusu */
.lot-edit { position: relative; display: inline-block; }
.lot-edit > summary { list-style: none; }
.lot-edit > summary::-webkit-details-marker { display: none; }
.lot-edit-form { position: absolute; right: 0; top: 100%; z-index: 25; width: min(520px, 88vw); margin-top: 4px; padding: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.lot-badges { display: flex; gap: 6px; flex-wrap: wrap; }
/* Cari kartı: tekrarlanan satırlar */
.rep-row { display: grid; gap: 8px; align-items: end; margin-bottom: 8px; }
.rep-row .field { margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
@media (max-width: 640px) { .rep-row { grid-template-columns: 1fr !important; padding-bottom: 8px; border-bottom: 1px dashed var(--border); } }

/* Çalışma dönemi seçici ve geçmiş dönem uyarısı */
.period-switch { display: flex; align-items: center; gap: 8px; margin: 8px 0 0; padding: 6px 10px; border: 1px solid var(--sidebar-border); border-radius: var(--radius-10); background: var(--sidebar-btn-bg); color: var(--sidebar-text); font-size: 0.82rem; }
.period-switch label { display: flex; align-items: center; gap: 6px; color: var(--sidebar-muted); font-weight: 600; }
.period-switch select { flex: 1; min-width: 0; background: transparent; border: 0; color: var(--sidebar-strong); font: inherit; font-weight: 700; padding: 2px 0; cursor: pointer; }
.period-switch select option { color: #111; }
.period-switch a { color: var(--sidebar-muted); display: inline-flex; }
.period-switch a:hover { color: var(--sidebar-strong); }
.period-banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 20px; background: var(--warning-soft); color: var(--text); border-bottom: 1px solid var(--border); font-size: 0.88rem; }
.period-banner form { margin-left: auto; }


/* ======================================================================
   İçerik genişliği (Görünüm → İçerik genişliği): genis (varsayılan) | tam | dar
   ====================================================================== */
.content { max-width: 1760px; }
.content-narrow { max-width: 1200px; }
html[data-width="tam"] .content, html[data-width="tam"] .content-narrow { max-width: none; }
html[data-layout="ust"][data-width="genis"] .content { max-width: none; }
html[data-layout] .grid > .card { margin-top: 0; }
html[data-width="dar"] .content { max-width: 1240px; }
html[data-width="dar"] .content-narrow { max-width: 760px; }

/* Daraltılmış menüde çalışma dönemi: yalnız yıl */
@media (min-width: 901px) {
  html[data-sidebar="collapsed"] .period-switch { justify-content: center; padding: 6px 2px; gap: 0; }
  html[data-sidebar="collapsed"] .period-switch label,
  html[data-sidebar="collapsed"] .period-switch a { display: none; }
  html[data-sidebar="collapsed"] .period-switch select { flex: none; width: 100%; text-align: center; text-align-last: center; font-size: 0.8rem; padding: 2px 0; appearance: none; -webkit-appearance: none; background-image: none; }
}

/* ======================================================================
   Panel temaları (Görünüm → Panel teması). Her tema menü yapısını VE
   kart, tablo, düğme, sekme, sayfa başlığı görünümünü birlikte değiştirir.
   classic | gruplu (Kurumsal) | cift (Modern) | ust (Yatay) | yuzen (Cam)
   ====================================================================== */
/* Ortak: menü başlığı düğme; kaydırma çubuğu görünür; açık sayfa görünür alana getirilir (app.js) */
button.nav-label { display: flex; align-items: center; gap: 7px; width: 100%; background: none; border: 0; font-family: inherit; text-align: left; cursor: default; }
.nav-label .nav-group-icon, .nav-label .nav-caret { display: none; }
.nav-label-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-scroll { position: relative; scrollbar-width: thin; scrollbar-color: var(--sidebar-border) transparent; }
.sidebar-scroll::-webkit-scrollbar { width: 8px; }
.sidebar-scroll::-webkit-scrollbar-thumb { background: var(--sidebar-border); border-radius: var(--radius-8); border: 2px solid var(--sidebar-bg); }
.sidebar-scroll::-webkit-scrollbar-thumb:hover { background: var(--sidebar-muted); }
.nav-link.active { font-weight: 650; }
.nav-rail, .topnav, .topbar-brand, .ribbon, .mega, .flyrail, .topbar-ctx { display: none; }
.topbar-pos { white-space: nowrap; }
.topbar-brand { align-items: center; gap: 10px; color: inherit; font-weight: 700; font-size: 1.02rem; white-space: nowrap; }
.topbar-brand:hover { text-decoration: none; }
.topbar-brand .brand-mark { width: 30px; height: 30px; }

/* ---------------------------------------------------------------------
   KURUMSAL (gruplu): koyu açılır kapanır menü, köşeli ve sıkı ekran,
   bantlı sayfa başlığı, çizgili tablolar — muhasebe programı hissi
   --------------------------------------------------------------------- */
html[data-layout="gruplu"] body { font-size: 14px; }
html[data-layout="gruplu"] .sidebar {
  --sidebar-bg: #1a2230; --sidebar-text: #c6cedb; --sidebar-strong: #ffffff; --sidebar-muted: #8591a5;
  --sidebar-hover: rgba(255, 255, 255, 0.06); --sidebar-border: rgba(255, 255, 255, 0.08);
  --sidebar-btn-bg: rgba(255, 255, 255, 0.05); --sidebar-menu-bg: #243044;
  --sidebar-active: color-mix(in srgb, var(--primary) 70%, #1a2230); --sidebar-active-text: #ffffff;
  --sidebar-w: 248px;
}
:root[data-theme="dark"][data-layout="gruplu"] .sidebar { --sidebar-bg: #090d14; --sidebar-active: color-mix(in srgb, var(--primary) 40%, #090d14); }
html[data-layout="gruplu"] .brand { background: rgba(0, 0, 0, 0.18); padding-top: 16px; padding-bottom: 16px; margin-bottom: 10px; }
html[data-layout="gruplu"] .nav-section { margin-top: 2px; }
html[data-layout="gruplu"] button.nav-label { cursor: pointer; padding: 9px 10px; border-radius: var(--radius-4); font-size: 0.72rem; color: var(--sidebar-muted); }
html[data-layout="gruplu"] button.nav-label:hover { background: var(--sidebar-hover); color: var(--sidebar-strong); }
html[data-layout="gruplu"] .nav-label .nav-group-icon { display: block; }
html[data-layout="gruplu"] .nav-label .nav-caret { display: block; margin-left: auto; transition: transform .18s ease; }
html[data-layout="gruplu"] .nav-section.open > .nav-label .nav-caret { transform: rotate(180deg); }
html[data-layout="gruplu"] .nav-section.has-active > .nav-label { color: var(--sidebar-strong); }
html[data-layout="gruplu"] .nav-section:not(.open) > .nav-items { display: none; }
html[data-layout="gruplu"] .nav-items { margin: 0 0 6px 17px; padding-left: 8px; border-left: 1px solid var(--sidebar-border); }
html[data-layout="gruplu"] .nav-link { border-radius: var(--radius-4); padding-top: 7px; padding-bottom: 7px; font-size: 0.88rem; }
html[data-layout="gruplu"][data-sidebar="collapsed"] .nav-items { display: block !important; margin: 0; padding: 0; border: 0; }
html[data-layout="gruplu"] .topbar { background: var(--surface); backdrop-filter: none; border-bottom: 1px solid var(--border); box-shadow: inset 0 3px 0 var(--primary); height: 54px; }
html[data-layout="gruplu"] .card, html[data-layout="gruplu"] .stat { border-radius: var(--radius-4); box-shadow: none; }
html[data-layout="gruplu"] .card-head { background: var(--surface-2); padding: 10px 16px; border-radius: var(--radius-4) var(--radius-4) 0 0; }
html[data-layout="gruplu"] .card-head h2 { font-size: 0.95rem; font-weight: 700; }
html[data-layout="gruplu"] .card-body { padding: 16px; }
html[data-layout="gruplu"] .card-foot { border-radius: 0 0 var(--radius-4) var(--radius-4); padding: 10px 16px; }
html[data-layout="gruplu"] .card + .card { margin-top: 12px; }
html[data-layout="gruplu"] .grid { gap: 12px; }
html[data-layout="gruplu"] .stat { border-top: 3px solid var(--primary); padding: 12px 14px; }
html[data-layout="gruplu"] .stat-value { font-size: 1.4rem; }
html[data-layout="gruplu"] .btn { border-radius: var(--radius-4); height: 34px; }
html[data-layout="gruplu"] .btn-sm { border-radius: var(--radius-3); height: 30px; }
html[data-layout="gruplu"] .btn-icon { width: 34px; } html[data-layout="gruplu"] .btn-icon.btn-sm { width: 30px; }
html[data-layout="gruplu"] .input, html[data-layout="gruplu"] .select { border-radius: var(--radius-4); height: 36px; }
html[data-layout="gruplu"] .textarea, html[data-layout="gruplu"] .topbar-search { border-radius: var(--radius-4); }
html[data-layout="gruplu"] .table th { background: var(--surface-3); color: var(--text-2); padding: 8px 12px; }
html[data-layout="gruplu"] .table td { padding: 8px 12px; }
html[data-layout="gruplu"] .table tbody tr:nth-child(even) { background: color-mix(in srgb, var(--surface-2) 70%, var(--surface)); }
html[data-layout="gruplu"] .table tbody tr:hover { background: var(--primary-soft); }
html[data-layout="gruplu"] .tabs { gap: 2px; }
html[data-layout="gruplu"] .tab { border: 1px solid transparent; border-bottom: 0; border-radius: var(--radius-4) var(--radius-4) 0 0; padding: 8px 14px; margin-bottom: -1px; }
html[data-layout="gruplu"] .tab.active { background: var(--surface); border-color: var(--border); color: var(--text); box-shadow: inset 0 2px 0 var(--primary); }
html[data-layout="gruplu"] h1 { font-size: 1.3rem; }
@media (min-width: 901px) {
  html[data-layout="gruplu"] .main { margin-left: 248px; }
  html[data-layout="gruplu"][data-sidebar="collapsed"] .main { margin-left: 72px; }
  html[data-layout="gruplu"] .sidebar { width: 248px; }
  html[data-layout="gruplu"][data-sidebar="collapsed"] .sidebar { width: 72px; }
  html[data-layout="gruplu"] .content { padding: 18px 20px; }
  /* Sayfa başlığı içerik üstünde tam genişlik bant */
  html[data-layout="gruplu"] .content:not(.content-narrow) > .page-head:first-child {
    margin: -18px -20px 18px; padding: 14px 20px; background: var(--surface); border-bottom: 1px solid var(--border);
  }
}

/* ---------------------------------------------------------------------
   MODERN (cift): renkli ikon şeridi + seçili bölümün sayfaları, gölgeli
   yuvarlak kartlar, hap düğmeler ve sekmeler, büyük rakamlar
   --------------------------------------------------------------------- */
html[data-layout="cift"] body { background: color-mix(in srgb, var(--primary) 5%, var(--bg)); }
html[data-layout="cift"] .topbar { background: color-mix(in srgb, color-mix(in srgb, var(--primary) 5%, var(--bg)) 80%, transparent); border-bottom-color: transparent; }
html[data-layout="cift"] .card, html[data-layout="cift"] .stat { border-radius: var(--radius-18); border-color: transparent; box-shadow: 0 2px 4px rgba(16, 24, 40, 0.03), 0 8px 24px rgba(16, 24, 40, 0.06); }
:root[data-theme="dark"][data-layout="cift"] .card, :root[data-theme="dark"][data-layout="cift"] .stat { border-color: var(--border); box-shadow: none; }
html[data-layout="cift"] .card-head { border-bottom-color: transparent; padding: 18px 22px 6px; }
html[data-layout="cift"] .card-head h2 { font-size: 1.08rem; font-weight: 700; }
html[data-layout="cift"] .card-body { padding: 16px 22px 22px; }
html[data-layout="cift"] .card-foot { border-radius: 0 0 var(--radius-18) var(--radius-18); border-top-color: transparent; }
html[data-layout="cift"] .grid { gap: 20px; }
html[data-layout="cift"] .card + .card { margin-top: 20px; }
html[data-layout="cift"] .stat { padding: 20px 22px; }
html[data-layout="cift"] .stat-value { font-size: 1.9rem; font-weight: 800; }
html[data-layout="cift"] .stat-icon { width: 38px; height: 38px; border-radius: var(--radius-12); }
html[data-layout="cift"] .btn { border-radius: var(--radius-tam); }
html[data-layout="cift"] .btn-icon { border-radius: 50%; }
html[data-layout="cift"] .btn-primary { box-shadow: 0 6px 16px color-mix(in srgb, var(--primary) 30%, transparent); }
html[data-layout="cift"] .input, html[data-layout="cift"] .select, html[data-layout="cift"] .textarea { border-radius: var(--radius-12); }
html[data-layout="cift"] .topbar-search { border-radius: var(--radius-tam); border-color: transparent; box-shadow: var(--shadow); }
html[data-layout="cift"] .table th { background: transparent; text-transform: none; letter-spacing: 0; font-size: 0.8rem; }
html[data-layout="cift"] .table td { border-bottom-color: color-mix(in srgb, var(--border) 60%, transparent); }
html[data-layout="cift"] .tabs { border-bottom: 0; gap: 4px; padding: 5px; background: var(--surface); border-radius: var(--radius-tam); box-shadow: var(--shadow); }
html[data-layout="cift"] .tab { border-bottom: 0; margin: 0; border-radius: var(--radius-tam); padding: 8px 16px; }
html[data-layout="cift"] .tab.active { background: var(--primary); color: var(--on-primary); }
html[data-layout="cift"] h1 { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.02em; }
@media (min-width: 901px) {
  html[data-layout="cift"] { --rail-w: 76px; }
  html[data-layout="cift"] .nav-rail {
    display: flex; flex-direction: column; align-items: center; gap: 4px; position: absolute; left: 0; top: 0; bottom: 0; width: var(--rail-w);
    padding: 14px 6px; overflow-y: auto; scrollbar-width: none; z-index: 2;
    background: linear-gradient(180deg, var(--primary), color-mix(in srgb, var(--primary) 62%, #000));
  }
  :root[data-theme="dark"][data-layout="cift"] .nav-rail { background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 32%, #0b111b), #0b111b); }
  html[data-layout="cift"] .nav-rail-btn {
    width: 64px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 9px 2px 7px; border: 0; border-radius: var(--radius-14);
    background: none; color: rgba(255, 255, 255, 0.78); font: inherit; font-size: 0.66rem; font-weight: 600; cursor: pointer; line-height: 1.15; text-align: center;
  }
  html[data-layout="cift"] .nav-rail-btn .icon { width: 21px; height: 21px; }
  html[data-layout="cift"] .nav-rail-btn:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
  html[data-layout="cift"] .nav-rail-btn.on { background: rgba(255, 255, 255, 0.22); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25); }
  html[data-layout="cift"] .sidebar { width: calc(var(--sidebar-w) + var(--rail-w)); padding-left: var(--rail-w); border-right: 0; box-shadow: 4px 0 24px rgba(16, 24, 40, 0.05); }
  html[data-layout="cift"] .main { margin-left: calc(var(--sidebar-w) + var(--rail-w)); }
  html[data-layout="cift"] .nav-section[data-nav-group]:not(.current) { display: none; }
  html[data-layout="cift"] .nav-section.current { margin-top: 16px; }
  html[data-layout="cift"] .nav-section.current > .nav-label { font-size: 1.05rem; text-transform: none; letter-spacing: 0; color: var(--sidebar-strong); font-weight: 800; padding: 2px 10px 10px; }
  html[data-layout="cift"] .nav-link { border-radius: var(--radius-12); padding-top: 10px; padding-bottom: 10px; }
  html[data-layout="cift"] .nav-link.active { background: var(--primary); color: var(--on-primary); box-shadow: 0 6px 14px color-mix(in srgb, var(--primary) 28%, transparent); }
  html[data-layout="cift"][data-sidebar="collapsed"] .sidebar { width: var(--rail-w); overflow: hidden; }
  html[data-layout="cift"][data-sidebar="collapsed"] .sidebar > :not(.nav-rail) { visibility: hidden; }
  html[data-layout="cift"][data-sidebar="collapsed"] .main { margin-left: var(--rail-w); }
  html[data-layout="cift"] .content { padding: 26px 30px; }
}

/* ---------------------------------------------------------------------
   YATAY (ust): koyu üst bant (logo, arama, düğmeler), altında yatay menü;
   sol menü yok, sayfa tüm genişliği kullanır
   --------------------------------------------------------------------- */
html[data-layout="ust"] .topbar { background: #1e293b; color: #e2e8f0; border-bottom: 0; backdrop-filter: none; }
:root[data-theme="dark"][data-layout="ust"] .topbar { background: #070b12; border-bottom: 1px solid var(--border); }
html[data-layout="ust"] .topbar-title { color: #fff; }
html[data-layout="ust"] .topbar .btn-ghost { color: #cbd5e1; }
html[data-layout="ust"] .topbar .btn-ghost:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
html[data-layout="ust"] .topbar .btn-soft { background: rgba(255, 255, 255, 0.1); color: #fff; }
html[data-layout="ust"] .topbar .btn-soft:hover { background: rgba(255, 255, 255, 0.18); }
html[data-layout="ust"] .topbar-search { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.12); color: #94a3b8; }
html[data-layout="ust"] .topbar-search input { color: #fff; }
html[data-layout="ust"] .topbar-search kbd { background: transparent; color: #94a3b8; border-color: rgba(255, 255, 255, 0.2); }
html[data-layout="ust"] .card, html[data-layout="ust"] .stat { border-radius: var(--radius-8); }
html[data-layout="ust"] .card-head { border-bottom-style: dashed; }
html[data-layout="ust"] .btn, html[data-layout="ust"] .input, html[data-layout="ust"] .select { border-radius: var(--radius-6); }
html[data-layout="ust"] .stat { box-shadow: none; position: relative; overflow: hidden; }
html[data-layout="ust"] .stat::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--primary); }
@media (min-width: 901px) {
  html[data-layout="ust"] .sidebar, html[data-layout="ust"] .menu-toggle { display: none; }
  html[data-layout="ust"] .main { margin-left: 0; }
  html[data-layout="ust"] .topbar-brand { display: inline-flex; margin-right: 8px; }
  html[data-layout="ust"] .topbar-brand + .topbar-title { display: none; }
  html[data-layout="ust"] .topbar, html[data-layout="ust"] .topnav, html[data-layout="ust"] .period-banner { padding-left: 28px; padding-right: 28px; }
  html[data-layout="ust"] .content { padding: 24px 28px; }
  html[data-layout="ust"] .topnav {
    display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding-top: 0; padding-bottom: 0; min-height: 48px; position: sticky; top: var(--topbar-h); z-index: 29;
    background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-sm);
  }
  .topnav-group { position: relative; }
  .topnav-btn { display: flex; align-items: center; gap: 7px; height: 48px; padding: 0 13px; border: 0; background: none; color: var(--text-2); font: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
  .topnav-btn:hover { color: var(--text); background: var(--surface-2); }
  .topnav-btn > .icon:last-child { width: 13px; height: 13px; opacity: .6; }
  .topnav-group.active .topnav-btn { color: var(--primary-text); box-shadow: inset 0 -3px 0 var(--primary); }
  .topnav-menu { position: absolute; top: 100%; left: 0; min-width: 250px; padding: 6px; z-index: 60; background: var(--surface); border: 1px solid var(--border); border-radius: 0 0 var(--radius-10) var(--radius-10); box-shadow: var(--shadow-lg); }
  .topnav-menu a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--radius-6); color: var(--text); font-size: 0.9rem; }
  .topnav-menu a:hover { background: var(--surface-2); text-decoration: none; }
  .topnav-menu a.active { background: var(--primary-soft); color: var(--primary-text); font-weight: 600; }
  .topnav-menu .nav-badge { margin-left: auto; }
  .topnav-menu form { margin: 0; }
  .topnav-menu-btn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: var(--radius-6); background: none; color: var(--text); font: inherit; font-size: 0.9rem; cursor: pointer; text-align: left; }
  .topnav-menu-btn:hover { background: var(--surface-2); }
  .topnav-spacer { flex: 1; }
  .topnav-book, .topnav-period { display: inline-flex; align-items: center; gap: 7px; height: 32px; margin-left: 6px; padding: 0 10px; border-radius: var(--radius-6); border: 1px solid var(--border); color: var(--text); font-size: 0.84rem; font-weight: 600; }
  .topnav-book:hover, .topnav-period:hover { background: var(--surface-2); text-decoration: none; }
  .topnav-user { margin-left: 6px; }
  .topnav-user .topnav-menu { left: auto; right: 0; }
  .topnav-user .topnav-btn { padding: 0 6px; }
}

/* ---------------------------------------------------------------------
   CAM (yuzen): renkli arka plan üzerinde yarı saydam, yüzen menü,
   üst çubuk ve kartlar; geniş yuvarlak köşeler
   --------------------------------------------------------------------- */
html[data-layout="yuzen"] body {
  background:
    radial-gradient(1100px 600px at 0% 0%, color-mix(in srgb, var(--primary) 20%, transparent), transparent 62%),
    radial-gradient(900px 520px at 100% 0%, rgba(245, 158, 11, 0.12), transparent 60%),
    radial-gradient(1000px 700px at 100% 100%, rgba(59, 130, 246, 0.13), transparent 62%),
    var(--bg);
  background-attachment: fixed;
}
html[data-layout="yuzen"] .card, html[data-layout="yuzen"] .stat {
  background: color-mix(in srgb, var(--surface) 82%, transparent); border-color: color-mix(in srgb, var(--surface) 50%, var(--border));
  border-radius: var(--radius-20); box-shadow: 0 10px 30px rgba(16, 24, 40, 0.07);
}
:root[data-theme="dark"][data-layout="yuzen"] .card, :root[data-theme="dark"][data-layout="yuzen"] .stat { border-color: rgba(255, 255, 255, 0.07); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); }
html[data-layout="yuzen"] .card-head { border-bottom-color: color-mix(in srgb, var(--border) 55%, transparent); }
html[data-layout="yuzen"] .card-foot { background: transparent; border-radius: 0 0 var(--radius-20) var(--radius-20); }
html[data-layout="yuzen"] .table th { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
html[data-layout="yuzen"] .table tbody tr:hover { background: color-mix(in srgb, var(--primary-soft) 60%, transparent); }
html[data-layout="yuzen"] .btn, html[data-layout="yuzen"] .input, html[data-layout="yuzen"] .select, html[data-layout="yuzen"] .textarea { border-radius: var(--radius-12); }
html[data-layout="yuzen"] .tab.active { background: color-mix(in srgb, var(--primary-soft) 70%, transparent); border-radius: var(--radius-10) var(--radius-10) 0 0; }
html[data-layout="yuzen"] .nav-link { border-radius: var(--radius-12); }
html[data-layout="yuzen"] .nav-link.active { box-shadow: inset 3px 0 0 var(--primary); }
@media (min-width: 901px) {
  html[data-layout="yuzen"] .sidebar { inset: 14px auto 14px 14px; border-radius: var(--radius-22); border: 1px solid color-mix(in srgb, var(--sidebar-bg) 40%, var(--sidebar-border)); box-shadow: 0 16px 40px rgba(16, 24, 40, 0.12); overflow: hidden;
    background: color-mix(in srgb, var(--sidebar-bg) 86%, transparent); }
  html[data-layout="yuzen"] .main { margin-left: calc(var(--sidebar-w) + 28px); }
  html[data-layout="yuzen"][data-sidebar="collapsed"] .main { margin-left: 100px; }
  html[data-layout="yuzen"] .topbar { top: 14px; margin: 14px 14px 0 0; border: 1px solid color-mix(in srgb, var(--surface) 50%, var(--border)); border-radius: var(--radius-18); box-shadow: 0 8px 24px rgba(16, 24, 40, 0.07); background: color-mix(in srgb, var(--surface) 80%, transparent); }
  html[data-layout="yuzen"] .period-banner { margin: 10px 14px 0 0; border: 1px solid var(--border); border-radius: var(--radius-14); }
  html[data-layout="yuzen"] .content { padding: 24px 14px 24px 0; }
}

/* Görünüm ayarındaki tema önizlemeleri */
.layout-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.layout-card { position: relative; border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; cursor: pointer; background: var(--surface); font-size: 0.86rem; }
.layout-card input { position: absolute; opacity: 0; pointer-events: none; }
.layout-card:has(input:checked) { border-color: var(--primary); box-shadow: var(--ring); }
.layout-card .lp { display: block; height: 74px; border-radius: var(--radius-8); border: 1px solid var(--border); background: var(--bg); position: relative; overflow: hidden; margin-bottom: 8px; }
.layout-card .lp i { position: absolute; display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-3); }
.layout-card .lp .s { background: var(--surface-3); border: 0; }
.layout-card .lp .d { background: #1e293b; border: 0; }
.layout-card .lp .a { background: var(--primary); border: 0; }
.layout-card strong { display: block; font-size: 0.86rem; }
.layout-card small { display: block; color: var(--muted); font-size: 0.74rem; line-height: 1.3; margin-top: 2px; }
.width-opts { display: flex; gap: 8px; flex-wrap: wrap; }
.width-opts label { display: flex; align-items: center; gap: 7px; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; font-size: 0.88rem; background: var(--surface); }
.width-opts label:has(input:checked) { border-color: var(--primary); box-shadow: var(--ring); }
@media (max-width: 640px) {
  html[data-layout="cift"] .stat { padding: 14px 16px; }
  html[data-layout="cift"] .stat-value { font-size: 1.35rem; }
  html[data-layout="cift"] h1 { font-size: 1.4rem; }
}

/* Daraltılmış menü her temada yalnız ikon: tema kuralları bunu ezemez */
@media (min-width: 901px) {
  html[data-sidebar="collapsed"] .sidebar .nav-link { font-size: 0 !important; justify-content: center !important; gap: 0 !important; padding: 10px 0 !important; }
  html[data-sidebar="collapsed"] .sidebar .nav-link .nav-badge { display: none; }
  html[data-sidebar="collapsed"] .sidebar .nav-edit-link { display: none; }
  html[data-sidebar="collapsed"] .sidebar .nav-items { margin: 0 !important; padding: 0 !important; border: 0 !important; }
}

/* ---------------------------------------------------------------------
   Sol menüsüz temalar (Yatay, Şerit, Başlat menüsü, Mini menü): ortak
   --------------------------------------------------------------------- */
@media (min-width: 901px) {
  html[data-layout="serit"] .sidebar, html[data-layout="mega"] .sidebar, html[data-layout="mini"] .sidebar,
  html[data-layout="serit"] .menu-toggle, html[data-layout="mega"] .menu-toggle, html[data-layout="mini"] .menu-toggle { display: none; }
  html[data-layout="serit"] .main, html[data-layout="mega"] .main,
  html[data-layout="serit"][data-sidebar="collapsed"] .main, html[data-layout="mega"][data-sidebar="collapsed"] .main { margin-left: 0; }
  html[data-layout="serit"] .topbar-ctx, html[data-layout="mega"] .topbar-ctx, html[data-layout="mini"] .topbar-ctx { display: flex; align-items: center; gap: 0; }
  html[data-layout="serit"] .topbar-ctx .topnav-btn, html[data-layout="mega"] .topbar-ctx .topnav-btn, html[data-layout="mini"] .topbar-ctx .topnav-btn { height: 40px; border-radius: var(--radius-10); }
  .topnav-book .truncate { max-width: 170px; }
  .topnav-menu-head { padding: 8px 10px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--border); line-height: 1.3; }
  .topnav-menu-head strong { display: block; font-size: 0.9rem; }
  .topnav-menu-head span { display: block; font-size: 0.78rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 230px; }
}

/* ---------------------------------------------------------------------
   ŞERİT (serit): muhasebe programı gibi — renkli bölüm sekmeleri,
   altında seçili bölümün büyük ikonlu sayfaları; sıkı, köşeli ekran
   --------------------------------------------------------------------- */
html[data-layout="serit"] body { font-size: 14px; }
html[data-layout="serit"] .topbar { height: 52px; background: var(--surface); backdrop-filter: none; }
html[data-layout="serit"] .card, html[data-layout="serit"] .stat { border-radius: var(--radius-6); box-shadow: none; }
html[data-layout="serit"] .card-head { background: var(--surface-2); padding: 10px 16px; border-radius: var(--radius-6) var(--radius-6) 0 0; }
html[data-layout="serit"] .card-foot { border-radius: 0 0 var(--radius-6) var(--radius-6); }
html[data-layout="serit"] .btn, html[data-layout="serit"] .input, html[data-layout="serit"] .select, html[data-layout="serit"] .topbar-search { border-radius: var(--radius-5); }
html[data-layout="serit"] .table th { background: var(--surface-3); color: var(--text-2); }
html[data-layout="serit"] .table td, html[data-layout="serit"] .table th { padding: 8px 12px; }
html[data-layout="serit"] .table td + td, html[data-layout="serit"] .table th + th { border-left: 1px solid var(--border); }
html[data-layout="serit"] .table tbody tr:nth-child(even) { background: color-mix(in srgb, var(--surface-2) 70%, var(--surface)); }
@media (min-width: 901px) {
  html[data-layout="serit"] { --topbar-h: 52px; }
  html[data-layout="serit"] .ribbon { display: block; position: sticky; top: 52px; z-index: 29; background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: 0 2px 6px rgba(16, 24, 40, 0.05); }
  .ribbon-tabs { display: flex; gap: 2px; padding: 0 20px; background: var(--primary); overflow-x: auto; scrollbar-width: none; }
  :root[data-theme="dark"] .ribbon-tabs { background: color-mix(in srgb, var(--primary) 28%, #0b111b); }
  .ribbon-tab { flex-shrink: 0; margin-top: 6px; padding: 7px 18px; border: 0; border-radius: var(--radius-6) var(--radius-6) 0 0; background: none; color: rgba(255, 255, 255, 0.85); font: inherit; font-size: 0.86rem; font-weight: 600; cursor: pointer; }
  .ribbon-tab:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }
  .ribbon-tab.on { background: var(--surface); color: var(--primary-text); }
  .ribbon-body { padding: 8px 16px; }
  .ribbon-panel { display: none; gap: 4px; overflow-x: auto; scrollbar-width: thin; }
  .ribbon-panel.on { display: flex; }
  .ribbon-item { position: relative; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; width: 96px; min-height: 70px; padding: 8px 6px 6px;
    border: 1px solid transparent; border-radius: var(--radius-6); color: var(--text-2); font-size: 0.76rem; font-weight: 600; line-height: 1.15; text-align: center; }
  .ribbon-item .icon { width: 26px; height: 26px; stroke-width: 1.6; color: var(--primary-text); }
  .ribbon-item:hover { background: var(--surface-2); border-color: var(--border); text-decoration: none; color: var(--text); }
  .ribbon-item.active { background: var(--primary-soft); border-color: color-mix(in srgb, var(--primary) 35%, transparent); color: var(--primary-text); }
  .ribbon-item .nav-badge { position: absolute; top: 3px; right: 6px; font-style: normal; }
  html[data-layout="serit"] .content { padding: 16px 20px; }
  html[data-layout="serit"][data-width="genis"] .content { max-width: none; }
}

/* ---------------------------------------------------------------------
   BAŞLAT MENÜSÜ (mega): sol menü yok; "Menü" düğmesi tüm bölümleri tek
   panelde sütunlar halinde açar; sayfa tüm genişliği kullanır
   --------------------------------------------------------------------- */
@media (min-width: 901px) {
  html[data-layout="mega"] .mega { display: block; }
  html[data-layout="mega"] .topbar { background: var(--surface); backdrop-filter: none; }
  .mega-toggle { height: 40px; border-radius: var(--radius-10); padding: 0 16px; }
  .mega-panel { position: absolute; left: 16px; right: 16px; top: calc(100% + 6px); z-index: 70; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px 22px;
    max-height: calc(100vh - var(--topbar-h) - 30px); overflow-y: auto; padding: 20px 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-16); box-shadow: var(--shadow-lg); }
  .mega-head { display: flex; align-items: center; gap: 8px; padding: 0 8px 8px; margin-bottom: 4px; border-bottom: 1px solid var(--border); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
  .mega-col.active .mega-head { color: var(--primary-text); border-bottom-color: var(--primary); }
  .mega-col a { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: var(--radius-8); color: var(--text); font-size: 0.9rem; }
  .mega-col a:hover { background: var(--surface-2); text-decoration: none; }
  .mega-col a.active { background: var(--primary-soft); color: var(--primary-text); font-weight: 600; }
  .mega-col .nav-badge { margin-left: auto; }
  html[data-layout="mega"] .content { padding: 26px 32px; }
  html[data-layout="mega"][data-width="genis"] .content { max-width: none; }
}
html[data-layout="mega"] .card, html[data-layout="mega"] .stat { border-radius: var(--radius-14); }

/* ---------------------------------------------------------------------
   MİNİ MENÜ (mini): ince ikon çubuğu; ikonun üzerine gelince (veya
   dokununca) o bölümün sayfaları yandan açılır
   --------------------------------------------------------------------- */
@media (min-width: 901px) {
  html[data-layout="mini"] .main, html[data-layout="mini"][data-sidebar="collapsed"] .main { margin-left: 78px; }
  html[data-layout="mini"] .flyrail { display: flex; flex-direction: column; align-items: center; position: fixed; left: 0; top: 0; bottom: 0; width: 78px; z-index: 45; padding: 12px 0;
    background: var(--sidebar-bg); border-right: 1px solid var(--sidebar-border); }
  .flyrail-brand { margin-bottom: 14px; }
  .flyrail-brand:hover { text-decoration: none; }
  .flyrail-groups { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; }
  .fly-group { position: relative; }
  .fly-btn { width: 66px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 9px 2px 7px; border: 0; border-radius: var(--radius-12); background: none; color: var(--sidebar-text);
    font: inherit; font-size: 0.64rem; font-weight: 600; line-height: 1.1; text-align: center; cursor: pointer; }
  .fly-btn .icon { width: 21px; height: 21px; }
  .fly-btn:hover, .fly-group:hover > .fly-btn, .fly-group.open > .fly-btn { background: var(--sidebar-hover); color: var(--sidebar-strong); text-decoration: none; }
  .fly-group.active > .fly-btn { background: var(--sidebar-active); color: var(--sidebar-active-text); }
  .fly-menu { display: none; position: absolute; left: calc(100% + 8px); top: -6px; z-index: 60; min-width: 250px; max-height: calc(100vh - 24px); overflow-y: auto; padding: 8px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-12); box-shadow: var(--shadow-lg); }
  .fly-group:nth-last-child(-n+2) .fly-menu { top: auto; bottom: -6px; }
  .fly-menu::before { content: ""; position: absolute; left: -14px; top: 0; bottom: 0; width: 14px; }
  .fly-group:hover > .fly-menu, .fly-group.open > .fly-menu, .fly-group:has(:focus-visible) > .fly-menu { display: block; }
  .fly-head { padding: 6px 10px 8px; margin-bottom: 4px; border-bottom: 1px solid var(--border); font-weight: 700; font-size: 0.92rem; }
  .fly-menu a { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: var(--radius-8); color: var(--text); font-size: 0.9rem; white-space: nowrap; }
  .fly-menu a:hover { background: var(--surface-2); text-decoration: none; }
  .fly-menu a.active { background: var(--primary-soft); color: var(--primary-text); font-weight: 600; }
  .fly-menu .nav-badge { margin-left: auto; }
  .fly-foot { margin-top: 8px; }
}

/* ---------------------------------------------------------------------
   SAĞ MENÜ (sag): klasik menü ekranın sağında
   --------------------------------------------------------------------- */
@media (min-width: 901px) {
  html[data-layout="sag"] .sidebar { inset: 0 0 0 auto; border-right: 0; border-left: 1px solid var(--sidebar-border); }
  html[data-layout="sag"] .main { margin-left: 0; margin-right: var(--sidebar-w); }
  html[data-layout="sag"][data-sidebar="collapsed"] .main { margin-left: 0; margin-right: 72px; }
  html[data-layout="sag"] .menu-toggle { order: 99; }
  html[data-layout="sag"][data-sidebar="collapsed"] .book-switcher-menu { left: auto; right: calc(100% + 8px); }
  html[data-layout="sag"] .nav-link.active { box-shadow: inset -3px 0 0 var(--primary); }
}

/* ---- Teklif ve faturalar / çek-senet ---- */
.tab-count { margin-left: 4px; font-size: .72rem; padding: 1px 6px; border-radius: var(--radius-hap); background: var(--surface-2, rgba(0,0,0,.06)); color: var(--muted); }
.btn-xs { height: 24px; padding: 0 8px; font-size: .76rem; border-radius: var(--radius-6); }
.inv-lines td { vertical-align: top; }
.inv-lines .input, .inv-lines .select { min-width: 0; }
.inv-totals { min-width: 260px; display: grid; gap: 4px; }
.inv-totals .row { gap: 16px; }
.inv-head { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.inv-head .k { font-size: .78rem; color: var(--muted); }
.mx-3 { margin-left: 16px; margin-right: 16px; }
.share-box { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.share-box .input { flex: 1; min-width: 200px; font-size: .84rem; }
@media (max-width: 640px) { .inv-totals { min-width: 0; width: 100%; } }

/* ---- Entegrasyonlar ------------------------------------------------------ */
.ig-summary { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.ig-stat { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); min-width: 150px; }
.ig-stat strong { font-size: 1.25rem; line-height: 1; }
.ig-stat span { font-size: 0.8rem; color: var(--muted); }
.ig-stat .ig-dot { width: 10px; height: 10px; }
.ig-filter { position: sticky; top: calc(var(--topbar-h) + 4px); z-index: 5; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 6px 0 10px; margin-bottom: 6px; background: var(--bg); }
.ig-filter::-webkit-scrollbar { display: none; }
.ig-chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: var(--radius-tam); border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-size: 0.85rem; font-weight: 600; white-space: nowrap; cursor: pointer; }
.ig-chip:hover { border-color: var(--border-strong); }
.ig-chip.active { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.ig-chip .ig-n { font-size: 0.72rem; padding: 1px 6px; border-radius: var(--radius-tam); background: var(--surface-3); color: var(--text-2); }
.ig-chip.active .ig-n { background: rgba(255, 255, 255, 0.22); color: var(--on-primary); }
.ig-section { margin: 18px 0 26px; }
.ig-section-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.ig-section-head h2 { font-size: 1.05rem; margin: 0; }
.ig-section-head p { margin: 2px 0 0; color: var(--muted); font-size: 0.86rem; }
.ig-ico { width: 36px; height: 36px; border-radius: var(--radius-10); display: inline-grid; place-items: center; flex: none; background: var(--primary-soft); color: var(--primary-text); }
.ig-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 12px; }
/* Uzun mağaza / sağlayıcı adları kartı telefonda şişirmesin */
.ig-card { min-width: 0; }
.ig-card > *, .ig-card-top > * { min-width: 0; }
.ig-card { position: relative; display: flex; flex-direction: column; gap: 12px; text-align: left; width: 100%; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); color: inherit; box-shadow: var(--shadow-sm); cursor: pointer; font: inherit; transition: border-color .15s, box-shadow .15s, transform .15s; }
.ig-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow); transform: translateY(-1px); }
.ig-card:focus-visible { outline: none; box-shadow: var(--ring); }
.ig-card-top { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ig-card-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ig-card-sub { font-size: 0.8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ig-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 10px; border-top: 1px dashed var(--border); font-size: 0.8rem; color: var(--text-2); min-height: 22px; }
.ig-card-foot .ig-status { display: flex; align-items: center; gap: 7px; min-width: 0; }
.ig-card-foot .ig-status span:last-child { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.3; }
.ig-logo { width: 42px; height: 42px; border-radius: var(--radius-12); display: inline-grid; place-items: center; flex: none; color: #fff; font-weight: 800; font-size: 0.98rem; letter-spacing: -0.02em; }
.ig-logo.ig-lg { width: 48px; height: 48px; border-radius: var(--radius-14); font-size: 1.1rem; }
.ig-logo.ig-sm { width: 34px; height: 34px; border-radius: var(--radius-10); font-size: 0.85rem; }
.ig-dot { width: 8px; height: 8px; border-radius: var(--radius-tam); flex: none; background: var(--faint); }
.ig-dot.ok { background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); }
.ig-dot.warn { background: var(--warning); box-shadow: 0 0 0 3px var(--warning-soft); }
.ig-dot.error { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.ig-dot.off { background: var(--faint); box-shadow: 0 0 0 3px var(--surface-3); }
.ig-add { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 118px; padding: 14px; border: 1.5px dashed var(--border-strong); border-radius: var(--radius-lg); background: transparent; color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; transition: border-color .15s, color .15s, background .15s; }
.ig-add:hover { border-color: var(--primary); color: var(--primary-text); background: var(--primary-soft); }
.ig-add .ig-plus { width: 34px; height: 34px; border-radius: var(--radius-tam); display: inline-grid; place-items: center; background: var(--surface-3); }
.ig-add:hover .ig-plus { background: var(--surface); }
.ig-locked { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); color: var(--muted); font-size: 0.88rem; background: var(--surface-2); }
.ig-locked .icon { flex: none; }
.ig-note { font-size: 0.85rem; color: var(--muted); padding: 14px 16px; border: 1px dashed var(--border); border-radius: var(--radius-lg); }
/* Yan panel */
/* Bağlantı ayarları sayfanın orta alanında açılır (çekmece kaldırıldı).
   Genişlik sınırı yok: diğer ayar ekranları gibi içerik alanını kullanır. */
.ig-panel-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.ig-panel-head h2 { margin: 0; font-size: 1.3rem; line-height: 1.25; letter-spacing: -0.02em; }
.ig-panel-head p { margin: 2px 0 0; font-size: 0.85rem; color: var(--muted); }
.ig-panel-head .ig-geri { margin-left: auto; flex: none; }
.ig-panel-body .card { margin-top: 0; margin-bottom: 14px; }
.ig-panel-body .card:last-child { margin-bottom: 0; }
.ig-state { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); margin-bottom: 14px; font-size: 0.88rem; }
.ig-state .ig-dot { margin-top: 6px; }
.ig-state.error { border-color: transparent; background: var(--danger-soft); }
.ig-state.warn { border-color: transparent; background: var(--warning-soft); }
.ig-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.ig-steps { counter-reset: ig; list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 0.86rem; }
.ig-steps li { position: relative; padding-left: 30px; }
.ig-steps li::before { counter-increment: ig; content: counter(ig); position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: var(--radius-tam); display: grid; place-items: center; font-size: 0.72rem; font-weight: 700; background: var(--primary-soft); color: var(--primary-text); }
/* Seçim ızgarası (banka / sağlayıcı / pazaryeri) */
.ig-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.ig-pick-item { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 8px; border: 1px solid var(--border); border-radius: var(--radius-12); background: var(--surface); color: inherit; text-align: center; font: inherit; font-size: 0.83rem; font-weight: 600; line-height: 1.25; cursor: pointer; }
.ig-pick-item:hover { border-color: var(--border-strong); }
.ig-pick-item .ig-pick-note { font-size: 0.7rem; font-weight: 500; color: var(--muted); }
.ig-pick-item input { position: absolute; opacity: 0; pointer-events: none; }
.ig-pick-item:has(input:checked), .ig-pick-item.active { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 1px var(--primary); }
.ig-pick-item:has(input:focus-visible) { box-shadow: var(--ring); }
@media (max-width: 640px) {
  .ig-grid { grid-template-columns: 1fr; }
  .ig-stat { min-width: 0; flex: 1; }
  .ig-pick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
button.link { background: none; border: 0; padding: 0; font: inherit; color: var(--primary-text); text-decoration: underline; cursor: pointer; }

/* ===== Faturalar modülü (genel bakış, gelen / giden e-faturalar) ===== */
.fv-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.fv-head h1 { font-size: 1.45rem; letter-spacing: -0.02em; }
.fv-head p { color: var(--muted); margin-top: 3px; font-size: 0.88rem; }
.fv-head-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.fv-crumb { font-size: 0.78rem; color: var(--muted); margin-bottom: 6px; display: flex; gap: 8px; align-items: center; }
.fv-crumb a { color: var(--primary-text); font-weight: 600; text-decoration: none; }

.fv-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
@media (max-width: 1100px) { .fv-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .fv-kpis { grid-template-columns: 1fr; gap: 10px; } }
.fv-kpi { position: relative; overflow: hidden; display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-16); padding: 18px 18px 16px; box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 14px rgba(16, 24, 40, .04); color: var(--text); text-decoration: none; transition: transform .15s ease, box-shadow .15s ease; min-width: 0; }
a.fv-kpi:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(16, 24, 40, .08); }
.fv-kpi-top { display: flex; justify-content: space-between; align-items: flex-start; }
.fv-ic { width: 36px; height: 36px; border-radius: var(--radius-10); display: grid; place-items: center; color: #fff; flex: none; }
.fv-ic svg { width: 18px; height: 18px; }
.fv-ic.green { background: #22a55b; } .fv-ic.blue { background: #3c6cf0; } .fv-ic.red { background: #ec4b4b; } .fv-ic.amber { background: #ef9a1a; }
.fv-ic.purple { background: #6c4fdb; } .fv-ic.teal { background: var(--primary); color: var(--on-primary); } .fv-ic.slate { background: #64748b; }
.fv-hint { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: var(--primary-text); background: var(--primary-soft); font-size: .72rem; font-weight: 700; cursor: help; }
.fv-kpi-label { margin-top: 14px; font-size: .84rem; color: var(--text-2); font-weight: 500; }
.fv-kpi-val { font-size: 1.5rem; font-weight: 750; letter-spacing: -0.02em; margin-top: 2px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fv-kpi-sub { font-size: .74rem; color: var(--muted); margin-top: 3px; }
.fv-kpi-sub b { color: var(--text-2); font-weight: 600; }
.fv-wm { position: absolute; right: 12px; bottom: 10px; opacity: .06; color: var(--text); pointer-events: none; }
.fv-wm svg { width: 64px; height: 64px; }
.fv-kpi.solid { border: 0; color: #fff; }
.fv-kpi.solid .fv-kpi-label, .fv-kpi.solid .fv-kpi-sub, .fv-kpi.solid .fv-kpi-sub b { color: rgba(255, 255, 255, .9); }
.fv-kpi.solid .fv-ic { background: rgba(255, 255, 255, .18); }
.fv-kpi.solid .fv-hint { background: rgba(255, 255, 255, .2); color: #fff; }
.fv-kpi.solid .fv-wm { color: #fff; opacity: .14; }
.fv-kpi.solid.green { background: linear-gradient(135deg, #2fb36a, #1f9a55); }
.fv-kpi.solid.purple { background: linear-gradient(135deg, #5b5be6, #3f3fc4); }
.fv-kpi.solid.amber { background: linear-gradient(135deg, #f3a632, #e08714); }
.fv-kpi.solid.red { background: linear-gradient(135deg, #f06262, #d83d3d); }
.fv-delta { display: inline-flex; align-items: center; gap: 3px; font-size: .72rem; font-weight: 700; padding: 1px 7px; border-radius: var(--radius-tam); margin-left: 6px; vertical-align: middle; }
.fv-delta.up { background: var(--success-soft); color: var(--success); } .fv-delta.down { background: var(--danger-soft); color: var(--danger); }
.fv-kpi.solid .fv-delta { background: rgba(255, 255, 255, .2); color: #fff; }

.fv-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
@media (max-width: 1000px) { .fv-grid { grid-template-columns: 1fr; } }
.fv-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-16); box-shadow: 0 1px 2px rgba(16, 24, 40, .04); min-width: 0; }
.fv-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 18px 10px; flex-wrap: wrap; }
.fv-card-head > .seg, .fv-period .seg { flex: none; width: auto; }
.fv-card-head h2 { font-size: 1rem; font-weight: 650; }
.fv-card-head p { font-size: .78rem; color: var(--muted); margin-top: 2px; }
.fv-card-body { padding: 6px 18px 18px; }
.fv-legend { display: flex; gap: 14px; font-size: .78rem; color: var(--text-2); justify-content: flex-end; margin-bottom: 4px; }
.fv-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }
.fv-chart { width: 100%; height: auto; display: block; }
.fv-chart .grid { stroke: var(--border); stroke-dasharray: 3 4; }
.fv-chart text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.fv-chart rect.bar { transition: opacity .15s; } .fv-chart g:hover rect.bar { opacity: .8; }
.fv-mini { list-style: none; margin: 0; padding: 0; }
.fv-mini li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.fv-mini li:last-child { border-bottom: 0; }
.fv-mini .grow { flex: 1; min-width: 0; }
.fv-mini .t { font-weight: 600; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fv-mini .s { font-size: .74rem; color: var(--muted); }
.fv-mini .v { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; font-size: .9rem; }
.fv-av { width: 34px; height: 34px; border-radius: var(--radius-10); display: grid; place-items: center; font-weight: 700; font-size: .8rem; background: var(--primary-soft); color: var(--primary-text); flex: none; }
.fv-bar { height: 6px; border-radius: var(--radius-hap); background: var(--surface-3); overflow: hidden; margin-top: 6px; }
.fv-bar span { display: block; height: 100%; background: #3c6cf0; border-radius: var(--radius-hap); }

.fv-period { display: flex; gap: 8px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-12); padding: 5px; box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
.fv-period input[type=month], .fv-period select { border: 0; background: transparent; font: inherit; font-weight: 600; color: var(--text); padding: 4px 6px; }
.fv-period .seg { background: var(--surface-2); }

/* Liste ekranı */
.fv-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-16); box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 14px rgba(16, 24, 40, .03); overflow: hidden; }
.fv-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; flex-wrap: wrap; border-bottom: 1px solid var(--border); }
.fv-counts { display: flex; gap: 18px; flex-wrap: wrap; font-size: .76rem; font-weight: 700; letter-spacing: .03em; color: var(--muted); text-transform: uppercase; }
.fv-counts b { color: var(--text); font-size: .86rem; margin-left: 4px; letter-spacing: 0; }
.fv-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.fv-pager { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: var(--radius-10); overflow: hidden; background: var(--surface); }
.fv-pager a, .fv-pager span { min-width: 32px; height: 32px; display: grid; place-items: center; color: var(--text-2); text-decoration: none; font-size: .8rem; font-weight: 600; padding: 0 6px; }
.fv-pager a:hover { background: var(--surface-2); }
.fv-pager .off { color: var(--faint); }
.fv-pager .cur { border-left: 1px solid var(--border); border-right: 1px solid var(--border); padding: 0 10px; }
.fv-filter { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 1.45fr) minmax(0, 1fr) auto; gap: 10px; padding: 16px 18px; background: var(--surface-2); border-bottom: 1px solid var(--border); align-items: end; }
@media (max-width: 1100px) { .fv-filter { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .fv-filter { grid-template-columns: 1fr; } }
/* Sipariş listesi süzgeci: sütun sayısı firma süzgecine göre (--fv-n); dar ekranda genel kural gibi 2 / 1 sütun */
.fv-filter.mp-sip-filtre { grid-template-columns: repeat(var(--fv-n, 4), minmax(0, 1fr)) auto; }
@media (max-width: 1100px) { .fv-filter.mp-sip-filtre { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .fv-filter.mp-sip-filtre { grid-template-columns: 1fr; } }
.fv-filter .field { margin: 0; }
.fv-filter .label { font-size: .72rem; }
.fv-filter .input, .fv-filter .select { height: 38px; background: var(--surface); }
.fv-filter-btns { display: flex; flex-direction: column; gap: 8px; grid-row: span 2; justify-content: flex-start; }
@media (max-width: 1100px) { .fv-filter-btns { grid-row: auto; flex-direction: row; grid-column: 1 / -1; order: 99; } }
.fv-sq { width: 38px; height: 38px; border-radius: var(--radius-10); border: 0; display: grid; place-items: center; color: #fff; cursor: pointer; text-decoration: none; }
.fv-sq.blue { background: #3c6cf0; } .fv-sq.red { background: #ec4b4b; }
.fv-sq:hover { filter: brightness(.95); }
.fv-range { display: flex; gap: 6px; } .fv-range > * { flex: 1; min-width: 0; }

.fv-table { width: 100%; border-collapse: collapse; }
.fv-table th { text-align: left; font-size: .7rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding: 12px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
.fv-table td { padding: 15px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; font-size: .86rem; }
.fv-table tbody tr:hover td { background: var(--surface-2); }
.fv-table tr.dim td { opacity: .62; }
.fv-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fv-no { font-weight: 700; letter-spacing: .01em; white-space: nowrap; color: var(--text); text-decoration: none; }
.fv-party { font-weight: 650; text-transform: uppercase; font-size: .82rem; line-height: 1.3; }
.fv-party a { color: inherit; text-decoration: none; } .fv-party a:hover { color: var(--primary-text); }
.fv-sub { font-size: .74rem; color: var(--muted); margin-top: 2px; }
.fv-amt { font-weight: 750; font-size: .92rem; }
.fv-tag { display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .03em; padding: 3px 8px; border-radius: var(--radius-6); background: var(--surface-3); color: var(--text-2); text-transform: uppercase; white-space: nowrap; }
.fv-tag.ticari { background: #fff1db; color: #a35c00; } .fv-tag.temel { background: #e5edff; color: #2c4fc0; } .fv-tag.earsiv { background: #efe9ff; color: #5a3dc2; }
:root[data-theme="dark"] .fv-tag.ticari { background: #3a2a0f; color: #f5b85c; }
:root[data-theme="dark"] .fv-tag.temel { background: #1b2647; color: #8fa9ff; }
:root[data-theme="dark"] .fv-tag.earsiv { background: #2a2147; color: #b6a2ff; }
.fv-state { display: inline-flex; align-items: center; gap: 5px; font-size: .74rem; font-weight: 650; white-space: nowrap; }
.fv-state::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.fv-state.ok { color: var(--success); } .fv-state.wait { color: var(--warning); } .fv-state.bad { color: var(--danger); } .fv-state.info { color: var(--info); } .fv-state.mute { color: var(--muted); }
.fv-acts { display: grid; grid-template-columns: repeat(3, 32px); gap: 6px; justify-content: end; }
.fv-acts > form { display: contents; }
.fv-table td.acts { width: 124px; }
.fv-act { width: 32px; height: 32px; border-radius: var(--radius-9); border: 0; display: grid; place-items: center; color: #fff; cursor: pointer; text-decoration: none; flex: none; }
.fv-act svg { width: 16px; height: 16px; }
.fv-act.g { background: #22a55b; } .fv-act.a { background: #ef9a1a; } .fv-act.r { background: #ec4b4b; } .fv-act.b { background: #3c6cf0; }
.fv-act.p { background: #6c4fdb; } .fv-act.s { background: #64748b; } .fv-act.t { background: var(--primary); color: var(--on-primary); }
.fv-act:hover { filter: brightness(.93); }
.fv-act[disabled] { opacity: .5; cursor: default; }
.fv-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 18px; font-size: .82rem; color: var(--muted); flex-wrap: wrap; }
.fv-foot b { color: var(--text); }
.fv-empty { padding: 48px 18px; text-align: center; color: var(--muted); }
.fv-empty .fv-ic { margin: 0 auto 12px; width: 48px; height: 48px; border-radius: var(--radius-14); }
.fv-switch { display: inline-flex; align-items: center; gap: 8px; font-size: .86rem; font-weight: 600; color: var(--text); cursor: pointer; text-decoration: none; }
.fv-switch i { width: 34px; height: 20px; border-radius: var(--radius-hap); background: var(--surface-3); border: 1px solid var(--border-strong); position: relative; transition: background .15s; }
.fv-switch i::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: left .15s; }
.fv-switch.on i { background: var(--primary); border-color: var(--primary); } .fv-switch.on i::after { left: 16px; }
.fv-modal-bg { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 80; display: grid; place-items: center; padding: 16px; }
.fv-modal { background: var(--surface); border-radius: var(--radius-16); width: 100%; max-width: 440px; box-shadow: var(--shadow-lg); }
.fv-modal-head { padding: 16px 18px; border-bottom: 1px solid var(--border); font-weight: 700; display: flex; justify-content: space-between; align-items: center; }
.fv-modal-body { padding: 16px 18px; }
.fv-modal-foot { padding: 12px 18px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; }
@media (max-width: 760px) {
  .fv-table thead { display: none; }
  .fv-table, .fv-table tbody, .fv-table tr, .fv-table td { display: block; width: 100%; }
  .fv-table tr { padding: 12px 14px; border-bottom: 1px solid var(--border); }
  .fv-table td { border: 0; padding: 3px 0; }
  .fv-table .num { text-align: left; }
  .fv-acts { justify-content: start; grid-template-columns: repeat(6, 32px); margin: 8px 0 0; }
  .fv-table td.acts { width: auto; }
}

/* ===== Uygulama geneli görünüm (Faturalar ekranlarıyla aynı dil): yumuşak kartlar, renkli simgeler, belirgin rakamlar ===== */
.page-head h1 { font-size: 1.45rem; letter-spacing: -0.02em; }
.page-head p { font-size: 0.88rem; }
.card { border-radius: var(--radius-16); box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 14px rgba(16, 24, 40, .035); }
.card-foot { border-radius: 0 0 var(--radius-16) var(--radius-16); }
.card-head { padding: 16px 20px; }
.card-head h2 { font-size: 1rem; font-weight: 650; letter-spacing: -0.01em; }
.card > .table-wrap:first-child .table thead th:first-child { border-top-left-radius: 16px; }
.card > .table-wrap:first-child .table thead th:last-child { border-top-right-radius: 16px; }
.stat { position: relative; overflow: hidden; border-radius: var(--radius-16); padding: 18px 18px 16px 22px; box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 14px rgba(16, 24, 40, .04); }
.stat::before { content: ''; position: absolute; left: 0; top: 16px; bottom: 16px; width: 4px; border-radius: 0 var(--radius-4) var(--radius-4) 0; background: #3c6cf0; }
.stats-row > .stat:nth-child(4n+2)::before, .grid > .stat:nth-child(4n+2)::before { background: #22a55b; }
.stats-row > .stat:nth-child(4n+3)::before, .grid > .stat:nth-child(4n+3)::before { background: #ef9a1a; }
.stats-row > .stat:nth-child(4n+4)::before, .grid > .stat:nth-child(4n+4)::before { background: #6c4fdb; }
.stat:has(.stat-icon)::before { display: none; }
.stat:has(.stat-icon) { padding-left: 18px; }
.stat-label { font-size: 0.84rem; color: var(--text-2); font-weight: 500; }
.stat-value { font-size: 1.5rem; font-weight: 750; letter-spacing: -0.02em; }
.stat-sub { font-size: 0.75rem; }
.stat-icon { width: 34px; height: 34px; border-radius: var(--radius-10); background: #3c6cf0; color: #fff; margin-right: 4px; }
.stat-icon svg { width: 17px; height: 17px; }
.stat-icon.warn { background: #ef9a1a; color: #fff; } .stat-icon.danger { background: #ec4b4b; color: #fff; } .stat-icon.info { background: #6c4fdb; color: #fff; }
.stats-row > .stat:nth-child(4n+2) .stat-icon:not(.warn):not(.danger):not(.info) { background: #22a55b; }
.stats-row > .stat:nth-child(4n+3) .stat-icon:not(.warn):not(.danger):not(.info) { background: #0f9488; }
a.stat { transition: transform .15s ease, box-shadow .15s ease; }
a.stat:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(16, 24, 40, .08); }
.table th { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.05em; padding: 12px 16px; }
.table td { padding: 14px 16px; }
.table td.num, .table .text-right { font-variant-numeric: tabular-nums; }
.btn { border-radius: var(--radius-10); }
.btn-sm { border-radius: var(--radius-9); }
.input, .select, .textarea { border-radius: var(--radius-10); }
.tabs { gap: 6px; border-bottom: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-12); padding: 5px; box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
.tab { border-bottom: 0; margin-bottom: 0; border-radius: var(--radius-8); padding: 8px 12px; font-size: 0.86rem; }
.tab:hover { background: var(--surface-2); }
.tab.active { background: var(--primary-soft); color: var(--primary-text); }
.alert { border-radius: var(--radius-12); }
.badge { border-radius: var(--radius-7); }
:root[data-theme="dark"] .card, :root[data-theme="dark"] .stat, :root[data-theme="dark"] .fv-kpi, :root[data-theme="dark"] .fv-card, :root[data-theme="dark"] .fv-panel { box-shadow: none; }

/* ===== Sol menü alt menüleri (Faturalar, Planlama, Varlıklar…) ===== */
.nav-sub-btn { width: 100%; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; }
.nav-sub-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-sub-btn .nav-badge { margin-left: 0; }
.nav-sub-caret { margin-left: 2px; opacity: .7; transition: transform .18s ease; }
.nav-sub.open > .nav-sub-btn .nav-sub-caret { transform: rotate(180deg); }
.nav-sub-btn.active-parent { color: var(--sidebar-strong); font-weight: 650; }
.nav-sub:not(.open) > .nav-sub-items { display: none; }
.nav-sub-items { margin: 2px 0 6px 19px; padding-left: 8px; border-left: 1px solid var(--sidebar-border); }
.nav-sub-items .nav-link { padding-top: 7px; padding-bottom: 7px; font-size: 0.88rem; }
.nav-sub-items .nav-link .icon { width: 16px; height: 16px; }
html[data-sidebar="collapsed"] .nav-sub-btn { display: none; }
html[data-sidebar="collapsed"] .nav-sub > .nav-sub-items { display: block; margin: 0; padding: 0; border: 0; }
/* Menü düzenleyicide alt menü */
.me-sub { border: 1px solid var(--border-strong); border-radius: var(--radius-10); background: var(--primary-soft); padding: 4px; }
.me-sub-head { display: flex; align-items: center; gap: 6px; padding: 2px 2px 4px; }
.me-sub-head .input { height: 32px; font-weight: 650; max-width: 220px; background: var(--surface); }
.me-sub-icon { width: 108px; height: 32px; font-size: .8rem; }
.me-sub-preview { display: inline-grid; place-items: center; width: 26px; color: var(--primary-text); }
.me-sub-preview [hidden] { display: none; }
.me-sub-tag { background: var(--surface); border-radius: var(--radius-tam); padding: 1px 8px; }
.me-sublist { margin-left: 26px; background: var(--surface-2); border-radius: var(--radius-8); min-height: 40px; }

/* ===== Pazaryeri sipariş yönetimi ===== */
.mp-mediamarkt { background: #df0000; } .mp-teknosa { background: #1d4ed8; } .mp-koctas { background: #f97316; }
.mp-woocommerce { background: #7f54b3; } .mp-shopify { background: #5e8e3e; } .mp-ikas { background: #1f2a44; } .mp-ideasoft { background: #f26b21; } .mp-ticimax { background: #d0182d; } .mp-shopphp_rest { background: #0f6cbd; } .mp-boyner { background: #111827; } .mp-modanisa { background: #be185d; } .mp-lazimbana { background: #0891b2; }
.mp-teknikservis { background: #475569; }
.mp-chip { display: inline-flex; align-items: center; gap: 7px; font-size: .78rem; font-weight: 650; color: var(--text-2); white-space: nowrap; }
.mp-chip .mp-logo { width: 22px; height: 22px; border-radius: var(--radius-6); font-size: .7rem; }
.mp-tabs { display: flex; gap: 4px; padding: 10px 14px 0; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.mp-tabs::-webkit-scrollbar { display: none; }
.mp-tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 9px 12px 11px; font-size: .86rem; font-weight: 650; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.mp-tabs a:hover { color: var(--text); }
.mp-tabs a.on { color: var(--primary-text); border-bottom-color: var(--primary); }
.mp-tabs .n { min-width: 22px; padding: 1px 7px; border-radius: var(--radius-hap); background: var(--surface-3); color: var(--text-2); font-size: .72rem; font-weight: 700; text-align: center; }
.mp-tabs a.on .n { background: var(--primary-soft); color: var(--primary-text); }
.mp-tabs .n.hot { background: #ef9a1a; color: #fff; }
.fv-table td.ck, .fv-table th.ck { width: 34px; padding-right: 0; }
.fv-table input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }
.mp-items { display: flex; flex-direction: column; gap: 3px; min-width: 220px; max-width: 360px; }
.mp-items div { font-size: .8rem; line-height: 1.3; display: flex; gap: 6px; }
.mp-items b { flex: none; min-width: 22px; color: var(--text); }
.mp-items span { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; color: var(--text-2); }
.mp-items .more { color: var(--muted); font-size: .74rem; }
.mp-flag { display: inline-flex; align-items: center; gap: 4px; font-size: .7rem; font-weight: 700; padding: 2px 7px; border-radius: var(--radius-6); white-space: nowrap; }
.mp-flag.ok { background: var(--success-soft); color: var(--success); } .mp-flag.wait { background: #fff1db; color: #a35c00; } .mp-flag.bad { background: var(--danger-soft); color: var(--danger); } .mp-flag.info { background: #e5edff; color: #2c4fc0; }
.mp-flag svg { width: 12px; height: 12px; }
:root[data-theme="dark"] .mp-flag.wait { background: rgba(239, 154, 26, .16); color: #f3b24f; } :root[data-theme="dark"] .mp-flag.info { background: rgba(60, 108, 240, .18); color: #8fb0ff; }
.mp-bulk { position: sticky; bottom: 12px; z-index: 30; margin: 0 14px 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-radius: var(--radius-14); background: var(--text); color: var(--surface); box-shadow: var(--shadow-lg); }
.mp-bulk .btn { height: 34px; }
.mp-bulk b { font-size: .9rem; margin-right: 6px; }
.topnav-menu button[data-tam-ekran], .topnav-menu button[data-ses-dugme] { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 12px; background: none; border: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.topnav-menu button[data-tam-ekran]:hover, .topnav-menu button[data-ses-dugme]:hover { background: var(--surface-2); }

/* Senkron göstergesi ve değişen hücrenin kısa vurgusu */
.senkron { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--muted); }
.senkron::before { content: ''; width: 8px; height: 8px; border-radius: var(--radius-hap); background: var(--success); flex: none; }
.senkron.calisiyor::before { animation: senkronYanip 1s ease-in-out infinite; }
@keyframes senkronYanip { 50% { opacity: .25; } }
.senkron-degisti { animation: senkronVurgu 2.4s ease-out; }
@keyframes senkronVurgu { 0% { background: color-mix(in srgb, var(--success) 35%, transparent); } 100% { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .senkron.calisiyor::before, .senkron-degisti { animation: none; } }

/* Ürün satırındaki pazaryeri rozetleri */
.kanal-rozet { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.kanal-rozet:empty { display: none; }
.kanal-rozet .mp-chip { gap: 4px; }
.kanal-rozet .badge { font-size: .68rem; padding: 1px 5px; }

/* Tam ekran: yalnız sayfa içeriği kalır. Kenar menü, üst şerit (arama çubuğu dahil),
   üst menü, alt menü, kırıntı yolu ve sayfa başlığı gizlenir; içerik kenardan kenara açılır. */
body.tam-ekran .sidebar, body.tam-ekran .topbar, body.tam-ekran .topnav,
body.tam-ekran .mobile-nav, body.tam-ekran .topbar-ctx,
body.tam-ekran .topbar-search, body.tam-ekran .fv-crumb, body.tam-ekran .breadcrumb,
body.tam-ekran .app-footer, body.tam-ekran footer { display: none !important; }
/* Yanlardaki boşluğun kaynağı olan kapsayıcı genişlikleri sıfırlanır (içerik genişliği ayarı dahil) */
body.tam-ekran .app, body.tam-ekran .main,
html[data-width] body.tam-ekran .content, html[data-layout] body.tam-ekran .content {
  margin: 0 !important; max-width: none !important; width: 100% !important;
}
body.tam-ekran .main { margin-left: 0 !important; padding: 0 !important; }
body.tam-ekran .content, body.tam-ekran .content-narrow {
  max-width: none !important; width: 100% !important; margin: 0 !important;
  padding: 8px 10px 10px !important; box-sizing: border-box;
}
body.tam-ekran { overflow-x: hidden; }
/* Üst şerit gizlendiği için çıkış düğmesi köşede durur */
.tam-ekran-cik { position: fixed; top: 10px; right: 12px; z-index: 60; display: none; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: var(--radius-10); border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font: inherit; font-size: .85rem; cursor: pointer; box-shadow: var(--shadow-lg); opacity: .85; }
.tam-ekran-cik:hover { opacity: 1; }
body.tam-ekran .tam-ekran-cik { display: inline-flex; }
/* Ses düğmesindeki açık / kapalı noktası */
.ses-nokta { position: absolute; right: 6px; bottom: 6px; width: 7px; height: 7px; border-radius: var(--radius-hap); background: var(--muted); }
[data-ses-dugme] { position: relative; }
[data-ses-dugme][aria-pressed="true"] .ses-nokta { background: var(--success); }

/* Liste üstündeki açık zeminli toplu işlem şeridi (koyu .mp-bulk'tan ayrıdır: yazı rengi devralınmaz) */
.mp-toplu { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--surface-2); color: var(--text); }
.mp-toplu label, .mp-toplu span, .mp-toplu .fv-sub { color: var(--text); }
.mp-toplu .fv-sub { opacity: .75; }
.mp-toplu .btn-ghost { color: var(--text); }
.mp-detail { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
@media (max-width: 1000px) { .mp-detail { grid-template-columns: 1fr; } }
.mp-detail > div { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.mp-steps { display: flex; padding: 18px; gap: 0; overflow-x: auto; }
.mp-step { flex: 1; min-width: 92px; position: relative; text-align: center; font-size: .76rem; color: var(--muted); font-weight: 600; }
.mp-step i { display: grid; place-items: center; width: 28px; height: 28px; margin: 0 auto 6px; border-radius: 50%; background: var(--surface-3); color: var(--muted); position: relative; z-index: 1; font-style: normal; font-size: .76rem; }
.mp-step::before { content: ''; position: absolute; top: 14px; left: -50%; right: 50%; height: 2px; background: var(--surface-3); }
.mp-step:first-child::before { display: none; }
.mp-step.done i { background: #22a55b; color: #fff; } .mp-step.done::before, .mp-step.cur::before { background: #22a55b; }
.mp-step.cur i { background: var(--primary); color: var(--on-primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.mp-step.done, .mp-step.cur { color: var(--text); }
.mp-step.bad i { background: #ec4b4b; color: #fff; }
.mp-step i svg { width: 14px; height: 14px; }
.mp-kv { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 8px 12px; font-size: .84rem; }
.mp-kv dt { color: var(--muted); } .mp-kv dd { margin: 0; font-weight: 550; overflow-wrap: anywhere; }
.mp-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.mp-note { font-size: .8rem; padding: 10px 12px; border-radius: var(--radius-10); background: var(--surface-2); color: var(--text-2); }
.mp-note.bad { background: var(--danger-soft); color: var(--danger); }
.mp-link-cell { min-width: 220px; }
.mp-pick { position: relative; }
.mp-pick-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 40; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-12); box-shadow: var(--shadow-lg); max-height: 260px; overflow: auto; }
.mp-pick-list button { display: flex; justify-content: space-between; gap: 10px; width: 100%; border: 0; background: none; text-align: left; padding: 9px 12px; font: inherit; font-size: .84rem; cursor: pointer; color: var(--text); }
.mp-pick-list button:hover, .mp-pick-list button.on { background: var(--surface-2); }
.mp-pick-list small { color: var(--muted); white-space: nowrap; }
.mp-qcard { padding: 16px 18px; border-bottom: 1px solid var(--border); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; }
.mp-qcard:last-child { border-bottom: 0; }
.mp-qcard .q { font-size: .92rem; line-height: 1.5; white-space: pre-line; }
.mp-qcard .a { margin-top: 8px; padding: 10px 12px; border-radius: var(--radius-10); background: var(--success-soft); font-size: .86rem; white-space: pre-line; }
.mp-qcard textarea { margin-top: 8px; }
.mp-qcard .meta { font-size: .74rem; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.mp-om { margin-top: 14px; border: 1px solid var(--border); border-radius: var(--radius-12); padding: 14px; background: var(--surface-2); }
.mp-om-head { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px; }
.mp-om-head > .icon, .mp-om-head > svg { color: var(--primary-text); margin-top: 2px; }
.mp-om-sub { margin-left: 26px; }
.mp-shops { list-style: none; margin: 0; padding: 0; }
.mp-shops li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); }
.mp-shops li:last-child { border-bottom: 0; }
.mp-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; vertical-align: 1px; }
.mp-dot.ok { background: #22a55b; } .mp-dot.bad { background: #ec4b4b; } .mp-dot.wait { background: #ef9a1a; } .mp-dot.off { background: var(--faint); }
.mp-todo { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
@media (max-width: 1100px) { .mp-todo { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 620px) { .mp-todo { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mp-todo a { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: var(--radius-14); background: var(--surface); border: 1px solid var(--border); text-decoration: none; color: var(--text); transition: transform .15s, box-shadow .15s; }
.mp-todo a:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(16, 24, 40, .08); }
.mp-todo .v { font-size: 1.6rem; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.mp-todo .l { font-size: .8rem; color: var(--text-2); font-weight: 600; }
.mp-todo a.hot { border-color: #ef9a1a; box-shadow: inset 0 0 0 1px #ef9a1a; }
.mp-todo a.zero .v { color: var(--faint); }
@media (max-width: 760px) { .fv-table.mp-resp thead { display: none; } .fv-table.mp-resp tr { display: grid; grid-template-columns: auto 1fr auto; padding: 10px 6px; border-bottom: 1px solid var(--border); } .fv-table.mp-resp td { border: 0; padding: 4px 8px; } .fv-table.mp-resp td.hide-sm { display: none; } }
.mp-link-cell { width: 240px; max-width: 260px; }
.mp-pick .input { width: 100%; min-width: 0; }

/* Pazaryeri yetki (OAuth) kutusu */
.mp-oauth { border: 1px solid var(--border-strong); border-radius: var(--radius-10); padding: 10px 12px; margin: 0 0 12px; background: var(--surface); }
.mp-oauth-row { display: flex; gap: 8px; align-items: center; margin-top: 4px; }
.mp-oauth-row .input { flex: 1; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.mp-oauth-state { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.mp-oauth-state .btn { margin-left: auto; }

/* ---- Projeler ---- */
.pj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.pj-card { --pj: #2563eb; display: block; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--pj); border-radius: var(--radius-lg); padding: 14px 16px; color: inherit; box-shadow: var(--shadow-sm); transition: border-color .15s, transform .15s; }
.pj-card:hover { text-decoration: none; border-color: var(--border-strong); border-left-color: var(--pj); transform: translateY(-1px); }
.pj-teal { --pj: #0f9488; } .pj-blue { --pj: #2563eb; } .pj-violet { --pj: #7c3aed; } .pj-rose { --pj: #e11d48; } .pj-orange { --pj: #ea580c; }
.pj-amber { --pj: #d97706; } .pj-green { --pj: #16a34a; } .pj-slate { --pj: #475569; }
.pj-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 12px 0 10px; }
.pj-nums div { display: flex; flex-direction: column; min-width: 0; }
.pj-nums span { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.pj-nums b { font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pj-bar { height: 6px; border-radius: var(--radius-hap); background: var(--surface-3); overflow: hidden; margin-bottom: 4px; }
.pj-bar i { display: block; height: 100%; background: var(--success); border-radius: var(--radius-hap); }
.pj-bar i.over { background: var(--danger); }
.pj-task { display: flex; gap: 10px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.pj-task:last-child { border-bottom: 0; }
.pj-task.done .pj-task-title { text-decoration: line-through; color: var(--muted); }
.pj-check { width: 22px; height: 22px; border-radius: var(--radius-7); border: 2px solid var(--border-strong); background: var(--surface); display: inline-grid; place-items: center; cursor: pointer; padding: 0; color: #fff; flex: none; }
.pj-task.done .pj-check { background: var(--success); border-color: var(--success); }
.pj-swatch { position: relative; width: 28px; height: 28px; border-radius: var(--radius-8); display: inline-block; cursor: pointer; }
.pj-swatch input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.pj-swatch input:checked + span { position: absolute; inset: -3px; border: 2px solid var(--text); border-radius: var(--radius-10); }
.pj-swatch input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ---- Uygulama kilidi ---- */
.pinpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 280px; margin: 8px auto 0; }
.pinpad button { height: 58px; border-radius: var(--radius-14); border: 1px solid var(--border); background: var(--surface); font-size: 1.35rem; font-weight: 600; color: var(--text); cursor: pointer; display: grid; place-items: center; }
.pinpad button:active { background: var(--surface-3); }
.pinpad button.ok { background: var(--primary); border-color: var(--primary); color: #fff; }

/* Hesap araçları */
.tool .tool-out { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-top: 12px; }
.tool .tool-out > div { background: var(--surface-2, rgba(0,0,0,.04)); border: 1px solid var(--border); border-radius: var(--radius-10); padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.tool .tool-out span { font-size: .78rem; color: var(--muted); }
.tool .tool-out b { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.tool-lines { display: grid; gap: 10px; }
.tool-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tool-line .input { width: 120px; }
.tool-line b { margin-left: auto; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .tool-line b { margin-left: 0; width: 100%; } }
.risk-dl { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin: 0 0 8px; }
.risk-dl dt { color: var(--muted); }
.risk-dl dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }

/* Sayfa geçişi: "<Sayfa> hazırlanıyor" — renkler seçili tema / vurgu renginden (--primary) */
.page-loader { --pl-c: var(--primary); --pl-c2: color-mix(in srgb, var(--primary) 60%, #fff); position: fixed; inset: 0; z-index: 9990; display: flex; align-items: center; justify-content: center; padding: 16px; user-select: none; opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility 0s linear .2s; }
.page-loader.on { opacity: 1; visibility: visible; transition: opacity .2s ease; }
.pl-backdrop { position: fixed; inset: 0; background: rgba(2, 6, 23, .4); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.pl-glow { position: absolute; width: 320px; height: 320px; border-radius: 50%; background: color-mix(in srgb, var(--pl-c) 22%, transparent); filter: blur(64px); pointer-events: none; animation: pl-pulse 2s cubic-bezier(.4, 0, .6, 1) infinite; }
.pl-card { position: relative; display: flex; flex-direction: column; align-items: center; padding: 28px 32px; border-radius: var(--radius-24); text-align: center; min-width: 280px; max-width: 340px; overflow: hidden;
  background: color-mix(in srgb, var(--surface) 90%, transparent); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
  border: 1px solid color-mix(in srgb, var(--surface) 60%, transparent); box-shadow: 0 20px 50px color-mix(in srgb, var(--pl-c) 14%, rgba(8, 20, 40, .12)); }
.pl-line { position: absolute; top: 0; left: 0; right: 0; height: 2px; opacity: .8; background: linear-gradient(to right, transparent, var(--pl-c), transparent); }
.pl-spinner { position: relative; width: 80px; height: 80px; display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.pl-ring { position: absolute; inset: 0; border-radius: 50%; }
.pl-ring.faint { border: 2px solid color-mix(in srgb, var(--pl-c) 15%, transparent); }
.pl-ring.spin { border: 2px solid transparent; border-top-color: var(--pl-c); border-right-color: var(--pl-c2); animation: pl-spin 1s linear infinite; }
.pl-ring.dash { inset: 6px; border: 1px dashed color-mix(in srgb, var(--pl-c) 30%, transparent); animation: pl-spin 9s linear infinite reverse; }
.pl-logo { position: relative; width: 48px; height: 48px; border-radius: var(--radius-16); display: flex; align-items: center; justify-content: center; background: var(--surface); color: var(--pl-c);
  box-shadow: 0 4px 6px -1px color-mix(in srgb, var(--pl-c) 20%, transparent), 0 0 0 1px rgba(0, 0, 0, .05); animation: pl-pulse 2.5s cubic-bezier(.4, 0, .6, 1) infinite; }
.pl-logo svg { width: 24px; height: 24px; }
.pl-title { display: flex; align-items: center; justify-content: center; gap: 4px; font-size: 16px; font-weight: 600; letter-spacing: -.025em; color: var(--text); }
.pl-title span:first-child::first-letter { text-transform: uppercase; }
.pl-dots { display: inline-flex; align-items: center; gap: 2px; margin-left: 2px; }
.pl-dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--pl-c); animation: pl-bounce 1s infinite; }
.pl-dots i:nth-child(1) { animation-delay: -.3s; }
.pl-dots i:nth-child(2) { animation-delay: -.15s; }
.pl-sub { font-size: 12px; font-weight: 500; color: var(--muted); margin: 4px 0 0; }
.pl-bar { margin-top: 20px; width: 176px; height: 6px; border-radius: var(--radius-tam); background: var(--surface-2, #f3f4f6); overflow: hidden; position: relative; }
.pl-bar::after { content: ""; position: absolute; top: 0; bottom: 0; width: 96px; border-radius: var(--radius-tam); background: linear-gradient(to right, transparent, var(--pl-c), transparent); animation: pl-bar 1.4s ease-in-out infinite; }
:root[data-theme="dark"] .page-loader { --pl-c2: color-mix(in srgb, var(--primary) 45%, #7dd3fc); }
:root[data-theme="dark"] .pl-backdrop { background: rgba(0, 0, 0, .7); }
:root[data-theme="dark"] .pl-glow { background: color-mix(in srgb, var(--pl-c) 26%, transparent); }
:root[data-theme="dark"] .pl-card { border-color: color-mix(in srgb, var(--border) 80%, transparent); box-shadow: 0 25px 60px rgba(0, 0, 0, .6); }
:root[data-theme="dark"] .pl-logo { background: var(--surface-3, #1f2937); box-shadow: 0 4px 6px -1px color-mix(in srgb, var(--pl-c) 20%, transparent), 0 0 0 1px rgba(255, 255, 255, .1); }
@keyframes pl-spin { to { transform: rotate(360deg); } }
@keyframes pl-pulse { 50% { opacity: .5; } }
@keyframes pl-bounce { 0%, 100% { transform: translateY(-25%); animation-timing-function: cubic-bezier(.8, 0, 1, 1); } 50% { transform: none; animation-timing-function: cubic-bezier(0, 0, .2, 1); } }
@keyframes pl-bar { 0% { left: -96px; } 100% { left: 176px; } }
@media (prefers-reduced-motion: reduce) { .pl-ring.spin, .pl-ring.dash, .pl-glow, .pl-logo, .pl-dots i, .pl-bar::after { animation-duration: 3s; } }

/* Hızlı kurulum */
.setup-wrap { max-width: 780px; margin: 0 auto; }
.setup-head { display: flex; gap: 14px; align-items: center; margin: 4px 0 16px; }
.setup-head h1 { font-size: 1.35rem; margin: 0 0 4px; }
.setup-head p { margin: 0; color: var(--muted); }
.setup-logo { flex: none; width: 48px; height: 48px; border-radius: var(--radius-14); display: grid; place-items: center; background: var(--primary-soft, rgba(37,99,235,.1)); color: var(--primary); }
.setup-steps { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0 0 14px; overflow-x: auto; }
.setup-steps li { flex: 1; min-width: 92px; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--radius-10); background: var(--surface); border: 1px solid var(--border); color: var(--muted); font-size: .82rem; }
.setup-steps li span { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2, rgba(0,0,0,.05)); font-size: .75rem; font-weight: 700; }
.setup-steps li.on { border-color: var(--primary); color: var(--text); }
.setup-steps li.on span { background: var(--primary); color: var(--on-primary, #fff); }
.setup-steps li.done span { background: var(--success, #16a34a); color: #fff; }
.setup-title { font-size: 1.05rem; margin: 0 0 10px; }
.setup-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.setup-choice { text-align: left; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 12px; border-radius: var(--radius-12); border: 1.5px solid var(--border); background: var(--surface); cursor: pointer; color: var(--text); font: inherit; }
.setup-choice:hover { border-color: color-mix(in srgb, var(--primary) 50%, var(--border)); }
.setup-choice.on { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 16%, transparent); }
.setup-choice-ic { grid-row: 1 / 3; width: 38px; height: 38px; border-radius: var(--radius-10); display: grid; place-items: center; background: var(--surface-2, rgba(0,0,0,.05)); }
.setup-choice.on .setup-choice-ic { background: var(--primary); color: var(--on-primary, #fff); }
.setup-choice small { color: var(--muted); font-size: .78rem; }
.setup-mods { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; margin-top: 10px; }
.setup-mod { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-10); cursor: pointer; }
.setup-mod input { margin-top: 3px; }
.setup-mod span { display: flex; flex-direction: column; gap: 2px; }
.setup-mod small { color: var(--muted); font-size: .78rem; }
.setup-mod.off { opacity: .6; cursor: not-allowed; }
.setup-acc { border: 1px solid var(--border); border-radius: var(--radius-10); padding: 10px 12px; margin-bottom: 8px; }
.setup-acc-row { display: flex; gap: 10px; align-items: center; cursor: pointer; }
.setup-acc .form-row { margin-top: 10px; }
.setup-next { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.setup-next li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-10); }
.setup-next li > div { display: flex; flex-direction: column; }
.setup-next small { color: var(--muted); }

/* Mali müşavir erişimi (mükellef tarafı) */
.acc-perms { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px; }
.acc-perm { display: flex; gap: 9px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-10); cursor: pointer; }
.acc-perm input { margin-top: 3px; }
.acc-perm span { display: flex; flex-direction: column; gap: 1px; }
.acc-perm small { color: var(--muted); font-size: .76rem; line-height: 1.35; }
.acc-perm:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.acc-thread { display: flex; flex-direction: column; gap: 10px; }
.acc-msg { max-width: 760px; padding: 10px 14px; border-radius: var(--radius-14); background: var(--surface); border: 1px solid var(--border); }
.acc-msg.me { align-self: flex-end; background: var(--primary-soft); border-color: transparent; }

/* ---- Çevrimdışı çalışma ---- */
.off-chip { position: fixed; left: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 90; display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border: 0; border-radius: var(--radius-tam); font: inherit; font-size: .85rem; font-weight: 700; cursor: pointer; box-shadow: var(--shadow-lg); }
.off-chip[hidden] { display: none; }
.off-chip strong { min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--radius-tam); display: inline-grid; place-items: center; background: rgba(0, 0, 0, .15); font-size: .78rem; }
.off-chip .off-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.off-chip.is-off { background: #b42318; color: #fff; }
.off-chip.is-off .off-dot { animation: off-blink 1.4s ease-in-out infinite; }
.off-chip.is-sync { background: var(--warning-soft); color: var(--warning); }
.off-chip.is-bad { background: var(--danger-soft); color: var(--danger); }
@keyframes off-blink { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .off-chip.is-off .off-dot { animation: none; } }
@media (max-width: 760px) { .off-chip { bottom: calc(76px + env(safe-area-inset-bottom)); } } /* alt menünün üstünde */
.off-copy { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 14px; padding: 10px 14px; border-radius: var(--radius); background: #fff4e5; color: #7a3d00; border: 1px solid #f3d3a6; font-size: .86rem; font-weight: 600; }
:root[data-theme="dark"] .off-copy { background: #3a2508; color: #ffd7a0; border-color: #5a3a10; }
.off-toast { position: fixed; left: 50%; bottom: calc(70px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 200; max-width: min(560px, calc(100vw - 32px)); padding: 11px 16px; border-radius: var(--radius-12); background: #1b2330; color: #fff; font-size: .9rem; box-shadow: var(--shadow-lg); transition: opacity .3s; }
.off-toast.bad { background: var(--danger); }
.off-toast.out { opacity: 0; }
.off-dialog { width: min(600px, calc(100vw - 24px)); max-height: 82vh; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); }
.off-dialog::backdrop { background: rgba(15, 20, 30, .45); }
.off-dialog-hd { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.off-dialog-hd h2 { margin: 0; font-size: 1.05rem; }
.off-dialog-bd { padding: 14px 16px; overflow: auto; max-height: calc(82vh - 130px); }
.off-dialog-ft { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); }
.off-list { display: grid; gap: 8px; margin-top: 8px; }
.off-item { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); }
.off-item.is-bad { border-color: var(--danger); }
.off-item-main { flex: 1 1 280px; min-width: 0; overflow-wrap: anywhere; }
.off-item-acts { display: flex; gap: 6px; }
.off-fields { margin-top: 6px; font-size: .82rem; }
.off-fields summary { cursor: pointer; color: var(--text-2, inherit); }
.off-fields dl { display: grid; grid-template-columns: minmax(90px, auto) 1fr; gap: 2px 10px; margin: 6px 0; }
.off-fields dt { color: var(--text-2, inherit); font-size: .78rem; }
.off-fields dd { margin: 0; }

/* Bilgisayardaki emizan: bulut eşitleme göstergesi */
.sync-chip { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: var(--radius-hap); border: 1px solid var(--border, #e3e8ef); font-size: 12.5px; color: inherit; text-decoration: none; white-space: nowrap; margin-right: 8px; }
.sync-chip:hover { background: var(--surface-2, rgba(0,0,0,.04)); }
.sync-chip-dot { width: 8px; height: 8px; border-radius: 50%; background: #16a34a; flex: none; }
.sync-chip[data-state="pending"] .sync-chip-dot { background: #d97706; }
.sync-chip[data-state="offline"] .sync-chip-dot { background: #64748b; }
.sync-chip[data-state="error"] .sync-chip-dot, .sync-chip[data-state="update"] .sync-chip-dot, .sync-chip[data-state="relink"] .sync-chip-dot { background: #dc2626; }
@media (max-width: 720px) { .sync-chip-text { display: none; } .sync-chip { padding: 7px; } }
.sync-dot { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: var(--radius-12); background: #dcfce7; color: #15803d; }
.sync-dot.sync-pending { background: #fef3c7; color: #b45309; }
.sync-dot.sync-offline { background: #e2e8f0; color: #475569; }
.sync-dot.sync-error, .sync-dot.sync-update, .sync-dot.sync-relink { background: #fee2e2; color: #b91c1c; }

/* ---- Fiş önizlemesi (fiş tasarımı sayfası) ---- */
.receipt-prev{background:#fff;border:1px solid var(--line);border-radius:var(--radius-6);padding:14px 12px;
  font-family:"Consolas","DejaVu Sans Mono",monospace;font-size:12px;line-height:1.45;color:#111;
  white-space:pre;overflow:hidden;box-shadow:0 1px 2px rgba(16,24,40,.06)}
.receipt-prev .receipt-line{min-height:1.45em}
.receipt-prev .receipt-line.b{font-weight:700}
.receipt-prev .receipt-line.h{font-size:16px;font-weight:800;line-height:1.3}
.receipt-prev .receipt-qr{display:flex;justify-content:center;margin:8px 0}
.receipt-prev .receipt-qr-box{width:86px;height:86px;border:2px solid #111;display:flex;align-items:center;
  justify-content:center;font-size:9px;letter-spacing:.5px;color:#111}

/* ---- Kampanya formu ------------------------------------------------------- */
.pick { display:flex; flex-direction:column; gap:3px; text-align:left; padding:11px 13px; border:1px solid var(--border);
    border-radius:var(--radius-12); background:var(--surface); cursor:pointer; transition:border-color .12s, background .12s; }
.pick:hover { border-color:var(--primary); }
.pick.on { border-color:var(--primary); background:var(--primary-soft, rgba(37,99,235,.07)); box-shadow:inset 0 0 0 1px var(--primary); }
.box { border:1px solid var(--border); border-radius:var(--radius-12); padding:12px; background:var(--surface); }
.checklist { max-height:190px; overflow:auto; border:1px solid var(--border); border-radius:var(--radius-10); padding:8px 10px; display:flex; flex-direction:column; gap:4px; }
.chips { display:flex; flex-wrap:wrap; gap:6px; }
.chip { display:inline-flex; align-items:center; gap:6px; padding:3px 8px; border-radius:var(--radius-tam); background:var(--surface-2, #f1f5f9);
    border:1px solid var(--border); font-size:12.5px; }
.chip button { border:0; background:none; cursor:pointer; color:var(--muted); font-size:12px; line-height:1; padding:0; }
.chip button:hover { color:var(--danger); }
.pickbox { position:relative; border:1px solid var(--border); border-radius:var(--radius-10); margin-top:4px; max-height:200px; overflow:auto; background:var(--surface); }
.pickrow { display:block; width:100%; text-align:left; padding:7px 10px; border:0; background:none; cursor:pointer; font-size:13.5px; }
.pickrow:hover { background:var(--surface-2, #f1f5f9); }
.pos-camp { display:inline-flex; align-items:center; gap:4px; color:var(--success, #16a34a); font-weight:600; }

/* ---- Fiş tasarımcısı ------------------------------------------------------
   Yan paneller yapışkan; top ve yükseklik üst barı hesaba katmalı, yoksa panel
   barın altına girip alt şeridi kırpıyordu. */
.rdesign { display:grid; grid-template-columns:300px minmax(0,1fr) 320px; gap:16px; align-items:start; }
.rd-foot { display:flex; gap:14px; align-items:center; justify-content:space-between;
    flex-wrap:wrap; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-14); padding:12px 14px; }
.rdesign + .rd-foot { margin-top: 16px; }
.rd-foot-rule { display:flex; gap:14px; align-items:center; flex-wrap:wrap; }
.rd-side { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-14); padding:14px; position:sticky; top:calc(var(--topbar-h) + 12px); max-height:calc(100vh - var(--topbar-h) - 28px); overflow:auto; }
.rd-title { display:flex; align-items:center; gap:7px; font-weight:700; font-size:13.5px; letter-spacing:.2px; margin-bottom:10px; }
.rd-group { padding:10px 0; border-top:1px solid var(--border); }
.rd-group:first-of-type { border-top:0; padding-top:0; }
.rd-label { font-size:11px; font-weight:700; letter-spacing:.6px; text-transform:uppercase; color:var(--muted); margin-bottom:7px; }
.rd-note { text-transform:none; letter-spacing:0; font-weight:400; }
.rd-sw { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:4px 0; font-size:13px; cursor:pointer; }
.rd-widths { display:grid; grid-template-columns:repeat(3,1fr); gap:6px; }
.rd-w { display:flex; flex-direction:column; align-items:center; gap:1px; padding:7px 4px; border:1px solid var(--border);
    border-radius:var(--radius-10); background:var(--surface); cursor:pointer; font-size:11px; color:var(--muted); }
.rd-w b { font-size:14px; color:var(--text); }
.rd-w.on { border-color:var(--primary); box-shadow:inset 0 0 0 1px var(--primary); }
.rd-stage { background:#1f2430; border-radius:var(--radius-14); overflow:hidden; min-height:420px; display:flex; flex-direction:column; }
.rd-stage-bar { display:flex; align-items:center; gap:8px; padding:8px 12px; color:#cbd5e1; font-size:12.5px; background:#171b24; }
.rd-zoom { width:26px; height:26px; border-radius:var(--radius-7); border:1px solid #374151; background:#232936; color:#e5e7eb; cursor:pointer; }
.rd-stage-tabs { margin-left:auto; display:flex; gap:4px; }
.rd-stage-tabs button { padding:4px 10px; border-radius:var(--radius-7); border:1px solid #374151; background:transparent; color:#cbd5e1; cursor:pointer; font-size:12px; }
.rd-stage-tabs button.on { background:#2563eb; border-color:#2563eb; color:#fff; }
.rd-paper-wrap { flex:1; overflow:auto; padding:22px 10px 40px; display:flex; justify-content:safe center; }
/* Boşluklar yalnız fiş satırında korunur: şablondaki satır sonları fişte boş satır olmasın */
.rd-paper { background:#fff; color:#111; box-shadow:0 6px 24px rgba(0,0,0,.35); padding:12px; white-space:normal; height:max-content; flex:none; }
.rd-line { line-height:1.32; white-space:pre; min-height:1.32em; }
.rd-line.c { text-align:center; } .rd-line.r { text-align:right; }
.rd-line.b { font-weight:700; } .rd-line.h { font-size:1.5em; font-weight:800; line-height:1.2; }
.rd-line.s { font-size:.86em; }
.rd-line img { max-width:100%; height:auto; }
.rd-ham { margin:0; font:inherit; white-space:pre; color:#111; }
/* Bölüm satırındaki yazı ayarı: boyut, hizalama, kalınlık */
.rd-stil { display:flex; align-items:center; gap:4px; margin-left:auto; }
.rd-stil .select { height:26px; min-height:26px; padding:0 22px 0 8px; font-size:11px; background-position:right 5px center; }
.rd-stil .dsel { width:auto; }
.rd-stil .dsel-ok { right:6px; width:13px; height:13px; margin-top:-6px; background-size:13px 13px; }
.rd-kalin { display:inline-flex; align-items:center; }
.rd-kalin input { position:absolute; opacity:0; pointer-events:none; }
.rd-kalin span { display:inline-flex; align-items:center; justify-content:center; width:26px; height:26px; border:1px solid var(--border-strong);
    border-radius:var(--radius-7); font-size:11px; font-weight:800; cursor:pointer; background:var(--surface); }
.rd-kalin input:checked + span { background:var(--text); color:var(--bg); border-color:var(--text); }
.rd-qr { width:74px; height:74px; margin:6px auto; border:1px solid #cbd5e1; border-radius:var(--radius-4); display:flex;
    align-items:center; justify-content:center; font-size:9px; color:#64748b; text-align:center; white-space:normal; }
.rd-order { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:4px; }
.rd-order li { display:flex; align-items:center; gap:8px; padding:6px 9px; border:1px solid var(--border); border-radius:var(--radius-9);
    background:var(--surface); font-size:12.5px; cursor:grab; }
.rd-order li.is-rule { color:var(--muted); background:var(--surface-2,#f8fafc); }
.rd-grip { color:var(--muted); font-size:11px; letter-spacing:-2px; }
.rd-del { margin-left:auto; border:0; background:none; color:var(--muted); cursor:pointer; }
.rd-del:hover { color:var(--danger); }
@media (max-width: 1200px) { .rdesign { grid-template-columns:1fr; } .rd-side { position:static; max-height:none; } }

/* ---- Etiket tasarımcısı --------------------------------------------------- */
.ld { display:grid; grid-template-columns:300px minmax(0,1fr) 300px; gap:16px; align-items:start; }
.ld .rd-foot { grid-column:1 / -1; position:relative; z-index:2; } /* yapışkan yan panel kaydırınca alt şeridin üstüne binmesin */
.ld-side { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-14); padding:14px; position:sticky; top:calc(var(--topbar-h) + 12px); max-height:calc(100vh - var(--topbar-h) - 28px); overflow:auto; }
.ld-add { display:flex; flex-wrap:wrap; gap:6px; }
.ld-stage { background:#1f2430; border-radius:var(--radius-14); overflow:hidden; min-height:420px; }
.ld-stage-inner { padding:34px 14px; display:flex; justify-content:center; overflow:auto; }
.ld-label { position:relative; background:#fff; box-shadow:0 6px 24px rgba(0,0,0,.4); }
.ld-label.bordered { outline:1px dashed #94a3b8; outline-offset:-1px; }
.ld-box { position:absolute; cursor:move; outline:1px dashed transparent; }
.ld-box:hover { outline-color:#93c5fd; }
.ld-box.on { outline:1px solid #2563eb; }
.ld-box-in { display:flex; align-items:center; width:100%; height:100%; overflow:hidden; line-height:1.05; color:inherit; }
.ld-box { color:#000; }
.ld-img { max-width:100%; max-height:100%; object-fit:contain; display:block; margin:auto; }
.ld-badge.ld-uye { background:#7c3aed; }
.ld-box-in .pi { display:inline-block; }
.ld-box-in .pc { display:inline-flex; flex-direction:column; vertical-align:top; line-height:1; margin-left:.04em; }
.ld-box-in .pc sup { font-size:.45em; vertical-align:baseline; }
.ld-box-in .pc i { font-style:normal; font-size:.3em; margin-top:.1em; }
.ld-box-in > * { width:100%; }
.ld-ph { color:#94a3b8; font-style:italic; font-size:min(1em, 15px); }
.ld-badge { display:inline-block; padding:0 .35em; border-radius:.2em; background:#000; color:#fff; }
.ld-badge.ld-yerli { background:#fff; color:#000; border:1px solid #000; }
.ld-bc { display:flex; flex-direction:column; align-items:center; width:100%; height:100%; justify-content:center; }
.ld-bc b { display:inline-block; height:70%; background:#111; margin-right:1px; }
.ld-bc i { font-size:.62em; font-style:normal; letter-spacing:.3px; }
.ld-qr { display:block; height:100%; aspect-ratio:1/1; margin:0 auto; }
.ld-qr svg { width:100%; height:100%; display:block; }
.ld-handle { position:absolute; right:-4px; bottom:-4px; width:9px; height:9px; background:#2563eb; border:1px solid #fff; border-radius:var(--radius-2); cursor:nwse-resize; }
.ld-box.on .ld-handle { display:block; } .ld-handle { display:none; }
.ld-empty { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; color:#94a3b8; font-size:12px; }
.lt-prev { position:relative; background:#fff; border:1px solid var(--border); border-radius:var(--radius-6); }
@media (max-width: 1200px) { .ld { grid-template-columns:1fr; } .ld-side { position:static; max-height:none; } }

/* ======================================================================
   Tek ürün listesi (hub): başlık, özet kartları, sekmeler, tablo,
   seçim şeridi, satır menüsü, işlem pencereleri, eşleşme kuyruğu.
   ====================================================================== */
.hub { display: flex; flex-direction: column; gap: 16px; }
.hub-head { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.hub-head h1 { margin: 0; font-size: 1.75rem; letter-spacing: -.02em; }
.hub-sub { margin: 4px 0 0; color: var(--muted); font-size: .88rem; }
.hub-head-acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hub-eyebrow { display: block; font-size: .68rem; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--primary); margin-bottom: 2px; }

.hub-stats.bes { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1200px) { .hub-stats.bes { grid-template-columns: repeat(3, 1fr); } }
.hub-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-14); overflow: hidden; }
.hub-stat { padding: 16px 18px; border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: 2px; }
.hub-stat:last-child { border-right: 0; }
.hub-stat-label { font-size: .68rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.hub-stat b { font-size: 1.9rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.hub-stat b.hot { color: var(--danger); }
.hub-stat-sub { font-size: .78rem; color: var(--muted); }
@media (max-width: 900px) { .hub-stats { grid-template-columns: repeat(2, 1fr); } .hub-stat:nth-child(2) { border-right: 0; } }

.hub-notice { display: flex; gap: 12px; align-items: center; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-14); }
.hub-notice-ic { display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--radius-9); background: var(--warn-soft, rgba(245,158,11,.14)); color: var(--warning, #b45309); flex: none; }
.hub-notice > div { flex: 1; min-width: 0; }

.hub-card { margin: 0; padding: 0; overflow: visible; }
.hub-tabs { display: flex; gap: 2px; padding: 0 14px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.hub-tabs a { padding: 13px 14px; font-size: .9rem; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; text-decoration: none; }
.hub-tabs a:hover { color: var(--text); }
.hub-tabs a.on { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.hub-tabs a span { margin-left: 5px; color: var(--muted); font-size: .82rem; }
.hub-tabs a span.hot { color: var(--danger); font-weight: 600; }

.hub-filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 12px 14px; }
.hub-search { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 220px; max-width: 420px; padding: 0 10px;
  border: 1px solid var(--border); border-radius: var(--radius-10); background: var(--surface); color: var(--muted); }
.hub-search input { flex: 1; border: 0; background: none; padding: 9px 0; font: inherit; color: var(--text); outline: none; }
.hub-count { margin-left: auto; font-size: .82rem; color: var(--muted); }
.hub-gaps { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 0 14px 12px; font-size: .8rem; color: var(--muted); }
.hub-gaps .chip { text-decoration: none; }

.hub-table th { font-size: .68rem; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.hub-table td { vertical-align: middle; }
.hub-urun { display: flex; gap: 10px; align-items: center; min-width: 0; }
.hub-urun img, .hub-thumb { width: 38px; height: 38px; border-radius: var(--radius-8); object-fit: cover; flex: none; border: 1px solid var(--border); }
.hub-thumb { display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.hub-pen { border: 0; background: none; padding: 2px; margin-left: 4px; color: var(--muted); cursor: pointer; opacity: 0; transition: opacity .12s; }
tr:hover .hub-pen, .hub-pen:focus-visible { opacity: 1; }
.hub-bb { display: inline-flex; flex-direction: column; margin-left: 6px; line-height: 1.15; }
.hub-bb b { font-size: .8rem; } .hub-bb span { font-size: .72rem; color: var(--muted); }
.hub-acts { display: flex; gap: 2px; justify-content: flex-end; }
.hub-act { display: grid; place-items: center; width: 28px; height: 28px; border-radius: var(--radius-7); border: 0; background: none; color: var(--muted); cursor: pointer; text-decoration: none; }
.hub-act:hover { background: var(--surface-2); color: var(--text); }
.hub-foot { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 14px; border-top: 1px solid var(--border); font-size: .82rem; color: var(--muted); flex-wrap: wrap; }

/* Durum noktası (küçük renkli daire). Önceden ".dot" adını taşıyordu; aynı ad işlem satırlarında
   metin ayıracı olarak da kullanılıyor (.tx-meta .dot). Bu yüzden uzun kategori yolları 7px'lik
   kutuya sıkışıp üst üste biniyordu. Daire kendi adını aldı, ayıraç serbest kaldı. */
.sdot { display: inline-block; width: 7px; height: 7px; border-radius: var(--radius-hap); background: var(--muted); }
.sdot-success { background: var(--success); } .sdot-warning { background: #f59e0b; }
.sdot-danger { background: var(--danger); } .sdot-muted { background: var(--muted); } .sdot-info { background: var(--primary); }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: var(--radius-hap); font-size: .72rem;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.chip b { font-weight: 600; color: var(--text); }
.chip-ok { background: rgba(16,185,129,.12); color: #047857; border-color: transparent; }
.chip-warn { background: rgba(245,158,11,.14); color: #b45309; border-color: transparent; }
.chip-danger { background: rgba(239,68,68,.12); color: #b91c1c; border-color: transparent; }

/* Seçim şeridi */
.hub-bulk { display: flex; gap: 12px; align-items: center; margin: 0 14px 12px; padding: 10px 12px;
  border: 1px solid var(--primary); border-radius: var(--radius-12); background: var(--surface); flex-wrap: wrap; }
.hub-bulk-n { display: grid; place-items: center; width: 28px; height: 28px; border-radius: var(--radius-8); background: var(--primary); color: #fff; font-weight: 700; }
.hub-bulk-t { display: flex; flex-direction: column; line-height: 1.2; }
.hub-bulk-acts { display: flex; gap: 6px; align-items: center; margin-left: auto; flex-wrap: wrap; }
.hub-bulk-b { display: inline-flex; gap: 6px; align-items: center; padding: 7px 11px; border: 1px solid var(--border); border-radius: var(--radius-9);
  background: var(--surface); color: var(--text); font: inherit; font-size: .84rem; cursor: pointer; }
.hub-bulk-b:hover:not(:disabled) { background: var(--surface-2); }
.hub-bulk-b:disabled { opacity: .45; cursor: not-allowed; }
.hub-bulk-b .n { color: var(--muted); font-size: .76rem; }
.hub-bulk-x { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 4px; }
.hub-more { position: relative; }
.hub-more-menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 40; min-width: 270px; padding: 5px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-11); box-shadow: var(--shadow-lg); }
.hub-more-menu button { display: flex; gap: 8px; align-items: center; width: 100%; padding: 8px 10px; border: 0; border-radius: var(--radius-8);
  background: none; font: inherit; font-size: .86rem; color: inherit; text-align: left; cursor: pointer; }
.hub-more-menu button:hover:not(:disabled) { background: var(--surface-2); }
.hub-more-menu button:disabled { opacity: .45; cursor: not-allowed; }
.hub-more-menu button.danger { color: var(--danger); }
.hub-more-menu .n { margin-left: auto; color: var(--muted); font-size: .76rem; }

/* Satır menüsü */
.hub-rowmenu { position: absolute; z-index: 60; min-width: 260px; padding: 5px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-11); box-shadow: var(--shadow-lg); }
.hub-rowmenu a, .hub-rowmenu button { display: flex; gap: 8px; align-items: center; width: 100%; padding: 8px 10px; border: 0;
  border-radius: var(--radius-8); background: none; font: inherit; font-size: .86rem; color: inherit; text-align: left; cursor: pointer; text-decoration: none; }
.hub-rowmenu a:hover, .hub-rowmenu button:hover { background: var(--surface-2); }
.hub-rowmenu button.danger { color: var(--danger); }
.hub-rowmenu-g { padding: 8px 10px 4px; font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* İşlem pencereleri */
.hub-modal { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center;
  padding: 16px; background: rgba(12,16,24,.45); }
.hub-modal-box { width: 100%; max-width: 560px; max-height: 88vh; display: flex; flex-direction: column;
  background: var(--surface); border-radius: var(--radius-16); box-shadow: var(--shadow-lg); overflow: hidden; }
.hub-modal-box.wide { max-width: 860px; }
.hub-modal-head { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; padding: 18px 20px 12px; }
.hub-modal-head h2 { margin: 0; font-size: 1.15rem; }
.hub-modal-head button { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 4px; }
.hub-modal-body { padding: 4px 20px 18px; overflow: auto; display: flex; flex-direction: column; gap: 14px; }
.hub-modal-foot { display: flex; gap: 8px; align-items: center; justify-content: space-between; padding: 14px 20px; border-top: 1px solid var(--border); }
.hub-note { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: var(--radius-11); background: var(--surface-2); }
.hub-note-ic { display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--radius-9); background: rgba(109,91,232,.14); color: var(--primary); flex: none; }
.hub-info { padding: 11px 13px; border-radius: var(--radius-10); background: rgba(59,130,246,.08); color: var(--text); font-size: .85rem; }
.hub-err { padding: 11px 13px; border-radius: var(--radius-10); background: rgba(239,68,68,.1); color: var(--danger); font-size: .85rem; }
.hub-ai { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-11); font-size: .85rem; }
.hub-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 680px) { .hub-two { grid-template-columns: 1fr; } }
.hub-pane { padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-12); }
.hub-pane .sonuk { opacity: .45; }
.hub-seg { display: flex; border: 1px solid var(--border); border-radius: var(--radius-9); overflow: hidden; }
.hub-seg button { flex: 1; padding: 8px; border: 0; background: var(--surface); font: inherit; font-size: .82rem; color: var(--muted); cursor: pointer; }
.hub-seg button.on { background: var(--surface-2); color: var(--text); font-weight: 600; }

.hub-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.hub-sum-b { padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-12); display: flex; flex-direction: column; }
.hub-sum-b b { font-size: 1.6rem; line-height: 1.1; } .hub-sum-b span { font-size: .78rem; color: var(--muted); }
.hub-sonuc { display: flex; flex-direction: column; gap: 10px; max-height: 44vh; overflow: auto; }
.hub-sonuc-r { padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-12); }
.hub-sonuc-h { display: flex; gap: 8px; align-items: center; }
.hub-isler { margin-top: 16px; }
.hub-mi-gecmis { display: grid; gap: 6px; margin-top: 6px; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); max-height: 220px; overflow: auto; }
.hub-isler .card-head { padding: 14px 18px; }
.hub-is { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 4px; }
.hub-is-info { color: var(--info); } .hub-is-muted { color: var(--muted); }
.hub-is-success b { color: var(--success); } .hub-is-danger b { color: var(--danger); } .hub-is-warning b { color: var(--warning); } .hub-is-info b { color: var(--info, var(--primary)); }
.hub-is-il { display: inline-flex; gap: 6px; align-items: center; width: 100%; }
.hub-is-spin { flex: none; width: 11px; height: 11px; border-radius: 50%; border: 2px solid color-mix(in srgb, currentColor 22%, transparent);
    border-top-color: currentColor; box-sizing: border-box; display: inline-block; animation: hubIsDon .7s linear infinite; }
@keyframes hubIsDon { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .hub-is-spin { animation: none; } }
.hub-is-serit { position: fixed; right: 18px; bottom: 18px; z-index: 60; display: flex; gap: 8px; align-items: center; padding: 10px 14px; border-radius: 12px;
    background: var(--surface); border: 1px solid var(--border); box-shadow: 0 6px 20px rgba(0,0,0,.12); font-size: .84rem; }
.hub-sonuc-k { display: flex; gap: 10px; margin-top: 7px; padding: 9px 11px; border-radius: var(--radius-9); background: var(--surface-2); font-size: .8rem; }
.hub-sonuc-k > span:first-child { font-weight: 600; min-width: 90px; flex: none; }

/* Eşleşme kuyruğu */
.hub-mq { padding: 14px; display: flex; flex-direction: column; gap: 14px; }
.hub-mq-filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.hub-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.hub-pills a { padding: 7px 12px; border: 1px solid var(--border); border-radius: var(--radius-9); font-size: .84rem; color: var(--muted); text-decoration: none; }
.hub-pills a.on { border-color: var(--primary); color: var(--text); font-weight: 600; }
.hub-pills a span { margin-left: 4px; color: var(--muted); }
.hub-mq-ara { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hub-mq-not { margin: 0; padding: 11px 13px; border-radius: var(--radius-10); background: var(--surface-2); font-size: .84rem; color: var(--muted); }
.hub-mq-head { display: flex; gap: 14px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; }
.hub-mq-head h2 { margin: 2px 0 2px; font-size: 1.2rem; }
.hub-mq-acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hub-mq-count { padding: 7px 12px; border: 1px solid var(--border); border-radius: var(--radius-9); font-size: .82rem; color: var(--muted); }
.hub-mq-list { display: flex; flex-direction: column; }
.hub-mq-row { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-top: 1px solid var(--border); flex-wrap: wrap; }
.hub-mq-img img, .hub-mq-img .hub-thumb { width: 52px; height: 52px; border-radius: var(--radius-9); object-fit: cover; }
.hub-mq-main { flex: 1; min-width: 220px; }
.hub-mq-ch { display: flex; gap: 7px; align-items: center; font-size: .78rem; color: var(--muted); margin-bottom: 2px; }
/* 40px logo bu küçük satırda yazıyla iç içe giriyordu */
.hub-mq-ch .mp-logo { width: 22px; height: 22px; border-radius: var(--radius-7); font-size: .72rem; font-weight: 700; }
.hub-mq-meta { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 6px; font-size: .82rem; }
.hub-mq-meta i { display: block; font-style: normal; font-size: .66rem; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.hub-mq-btn { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* Eşleşme ayrıntıları penceresi */
.hub-mi { display: flex; flex-direction: column; gap: 12px; }
.hub-mi-head { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; }
.hub-mi-head h3 { margin: 0; font-size: 1rem; }
.hub-mi-lock { margin: 0; font-size: .84rem; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.hub-mi-ch { border: 1px solid var(--border); border-radius: var(--radius-12); overflow: hidden; }
.hub-mi-ch-head { display: flex; gap: 10px; align-items: center; padding: 12px 14px; background: var(--surface-2); }
.hub-mi-item { padding: 14px; border-top: 1px solid var(--border); }
.hub-mi-remote { margin-top: 10px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-10); }

/* Senkron bildirimi: hangi ekranda olursan ol köşede belirir */
.senkron-bildirim { position: fixed; right: 16px; bottom: 16px; z-index: 90; display: flex; flex-direction: column; gap: 8px; max-width: 340px; }
.senkron-bildirim-k { padding: 12px 14px; border-radius: var(--radius-12); background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-lg); font-size: .88rem; cursor: pointer; animation: nabizGir .25s ease-out; }
.senkron-bildirim-k.ok { border-left: 3px solid var(--success); }
.senkron-bildirim-k.hata { border-left: 3px solid var(--danger); }
.senkron-bildirim-k.git { opacity: 0; transform: translateY(6px); transition: opacity .35s, transform .35s; }
@keyframes nabizGir { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
[data-sayac].bos { display: none; }
@media (prefers-reduced-motion: reduce) { .senkron-bildirim-k { animation: none; } }

/* ======================================================================
   Ürün sihirbazı: başlık, adım çubuğu, görsel ızgarası, adım altı
   ====================================================================== */
.sh-head { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; margin-bottom: 14px; }
.sh-head h1 { margin: 2px 0 0; font-size: 1.7rem; letter-spacing: -.02em; }
.sh-sub { margin: 4px 0 0; color: var(--muted); font-size: .88rem; }
.sh-head-acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sh-hazir { display: flex; gap: 8px; align-items: center; }
.sh-hazir-bar { display: block; width: 110px; height: 5px; border-radius: var(--radius-hap); background: var(--surface-2); overflow: hidden; }
.sh-hazir-bar i { display: block; height: 100%; background: var(--success); border-radius: var(--radius-hap); transition: width .3s; }
.sh-hazir-n { font-size: .8rem; color: var(--muted); white-space: nowrap; }

.sh-steps { display: flex; align-items: flex-start; gap: 0; margin-bottom: 16px; overflow-x: auto; padding: 4px 0 2px; }
.sh-step { position: relative; flex: 1; min-width: 92px; display: flex; flex-direction: column; align-items: center; gap: 7px;
  border: 0; background: none; font: inherit; color: var(--muted); cursor: pointer; padding: 0; }
.sh-step::before, .sh-step::after { content: ''; position: absolute; top: 18px; height: 2px; background: var(--border); }
.sh-step::before { left: 0; right: 50%; } .sh-step::after { left: 50%; right: 0; }
.sh-step:first-child::before, .sh-step:last-child::after { display: none; }
/* Çizgi bir ilerleme çubuğudur: geçilen adımların iki yarısı da, bulunulan adımın sol yarısı yeşildir */
.sh-step.gecildi::before, .sh-step.gecildi::after, .sh-step.suan::before { background: var(--success); }
.sh-step-ic { position: relative; z-index: 1; display: grid; place-items: center; width: 38px; height: 38px; border-radius: var(--radius-hap);
  background: var(--surface); border: 2px solid var(--border); color: var(--muted); }
.sh-step.on .sh-step-ic { border-color: var(--primary); background: var(--primary); color: #fff; }
.sh-step.ok .sh-step-ic { border-color: var(--success); background: var(--success); color: #fff; }
.sh-step-ad { font-size: .8rem; text-align: center; line-height: 1.2; }
.sh-step.on .sh-step-ad { color: var(--primary); font-weight: 600; }
.sh-step.ok .sh-step-ad { color: var(--text); }
.sh-step-ad i { display: inline-block; margin-left: 3px; font-style: normal; font-size: .72rem; color: var(--muted); }

/* Sihirbaz: solda dar sütun (Hazırlık Durumu + Pazaryeri Önizleme), sağda adımın bütün kartları.
   "Önizlemeyi gizle" sol sütunu kaldırır, form tam genişliğe yayılır. */
.sh-wrap { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 16px; align-items: start; }
.sh-wrap.yansiz { grid-template-columns: minmax(0, 1fr); }
.sh-yan { display: grid; gap: 16px; align-content: start; position: sticky; top: 16px; }
/* Bölümler bitişik durmasın */
.sh-wrap .stack { display: grid; gap: 16px; align-content: start; }
/* Boşluğu yalnız grid gap versin; .card + .card payı iki kez boşluk yaratmasın. */
.sh-wrap > .stack > .card, .sh-wrap > .stack > * + *, .sh-yan > .card, .sh-yan > * + * { margin-top: 0; }
.sh-taslak { margin-left: 6px; color: var(--success); }

.sh-foot { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  margin-top: 16px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-14); }
.sh-foot-n { font-size: .84rem; color: var(--muted); }

.sh-gorseller { display: flex; gap: 12px; flex-wrap: wrap; }
.sh-gorsel { position: relative; width: 128px; height: 128px; border-radius: var(--radius-12); overflow: hidden; border: 1px solid var(--border); }
.sh-gorsel img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sh-gorsel-ana { position: absolute; left: 6px; top: 6px; padding: 2px 7px; border-radius: var(--radius-6); background: rgba(12,16,24,.78); color: #fff; font-size: .68rem; }
.sh-gorsel-sil { position: absolute; right: 6px; top: 6px; display: grid; place-items: center; width: 22px; height: 22px;
  border: 0; border-radius: var(--radius-hap); background: rgba(12,16,24,.7); color: #fff; cursor: pointer; }
.sh-gorsel.aday .sh-gorsel-sec { position: absolute; left: 0; right: 0; bottom: 0; padding: 5px 7px; background: rgba(12,16,24,.72);
  color: #fff; font-size: .7rem; display: flex; gap: 5px; align-items: center; }
.sh-gorsel-ekle { display: grid; place-items: center; gap: 2px; width: 128px; height: 128px; border-radius: var(--radius-12);
  border: 1.5px dashed var(--border); color: var(--muted); cursor: pointer; text-align: center; }
.sh-gorsel-ekle:hover { border-color: var(--primary); color: var(--primary); }
.sh-gorsel-ekle.busy { opacity: .6; }
.sh-gorsel-ekle b { font-size: .84rem; color: var(--text); }
.sh-gorsel-alt { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; margin-top: 14px; }
.sh-det summary { cursor: pointer; font-size: .86rem; color: var(--primary); display: flex; gap: 6px; align-items: center; }
.sh-video { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
@media (max-width: 1100px) { .sh-wrap { grid-template-columns: 1fr; } }

/* Özellikler adımı: kanal sekmeleri, sayaçlar, zorunlu / diğer alanlar */
.oz-head { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 10px; }
.oz-tabs { display: flex; gap: 4px; padding: 3px; background: var(--surface-2); border-radius: var(--radius-10); flex-wrap: wrap; }
.oz-tabs button { padding: 7px 13px; border: 0; border-radius: var(--radius-8); background: none; font: inherit; font-size: .85rem; color: var(--muted); cursor: pointer; }
.oz-tabs button.on { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.oz-sayac { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.oz-sayac button { padding: 5px 10px; border: 1px solid transparent; border-radius: var(--radius-8); background: none; font: inherit; font-size: .8rem; color: var(--muted); cursor: pointer; }
.oz-sayac button.on { background: var(--surface-2); border-color: var(--border); color: var(--text); font-weight: 600; }
.oz-sayac button i { font-style: normal; margin-left: 3px; color: var(--muted); }
.oz-dolu { display: flex; gap: 7px; align-items: center; font-size: .8rem; color: var(--muted); }
.oz-dolu-bar { display: block; width: 70px; height: 4px; border-radius: var(--radius-hap); background: var(--surface-2); overflow: hidden; }
.oz-dolu-bar i { display: block; height: 100%; background: var(--primary); }
.oz-ust { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin: 10px 0; }
.oz-ok { display: flex; gap: 8px; align-items: center; padding: 11px 14px; border-radius: var(--radius-11);
  background: rgba(16,185,129,.1); color: #047857; font-size: .88rem; font-weight: 600; margin-bottom: 12px; }
.oz-blok { padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-12); margin-bottom: 12px; }
.oz-blok-h { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; margin-bottom: 10px; }
.oz-det > summary { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; cursor: pointer; list-style: none; }
.oz-det > summary::-webkit-details-marker { display: none; }
.oz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.oz-alan { display: flex; flex-direction: column; gap: 4px; }
.oz-lbl { display: flex; gap: 6px; align-items: baseline; font-size: .82rem; font-weight: 600; }
.oz-lbl i { margin-left: auto; font-style: normal; font-size: .7rem; color: var(--muted); }
.oz-ortak { padding: 1px 6px; border-radius: var(--radius-5); background: rgba(16,185,129,.12); color: #047857; font-size: .66rem; font-weight: 600; }
.oz-bos { margin-left: auto; font-size: .68rem; color: var(--muted); }

/* Aramalı özellik seçimi */
.oz-sec { position: relative; }
.oz-sec-b { display: flex; gap: 8px; align-items: center; justify-content: space-between; width: 100%; padding: 7px 10px;
  border: 1px solid var(--border); border-radius: var(--radius-9); background: var(--surface); font: inherit; font-size: .86rem; color: var(--text); cursor: pointer; text-align: left; }
.oz-sec-b .bos { color: var(--muted); }
.oz-sec-liste { position: absolute; z-index: 50; left: 0; right: 0; top: calc(100% + 4px); padding: 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-11); box-shadow: var(--shadow-lg); }
.oz-sec-ara { display: flex; gap: 7px; align-items: center; padding: 0 9px; margin-bottom: 4px;
  border: 1px solid var(--border); border-radius: var(--radius-8); color: var(--muted); }
.oz-sec-ara input { flex: 1; border: 0; background: none; padding: 8px 0; font: inherit; font-size: .85rem; color: var(--text); outline: none; }
.oz-sec-kayar { max-height: 230px; overflow: auto; }
.oz-sec-s { display: flex; gap: 9px; align-items: center; width: 100%; padding: 7px 9px; border: 0; border-radius: var(--radius-8);
  background: none; font: inherit; font-size: .86rem; color: inherit; text-align: left; cursor: pointer; }
.oz-sec-s:hover { background: var(--surface-2); }
.oz-sec-r { width: 14px; height: 14px; border-radius: var(--radius-hap); border: 1.5px solid var(--border); flex: none; }
.oz-sec-s.on .oz-sec-r { border-color: var(--primary); border-width: 4px; }

/* ======================================================================
   Sipariş kartları: üst satır, kalemler, durum şeridi, kart işlemleri
   ====================================================================== */
.sp-liste { display: flex; flex-direction: column; gap: 10px; padding: 0 14px 14px; }
.sp-tumu { display: flex; gap: 8px; align-items: center; padding: 2px 2px 4px; font-size: .82rem; color: var(--muted); }

/* overflow:hidden verilemez: alttaki "Diğer işlemler" menüsü kart sınırında kırpılıp çizgi gibi görünüyordu */
.sp-kart { border: 1px solid var(--border); border-radius: var(--radius-14); background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.sp-kart > :first-child { border-top-left-radius: 13px; border-top-right-radius: 13px; }
.sp-kart > :last-child { border-bottom-left-radius: 13px; border-bottom-right-radius: 13px; }
.sp-kart:hover { border-color: var(--border-strong, var(--border)); box-shadow: 0 1px 10px rgba(15, 23, 42, .06); }
.sp-kart.sec { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary) inset; }
.sp-kart.gec { border-left: 3px solid var(--danger); }
.sp-kart.soluk { opacity: .64; }

.sp-ust { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 11px 14px; border-bottom: 1px solid var(--border); }
.sp-no { font-weight: 700; font-variant-numeric: tabular-nums; text-decoration: none; color: var(--text); }
.sp-no:hover { color: var(--primary); }
.sp-tarih { font-size: .8rem; color: var(--muted); }
.sp-sure { display: inline-flex; gap: 5px; align-items: center; margin-left: auto; padding: 4px 9px; border-radius: var(--radius-hap);
    background: rgba(245, 158, 11, .12); color: var(--warning, #b45309); font-size: .78rem; font-weight: 600; white-space: nowrap; }
.sp-sure.gec { background: rgba(239, 68, 68, .12); color: var(--danger); }

.sp-orta { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 14px; padding: 12px 14px; }
.sp-kalemler { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.sp-kalem { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; }
.sp-gorsel { display: grid; place-items: center; width: 34px; height: 34px; border-radius: var(--radius-8); overflow: hidden;
    background: var(--surface-2); color: var(--muted); flex: none; }
.sp-gorsel img { width: 100%; height: 100%; object-fit: cover; }
.sp-ad { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; font-size: .87rem; }
.sp-ad > span.muted { display: inline; }
.sp-kod { font-size: .74rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.sp-bagsiz { color: var(--danger); }
.sp-adet { font-weight: 700; font-variant-numeric: tabular-nums; font-size: .87rem; }
.sp-tutar { font-variant-numeric: tabular-nums; font-size: .87rem; color: var(--muted); min-width: 82px; text-align: right; }
.sp-daha { font-size: .8rem; color: var(--muted); }

.sp-sag { display: flex; flex-direction: column; gap: 3px; align-items: flex-end; text-align: right; border-left: 1px solid var(--border); padding-left: 14px; }
.sp-musteri { display: flex; flex-direction: column; font-size: .85rem; line-height: 1.3; }
.sp-musteri .muted { font-size: .76rem; }
.sp-toplam { font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.sp-kar { font-size: .8rem; color: var(--success); font-variant-numeric: tabular-nums; }
.sp-kar.eksi { color: var(--danger); }
.sp-kar.yok { color: var(--muted); }
.sp-kar.yok a { display: block; white-space: nowrap; color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.sp-teslim { font-size: .74rem; color: var(--muted); }

.sp-serit { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; padding: 9px 14px; background: var(--surface-2); font-size: .8rem; }
.sp-adim { display: inline-flex; gap: 7px; align-items: center; color: var(--muted); }
.sp-adim b { color: var(--text); font-weight: 600; }
.sp-adim i { width: 8px; height: 8px; border-radius: var(--radius-hap); background: var(--muted); flex: none; }
.sp-adim.ok i { background: var(--success); }
.sp-adim.wait i { background: var(--warning, #f59e0b); }
.sp-adim.bad i { background: var(--danger); }
.sp-adim.off i { background: var(--border); }
.sp-takip { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--muted); }

.sp-alt { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; padding: 11px 14px; border-top: 1px solid var(--border); }
.sp-b { display: inline-flex; gap: 6px; align-items: center; padding: 7px 11px; border: 1px solid var(--border); border-radius: var(--radius-9);
    background: var(--surface); color: var(--text); font-size: .83rem; font-weight: 500; cursor: pointer; text-decoration: none; }
.sp-b:hover { background: var(--surface-2); }
.sp-b.ana { background: var(--primary); border-color: var(--primary); color: #fff; }
.sp-b.ana:hover { filter: brightness(1.06); }
.sp-alt .hub-more { margin-left: auto; }
.sp-alt .hub-more-menu { top: auto; bottom: calc(100% + 4px); }
.sp-alt .hub-more-menu a { display: flex; gap: 8px; align-items: center; padding: 8px 10px; border-radius: var(--radius-8); color: var(--text); text-decoration: none; font-size: .85rem; }
.sp-alt .hub-more-menu a:hover { background: var(--surface-2); }

@media (max-width: 860px) {
    .sp-orta { grid-template-columns: 1fr; }
    .sp-sag { align-items: flex-start; text-align: left; border-left: 0; padding-left: 0; border-top: 1px solid var(--border); padding-top: 10px; }
    .sp-sure { margin-left: 0; }
}

/* ======================================================================
   Canlı operasyon paneli: monitörden okunacak kadar büyük, sakin düzen
   ====================================================================== */
.cp { display: flex; flex-direction: column; gap: 16px; }
.cp-head { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.cp-head h1 { margin: 2px 0 0; font-size: 1.7rem; letter-spacing: -.02em; }
.cp-sub { margin: 5px 0 0; color: var(--muted); font-size: .86rem; display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.cp-head-a { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cp-nokta { width: 9px; height: 9px; border-radius: var(--radius-hap); background: var(--success); box-shadow: 0 0 0 4px rgba(22, 163, 74, .14); }
.cp-nokta.bekle { background: var(--warning, #f59e0b); box-shadow: 0 0 0 4px rgba(245, 158, 11, .16); }

.cp-uyari { display: flex; gap: 12px; align-items: center; padding: 14px 18px; border-radius: var(--radius-14);
    background: var(--success); color: #fff; font-size: 1.1rem; animation: cp-yanip 1.4s ease-in-out infinite; }
.cp-uyari button { margin-left: auto; border: 0; background: none; color: inherit; cursor: pointer; opacity: .85; }
@keyframes cp-yanip { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.22); } }
@media (prefers-reduced-motion: reduce) { .cp-uyari { animation: none; } }

.cp-kutular { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1280px) { .cp-kutular { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .cp-kutular { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cp-kutu { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border: 1px solid var(--border);
    border-radius: var(--radius-14); background: var(--surface); }
.cp-kutu > span { font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cp-kutu b { font-size: 2.1rem; line-height: 1.05; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.cp-kutu.ana b { font-size: 2.5rem; }
.cp-kutu small { font-size: .78rem; color: var(--muted); }
.cp-kutu small.up { color: var(--success); }
.cp-kutu small.down { color: var(--danger); }
.cp-kutu.kirmizi { border-color: var(--danger); }
.cp-kutu.kirmizi b { color: var(--danger); }
.cp-kutu.sari { border-color: var(--warning, #f59e0b); }

.cp-iki { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.cp-panel { border: 1px solid var(--border); border-radius: var(--radius-14); background: var(--surface); padding: 16px 18px 18px; }
.cp-panel > header { display: flex; gap: 10px; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.cp-panel h2 { margin: 0; font-size: 1rem; }
.cp-etiket { font-size: .78rem; color: var(--muted); }

.cp-grafik { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 8px; }
.cp-eksen { display: flex; flex-direction: column; justify-content: space-between; height: 190px; padding-bottom: 18px;
    font-size: .7rem; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.cp-cubuklar { display: flex; align-items: flex-end; gap: 4px; height: 190px;
    background: repeating-linear-gradient(to top, transparent 0 calc(50% - 1px), var(--border) calc(50% - 1px) 50%); }
.cp-cubuk { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; gap: 2px; }
.cp-cubuk i { display: block; width: 100%; max-width: 26px; border-radius: var(--radius-4) var(--radius-4) 0 0; background: var(--primary); }
.cp-cubuk.simdi i { background: var(--success); }
.cp-cubuk .cp-deger { font-size: .68rem; color: var(--muted); font-variant-numeric: tabular-nums; height: 12px; }
.cp-cubuk em { font-style: normal; font-size: .68rem; color: var(--muted); height: 16px; line-height: 16px; }
.cp-bos { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 42px 10px; color: var(--muted); text-align: center; }
.cp-bos b { color: var(--text); font-size: 1.02rem; }
.cp-bos-kisa { color: var(--muted); font-size: .86rem; }

.cp-kanal { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 13px; }
.cp-kanal-u { display: flex; justify-content: space-between; gap: 10px; font-size: .9rem; }
.cp-kanal-u span { font-variant-numeric: tabular-nums; }
.cp-kanal-a { display: flex; justify-content: space-between; gap: 10px; font-size: .74rem; color: var(--muted); margin-top: 3px; }
.cp-oran { height: 7px; border-radius: var(--radius-hap); background: var(--surface-2); overflow: hidden; margin-top: 5px; }
.cp-oran i { display: block; height: 100%; background: var(--primary); border-radius: var(--radius-hap); }

.cp-son { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
/* Saat sütunu 70px'e sığmayıp "31.10 / 12:35" alt alta kırılıyor ve kenarda
   kesik duruyordu; sütunu genişletip satıra iç boşluk verdik. */
.cp-son li { display: grid; grid-template-columns: 130px 110px minmax(0, 1fr) 120px 110px 96px; gap: 10px; align-items: center;
    padding: 9px 4px; border-top: 1px solid var(--border); font-size: .87rem; }
.cp-son li:first-child { border-top: 0; }
.cp-son li.yeni { background: rgba(22, 163, 74, .07); }
.cp-son a { font-weight: 600; color: var(--text); text-decoration: none; font-variant-numeric: tabular-nums; }
.cp-son a:hover { color: var(--primary); }
.cp-son b { text-align: right; font-variant-numeric: tabular-nums; }
.cp-son-k, .cp-son-d, .cp-son-z { color: var(--muted); }
.cp-son-z { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cp-son-m { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 980px) {
    .cp-iki { grid-template-columns: 1fr; }
    .cp-son li { grid-template-columns: 1fr auto; row-gap: 2px; }
    .cp-son-k, .cp-son-d, .cp-son-z { font-size: .76rem; }
}

/* Kargo teslim dökümü: ekranda firma firma listeler, altında imza alanı */
.dk-grup { margin: 0 14px 18px; border: 1px solid var(--border); border-radius: var(--radius-13); overflow: hidden; }
.dk-grup > header { display: flex; gap: 10px; align-items: baseline; justify-content: space-between; flex-wrap: wrap;
    padding: 12px 15px; background: var(--surface-2); }
.dk-grup > header h2 { margin: 0; font-size: 1rem; }
.dk-grup > header span { font-size: .8rem; color: var(--muted); }
.dk-imza { display: flex; gap: 32px; padding: 26px 15px 14px; }
.dk-imza div { flex: 1; border-top: 1px solid var(--border); padding-top: 6px; font-size: .78rem; color: var(--muted); }

/* ======================================================================
   Kargo etiketi tasarımcısı: tuval gerçek etiket ölçüsünde, kutular taşınır
   ====================================================================== */
.et-sayfa { display: flex; flex-direction: column; gap: 14px; }
.et-duzen { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.et-sol { display: flex; flex-direction: column; gap: 10px; }
.et-arac { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; padding: 12px 14px;
    border: 1px solid var(--border); border-radius: var(--radius-12); background: var(--surface); }
.et-arac label { display: flex; flex-direction: column; gap: 4px; color: var(--muted); }
.et-arac label.kilavuz { flex-direction: row; align-items: center; gap: 6px; }

.et-tuval-sar { padding: 22px; border: 1px solid var(--border); border-radius: var(--radius-12); background: var(--surface-2);
    overflow: auto; display: flex; justify-content: center; }
.et-tuval { position: relative; background: #fff; box-shadow: 0 2px 14px rgba(15, 23, 42, .16);
    background-image: linear-gradient(to right, rgba(15,23,42,.06) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(15,23,42,.06) 1px, transparent 1px);
    background-size: 18.9px 18.9px; /* 5 mm kılavuz */ }
.et-kutu { position: absolute; border: 1px dashed rgba(15, 23, 42, .35); background: rgba(109, 91, 232, .05);
    color: #0f172a; cursor: move; overflow: hidden; user-select: none; }
.et-kutu:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
.et-kutu.sec { border-color: var(--primary); background: rgba(109, 91, 232, .12); }
.et-ad { display: block; padding: 1px 3px; line-height: 1.15; pointer-events: none; }
.et-tut { position: absolute; right: -4px; bottom: -4px; width: 11px; height: 11px; border-radius: var(--radius-3);
    background: var(--primary); cursor: nwse-resize; }

.et-sag { border: 1px solid var(--border); border-radius: var(--radius-12); background: var(--surface); padding: 14px; }
.et-liste { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; }
.et-liste li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 8px; align-items: center;
    padding: 7px 6px; border-radius: var(--radius-8); font-size: .85rem; cursor: pointer; }
.et-liste li:hover { background: var(--surface-2); }
.et-liste li.sec { background: rgba(109, 91, 232, .1); }
.et-liste small { color: var(--muted); font-variant-numeric: tabular-nums; font-size: .72rem; }
.et-ozel { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.et-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.et-grid label { display: flex; flex-direction: column; gap: 3px; color: var(--muted); }

@media (max-width: 900px) { .et-duzen { grid-template-columns: 1fr; } }

/* Yapay zekâ ile ürün araştırma sonucu */
.yz-ara .card-head { align-items: flex-start; gap: 14px; }
.yz-sonuc { display: flex; flex-direction: column; gap: 10px; }
.yz-ust { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: .82rem; color: var(--muted); }
.yz-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.yz-liste li { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto auto auto; gap: 10px; align-items: center;
    padding: 9px 2px; border-top: 1px solid var(--border); font-size: .86rem; }
.yz-liste li:first-child { border-top: 0; }
.yz-ad { font-weight: 600; }
.yz-deger { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.yz-kaynak { font-size: .76rem; color: var(--muted); }
.yz-guven { font-size: .76rem; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 34px; text-align: right; }
.yz-kaynaklar summary { cursor: pointer; font-size: .82rem; color: var(--muted); }
.yz-kaynaklar ul { margin: 8px 0 0; padding-left: 18px; font-size: .82rem; }
@media (max-width: 760px) { .yz-liste li { grid-template-columns: 1fr auto; row-gap: 2px; } }
.yz-ayar { margin-top: 10px; border-top: 1px solid var(--border); padding-top: 10px; }
.yz-ayar summary { cursor: pointer; font-size: .84rem; color: var(--muted); }
.yz-ayar-ic { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin-top: 10px; }
.yz-ayar-ic label { display: flex; flex-direction: column; gap: 4px; }
.yz-ayar-ic label.small input[type=checkbox] { align-self: flex-start; }

/* Sihirbaz: pazaryerleri adımı (solda mağazalar, sağda ayrıntı) ve eşleşmeler */
.mp-ai { display: flex; gap: 8px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-11); background: var(--surface-2); font-size: .86rem; }
.mp-iki { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; margin-top: 14px; align-items: start; }
.mp-sol { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-12); overflow: hidden; }
.mp-sol li { display: grid; grid-template-columns: 22px 30px minmax(0, 1fr) auto; gap: 9px; align-items: center;
    padding: 10px 12px; border-top: 1px solid var(--border); cursor: pointer; }
.mp-sol li:first-child { border-top: 0; }
.mp-sol li:hover { background: var(--surface-2); }
.mp-sol li.on { background: rgba(109, 91, 232, .09); }
.mp-sol-t { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.mp-sol-t small { color: var(--muted); font-size: .74rem; }
.mp-sol-k { font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.mp-sag { border: 1px solid var(--border); border-radius: var(--radius-12); padding: 16px; }
.mp-sag-h { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.mp-sag-h a { margin-left: auto; }
.mp-bilgi { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 0 0 14px; }
.mp-bilgi dt { font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.mp-bilgi dd { margin: 2px 0 0; font-size: .92rem; }
.mp-kar { margin-top: 10px; padding: 10px 12px; border-radius: var(--radius-10); background: rgba(22, 163, 74, .08); font-size: .86rem; }
.mp-kar.yok { background: var(--surface-2); color: var(--muted); }

.es-liste { display: flex; flex-direction: column; gap: 12px; }
.es-kart { border: 1px solid var(--border); border-radius: var(--radius-12); padding: 14px; }
.es-ust { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.es-ad { display: flex; flex-direction: column; line-height: 1.2; margin-right: auto; }
.es-kilit { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: var(--radius-10); background: var(--surface-2); font-size: .83rem; }
@media (max-width: 860px) { .mp-iki { grid-template-columns: 1fr; } }

/* Kargo listesi: sağdan açılan gönderi özeti */
.kd-ov { position: fixed; inset: 0; z-index: 70; }
.kd-arka { position: absolute; inset: 0; background: rgba(15, 23, 42, .35); }
.kd-panel { position: absolute; right: 0; top: 0; bottom: 0; width: min(430px, 94vw); overflow: auto;
    background: var(--surface); border-left: 1px solid var(--border); padding: 20px; box-shadow: -2px 0 20px rgba(15, 23, 42, .14); }
.kd-kapat { position: absolute; right: 14px; top: 14px; border: 0; background: none; color: var(--muted); cursor: pointer; }
.kd-head { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; margin: 0 26px 14px 0; }
.kd-no { font-weight: 700; font-variant-numeric: tabular-nums; }
.kd-acts { display: flex; gap: 7px; flex-wrap: wrap; margin: 12px 0 18px; }
.kd-baslik { margin: 0 0 8px; font-size: .95rem; }
.kd-gecmis { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--border); }
.kd-gecmis li { position: relative; padding: 0 0 14px 14px; }
.kd-gecmis li::before { content: ''; position: absolute; left: -5px; top: 5px; width: 8px; height: 8px; border-radius: var(--radius-hap); background: var(--primary); }
.kd-zaman { display: block; font-size: .74rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.kd-metin { font-size: .86rem; }

/* Pazaryeri ürünleri: bakım kutusu (eşleştirmeleri kaldır) */
.hub-bakim { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap;
    padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius-13); background: var(--surface); }
.hub-bakim p { margin: 4px 0 0; max-width: 70ch; }

/* Buybox sütunu */
.hub-bb b.bb-ok { color: var(--success); }
.hub-bb b.bb-geride { color: var(--danger); }

/* --- Kategori / marka eşleştirme penceresi: yatay pazaryeri şeridi --- */
/* Pencere ortalama. Satır içi stille verilemez: Alpine x-show kapanışta satır içi display'i siler
   ve pencere display:block kalıp sol üste yapışır. Bütün pencereler bu sınıfı kullanır. */
.fv-ort { position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center;
    background: rgba(10, 14, 22, .5); padding: 16px; }
.mpm-kutu { max-width: 720px; width: 100%; max-height: 88vh; display: flex; flex-direction: column; }
.mpm-bas { padding: 16px 18px; border-bottom: 1px solid var(--border); flex: none; }
.mpm-govde { padding: 14px 18px; display: grid; gap: 12px; overflow: auto; }
.mpm-alt { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 18px; border-top: 1px solid var(--border); flex: none; }

.mpm-serit { display: flex; gap: 8px; overflow-x: auto; overscroll-behavior-x: contain; padding: 2px 2px 8px; scroll-snap-type: x proximity; }
.mpm-serit::-webkit-scrollbar { height: 6px; }
.mpm-serit::-webkit-scrollbar-thumb { background: var(--border); border-radius: var(--radius-hap); }
.mpm-chip { flex: 0 0 auto; scroll-snap-align: start; min-width: 190px; max-width: 230px; display: flex; align-items: center; gap: 8px;
    padding: 9px 11px; border: 1px solid var(--border); border-radius: var(--radius-10); background: var(--surface); cursor: pointer; text-align: left; }
.mpm-chip:hover { border-color: var(--muted); }
.mpm-chip.on { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.mpm-chip.ok { background: color-mix(in srgb, var(--success) 7%, transparent); }
.mpm-chip-ad { min-width: 0; display: grid; }
.mpm-chip-ad b { font-size: .84rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mpm-chip-ad i { font-style: normal; font-size: .74rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mpm-chip.ok .mpm-chip-ad i { color: var(--success); }

.mpm-panel { border: 1px solid var(--border); border-radius: var(--radius-10); padding: 12px; display: grid; gap: 8px; }
.mpm-liste { max-height: 230px; overflow: auto; margin-top: 8px; border: 1px solid var(--border); border-radius: var(--radius-8); }
.mpm-sec { display: block; width: 100%; text-align: left; padding: 8px 10px; background: none; border: 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.mpm-sec:last-child { border-bottom: 0; }
.mpm-sec:hover { background: var(--surface-2); }
.mpm-sec span { display: block; }
.mpm-oneri { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap;
    margin-top: 8px; padding: 10px; border: 1px dashed var(--primary); border-radius: var(--radius-8);
    background: color-mix(in srgb, var(--primary) 6%, transparent); }
@media (max-width: 560px) { .mpm-chip { min-width: 160px; } }

/* --- Yeni marka / kategori penceresi (tarayıcı prompt'unun yerine) --- */
.yk-ort { z-index: 72; }
.yk-kutu { max-width: 420px; width: 100%; display: flex; flex-direction: column; }
.yk-bas { padding: 16px 18px; border-bottom: 1px solid var(--border); }
.yk-govde { padding: 16px 18px; display: grid; gap: 10px; }
.yk-alt { display: flex; justify-content: flex-end; padding: 14px 18px; border-top: 1px solid var(--border); }

/* İşlem penceresinde işleme uygun mağazaların listesi */
.hub-kanallar { display: grid; gap: 8px; margin-top: 6px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-10); max-height: 240px; overflow: auto; }

/* Mağazaların yapabildikleri tablosu */
.yt-table th, .yt-table td { vertical-align: middle; }
.yt-table .yt-m { min-width: 120px; }
.yt-table .yt-m .mp-logo { margin-right: 6px; vertical-align: middle; }
.yt-table .yt-h { text-align: center; width: 120px; }
.yt-table .yt-bolum th { background: var(--surface-2); font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.yt-var { color: var(--success); }
.yt-yok { color: var(--muted); }

/* Pazaryeri hata listesi: uzun hata metni satırı şişirmesin */
.hata-secim { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 16px 10px; padding: 8px 12px; border-radius: 10px;
    background: var(--warning-soft); border: 1px solid color-mix(in srgb, var(--warning) 30%, transparent); }
.hata-secim .btn-danger { margin-left: auto; }
.hata-metin { max-width: 520px; font-size: .84rem; line-height: 1.45; word-break: break-word; }

/* ==========================================================================
   GÖRÜNÜM KATMANI
   Panelin güncel tasarım dili: Onest yazı tipi, 14px gövde, yeşile çalan nötr
   renkler, yuvarlak köşeler, gölgesiz kartlar, 44px kontroller.

   Vurgu rengini (--primary ve türevleri) BU KATMAN BELİRLEMEZ; onu kullanıcının
   seçtiği renk teması yönetir (Deniz, Okyanus, Mor, Gül, Orman, Kehribar, Grafit).
   Buraya renk eklerken bunu bozma.
   ========================================================================== */

/* ---- Yazı tipi: Onest (SIL Open Font License, lisans: fonts/onest-LICENSE.txt) ---- */
@font-face {
  font-family: "Onest";
  src: url("fonts/onest-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900; font-display: swap; font-style: normal;
  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+20BA, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Onest";
  src: url("fonts/onest-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 100 900; font-display: swap; font-style: normal;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ==========================================================================
   1. Değişkenler
   ========================================================================== */
:root {
  --font: "Onest", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Nötr rampa: düz gri değil, yeşile çalan. Görünümün karakterini bu belirliyor. */
  --bg: #f4f5f5;
  --surface: #ffffff;
  --surface-2: #f4f5f5;
  --surface-3: #e9ebeb;
  --border: #c3cdc9;
  --border-strong: #a9b1ae;
  --border-soft: #e9ebeb;        /* tablo satır ayıracı */
  --text: #1f2725;
  --text-2: #4b5552;
  --muted: #7d8784;
  --faint: #a9b1ae;

  /* Marka yeşili yalnız durum ve vurgu için */

  --success: #047857; --success-soft: #ecfdf5;
  --warning: #b45309; --warning-soft: #fffbeb;
  --danger:  #b42318; --danger-soft:  #fef3f2;
  --info:    #0369a1; --info-soft:    #f0f9ff;

  --sidebar-bg: #ffffff;
  --sidebar-text: #1f2725;
  --sidebar-strong: #121917;
  --sidebar-muted: #7d8784;
  --sidebar-hover: #f4f5f5;
  --sidebar-border: #e9ebeb;
  --sidebar-btn-bg: #f4f5f5;

  /* Derinlik gölgeyle değil kenarlıkla verilir */
  --shadow-sm: none;
  --shadow: none;
  --shadow-lg: 0 10px 30px rgba(6, 18, 15, 0.14);

  /* Köşe merdiveni yeniden eşlendi: küçükler az, orta boylar belirgin büyüdü */
  --radius-2: 4px;   --radius-3: 6px;   --radius-4: 8px;   --radius-5: 8px;
  --radius-6: 10px;  --radius-7: 10px;  --radius-8: 12px;  --radius-9: 12px;
  --radius-10: 16px; --radius-11: 16px; --radius-12: 16px; --radius-13: 16px;
  --radius-14: 20px; --radius-16: 20px; --radius-18: 20px;
  --radius-20: 24px; --radius-22: 24px; --radius-24: 24px;

  /* Hareket */
  --gecis: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}


:root[data-theme="dark"] {
  --bg: #06120f; --surface: #0f1715; --surface-2: #121917; --surface-3: #1e2c28;
  --border: #33413c; --border-strong: #46554f; --border-soft: #1e2c28;
  --text: #e9ebeb; --text-2: #c3cdc9; --muted: #93a29d; --faint: #5b6b66;
  --sidebar-bg: #0f1715; --sidebar-text: #c3cdc9; --sidebar-strong: #e9ebeb;
  --sidebar-hover: #121917; --sidebar-border: #1e2c28; --sidebar-btn-bg: #121917;
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* ==========================================================================
   2. Tipografi — 14px gövde, sıkı başlık
   ========================================================================== */
body { font-size: 14px; line-height: 1.45; }
h1, h2,
h3, h4 { letter-spacing: -0.025em; }
.page-head h1 { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.025em; }
.page-head p { font-size: 0.86rem; color: var(--muted); }
.card-head h2 { font-size: 0.95rem; font-weight: 700; letter-spacing: -0.02em; }
.label { font-size: 0.8rem; font-weight: 500; color: var(--text-2); }
.help { font-size: 0.78rem; color: var(--muted); }
.num, .amt,
.mono { font-variant-numeric: tabular-nums; }

/* ==========================================================================
   3. Düğmeler — 44px, yuvarlak, yumuşak geçişli
   ========================================================================== */
.btn {
  height: 44px; padding: 0 18px; border-radius: var(--radius-10);
  font-size: 0.875rem; font-weight: 600; letter-spacing: -0.01em;
  transition: background var(--gecis), color var(--gecis), border-color var(--gecis), transform var(--gecis);
}
.btn:active { transform: scale(0.98); }
.btn-lg { height: 48px; padding: 0 22px; font-size: 0.925rem; }
.btn-sm { height: 36px; padding: 0 13px; border-radius: var(--radius-8); font-size: 0.82rem; }
.btn-xs { height: 30px; padding: 0 10px; border-radius: var(--radius-6); font-size: 0.76rem; }
.btn-icon { width: 44px; padding: 0; }
.btn-sm.btn-icon { width: 36px; }
.btn-secondary {
  background: var(--surface); border-color: var(--border-strong); color: var(--text);
}
.btn-secondary:hover { background: var(--surface-2); border-color: var(--muted); }
.btn-ghost:hover { background: var(--surface-3); }
.btn:focus-visible {
  outline: none; border-color: var(--primary); box-shadow: var(--ring);
}

/* ==========================================================================
   4. Form alanları — 44px, 16px köşe, yeşil odak halkası
   ========================================================================== */
.input,
.select,
.textarea {
  height: 44px; padding: 0 14px; border-radius: var(--radius-10);
  border-color: var(--border-strong); font-size: 0.875rem;
  transition: border-color var(--gecis), box-shadow var(--gecis);
}
.textarea { height: auto; min-height: 104px; padding: 12px 14px; }
.select { padding-right: 38px; background-position: right 14px center; }
.input:focus,
.select:focus,
.textarea:focus { border-color: var(--primary); box-shadow: var(--ring); }
.input-sm,
.select-sm { height: 36px; min-height: 36px; padding: 0 12px; border-radius: var(--radius-8); font-size: 0.82rem; }
.check input[type="checkbox"],
.check input[type="radio"] { accent-color: var(--primary); }

/* ==========================================================================
   5. Kartlar — 20px köşe, gölgesiz, ince kenarlık
   ========================================================================== */
.card {
  border-radius: var(--radius-14); border: 1px solid var(--border); box-shadow: none;
}
.card-foot { border-radius: 0 0 var(--radius-14) var(--radius-14); }
.card-head { padding: 14px 18px; }
.card-body { padding: 18px; }
.stat {
  border-radius: var(--radius-14); border: 1px solid var(--border); box-shadow: none; padding: 16px 18px;
}
.stat::before { display: none; }
.stat-label { font-size: 0.8rem; font-weight: 500; color: var(--text-2); }
.stat-value { font-size: 1.3rem; font-weight: 700; letter-spacing: -0.03em; }
a.stat:hover { transform: none; box-shadow: none; border-color: var(--border-strong); }

/* ==========================================================================
   6. Tablolar — sıkı, zebrasız, ince ayıraçlı
   ========================================================================== */
.table { font-size: 0.875rem; }
.table th {
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0; color: var(--text-2);
  padding: 10px 16px; border-bottom: 1px solid var(--border-soft);
}
.table td { padding: 10px 16px; border-bottom: 1px solid var(--border-soft); }
.table tbody tr { transition: background var(--gecis); }
.table tbody tr:hover { background: var(--surface-2); }
.tx-row { padding: 10px 18px; border-bottom: 1px solid var(--border-soft); }
.tx-row:hover { background: var(--surface-2); }

/* ==========================================================================
   7. Sol menü — 44px satır, 16px köşe
   ========================================================================== */
.sidebar { border-right: 1px solid var(--sidebar-border); }
.nav-link,
.nav-sub-btn {
  min-height: 44px; padding: 0 12px; border-radius: var(--radius-10);
  font-size: 0.875rem; font-weight: 600; transition: background var(--gecis), color var(--gecis);
}
.nav-sub .nav-link { min-height: 38px; font-weight: 500; }
.nav-label { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; color: var(--sidebar-muted); }

/* ==========================================================================
   8. Sekmeler, çipler, rozetler
   ========================================================================== */
.tabs {
  gap: 4px; padding: 4px; border-radius: var(--radius-12); border: 1px solid var(--border); box-shadow: none;
}
.tab {
  min-height: 40px; padding: 0 14px; border-radius: var(--radius-8);
  font-size: 0.85rem; font-weight: 600; transition: background var(--gecis), color var(--gecis);
}
.tab.active { background: var(--text); color: var(--surface); }
.chip { height: 24px; padding: 0 10px; font-size: 0.74rem; }
.badge { height: 24px; padding: 0 10px; font-size: 0.74rem; border-radius: var(--radius-tam); }

/* ==========================================================================
   9. Uyarılar ve pencereler — yumuşak giriş
   ========================================================================== */
.alert {
  border-radius: var(--radius-12); padding: 14px 16px; font-size: 0.86rem;
  border: 1px solid var(--border); animation: arsigo-giris 0.2s cubic-bezier(0, 0, 0.2, 1);
}
.alert-success { border-color: #a7f3d0; }
.alert-danger  { border-color: #fecdca; }
.alert-warning { border-color: #fde68a; }
.alert-info    { border-color: #bae6fd; }

.modal,
.fv-panel {
  border-radius: var(--radius-20); border: 1px solid var(--border); box-shadow: var(--shadow-lg);
  animation: arsigo-giris 0.2s cubic-bezier(0, 0, 0.2, 1);
}
.modal-head { padding: 18px 20px 0; }
.modal-body { padding: 16px 20px; }
.modal-foot { padding: 14px 20px 18px; }
.modal::backdrop { background: rgba(6, 18, 15, 0.45); }

@keyframes arsigo-giris {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .alert,
  .modal,
  .fv-panel { animation: none; }
  .btn:active { transform: none; }
}

/* ==========================================================================
   10. Büyük rakamlar
   Onest'in tablo rakamları (tabular-nums) geniş; büyük puntoda "12" aralıklı
   görünüyordu. Bu boylarda hafif negatif aralık dengeliyor.
   ========================================================================== */
.hub-stat b,
.fv-kpi-val,
.stat-value,
.hero-stat { letter-spacing: -0.04em; }
.hub-stat b { font-size: 1.7rem; font-weight: 700; }
.hub-stat-label,
.fv-kpi-label { font-size: 0.7rem; letter-spacing: 0.04em; font-weight: 600; }

/* ==========================================================================
   11. Boş durumlar, bildirimler, yükleniyor
   ========================================================================== */
.empty,
.fv-empty,
.ld-empty { padding: 48px 20px; font-size: 0.875rem; }
.empty-icon {
  width: 56px; height: 56px; border-radius: var(--radius-14);
  background: var(--surface-3); color: var(--muted);
}

/* Köşeden gelen bildirimler: koyu değil, kartla aynı dilde */
.off-toast {
  border-radius: var(--radius-12); background: var(--text); color: var(--surface);
  font-size: 0.86rem; padding: 12px 18px; box-shadow: var(--shadow-lg);
  animation: arsigo-giris 0.2s cubic-bezier(0, 0, 0.2, 1);
}
.senkron-bildirim-k,
.hub-notice {
  border-radius: var(--radius-14); border: 1px solid var(--border); box-shadow: none;
  animation: arsigo-giris 0.2s cubic-bezier(0, 0, 0.2, 1);
}

.page-loader { background: var(--bg); }

/* ==========================================================================
   12. Giriş / kayıt ekranı
   Oturumsuz sayfalarda görünüm tarayıcı hafızasından geliyor; kontroller
   panelle aynı ölçüde olsun diye burada da 44px ve 16px köşe.
   ========================================================================== */
/* .auth-card aslında yalnız 410px'lik bir sarmalayıcıydı; ona çerçeve verilince
   içi boş bir dikdörtgen çizilip yazılar kenara yapışmıştı. Gerçek karta çeviriyoruz. */
.auth-main { background: var(--bg); }
.auth-card,
.guest-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-20); box-shadow: none; padding: 30px 28px;
}
@media (max-width: 480px) {
  .auth-card, .guest-card { padding: 22px 18px; border: 0; background: transparent; }
}

/* ==========================================================================
   13. ANA HATLAR — bütün panel temalarında geçerli
   Buradaki kurallar `html[data-layout]` ile yazıldı; panel teması kuralları
   (html[data-layout="gruplu"] .btn gibi) ile aynı güçte ama sonra geldikleri
   için kazanırlar. Böylece dokuz panel temasının hepsi aynı ana hatları taşır;
   temalar yalnız menü yapısını ve yerleşimi değiştirir.
   ========================================================================== */

/* Ana düğme koyu. Renk seçimi (--primary) burada kullanılmaz; o, aktif menü
   satırı, odak halkası, grafikler, ölçerler ve onay kutularını renklendirir. */
:root { --dugme: #0a0f0e; --dugme-hover: #000000; --dugme-metin: #ffffff; }
:root[data-theme="dark"] { --dugme: #e9ebeb; --dugme-hover: #ffffff; --dugme-metin: #06120f; }

html[data-layout] .btn-primary,
.btn-primary { background: var(--dugme); color: var(--dugme-metin); border-color: transparent; }
html[data-layout] .btn-primary:hover,
.btn-primary:hover { background: var(--dugme-hover); color: var(--dugme-metin); }

/* Kontrol ölçüleri */
html[data-layout] .btn { height: 44px; padding: 0 18px; border-radius: var(--radius-10); font-size: 0.875rem; font-weight: 600; }
html[data-layout] .btn-lg { height: 48px; padding: 0 22px; font-size: 0.925rem; }
html[data-layout] .btn-sm { height: 36px; padding: 0 13px; border-radius: var(--radius-8); font-size: 0.82rem; }
html[data-layout] .btn-xs { height: 30px; padding: 0 10px; border-radius: var(--radius-6); font-size: 0.76rem; }
html[data-layout] .btn-icon { width: 44px; padding: 0; }
html[data-layout] .btn-sm.btn-icon { width: 36px; }

html[data-layout] .input,
html[data-layout] .select,
html[data-layout] .textarea {
  height: 44px; padding: 0 14px; border-radius: var(--radius-10);
  border: 1px solid var(--border-strong); font-size: 0.875rem;
}
html[data-layout] .textarea { height: auto; min-height: 104px; padding: 12px 14px; }
html[data-layout] .select { padding-right: 38px; background-position: right 14px center; }
html[data-layout] .input-sm,
html[data-layout] .select-sm { height: 36px; min-height: 36px; padding: 0 12px; border-radius: var(--radius-8); font-size: 0.82rem; }

/* Kartlar: yuvarlak, gölgesiz, ince kenarlıklı */
html[data-layout] .card,
html[data-layout] .stat {
  border-radius: var(--radius-14); border: 1px solid var(--border); box-shadow: none;
}
html[data-layout] .card-head { padding: 14px 18px; }
html[data-layout] .card-foot { border-radius: 0 0 var(--radius-14) var(--radius-14); }
html[data-layout] .stat::before { display: none; }

/* Tablolar: sıkı, zebrasız, ince ayıraçlı */
html[data-layout] .table { font-size: 0.875rem; }
html[data-layout] .table th {
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0; padding: 10px 16px;
  border-bottom: 1px solid var(--border-soft); border-left: 0; border-right: 0;
}
html[data-layout] .table td {
  padding: 10px 16px; border-bottom: 1px solid var(--border-soft); border-left: 0; border-right: 0;
}
html[data-layout] .table tbody tr:nth-child(even) { background: transparent; }
html[data-layout] .table tbody tr:hover { background: var(--surface-2); }

/* Sekmeler ve sol menü */
html[data-layout] .tabs { gap: 4px; padding: 4px; border-radius: var(--radius-12); border: 1px solid var(--border); box-shadow: none; }
html[data-layout] .tab { min-height: 40px; padding: 0 14px; border-radius: var(--radius-8); border-bottom: 0; font-size: 0.85rem; font-weight: 600; }
html[data-layout] .tab.active { background: var(--text); color: var(--surface); border-bottom-color: transparent; }
html[data-layout] .nav-link,
html[data-layout] .nav-sub-btn { min-height: 44px; padding: 0 12px; border-radius: var(--radius-10); font-size: 0.875rem; font-weight: 600; }
html[data-layout] .nav-sub .nav-link { min-height: 38px; font-weight: 500; }

/* ==========================================================================
   14. Mod anahtarı — Defter / Pazaryeri
   Pazaryeri sayfaları ayrı bir panel gibi çalışır: sol menü yalnız o sayfaları
   gösterir. Anahtar sol menünün üstünde durur; sol menüsü olmayan panel
   temalarında (Yatay, Şerit, Başlat menüsü) üst bara taşınır.
   ========================================================================== */
.mod-anahtar {
  display: flex; gap: 3px; padding: 3px; margin: 0 12px 10px;
  border: 1px solid var(--sidebar-border); border-radius: var(--radius-12);
}
.mod-btn {
  flex: 1 1 0; min-width: 0; min-height: 36px; display: flex; align-items: center;
  justify-content: center; gap: 6px; border-radius: var(--radius-8);
  font-size: 0.8rem; font-weight: 700; color: var(--sidebar-muted); text-decoration: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: background var(--gecis, .15s ease), color var(--gecis, .15s ease);
}
.mod-btn:hover { color: var(--sidebar-strong); text-decoration: none; }
.mod-btn.on { background: var(--sidebar-active); color: var(--sidebar-active-text); }
.mod-btn .nav-badge { position: static; margin: 0; flex: 0 0 auto; }

/* Daraltılmış menüde yalnız baş harf: "Defter / Pazaryeri" dar raya sığmıyor,
   kırpılıp "efte zary" gibi okunuyordu. */
.mod-kisa { display: none; }
:root[data-sidebar="collapsed"] .mod-anahtar { margin: 0 8px 8px; padding: 3px; gap: 3px; }
:root[data-sidebar="collapsed"] .mod-btn { min-height: 30px; padding: 0; font-size: 0.82rem; }
:root[data-sidebar="collapsed"] .mod-tam { display: none; }
:root[data-sidebar="collapsed"] .mod-kisa { display: block; }
:root[data-sidebar="collapsed"] .mod-btn .nav-badge { display: none; }

/* Sol menüsüz temalarda (Yatay, Şerit, Başlat, Mini) anahtar üst barda durur */
.mod-ust { display: none; }
@media (min-width: 901px) {
  html[data-layout="ust"] .mod-ust,
  html[data-layout="serit"] .mod-ust,
  html[data-layout="mega"] .mod-ust,
  html[data-layout="mini"] .mod-ust {
    display: flex; margin: 0 10px 0 0; flex: 0 0 auto; width: 192px;
    border-color: var(--border);
  }
  .mod-ust .mod-btn { min-height: 32px; font-size: 0.78rem; color: var(--text-2); }
  .mod-ust .mod-btn:hover { color: var(--text); }
  .mod-ust .mod-btn.on { background: var(--primary-soft); color: var(--primary-text); }
}

/* Başka ekrana götüren bağlantı kartı (Pazaryeri Ayarları) */
a.ig-card, a.ig-card:hover, a.ig-add, a.ig-add:hover { text-decoration: none; }
a.ig-card, a.ig-card:hover { color: inherit; }
a.ig-card .ig-card-name, a.ig-card .ig-card-sub { text-decoration: none; }
.ig-add { text-align: center; }

/* ==========================================================================
   15. FORM ÖĞELERİ — tarayıcı öntanımlıları yerine tema
   Onay kutusu, radyo, dosya seçme ve açılır bölümler her ekranda aynı görünsün.
   Kurallar sınıfsızdır: işaretlemeye dokunmadan bütün projeyi kapsar.
   ========================================================================== */

/* --- Onay kutusu ve radyo --------------------------------------------- */
input[type="checkbox"],
input[type="radio"] {
  appearance: none; -webkit-appearance: none;
  width: 18px; height: 18px; flex: none; margin: 0; padding: 0;
  border: 1.5px solid var(--border-strong); background: var(--surface);
  cursor: pointer; display: inline-grid; place-content: center;
  transition: background var(--gecis, .15s ease), border-color var(--gecis, .15s ease);
}
/* Görünüm katmanı köşe merdivenini büyüttüğü için kutuya kendi ölçüsünü veriyoruz:
   18px'lik bir kareye 10px köşe fazla geliyor. */
input[type="checkbox"] { border-radius: 6px; }
input[type="radio"] { border-radius: var(--radius-tam); }

input[type="checkbox"]:hover:not(:disabled),
input[type="radio"]:hover:not(:disabled) { border-color: var(--primary); }

input[type="checkbox"]::before,
input[type="radio"]::before { content: ""; display: block; transform: scale(0); transition: transform .12s ease; }

/* Tik, maske ile çiziliyor: rengi temadan gelsin (koyu temada birincil renk açık olur,
   üstüne beyaz tik okunmuyordu). */
input[type="checkbox"]::before {
  width: 18px; height: 18px; background-color: var(--on-primary, #fff);
  -webkit-mask: no-repeat center / 12px 12px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  mask: no-repeat center / 12px 12px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}
input[type="radio"]::before { width: 7px; height: 7px; border-radius: var(--radius-tam); background: var(--on-primary, #fff); }

input[type="checkbox"]:checked,
input[type="radio"]:checked { background: var(--primary); border-color: var(--primary); }
input[type="checkbox"]:checked::before,
input[type="radio"]:checked::before { transform: scale(1); }

/* Kısmi seçim (tablo başlığındaki "hepsini seç") */
input[type="checkbox"]:indeterminate { background: var(--primary); border-color: var(--primary); }
input[type="checkbox"]:indeterminate::before {
  transform: scale(1); -webkit-mask: none; mask: none;
  background: no-repeat center / 11px 2px linear-gradient(var(--on-primary, #fff), var(--on-primary, #fff));
}

input[type="checkbox"]:focus-visible,
input[type="radio"]:focus-visible { outline: none; box-shadow: var(--ring); }

input[type="checkbox"]:disabled,
input[type="radio"]:disabled { cursor: not-allowed; opacity: 0.5; background: var(--surface-2); }

/* Anahtar görünümlü kutular (varsa) kendi stillerini korusun */
input[type="checkbox"].switch, input[type="checkbox"][role="switch"] { appearance: auto; -webkit-appearance: auto; }

/* --- Dosya seçme ------------------------------------------------------- */
/* Ekrandan gizlenmiş dosya alanları (kendi düğmesi olan yükleyiciler) bu biçimi almaz:
   genişlik 100% olunca sayfayı yatay kaydırıyordu. */
input[type="file"]:not(.visually-hidden):not([hidden]) {
  width: 100%; min-height: 44px; padding: 0; display: flex; align-items: center;
  border: 1px solid var(--border-strong); border-radius: var(--radius-10);
  background: var(--surface); color: var(--text); font: inherit; font-size: 0.875rem;
  cursor: pointer; overflow: hidden;
}
input[type="file"]:not(.visually-hidden)::file-selector-button {
  height: 42px; margin: 0 12px 0 0; padding: 0 16px; flex: none;
  border: 0; border-right: 1px solid var(--border);
  background: var(--surface-2); color: var(--text);
  font: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer;
  transition: background var(--gecis, .15s ease);
}
input[type="file"]:not(.visually-hidden)::file-selector-button:hover { background: var(--surface-3); }
input[type="file"]:not(.visually-hidden):focus-visible { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
input[type="file"]:not(.visually-hidden):disabled { opacity: 0.6; cursor: not-allowed; }

/* --- Açılır kapanır bölüm (details / summary) -------------------------- */
details {
  border: 1px solid var(--border); border-radius: var(--radius-10);
  background: var(--surface-2); margin-bottom: 10px;
}
details > summary {
  list-style: none; cursor: pointer; user-select: none;
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; font-size: 0.9rem; font-weight: 600; color: var(--text);
  border-radius: var(--radius-10);
  transition: background var(--gecis, .15s ease);
}
details > summary::-webkit-details-marker { display: none; }
details > summary::marker { content: ""; }
details > summary::before {
  content: ""; flex: none; width: 16px; height: 16px;
  background: no-repeat center / 16px 16px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7382' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E");
  transition: transform var(--gecis, .15s ease);
}
details[open] > summary::before { transform: rotate(90deg); }
details > summary:hover { background: var(--surface-3); }
details > summary:focus-visible { outline: none; box-shadow: var(--ring); }
details[open] > summary { border-bottom: 1px solid var(--border); border-radius: var(--radius-10) var(--radius-10) 0 0; }
details > summary ~ * { margin-left: 14px; margin-right: 14px; }
details > summary ~ *:first-of-type { margin-top: 12px; }
details > summary ~ *:last-child { margin-bottom: 14px; }

/* --- Açılır seçim listesi (sec.js) ------------------------------------- */
/* Gerçek <select> DOM'da kalır; görünmez ama erişilebilir durur. */
.dsel { position: relative; display: block; width: 100%; }
/* Select'in kendi genişliği olan bağlamlarda sarmalayıcı germesin.
   .row doğrudan çocuğu: yan yana dizilen süzgeçlerde select içeriği kadar durur. */
.bulk-bar .dsel, .rv-detail .dsel, .rv-table .dsel { width: auto; }
.row > .dsel { width: auto; max-width: 100%; }
.inv-lines .dsel { min-width: 0; }
/* inset: 0 zaten kutuyu kaplar; width/height yazmıyoruz ki select kendi
   genişlik kurallarını (ör. .me-sub-icon) korusun. */
.dsel > select { position: absolute; inset: 0; opacity: 0; pointer-events: none; z-index: -1; }
/* Düğme select'in sınıflarını taşır: yükseklik, yazı boyutu ve genişlik kuralları
   oradan gelir. Burada yalnız select'e özgü görünümü geri alıyoruz. */
.dsel-dugme {
  display: flex; align-items: center; gap: 8px; text-align: left;
  padding-right: 38px; background-image: none; cursor: pointer; position: relative;
  transition: border-color var(--gecis, .15s ease), box-shadow var(--gecis, .15s ease);
}

.dsel-dugme:hover:not(:disabled) { border-color: var(--primary); }
.dsel-dugme:focus-visible,
.dsel-acik .dsel-dugme { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
.dsel-dugme:disabled { cursor: not-allowed; background: var(--surface-2); color: var(--muted); }
.dsel-dugme.is-invalid { border-color: var(--danger); }
.dsel-metin { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dsel-metin.dsel-bos { color: var(--faint); }
.dsel-ok {
  position: absolute; right: 13px; top: 50%; width: 16px; height: 16px; margin-top: -8px; flex: none;
  background: no-repeat center / 16px 16px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7382' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  transition: transform var(--gecis, .15s ease);
}
.dsel-acik .dsel-ok { transform: rotate(180deg); }


/* Açılan kutu gövdeye eklenir: kartların taşma sınırlarına takılmaz.
   z-index pencere katmanlarının (kasa .pos-overlay 100, onay 90, ekran klavyesi 90) üstünde olmalı;
   90'dayken kasa pencerelerindeki listeler perdenin altında açılıyor, "açılmıyor" sanılıyordu. */
.dsel-kutu {
  position: fixed; z-index: 1000; display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius-12); box-shadow: var(--shadow-lg);
  animation: dsel-gir 0.12s cubic-bezier(0, 0, 0.2, 1);
}
@keyframes dsel-gir { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.dsel-kutu.dsel-yukari { animation-name: dsel-gir-ust; }
@keyframes dsel-gir-ust { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.dsel-ara { padding: 8px; border-bottom: 1px solid var(--border); flex: none; }
.dsel-ara-alan {
  width: 100%; height: 34px; padding: 0 11px; font: inherit; font-size: 0.85rem;
  border: 1px solid var(--border-strong); border-radius: var(--radius-8);
  background: var(--surface); color: var(--text);
}
.dsel-ara-alan:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }

.dsel-golge { overflow-y: auto; padding: 5px; overscroll-behavior: contain; }
.dsel-grup {
  padding: 9px 10px 4px; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--faint);
}
.dsel-sat {
  display: flex; align-items: center; min-height: 36px; padding: 7px 11px;
  border-radius: var(--radius-8); font-size: 0.875rem; color: var(--text);
  cursor: pointer; user-select: none; word-break: break-word;
}
.dsel-sat.vurgu { background: var(--surface-3); }
.dsel-sat.secili { background: var(--primary-soft); color: var(--primary-text); font-weight: 600; }
.dsel-sat.secili.vurgu { background: var(--primary-soft); }
.dsel-sat.kapali { color: var(--faint); cursor: not-allowed; }
.dsel-yok { padding: 14px 11px; font-size: 0.85rem; color: var(--muted); text-align: center; }


/* ---- Tarih / saat seçici (tarih.js) ------------------------------------ */
/* sec.js ile aynı düzen: gerçek input sarmalayıcıda gizli durur, düğme onun
   sınıflarını taşır, açılan kutu gövdeye eklenir. */
.dtar { position: relative; display: block; width: 100%; }
.row > .dtar { width: auto; max-width: 100%; }
.dtar > input { position: absolute; inset: 0; opacity: 0; pointer-events: none; z-index: -1; }
.dtar-dugme {
  display: flex; align-items: center; gap: 8px; text-align: left;
  padding-right: 38px; background-image: none; cursor: pointer; position: relative;
  transition: border-color var(--gecis, .15s ease), box-shadow var(--gecis, .15s ease);
}
.dtar-dugme:hover:not(:disabled) { border-color: var(--primary); }
.dtar-dugme:focus-visible,
.dtar-acik .dtar-dugme { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
.dtar-dugme:disabled { cursor: not-allowed; background: var(--surface-2); color: var(--muted); }
.dtar-dugme.is-invalid { border-color: var(--danger); }
.dtar-metin { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dtar-metin.dtar-bos { color: var(--faint); }
.dtar-sim { position: absolute; right: 12px; top: 50%; width: 17px; height: 17px; margin-top: -8px; flex: none;
  background: no-repeat center / 17px 17px; opacity: .85; }

.dtar-kutu {
  position: fixed; z-index: 1000; width: 272px; display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius-12); box-shadow: var(--shadow-lg); padding: 8px;
  animation: dsel-gir 0.12s cubic-bezier(0, 0, 0.2, 1);
}
.dtar-kutu.dtar-yukari { animation-name: dsel-gir-ust; }

.dtar-bas { display: flex; align-items: center; gap: 4px; margin-bottom: 6px; }
.dtar-baslik {
  flex: 1; border: 0; background: none; font: inherit; font-size: .9rem; font-weight: 650; color: var(--text);
  padding: 6px 8px; border-radius: var(--radius-8); cursor: pointer;
}
.dtar-baslik:hover:not(:disabled) { background: var(--surface-3); }
.dtar-baslik:disabled { cursor: default; }
.dtar-bas-sade .dtar-ok { visibility: hidden; }
.dtar-ok {
  width: 30px; height: 30px; flex: none; border: 0; background: none; cursor: pointer; border-radius: var(--radius-8);
  position: relative; color: var(--muted);
}
.dtar-ok:hover { background: var(--surface-3); color: var(--text); }
.dtar-ok::before {
  content: ''; position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px;
  border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; border-radius: 1px;
}
.dtar-geri::before { transform: rotate(45deg) translate(1px, -1px); }
.dtar-ileri::before { transform: rotate(-135deg) translate(1px, -1px); }

.dtar-izgara { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.dtar-gunad { text-align: center; font-size: .7rem; font-weight: 650; color: var(--muted); padding: 4px 0 6px; }
.dtar-gun {
  height: 32px; border: 0; background: none; font: inherit; font-size: .84rem; color: var(--text);
  border-radius: var(--radius-8); cursor: pointer;
}
.dtar-gun:hover:not(:disabled) { background: var(--surface-3); }
.dtar-gun.dis { color: var(--faint); }
.dtar-gun.bugun { box-shadow: inset 0 0 0 1px var(--border-strong); font-weight: 650; }
.dtar-gun.secili { background: var(--primary); color: var(--on-primary); font-weight: 650; }
.dtar-gun.secili:hover { background: var(--primary-hover); }
.dtar-gun.kapali { color: var(--faint); opacity: .45; cursor: not-allowed; }

.dtar-aylar { grid-template-columns: repeat(3, 1fr); gap: 4px; }
.dtar-kare {
  height: 40px; border: 0; background: none; font: inherit; font-size: .85rem; color: var(--text);
  border-radius: var(--radius-8); cursor: pointer;
}
.dtar-kare:hover { background: var(--surface-3); }
.dtar-kare.secili { background: var(--primary); color: var(--on-primary); font-weight: 650; }

.dtar-saatler { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; max-height: 240px; overflow-y: auto; overscroll-behavior: contain; }
.dtar-saat {
  height: 32px; border: 0; background: none; font: inherit; font-size: .84rem; color: var(--text);
  border-radius: var(--radius-8); cursor: pointer;
}
.dtar-saat:hover { background: var(--surface-3); }
.dtar-saat.secili { background: var(--primary); color: var(--on-primary); font-weight: 650; }

.dtar-alt { display: flex; gap: 6px; align-items: center; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); }
.dtar-kisa {
  flex: 1; height: 32px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  font: inherit; font-size: .82rem; font-weight: 600; border-radius: var(--radius-8); cursor: pointer;
}
.dtar-kisa:hover { background: var(--surface-2); }
.dtar-temizle { color: var(--muted); }
.dtar-elle {
  flex: 1; height: 32px; border: 1px solid var(--border-strong); border-radius: var(--radius-8);
  background: var(--surface); color: var(--text); font: inherit; font-size: .84rem; padding: 0 10px; text-align: center;
}
.dtar-elle:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }

/* --- Satır içi alan hizası ---------------------------------------------
   Esnek bir satırın doğrudan çocuğu olan .field'in alt boşluğu, satırı alta
   hizalayan düzenlerde etiketsiz düğmeleri bir etiket boyu aşağı itiyordu
   (süzgeç çubuklarındaki "Göster", "Kaydet" düğmeleri). Satır zaten gap ile
   boşluk veriyor; alandaki alt boşluk gereksiz. */
.row > .field,
.fv-toolbar > .field,
.filter-grid > .field { margin-bottom: 0; }
/* Filtre düğmeleri alanlara yapışmasın; "Temizle" de birincil düğmeye
   birleşik görünmesin (çerçevesiz olduğu için tek kutu gibi duruyordu). */
.filter-grid + .row { margin-top: 14px; gap: 10px; }
:is(.btn-primary, .btn-danger) + :is(.btn-ghost, .btn-danger-ghost):not(.btn-icon) { border-color: var(--border-strong); }

/* Alta hizalanan süzgeç satırlarında etiketsiz öğeler alanlarla aynı çizgide dursun */
.row[style*="flex-end"] > .btn,
.row[style*="flex-end"] > .check,
.fv-toolbar .row > .btn { align-self: flex-end; }

/* Panelin dibindeki sayfalama kartın köşesine yapışmasın: kendi çerçevesi
   kartın çerçevesiyle çakışıyor, iki yuvarlak köşe üst üste biniyordu. */
.fv-panel > .fv-pager:last-child,
.fv-card > .fv-pager:last-child { margin: 12px 16px 14px; }

/* Çoklu seçim alanı: tek seçimlik select stiline sıkışmasın.
   Sabit 44px yükseklik ve ok simgesi burada yanlış; liste kendi boyunda dursun. */
select[multiple],
select[size]:not([size="0"]):not([size="1"]) {
  height: auto; min-height: 96px; padding: 6px; line-height: 1.5;
  background-image: none; overflow-y: auto;
}
select[multiple] option,
select[size]:not([size="0"]):not([size="1"]) option {
  padding: 6px 9px; border-radius: var(--radius-6); margin-bottom: 2px;
}
select[multiple] option:checked {
  background: var(--primary-soft) linear-gradient(var(--primary-soft), var(--primary-soft));
  color: var(--primary-text); font-weight: 600;
}

/* Üst üste dizilen kartlar birleşik görünmesin: aralarında boşluk olsun.
   (Kart bitişiklikleri "tek kutu" izlenimi veriyordu: Pazaryeri Özeti'nde
   Mağazalar / Mağazaların yapabildikleri, Hesap Araçları'nda form + tablo.) */
.fv-card + .fv-card,
.fv-panel + .fv-panel,
.fv-card + .fv-panel,
.fv-panel + .fv-card { margin-top: 16px; }
.card + .card, .card + .fv-card, .fv-card + .card { margin-top: 16px; }
/* Ama ızgara / esnek satır içinde boşluğu yalnız gap verir: bitişiklik payı
   oradaki kartları aşağı kaydırıp ilk karttan kısa gösteriyordu. */
:is([class*="grid"], .row) > :is(.card, .fv-card, .fv-panel) { margin-top: 0; }

/* Üst sayaçlar tek kutuda bölmeli değil, ayrı ayrı kart olsun.
   (Panelin diğer ekranlarındaki özet kartlarıyla aynı görünüm.) */
.hub-stats { gap: 14px; background: transparent; border: 0; border-radius: 0; overflow: visible; }
.hub-stat {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-14); border-right: 1px solid var(--border);
  min-width: 0;
}
.hub-stat:last-child { border-right: 1px solid var(--border); }
@media (max-width: 900px) { .hub-stat:nth-child(2) { border-right: 1px solid var(--border); } }

/* Sipariş seçim şeridi: "tümünü seç" ve toplu işlemler tek kutuda, üstteki
   çizgiye yapışmadan. Eskiden onay kutusu kutunun dışında kalıyordu. */
/* overflow: hidden koymuştum; toplu işlem çubuğundaki "Diğer" açılır menüsünü
   kırpıyordu. Köşeleri çocuklara tek tek vererek kırpmaya gerek bırakmıyoruz. */
.sp-secim {
  margin: 14px 14px 12px; border: 1px solid var(--border);
  border-radius: var(--radius-12); background: var(--surface-2);
}
.sp-secim .sp-tumu {
  padding: 11px 14px; margin: 0; font-size: .85rem; color: var(--text-2); cursor: pointer;
  border-radius: var(--radius-12) var(--radius-12) 0 0;
}
.sp-secim .sp-tumu:only-child { border-radius: var(--radius-12); }
.sp-secim .hub-bulk {
  margin: 0; border: 0; border-top: 1px solid var(--border); background: var(--surface);
  border-radius: 0 0 var(--radius-12) var(--radius-12);
}

/* --- Alt sekmeler: alt çizgi yerine düğme ------------------------------- */
.hub-tabs { gap: 6px; padding: 12px 14px; }
.hub-tabs a {
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px;
  padding: 0 13px; border-radius: var(--radius-10);
  border: 1px solid var(--border); border-bottom: 1px solid var(--border);
  background: var(--surface); color: var(--text-2); font-size: .85rem; font-weight: 600;
  transition: background var(--gecis, .15s ease), color var(--gecis, .15s ease), border-color var(--gecis, .15s ease);
}
.hub-tabs a:hover { background: var(--surface-2); color: var(--text); border-color: var(--border-strong); }
.hub-tabs a.on { background: var(--text); color: var(--surface); border-color: var(--text); font-weight: 700; }
.hub-tabs a span {
  margin-left: 0; min-width: 20px; height: 20px; padding: 0 6px; display: inline-grid; place-items: center;
  border-radius: var(--radius-tam); background: var(--surface-3); color: var(--text-2);
  font-size: .72rem; font-weight: 700; font-variant-numeric: tabular-nums;
}
.hub-tabs a.on span { background: rgba(255, 255, 255, .18); color: var(--surface); }
.hub-tabs a span.hot { background: var(--danger); color: #fff; }
.hub-tabs a.on span.hot { background: var(--danger); color: #fff; }

/* --- İşlem sütunu: çıplak simge değil, düğme --------------------------- */
.hub-acts { gap: 4px; }
.hub-act {
  width: 32px; height: 32px; border-radius: var(--radius-8);
  border: 1px solid transparent; background: transparent; color: var(--text-2);
  transition: background var(--gecis, .15s ease), border-color var(--gecis, .15s ease), color var(--gecis, .15s ease);
}
.hub-act:hover { background: var(--surface-2); border-color: var(--border); color: var(--text); }
.hub-act:focus-visible { outline: none; box-shadow: var(--ring); border-color: var(--primary); }

/* Kartın içindeki tablo köşeleri ---------------------------------------
   .card yuvarlak ama .table-wrap köşeli; tablo başlığının gri zemini kartın
   yuvarlak köşesinin dışına taşıp köşeyi kare gösteriyordu. Sarmalayıcı kartın
   köşesini devralsın (overflow-x: auto zaten kırpıyor). */
.card > .table-wrap:first-child,
.fv-card > .table-wrap:first-child,
.fv-panel > .table-wrap:first-child {
  border-top-left-radius: inherit; border-top-right-radius: inherit;
}
.card > .table-wrap:last-child,
.fv-card > .table-wrap:last-child,
.fv-panel > .table-wrap:last-child {
  border-bottom-left-radius: inherit; border-bottom-right-radius: inherit;
}

/* Sipariş kartının sağ sütunu: uzun müşteri adı, uzun teslim tarihi metni veya
   geniş bir yazı tipi sütunu aşıp kartın kenarının altında kalıyordu. Sütun biraz
   genişletildi; içerik de hiçbir durumda sütunu aşamaz. */
.sp-orta { grid-template-columns: minmax(0, 1fr) minmax(230px, 272px); }
.sp-sag > * { max-width: 100%; min-width: 0; }
.sp-sag, .sp-musteri, .sp-kar, .sp-teslim { overflow-wrap: anywhere; }
.sp-serit > :last-child { margin-left: auto; min-width: 0; overflow-wrap: anywhere; }

/* Pazaryeri sekme çubukları da düğme olsun (İade Talepleri, Müşteri Soruları,
   Kargo). .hub-tabs ile aynı görünüm; iki ayrı sekme biçimi kalmasın. */
.mp-tabs { gap: 6px; padding: 12px 14px; }
.mp-tabs a {
  min-height: 36px; padding: 0 13px; border-radius: var(--radius-10);
  border: 1px solid var(--border); border-bottom: 1px solid var(--border);
  margin-bottom: 0; background: var(--surface); color: var(--text-2); font-size: .85rem; font-weight: 600;
  transition: background var(--gecis, .15s ease), color var(--gecis, .15s ease), border-color var(--gecis, .15s ease);
}
.mp-tabs a:hover { background: var(--surface-2); color: var(--text); border-color: var(--border-strong); }
.mp-tabs a.on { background: var(--text); color: var(--surface); border-color: var(--text); font-weight: 700; }
.mp-tabs .n {
  min-width: 20px; height: 20px; padding: 0 6px; display: inline-grid; place-items: center;
  border-radius: var(--radius-tam); background: var(--surface-3); color: var(--text-2);
  font-size: .72rem; font-weight: 700; font-variant-numeric: tabular-nums;
}
.mp-tabs a.on .n { background: rgba(255, 255, 255, .18); color: var(--surface); }
.mp-tabs .n.hot { background: var(--danger); color: #fff; }
.mp-tabs a.on .n.hot { background: var(--danger); color: #fff; }

/* Süzgeç satırında etiketi olmayan öğeler (onay kutusu, düğme) alanın orta
   çizgisine denk gelsin. Yalnız alta hizalamak yetmiyordu: alan 36px, metin
   ise kutunun dibinde kaldığı için göz aşağıda görüyordu. */
.hiza-satir .hiza-oge { min-height: 36px; display: inline-flex; align-items: center; }
.hiza-satir .hiza-oge.btn-sm { height: 36px; }

/* Sipariş işlem penceresi ve kartta süren işlem */
.sp-donen { display: inline-block; width: 11px; height: 11px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: sp-don .8s linear infinite; }
.sp-donen.buyuk { width: 34px; height: 34px; border-width: 3px; color: var(--primary); }
@keyframes sp-don { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .sp-donen { animation-duration: 2.4s; } }
.sp-islem-hata { display: flex; gap: 8px; align-items: flex-start; margin: 0 14px 10px; padding: 9px 12px; border-radius: var(--radius-10);
  background: var(--danger-soft); color: var(--danger); font-size: .82rem; line-height: 1.4; }
.sp-islem-hata > svg { flex: none; margin-top: 2px; }
.sp-islem-hata > span { flex: 1; color: var(--text); }
.sp-islem-kapat { flex: none; border: 0; background: none; color: var(--danger); font: inherit; font-weight: 700; cursor: pointer; padding: 0 2px; }
.sp-islem-kapat:hover { text-decoration: underline; }
.fv-head + .sp-islem-hata { margin: 0 0 14px; }
.sp-form { display: flex; flex-direction: column; gap: 12px; }
.sp-form fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.sp-bekle { align-items: center; text-align: center; padding: 26px 20px 30px; }
.sp-bekle p { margin: 0; }
.sp-sonuc-ok, .sp-sonuc-hata { align-items: center; text-align: center; padding: 24px 20px 26px; animation: sp-gel .32s ease-out; }
.sp-sonuc-ok h3, .sp-sonuc-hata h3 { margin: 4px 0 0; font-size: 1.1rem; }
.sp-sonuc-ok p, .sp-sonuc-hata p { margin: 0; color: var(--muted); max-width: 46ch; }
.sp-sonuc-hata p { color: var(--text); }
.sp-tik, .sp-carpi { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; }
.sp-tik { background: var(--success-soft); color: var(--success); animation: sp-tik .42s cubic-bezier(.2, 1.4, .4, 1); }
.sp-carpi { background: var(--danger-soft); color: var(--danger); }
.sp-tik svg, .sp-carpi svg { width: 26px; height: 26px; }
@keyframes sp-gel { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes sp-tik { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sp-sonuc-ok, .sp-sonuc-hata, .sp-tik { animation: none; } }
.sp-mini { margin: 6px 0 0; padding-left: 18px; font-size: .8rem; }
.sp-sonuclar { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: 50vh; overflow: auto; }
.sp-sonuclar li { display: flex; gap: 8px; align-items: flex-start; padding: 9px 12px; border-radius: var(--radius-10); font-size: .84rem; }
.sp-sonuclar li.ok { background: var(--success-soft); } .sp-sonuclar li.ok svg { color: var(--success); }
.sp-sonuclar li.bad { background: var(--danger-soft); } .sp-sonuclar li.bad svg { color: var(--danger); }
.sp-sonuclar svg { flex: none; margin-top: 2px; }
.hub-bulk-b.danger { color: var(--danger); }

/* Etiket tasarımcısı: eklenen öğeler, logo */
.et-ek-line { background: transparent; border-color: transparent; }
.et-ek-line.sec { background: rgba(109, 91, 232, .18); }
.et-ek-box { background: transparent; }
.et-ek-note { background: rgba(255, 196, 0, .08); }
.et-logo { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.et-tam { display: flex; flex-direction: column; gap: 3px; color: var(--muted); margin-top: 8px; }
.et-grid label.kilavuz { flex-direction: row; align-items: center; gap: 6px; }
.et-logo-kutu { margin-top: 6px; padding: 8px; border: 1px dashed var(--border); border-radius: var(--radius-8); min-height: 44px; display: grid; place-items: center; }
.et-logo-kutu img { max-width: 100%; max-height: 60px; object-fit: contain; }
.et-sablonlar { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.et-sablon { display: flex; flex-direction: column; gap: 6px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-12); background: var(--surface); }
.et-sablon p { margin: 0; }

/* Toplu kargo fişi penceresi */
.sp-fis-grup { border: 1px solid var(--border); border-radius: var(--radius-12); padding: 10px 12px; }
.sp-fis-bas { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.sp-fis-hesap { display: flex; flex-direction: column; gap: 3px; min-width: 260px; }
.sp-fis-liste { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.sp-fis-liste li { display: flex; gap: 10px; justify-content: space-between; font-size: .82rem; padding: 5px 8px; border-radius: var(--radius-8); background: var(--surface-2); }
.sp-fis-liste li small { color: var(--muted); text-align: right; }
.sp-fis-liste li.hata { background: var(--danger-soft); } .sp-fis-liste li.hata small { color: var(--danger); }
.sp-fis-liste li.gonderi small { color: var(--primary); }

/* Canlı sipariş ekranı (Tasarımlar › Canlı ekran ile değişir; renkler kök öğede değişken olarak gelir) */
.cs { --cs-bg: #f3f5f8; --cs-panel: #fff; --cs-il: #e3e8ef; --cs-ilc: #fff; --cs-text: #15202b; --cs-muted: #6b7785; --cs-line: #e3e8ef;
  --cs-hz: #f2a93b; --cs-kg: #22a06b; --cs-yeni: #4f6ef7;
  background: var(--cs-bg); color: var(--cs-text); border-radius: var(--radius-16); padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.tam-ekran .cs, .cs-onizleme-govde .cs { border-radius: 0; min-height: 100vh; }
.cs-onizleme-govde { margin: 0; background: #f3f5f8; }
.cs.dikey { max-width: 1000px; margin: 0 auto; width: 100%; }
.cs-ust { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.cs-logo { height: 38px; max-width: 180px; object-fit: contain; }
.cs-logo-ad { font-weight: 800; font-size: 1.15rem; }
.cs-baslik { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.cs-nokta { width: 9px; height: 9px; border-radius: 50%; background: var(--cs-kg); box-shadow: 0 0 0 4px color-mix(in srgb, var(--cs-kg) 22%, transparent); }
.cs-nokta.kopuk { background: #e5484d; box-shadow: none; }
.cs-saat { color: var(--cs-muted); font-size: .85rem; font-variant-numeric: tabular-nums; }
.cs-ust-a { margin-left: auto; display: flex; gap: 8px; }
.cs-dugme { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: var(--radius-10); border: 1px solid var(--cs-line);
  background: var(--cs-panel); color: var(--cs-text); font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; text-decoration: none; }
.cs-dugme.ana { background: var(--cs-kg); border-color: var(--cs-kg); color: #fff; }
.cs-ozet { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); background: var(--cs-panel); border: 1px solid var(--cs-line); border-radius: var(--radius-16); overflow: hidden; }
.cs-ozet > div { padding: 14px 18px; border-right: 1px solid var(--cs-line); }
.cs-ozet > div:last-child { border-right: 0; }
.cs-ozet span { display: block; color: var(--cs-muted); font-size: .8rem; }
.cs-ozet b { display: block; font-size: 1.9rem; font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; }
.cs-ozet .hz b { color: var(--cs-hz); } .cs-ozet .kg b { color: var(--cs-kg); } .cs-ozet .kirmizi b { color: #e5484d; }
.cs-kart { background: var(--cs-panel); border: 1px solid var(--cs-line); border-radius: var(--radius-16); padding: 14px 18px; }
.cs-kart-bas { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.cs-kart-bas h2 { margin: 0; font-size: 1rem; }
.cs-not { color: var(--cs-muted); font-size: .8rem; }
.cs-lejant { display: flex; gap: 14px; flex-wrap: wrap; color: var(--cs-muted); font-size: .8rem; }
.cs-lejant span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; background: var(--c); }
.cs-harita-sar { position: relative; }
.cs-harita { display: block; width: 100%; height: auto; }
.cs-harita path { fill: var(--cs-il); stroke: var(--cs-ilc); stroke-width: .8; transition: fill .4s; }
.cs-harita g[data-durum="hz"] path { fill: color-mix(in srgb, var(--cs-hz) 70%, var(--cs-il)); }
.cs-harita g[data-durum="kg"] path { fill: color-mix(in srgb, var(--cs-kg) 70%, var(--cs-il)); }
.cs-harita g[data-durum="yeni"] path { fill: color-mix(in srgb, var(--cs-yeni) 70%, var(--cs-il)); }
.cs-harita g.parla path { animation: cs-parla 1s ease-in-out infinite; }
.cs-harita .kibris path { opacity: .5; }
@keyframes cs-parla { 0%, 100% { fill: var(--cs-yeni); } 50% { fill: color-mix(in srgb, var(--cs-yeni) 25%, var(--cs-il)); } }
@media (prefers-reduced-motion: reduce) { .cs-harita g.parla path { animation: none; fill: var(--cs-yeni); } }
.cs-balon { position: absolute; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 3px; padding: 2px 6px 2px 8px; border-radius: 999px;
  background: var(--cs-panel); color: var(--cs-text); box-shadow: 0 1px 4px rgba(15, 23, 42, .18); font-size: .7rem; white-space: nowrap; pointer-events: none; }
.cs-balon i { font-style: normal; font-weight: 600; margin-right: 2px; }
.cs-balon em { font-style: normal; font-weight: 800; color: #fff; background: var(--c); border-radius: 999px; padding: 0 6px; min-width: 18px; text-align: center; }
.cs-bos { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: var(--cs-panel); color: var(--cs-muted); padding: 8px 14px; border-radius: var(--radius-10); font-size: .9rem; box-shadow: 0 1px 6px rgba(0,0,0,.08); }
.cs-tablo-sar { overflow: auto; max-height: 60vh; }
.cs-tablo { width: 100%; border-collapse: collapse; font-size: .9rem; }
.cs-tablo th { text-align: left; color: var(--cs-muted); font-weight: 600; font-size: .75rem; padding: 6px 10px; border-bottom: 1px solid var(--cs-line); position: sticky; top: 0; background: var(--cs-panel); }
.cs-tablo td { padding: 8px 10px; border-bottom: 1px solid var(--cs-line); }
.cs-tablo td small { display: block; color: var(--cs-muted); font-size: .72rem; }
.cs-tablo td a { color: inherit; font-weight: 700; }
.cs-tablo .r { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.cs-tablo tr.yeni td { background: color-mix(in srgb, var(--cs-yeni) 12%, transparent); }
.cs-bos-satir { text-align: center; color: var(--cs-muted); padding: 20px !important; }
.cs-mp { display: inline-flex; align-items: center; gap: 6px; } .cs-mp i { font-style: normal; }
.cs-durum { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .75rem; font-weight: 700; }
.cs-durum.hz { background: color-mix(in srgb, var(--cs-hz) 18%, transparent); color: color-mix(in srgb, var(--cs-hz) 75%, var(--cs-text)); }
.cs-durum.kg { background: color-mix(in srgb, var(--cs-kg) 18%, transparent); color: color-mix(in srgb, var(--cs-kg) 75%, var(--cs-text)); }
.cs-durum.yeni { background: color-mix(in srgb, var(--cs-yeni) 18%, transparent); color: color-mix(in srgb, var(--cs-yeni) 75%, var(--cs-text)); }
.cs-ekler { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
.cs-saatlik { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; height: 120px; align-items: end; }
.cs-saatlik div { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 2px; }
.cs-saatlik i { width: 100%; min-height: 2px; background: color-mix(in srgb, var(--cs-kg) 55%, transparent); border-radius: 3px 3px 0 0; }
.cs-saatlik .simdi i { background: var(--cs-kg); }
.cs-saatlik em { font-style: normal; font-size: .65rem; color: var(--cs-muted); height: 12px; }
.cs-kanallar { list-style: none; margin: 0; padding: 0; } .cs-kanallar li { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--cs-line); font-size: .9rem; }
.cs-kanallar .r { font-weight: 700; font-variant-numeric: tabular-nums; }
/* Bildirim */
.cs-perde { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; background: rgba(10, 14, 20, .55); backdrop-filter: blur(3px); }
.cs-bildirim { position: relative; width: min(640px, 100%); background: #fff; color: #15202b; border-radius: 24px; padding: 28px 32px 30px; box-shadow: 0 30px 80px rgba(0, 0, 0, .35); overflow: hidden; }
.cs-bildirim::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: linear-gradient(90deg, var(--cs-yeni), var(--cs-kg)); }
.cs-b-ust { display: flex; align-items: center; gap: 12px; font-size: 1rem; }
.cs-zil { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--cs-yeni) 14%, #fff); color: var(--cs-yeni); }
.cs-b-magaza { margin-left: auto; color: #6b7785; font-size: .9rem; }
.cs-bildirim h2 { margin: 16px 0 2px; font-size: clamp(1.8rem, 4vw, 2.6rem); letter-spacing: .02em; }
.cs-b-no { color: #4a5a68; font-size: 1.25rem; font-weight: 600; }
.cs-b-satir { display: flex; align-items: baseline; gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 1px dashed #d7dee7; font-size: 1.15rem; }
.cs-b-satir b { margin-left: auto; font-size: clamp(1.8rem, 4vw, 2.4rem); font-variant-numeric: tabular-nums; }
.cs-b-alt { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.cs-b-alt > span { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 12px; background: #eef2f6; font-weight: 700; font-size: 1.05rem; }
.cs-b-kapat { position: absolute; right: 14px; top: 16px; border: 0; background: none; color: #8b97a8; cursor: pointer; padding: 4px; }
.cs-b-sure { position: absolute; left: 0; bottom: 0; height: 4px; background: var(--cs-kg); transition: width 1s linear; }
@media (max-width: 760px) { .cs { padding: 12px; } .cs-ust-a { margin-left: 0; } .cs-balon i { display: none; } .cs-bildirim { padding: 22px 20px 24px; } }

/* Tasarımlar › Canlı ekran */
.ce-duzen { display: grid; grid-template-columns: minmax(320px, 440px) 1fr; gap: 18px; align-items: start; }
.ce-kart { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-14); padding: 14px 16px; margin-bottom: 12px; }
.ce-kart h2 { margin: 0 0 8px; font-size: .95rem; }
.ce-satir { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: .88rem; }
.ce-satir:last-child { border-bottom: 0; }
.ce-satir > span small { display: block; color: var(--muted); font-size: .74rem; }
.ce-sec { display: flex; flex-wrap: wrap; gap: 6px 12px; justify-content: flex-end; }
.ce-sec.dik { flex-direction: column; align-items: flex-end; }
.ce-sec label { display: inline-flex; gap: 5px; align-items: center; font-size: .84rem; }
.ce-renk { display: flex; gap: 6px; align-items: center; }
.ce-satir input[type="color"] { width: 40px; height: 28px; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-8); background: none; }
.ce-logo { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; } .ce-logo img { max-height: 40px; max-width: 160px; object-fit: contain; }
.ce-sag { position: sticky; top: 12px; }
.ce-onizle { border: 1px solid var(--border); border-radius: var(--radius-14); overflow: hidden; background: var(--surface); }
.ce-onizle-bas { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.ce-onizle-bas button:first-of-type { margin-left: auto; }
.ce-onizle iframe { display: block; width: 100%; height: 78vh; border: 0; }
@media (max-width: 1000px) { .ce-duzen { grid-template-columns: 1fr; } .ce-sag { position: static; } }
.cs-mp i.mp-logo { width: 22px; height: 22px; min-width: 22px; font-size: .7rem; border-radius: 6px; display: inline-grid; place-items: center; }
.cs-ozet { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.cs-ozet b { font-size: clamp(1.3rem, 2.4vw, 1.9rem); }
.cs h2, .cs-kart-bas h2 { color: var(--cs-text); }

/* Canlı ekran: harita boyu, üzerine gelme, iptal bildirimi, ses kilidi */
.cs-harita-sar { max-width: var(--cs-boy, 72%); margin: 0 auto; width: 100%; padding-top: 34px; }
.cs-harita g[data-il], .cs-harita path[data-ulke] { transition: transform .22s ease, filter .22s ease; transform-box: fill-box; transform-origin: center; }
.cs:not(.hover-kapali) .cs-harita g[data-il], .cs:not(.hover-kapali) .cs-harita path[data-ulke] { cursor: pointer; }
.cs-harita g.ust { transform: translateY(-5px) scale(1.05); filter: drop-shadow(0 8px 10px rgba(15, 23, 42, .28)); }
.cs-harita g.ust path { stroke: var(--cs-text); stroke-width: 1.3; }
.cs-dunya path[data-ulke] { fill: var(--cs-il); stroke: var(--cs-ilc); stroke-width: .35; }
.cs-dunya path[data-durum="hz"] { fill: color-mix(in srgb, var(--cs-hz) 70%, var(--cs-il)); }
.cs-dunya path[data-durum="kg"] { fill: color-mix(in srgb, var(--cs-kg) 70%, var(--cs-il)); }
.cs-dunya path[data-durum="yeni"] { fill: color-mix(in srgb, var(--cs-yeni) 70%, var(--cs-il)); }
.cs-dunya path.ust { transform: translateY(-3px) scale(1.06); filter: drop-shadow(0 6px 8px rgba(15, 23, 42, .3)); stroke: var(--cs-text); stroke-width: .9; }
.cs-ipucu { position: absolute; left: 50%; top: 0; transform: translateX(-50%); z-index: 2; display: flex; gap: 10px; align-items: center; white-space: nowrap;
  padding: 7px 16px; border-radius: 999px; background: var(--cs-text); color: var(--cs-panel); font-size: .88rem; box-shadow: 0 6px 16px rgba(0, 0, 0, .2); pointer-events: none; }
.cs-ipucu span { opacity: .85; }
.cs-kaynak { margin: 4px 0 0; text-align: right; color: var(--cs-muted); font-size: .68rem; }
.cs-tablo tr.iptal td { color: var(--cs-muted); }
.cs-durum.iptal { background: rgba(229, 72, 77, .14); color: #c2262b; }
.cs-bildirim.iptal::before { background: linear-gradient(90deg, #e5484d, #ff8a65); }
.cs-bildirim.iptal .cs-zil { background: #fde8e8; color: #e5484d; }
.cs-bildirim.iptal h2 { color: #b42318; }
.cs-bildirim.iptal .cs-b-sure { background: #e5484d; }
.cs-iptal-etiket { display: inline-block; margin-left: 10px; padding: 2px 10px; border-radius: 999px; background: #fde8e8; color: #b42318; font-size: .8rem; font-weight: 800; vertical-align: middle; }
.cs-b-satir b.cizik { text-decoration: line-through; text-decoration-thickness: 2px; color: #b42318; }
.cs-b-magaza { display: inline-flex; align-items: center; gap: 6px; }
.cs-b-magaza i.mp-logo, .cs-kanallar i.mp-logo { width: 22px; height: 22px; min-width: 22px; font-size: .7rem; border-radius: 6px; display: inline-grid; place-items: center; font-style: normal; }
.cs-kanallar .cs-mp b { font-weight: 700; }
.cs-ses-kilit { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 95; display: inline-flex; gap: 8px; align-items: center;
  padding: 9px 16px; border-radius: 999px; border: 0; background: #15202b; color: #fff; font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); }
body:has(.cs) .tam-ekran-cik { display: none !important; }
@media (prefers-reduced-motion: reduce) { .cs-harita g.ust, .cs-dunya path.ust { transform: none; } }
.cs-harita g[data-durum="odeme"] path, .cs-dunya path[data-durum="odeme"] { fill: color-mix(in srgb, var(--cs-odeme, #9b8afb) 70%, var(--cs-il)); }
.cs-durum.odeme { background: color-mix(in srgb, var(--cs-odeme, #9b8afb) 18%, transparent); color: color-mix(in srgb, var(--cs-odeme, #9b8afb) 70%, var(--cs-text)); }

/* Canlı ekran tam ekranda: sayfa kaydırma çubuğu çıkmaz. Ekran tam olarak pencere boyundadır;
   içerik sığmazsa (uzun liste) tekerlekle kayar ama kaydırma çubuğu görünmez. */
body.tam-ekran:has(.cs) { overflow: hidden; }
body.tam-ekran:has(.cs) .content, body.tam-ekran:has(.cs) .content-narrow { padding: 0 !important; }
body.tam-ekran .cs { height: 100vh; min-height: 0; overflow-y: auto; scrollbar-width: none; -ms-overflow-style: none; }
body.tam-ekran .cs::-webkit-scrollbar { display: none; }
body.tam-ekran .cs .cs-tablo-sar { scrollbar-width: none; }
body.tam-ekran .cs .cs-tablo-sar::-webkit-scrollbar { display: none; }
body.tam-ekran .cs > * { flex-shrink: 0; }
.ld-bc .ld-bc-svg { display: block; width: 100%; flex: 1; min-height: 0; }

/* ---- Hazır stok penceresi ---- */
.hs-modal { width: min(660px, calc(100vw - 24px)); }
.hs-modal .modal-head { align-items: center; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.hs-modal .modal-head h2 { font-size: 1.05rem; margin: 0; }
.hs-x { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 4px; border-radius: 8px; }
.hs-intro { font-size: .9rem; color: var(--text-2); line-height: 1.55; margin: 0 0 12px; }
.hs-tumu { font-weight: 600; margin-bottom: 10px; }
.hs-liste { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-height: min(430px, 52vh); overflow-y: auto; padding: 2px 4px 2px 0; }
.hs-kat { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 42px; padding: 8px 12px; text-align: left;
    background: var(--surface); border: 1px solid var(--border); border-radius: 12px; color: var(--text); font: inherit; font-weight: 600; font-size: .9rem; cursor: pointer; }
.hs-kat:hover { border-color: var(--border-strong); }
.hs-kat.on { border-color: var(--primary); background: var(--primary-soft); box-shadow: inset 0 0 0 1px var(--primary); }
.hs-kat.bitti:not(.on) .hs-kat-say b { color: var(--muted); }
.hs-kat:disabled { cursor: default; opacity: .7; }
.hs-kat-ad { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hs-kat-say { display: flex; flex-direction: column; align-items: flex-end; flex: none; line-height: 1.15; }
.hs-kat-say b { font-weight: 500; font-size: .8rem; color: var(--text-2); font-variant-numeric: tabular-nums; }
.hs-kat-say small { font-size: .68rem; color: var(--primary-text, var(--primary)); font-weight: 500; }
.hs-bekle { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: .9rem; padding: 12px 0; }
.hs-ilerleme { margin-top: 14px; }
.hs-bar { height: 10px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.hs-bar span { display: block; height: 100%; background: var(--primary); border-radius: inherit; transition: width .35s ease; }
.hs-ilerleme p { margin: 6px 0 0; font-variant-numeric: tabular-nums; }
.hs-sinir { margin-top: 12px; }
.hs-modal .hub-err { margin-top: 12px; }
@media (max-width: 560px) { .hs-liste { grid-template-columns: minmax(0, 1fr); } }
/* Yönetim › Hazır stok */
.kp-resim { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 4px 0 10px; }
.kp-resim a { color: var(--text-2); }
.kp-resim b { color: var(--text); font-variant-numeric: tabular-nums; }
.kp-sonuc { margin: 8px 0 0; padding-left: 18px; max-height: 160px; overflow-y: auto; }
.kp-img { display: block; width: 44px; height: 44px; object-fit: contain; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); }
.kp-img-yok { background: repeating-linear-gradient(45deg, var(--surface-2), var(--surface-2) 6px, var(--surface-3) 6px, var(--surface-3) 12px); }
.kp-buyuk { display: block; width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); margin-bottom: 8px; }
.kp-toplu { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.kp-toplu .kp-toplu-sec { width: auto; flex: none; min-width: 90px; }
.kp-toplu { justify-content: flex-start; } .kp-toplu > span { white-space: nowrap; } .kp-toplu > .btn { margin-left: 0; flex: none; }
.kp-toplu > .dsel { flex: none; width: auto; min-width: 110px; }
.kp-ara { min-width: 200px; }
.kp-oneri { display: flex; gap: 8px; align-items: center; }
.kp-fiyat { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; max-width: 380px; }
.kp-fiyat .select { width: auto; flex: 1 1 170px; }
.kp-fiyat .input { width: 96px; flex: none; }
.kp-fiyat .kp-kaynak { flex-basis: 100%; }
.kp-ayrac { width: 1px; align-self: stretch; background: var(--border); margin: 0 4px; }

/* ---- Stok › Kategoriler (ağaç) ---- */
.ka-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
.ka-tree { padding: 0; overflow: hidden; margin-top: 0; }
.ka-side { margin-top: 0; position: sticky; top: 76px; }
.ka-bar { display: flex; gap: 8px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.ka-search { flex: 1 1 220px; display: flex; align-items: center; gap: 8px; height: 38px; border: 1px solid var(--border); border-radius: 12px; padding: 0 12px; color: var(--muted); background: var(--surface); }
.ka-search input { border: 0; outline: 0; background: none; font: inherit; font-size: .9rem; color: var(--text); flex: 1; min-width: 0; }
.ka-search:focus-within { border-color: var(--border-strong); }
.ka-toplu { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.ka-toplu > .dsel, .ka-toplu > .select { width: auto; flex: none; min-width: 200px; }
.ka-toplu .check { margin: 0; }
.ka-list { padding: 6px 8px 10px; min-height: 120px; }
.ka-bekle, .ka-bos { padding: 16px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.ka-row { position: relative; display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 8px 0 calc(8px + var(--d) * 24px); border-radius: 10px; font-size: .9rem; color: var(--text); cursor: pointer; user-select: none; }
.ka-row:hover { background: var(--surface-2); }
.ka-row.sel { background: var(--primary-soft, var(--surface-2)); box-shadow: inset 0 0 0 1px var(--border-strong); }
.ka-row.sel .ka-ad { font-weight: 700; }
.ka-row.drag { opacity: .45; }
.ka-row.drop-icine { box-shadow: inset 0 0 0 2px #2563eb; background: rgba(37, 99, 235, .07); }
.ka-row.drop-once::before, .ka-row.drop-sonra::after { content: ""; position: absolute; left: calc(8px + var(--d) * 24px); right: 8px; height: 0; border-top: 2px solid #2563eb; }
.ka-row.drop-once::before { top: 0; }
.ka-row.drop-sonra::after { bottom: 0; }
.ka-grip { color: var(--muted); opacity: .5; display: flex; width: 14px; cursor: grab; }
.ka-tog { display: flex; width: 22px; height: 22px; align-items: center; justify-content: center; color: var(--muted); background: none; border: 0; border-radius: 6px; padding: 0; cursor: pointer; }
.ka-tog svg { transition: transform .15s ease; }
.ka-tog.open svg { transform: rotate(90deg); }
.ka-tog.leaf { visibility: hidden; }
.ka-ic { display: flex; color: var(--muted); }
.ka-ad { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.ka-rename { flex: 1; min-width: 0; height: 30px; border: 1px solid #2563eb; border-radius: 8px; padding: 0 8px; font: inherit; font-size: .88rem; box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); }
.ka-mp { display: flex; gap: 3px; flex: none; }
.ka-mpdot { width: 18px; height: 18px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: .62rem; font-weight: 700; flex: none; }
.ka-mpdot.esli { background: #16a34a; color: #fff; }
.ka-mpdot.oneri { background: #fff3cc; color: #7a5b00; box-shadow: inset 0 0 0 1px #f0d27a; }
.ka-mpdot.bos { background: none; color: var(--muted); box-shadow: inset 0 0 0 1px var(--border-strong); }
.ka-mpdot.yok { display: none; }
.ka-say { font-variant-numeric: tabular-nums; font-size: .78rem; color: var(--text-2); background: var(--surface-2); border-radius: 99px; padding: 2px 9px; min-width: 34px; text-align: center; flex: none; }
.ka-act { display: flex; gap: 2px; flex: none; visibility: hidden; }
.ka-row:hover .ka-act, .ka-row.sel .ka-act { visibility: visible; }
.ka-act button { border: 0; background: var(--surface); box-shadow: 0 0 0 1px var(--border); color: var(--text-2); width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.ka-new { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 8px 0 calc(30px + var(--d) * 24px); color: var(--muted); }
.ka-new input { flex: 1; height: 34px; border: 1px solid #2563eb; border-radius: 9px; padding: 0 10px; font: inherit; font-size: .88rem; box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); color: var(--text); background: var(--surface); }
.ka-hint { font-size: .76rem; color: var(--muted); padding: 10px 16px; border-top: 1px solid var(--border); display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.ka-hint kbd { font: inherit; font-size: .72rem; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; background: var(--surface); }
.ka-leg { display: inline-flex; gap: 6px; align-items: center; margin-left: auto; }
.ka-side .card-body { display: flex; flex-direction: column; gap: 14px; }
.ka-path { font-size: .8rem; color: var(--muted); }
.ka-path b { color: var(--text); }
.ka-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ka-stat { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; color: inherit; text-decoration: none; }
.ka-stat b { display: block; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.ka-stat span { font-size: .76rem; color: var(--muted); }
.ka-ch { padding: 10px 0; border-top: 1px solid var(--border); }
.ka-ch-head { display: flex; align-items: center; gap: 8px; }
.ka-ch-ad { flex: 1; min-width: 0; font-size: .86rem; }
.ka-ch-esli { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: .84rem; font-weight: 600; color: #15803d; }
.ka-ch-esli span { flex: 1; min-width: 0; }
.ka-oneri { margin-top: 8px; border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; background: var(--surface-2); }
.ka-oneri.kesin { border-color: #86efac; background: #f0fdf4; }
.ka-oneri.muhtemel { border-color: #f0d27a; background: #fffbeb; }
.ka-oneri.zayif { border-color: #fca5a5; background: #fef2f2; }
.ka-oneri-ust { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.ka-seviye { font-size: .74rem; font-weight: 700; }
.ka-oneri.kesin .ka-seviye { color: #15803d; }
.ka-oneri.muhtemel .ka-seviye { color: #a16207; }
.ka-oneri.zayif .ka-seviye { color: #b91c1c; }
.ka-oneri-yol { font-size: .86rem; font-weight: 600; margin: 4px 0 2px; color: #1f2937; }
.ka-bilgi { color: #15803d; }
.ka-foot { display: flex; gap: 8px; justify-content: space-between; padding: 12px 16px; border-top: 1px solid var(--border); }
.ka-sil { color: #c0392b; }
@media (max-width: 1100px) { .ka-wrap { grid-template-columns: minmax(0, 1fr); } .ka-side { position: static; } }
@media (max-width: 560px) { .ka-mp, .ka-grip { display: none; } }
.ka-say { width: 56px; min-width: 0; padding: 2px 6px; }
/* Stok › Markalar (kategori ağacıyla aynı düzen) */
.mk-yeni { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.mk-yeni .input { width: auto; flex: 1 1 180px; }
.mk-list .ka-row { height: 46px; }
.mk-bas { width: 28px; height: 28px; border-radius: 8px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .8rem; color: var(--text-2); flex: none; }
.mk-list .ka-ad { display: flex; flex-direction: column; line-height: 1.2; }
.mk-not { font-size: .74rem; font-weight: 400; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.mk-form { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.mk-form .field { width: 100%; margin: 0; }
.ka-wrap > .card { margin-top: 0; }
.ka-coklu { margin: 0; padding-left: 18px; max-height: 220px; overflow-y: auto; }

/* Aşama 227: ön muhasebe kurulum kılavuzu (cariler, sonraki adımlar) ve uygulama kontrol listesi */
.setup-con { display: grid; grid-template-columns: minmax(0, 2fr) 120px minmax(0, 1fr) 150px; gap: 8px; align-items: center; margin-bottom: 8px; }
.setup-con-head { font-size: .78rem; color: var(--muted); margin-bottom: 4px; }
.setup-next button.setup-go { all: unset; box-sizing: border-box; display: flex; gap: 12px; align-items: flex-start; width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-10); cursor: pointer; color: var(--text); }
.setup-next li.setup-go-li { padding: 0; border: 0; }
.setup-next button.setup-go:hover, .setup-next button.setup-go:focus-visible { border-color: var(--primary); background: var(--surface-2); }
.setup-next button.setup-go > div { display: flex; flex-direction: column; flex: 1; }
.setup-next button.setup-go .setup-go-arrow { color: var(--muted); align-self: center; }
@media (max-width: 640px) {
    .setup-con { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .setup-con > :nth-child(1) { grid-column: span 4; }
    .setup-con > :nth-child(2) { grid-column: span 2; }
    .setup-con > :nth-child(3), .setup-con > :nth-child(4) { grid-column: span 3; }
    .setup-con-head { display: none; }
    .setup-con + .setup-con { border-top: 1px dashed var(--border); padding-top: 8px; }
}
.app-setup-list { list-style: none; margin: 0; padding: 6px 20px 12px; }
.app-setup-list li { display: flex; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--border); }
.app-setup-list li:last-child { border-bottom: 0; }
.app-setup-mark { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--border-strong, var(--border)); display: grid; place-items: center; }
.app-setup-list li.done .app-setup-mark { background: var(--success); border-color: var(--success); color: #fff; }
.app-setup-list li.done .app-setup-text b { color: var(--muted); text-decoration: line-through; }
.app-setup-text { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; }
.app-setup-text small { flex-basis: 100%; color: var(--muted); font-size: .8rem; }
.app-setup .card-head h2 { display: flex; align-items: center; gap: 8px; margin: 0; }

/* ===================== Aşama 228: kullanıcı menüsü, geri düğmesi, Ayarlar ===================== */

/* Sol menünün altı: tek kullanıcı satırı; hesap bağlantıları yukarı açılan menüde */
.sidebar-footer { position: relative; padding: 10px 12px; }
.sidebar-footer .user-chip { width: 100%; background: none; border: 0; font: inherit; text-align: left; cursor: pointer; }
.user-chip-caret { color: var(--sidebar-muted); flex: none; }
.user-pop {
  position: absolute; left: 10px; right: 10px; bottom: calc(100% + 4px); z-index: 60;
  background: var(--sidebar-menu-bg); border: 1px solid var(--sidebar-border); border-radius: var(--radius-10);
  box-shadow: var(--shadow-lg); padding: 6px; max-height: calc(100vh - 110px); overflow-y: auto;
}
.user-pop-head { display: flex; flex-direction: column; min-width: 0; padding: 6px 8px 8px; margin-bottom: 4px; border-bottom: 1px solid var(--sidebar-border); line-height: 1.3; }
.user-pop-head strong { color: var(--sidebar-strong); font-size: 0.88rem; }
.user-pop-head span { color: var(--sidebar-muted); font-size: 0.75rem; }
.user-pop > a, .user-pop-btn {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 8px; border-radius: var(--radius-7);
  color: var(--sidebar-text); font: inherit; font-size: 0.88rem; background: none; border: 0; cursor: pointer; text-align: left;
}
.user-pop > a:hover, .user-pop-btn:hover { background: var(--sidebar-hover); color: var(--sidebar-strong); text-decoration: none; }
.user-pop > a.active { color: var(--sidebar-active-text); background: var(--sidebar-active); }
.user-pop > a .icon, .user-pop-btn .icon { width: 17px; height: 17px; flex: none; }
.user-pop > a .nav-badge { margin-left: auto; }
.user-pop > form:last-child { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--sidebar-border); }
.user-pop-quick { gap: 6px; padding: 6px 2px 2px; margin-top: 4px; border-top: 1px solid var(--sidebar-border); }
@media (max-width: 900px) { .user-pop-quick.show-mobile { display: flex; } }
.user-pop-quick button {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 4px; border-radius: var(--radius-8);
  background: var(--sidebar-btn-bg); border: 1px solid var(--sidebar-border); color: var(--sidebar-text); font: inherit; font-size: 0.72rem; cursor: pointer;
}
.user-pop-quick button[aria-pressed="true"] { color: var(--sidebar-active-text); border-color: currentColor; }
@media (min-width: 901px) {
  html[data-sidebar="collapsed"] .user-chip-caret { display: none; }
  html[data-sidebar="collapsed"] .user-pop { left: calc(100% + 8px); right: auto; bottom: 8px; width: 260px; }
  html[data-layout="sag"][data-sidebar="collapsed"] .user-pop { left: auto; right: calc(100% + 8px); }
  /* Dar menüde alt menülerin bütün simgeleri açık durduğundan liste ekrandan taşıyor, kullanıcı satırı görünmüyordu:
     liste kendi içinde kayar; defter seçme menüsü kaymadan etkilenmesin diye ekrana sabitlenir. */
  html[data-sidebar="collapsed"] .sidebar-scroll { overflow-x: hidden; overflow-y: auto; scrollbar-width: none; min-height: 0; }
  html[data-sidebar="collapsed"] .sidebar-scroll::-webkit-scrollbar { display: none; }
  html[data-sidebar="collapsed"] .book-switcher-menu { position: fixed; left: 80px; top: 64px; }
  html[data-layout="sag"][data-sidebar="collapsed"] .book-switcher-menu { left: auto; right: 80px; }
}

/* Telefonda üst çubuk sade: ses, tutar gizleme, destek ve görünüm düğmeleri kullanıcı menüsüne taşınır */
@media (max-width: 900px) { .topbar .topbar-extra { display: none !important; } }

/* Geri düğmesi (her iç sayfada, üst çubukta başlığın solunda) */
.page-back { flex: none; margin-right: -6px; }
@media (min-width: 901px) {
  .page-back { width: 34px; height: 34px; }
  /* Geri düğmesi başlığa yer açsın: kısa sayfa adı kesilmesin, arama kutusu biraz daralır */
  .page-back + .topbar-title { flex-shrink: 0.2; max-width: 240px; }
  .topbar:has(.page-back) .topbar-search { min-width: 150px; }
}
@media (max-width: 900px) {
  .topbar-title { flex: 1 1 auto; }
  .topbar-title + .topbar-spacer { flex: 0 0 0; }
}

/* Ayarlar */
.set-hero {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px; margin-bottom: 16px; border: 1px solid var(--border);
  border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); color: inherit;
}
.set-hero:hover { text-decoration: none; border-color: var(--border-strong); box-shadow: var(--shadow); }
.set-hero-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.set-hero-text span { color: var(--muted); font-size: 0.86rem; }
.set-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 16px; align-items: start; }
.set-grid .card + .card { margin-top: 0; }
.set-card .card-head h2 { font-size: 1rem; }
.set-link { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--border); color: inherit; }
.set-link:last-child { border-bottom: 0; }
.set-link:hover { background: var(--surface-2, var(--bg)); text-decoration: none; }
.set-link > .icon:first-child { color: var(--muted); flex: none; }
.set-link-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.set-link-text strong { font-weight: 600; font-size: 0.93rem; }
.set-link-text span { color: var(--muted); font-size: 0.8rem; }
.set-ig-desc { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 900px) { .set-link { padding: 12px 16px; } }
/* Ayarlar iskeleti: solda bölüm gezintisi (telefonda üstte açılır kutu) */
.set-shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 24px; align-items: start; }
.set-nav-wrap { position: sticky; top: 76px; max-height: calc(100vh - 92px); overflow-y: auto; scrollbar-width: thin; }
.set-nav { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-12, 12px); padding: 8px; }
.set-nav > summary { display: none; }
.set-nav-title { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 12px 10px 4px; }
.set-nav-title:first-child { padding-top: 4px; }
.set-nav-link { display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 8px; color: inherit; font-size: 0.88rem; line-height: 1.3; }
.set-nav-link .icon { color: var(--muted); flex: none; }
.set-nav-link:hover { background: var(--surface-2, var(--bg)); text-decoration: none; }
.set-nav-link.active { background: var(--surface-2, var(--bg)); font-weight: 600; box-shadow: inset 3px 0 0 var(--primary); }
.set-nav-link.active .icon { color: var(--primary); }
.set-main { min-width: 0; }
.set-main .set-grid { grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
@media (max-width: 900px) {
  .set-shell { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .set-nav-wrap { position: static; max-height: none; overflow: visible; }
  .set-nav { padding: 0; }
  .set-nav > summary { display: flex; align-items: center; gap: 8px; padding: 12px 14px; font-weight: 600; cursor: pointer; list-style: none; }
  .set-nav > summary::-webkit-details-marker { display: none; }
  .set-nav > summary::before { content: none; display: none; }
  .set-nav > summary > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .set-nav[open] > summary { border-bottom: 1px solid var(--border); }
  .set-nav[open] .set-nav-caret { transform: rotate(180deg); }
  .set-nav nav { padding: 4px 8px 10px; }
}

/* Telefonda (390px): bağlantılı sekme grupları tek satırda kayar; kart başlığındaki uzun rozet taşmaz */
@media (max-width: 520px) {
  .seg:has(> a) { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  .seg:has(> a)::-webkit-scrollbar { display: none; }
  .seg > a { white-space: nowrap; flex: none; padding: 5px 9px; }
  .card-head:has(.badge) { flex-wrap: wrap; }
  .card-head:has(.badge) > * { max-width: 100%; min-width: 0; }
  .card-head:has(.badge) > :last-child:not(:first-child) { margin-left: auto; }
  .card-head .badge { max-width: 100%; height: auto; min-height: 22px; white-space: normal; padding-top: 2px; padding-bottom: 2px; }
}

/* =====================================================================================================
   Yerleşim denetimi düzeltmeleri (otomatik tarama: yatay taşma, üst üste binme, form hizası, kesilen metin)
   ===================================================================================================== */

/* Alt alta kartlar / tablolar birbirine yapışmasın: ızgarada kart payını sıfırlamak için konan satır içi
   "margin-top:0" .stack içinde de kalıyordu; iki kart (ör. Şube kapanışı › Bankaya yatır + Son yatırmalar)
   arada boşluksuz tek kutu gibi görünüyordu. .stack aralığı satır içi sıfırlamadan önce gelir. */
.stack > * + *[style*="margin-top:0"],
.stack > * + *[style*="margin-top: 0"] { margin-top: 16px !important; }

/* Form ızgaralarında girdiler aynı çizgide: yan yana alanlardan birinin etiketi iki satıra kırılınca
   ("… (isteğe bağlı)") o alanın girdisi aşağı kayıyordu. Alan yalnız etiket + denetimden oluşuyorsa
   denetim satırın dibine hizalanır. Izgarada yardım / hata satırı olan bir alan varsa kural devreye
   girmez (o satırlarda dibe hizalama girdileri kaydırırdı). */
:is(.form-row, .grid, .filter-grid, [style*="grid-template-columns"]):not(:has(> .field > :nth-child(3))) > .field:has(> :is(label, .label):first-child + :last-child) {
  display: flex; flex-direction: column;
}
:is(.form-row, .grid, .filter-grid, [style*="grid-template-columns"]):not(:has(> .field > :nth-child(3))) > .field > :is(label, .label):first-child + :last-child {
  margin-top: auto;
}
/* Dibe hizalamada alt paylar eşit olmalı: satırın son alanında ".field:last-child" payı 0 olduğundan
   girdisi komşusundan 16 px aşağıda kalıyordu. Satır yüksekliği zaten ilk alanın 16 px payını
   içerdiğinden bu, satırlar arası boşluğu değiştirmez. */
:is(.form-row, .grid):not(:has(> .field > :nth-child(3))) > .field:last-child:not(:only-child):has(> :is(label, .label):first-child + :last-child) {
  margin-bottom: 16px;
}
/* Telefonda 3–5 sütunlu satır içi form ızgaraları (ör. Kargo › Yeni gönderi › Paket) iki sütuna iner;
   70 px'lik girdiler ve üç satıra kırılan etiketler oluşmasın. */
@media (max-width: 520px) {
  :is([style*="grid-template-columns:repeat(3"], [style*="grid-template-columns:repeat(4"], [style*="grid-template-columns:repeat(5"],
      [style*="grid-template-columns: repeat(3"], [style*="grid-template-columns: repeat(4"], [style*="grid-template-columns: repeat(5"]):has(> .field) {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  /* İki sütunlu satır içi form ızgaraları da .form-row / .grid-2 gibi tek sütuna iner (uzun etiketler
     dar sütunda 3 satıra kırılıp girdileri kaydırıyordu: Katalog şablonları, Kargo hesapları). */
  :is([style*="grid-template-columns:1fr 1fr"], [style*="grid-template-columns: 1fr 1fr"],
      [style*="grid-template-columns:repeat(2,"], [style*="grid-template-columns: repeat(2,"]):has(> .field ~ .field) {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  :is([style*="grid-template-columns:1fr 1fr"], [style*="grid-template-columns: 1fr 1fr"],
      [style*="grid-template-columns:repeat(2,"], [style*="grid-template-columns: repeat(2,"]):has(> .field ~ .field) > * {
    grid-column: auto !important;
  }
}

/* Esnek sarmalanan liste satırı: .list-item-main'in esas boyu 0 olduğu için satır hiç alta kırılmıyor,
   ad sütunu 26–30 px'e sıkışıp metin dışarı taşıyordu (Mağaza › Sepet, Analiz › İçgörüler, telefonda). */
.list-item[style*="flex-wrap:wrap"] > .list-item-main,
.list-item[style*="flex-wrap: wrap"] > .list-item-main { flex-basis: 220px; }
@media (max-width: 640px) {
  .insight-item > .list-item-main { flex-basis: calc(100% - 44px); }
}

/* Sipariş kartı: geniş ekran için verilen iki sütunlu düzen (min 230 px sağ sütun) telefondaki tek
   sütun kuralını eziyordu; kart içeriği sağdan taşıyordu. */
@media (max-width: 860px) {
  .sp-orta { grid-template-columns: minmax(0, 1fr); }
}

/* Kargo etiketi düzenleyici: telefonda tek sütun "1fr" tuvalin genişliğine uzayıp sayfayı yatay
   kaydırıyordu; sütun daralsın, tuval kendi kutusunda kaysın (ortalama taşınca sol kenarı kırpmasın). */
@media (max-width: 900px) {
  .et-duzen { grid-template-columns: minmax(0, 1fr); }
  .et-sol { min-width: 0; }
}
.et-tuval-sar { justify-content: safe center; }

/* Menü düzenleyici: ızgara sütunu içerik kadar genişleyip kartı 12 px aşıyordu; alt menü başlığında
   simge seçimi (36 px) ile ad kutusu (44 px) farklı boydaydı. */
.menu-editor { grid-template-columns: minmax(0, 1fr); }
html[data-layout] .me-sub-head .input,
.me-sub-head .input { height: 36px; min-height: 36px; }
.me-sub-head .me-sub-icon { height: 36px; }
@media (max-width: 520px) { .me-sub-head { flex-wrap: wrap; } }

/* Kampanya formu örnek fişi: boşken gösterilen açıklama fişin "pre" satır kuralını devralıp kesiliyordu */
.receipt-prev > .muted { white-space: normal; }

/* Bloklar arası boşluk: kart / ızgara art arda geldiğinde birbirine yapışmasın (ör. Analiz'de süzgeç kartı ile göstergeler).
   Sıfır özgüllük: sayfanın kendi margin / mt-* ayarı varsa o geçerli kalır. */
:where(.content > .card, .content > .grid, .content > form, .content > .table-wrap) + :where(.card, .grid) { margin-top: 16px; }

/* Sayfa açıklaması kutusu (başlık altı tanıtım yazısı): küçültülüp açılabilir */
.page-intro { margin-top: 10px; max-width: 760px; background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--primary); border-radius: 12px; }
.page-intro-tog { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 12px; background: none; border: 0; cursor: pointer; color: var(--text-2); font: inherit; font-size: .8rem; font-weight: 600; text-align: left; border-radius: 12px; }
.page-intro-tog > svg:first-child { color: var(--primary); flex: none; }
.page-intro-tog:hover { color: var(--text); }
.page-intro-tog:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.page-intro-chev { margin-left: auto; transition: transform .18s ease; transform: rotate(180deg); }
.page-head .page-intro-body p { margin: 0; padding: 0 12px 10px 34px; color: var(--muted); font-size: .86rem; line-height: 1.5; }
.page-intro.is-closed { display: inline-flex; max-width: none; border-left-width: 1px; border-radius: 999px; }
.page-intro.is-closed .page-intro-tog { width: auto; padding: 5px 12px; border-radius: 999px; }
.page-intro.is-closed .page-intro-chev { transform: none; }
.page-intro.is-closed .page-intro-body { display: none; }
@media (prefers-reduced-motion: reduce) { .page-intro-chev { transition: none; } }

/* ==========================================================================
   Kayıt sonrası kurulum (App\Support\Onboarding): menü kapalı, adım ortada
   ========================================================================== */
.app.onboarding .sidebar, .app.onboarding .bottom-nav, .app.onboarding .menu-toggle, .app.onboarding .mega,
.app.onboarding .topbar-search, .app.onboarding .topbar-pos, .app.onboarding .page-back,
.app.onboarding .topbar a.btn:not(.btn-icon), .app.onboarding .push-banner { display: none !important; }
.app.onboarding .main { margin-left: 0 !important; }
.app.onboarding .topbar-brand { display: flex; }
.onb-track { max-width: 780px; margin: 0 auto 18px; }
.onb-track ol { list-style: none; display: flex; gap: 0; padding: 0; margin: 0; }
.onb-track li { flex: 1; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 0.88rem; min-width: 0; }
.onb-track li + li::before { content: ""; flex: 1; height: 2px; background: var(--border); margin: 0 4px; min-width: 12px; }
.onb-track li:first-child { flex: none; }
.onb-track li span { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--border-strong); font-weight: 700; font-size: 0.78rem; background: var(--surface); }
.onb-track li b { white-space: nowrap; font-weight: 600; }
.onb-track li.on { color: var(--text); }
.onb-track li.on span { border-color: var(--primary); background: var(--primary); color: var(--on-primary); }
.onb-track li.done span { border-color: var(--primary); color: var(--primary); }
.onb-track li.done + li::before, .onb-track li.on::before { background: var(--primary); }
.onb-track p { margin: 8px 0 0; color: var(--muted); font-size: 0.82rem; }
.setup-wide { max-width: 980px; }
.setup-wide + .onb-track, .content:has(.setup-wide) .onb-track { max-width: 980px; }
.system-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.system-card { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: var(--radius-14); border: 1.5px solid var(--border); background: var(--surface); cursor: pointer; min-width: 0; }
.system-card:hover { border-color: color-mix(in srgb, var(--primary) 50%, var(--border)); }
.system-card.on { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 16%, transparent); }
.system-card:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
.system-card-head { display: flex; align-items: center; gap: 12px; font-size: 1.02rem; }
.system-card.on .setup-choice-ic { background: var(--primary); color: var(--on-primary); }
.system-card-text { color: var(--text-2); font-size: 0.9rem; }
.system-card-sub { margin-top: 4px; color: var(--muted); font-size: 0.78rem; font-weight: 600; }
.system-card ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; font-size: 0.85rem; color: var(--text-2); }
.system-card li { display: flex; gap: 6px; align-items: flex-start; }
.system-card li .icon { color: var(--primary); margin-top: 2px; flex: none; }
@media (max-width: 720px) {
  .system-grid { grid-template-columns: minmax(0, 1fr); }
  .onb-track li b { display: none; }
  .onb-track li.on b { display: inline; }
}
