/* =====================================================================
   ExportPro tasarım sistemi — tek kaynaklı, derlenmeyen CSS.
   Süper admin: koyu lacivert menü + mavi vurgu (ExportPro).
   Müşteri paneli: beyaz menü + firma marka rengi (varsayılan yeşil).
   ===================================================================== */
:root {
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;

  --bg: #F4F6FB;
  --surface: #FFFFFF;
  --surface-2: #F8FAFD;
  --border: #E6EAF2;
  --border-strong: #D5DBE7;
  --text: #0F172A;
  --text-2: #475569;
  --muted: #7C8798;
  --muted-2: #A0AAB8;

  --blue: #2563EB;
  --blue-2: #3B82F6;
  --blue-soft: #E8F0FF;
  --green: #16A34A;
  --green-soft: #E6F7ED;
  --amber: #F59E0B;
  --amber-soft: #FFF4DF;
  --red: #EF4444;
  --red-soft: #FEE8E8;
  --purple: #7C3AED;
  --purple-soft: #F0E9FF;
  --cyan: #06B6D4;
  --gray-soft: #EEF1F6;
  --pink: #EC4899;
  --pink-soft: #FCE7F3;
  --yellow: #EAB308;
  --yellow-soft: #FEF9C3;

  --brand: #2563EB;              /* panel vurgu rengi */
  --brand-soft: #E8F0FF;
  --brand-text: #FFFFFF;

  --sidebar-bg: #0B1324;
  --sidebar-text: #9AA7BD;
  --sidebar-text-active: #FFFFFF;
  --sidebar-active: #2563EB;
  --sidebar-hover: rgba(255,255,255,.06);
  --sidebar-border: rgba(255,255,255,.08);

  --radius: 12px;
  --radius-sm: 8px;
  --radius-pill: 999px;
  --shadow: 0 1px 2px rgba(15,23,42,.04), 0 1px 3px rgba(15,23,42,.06);
  --shadow-lg: 0 10px 30px rgba(15,23,42,.10);
  --sidebar-w: 236px;
  --topbar-h: 64px;
  --gap: 16px;
}

/* Müşteri paneli teması */
[data-panel="customer"] {
  --brand: var(--tenant-color, #1F7A4D);
  --brand-soft: color-mix(in srgb, var(--brand) 12%, white);
  --sidebar-bg: #FFFFFF;
  --sidebar-text: #334155;
  --sidebar-text-active: #FFFFFF;
  --sidebar-active: var(--brand);
  --sidebar-hover: #F1F5F9;
  --sidebar-border: #E6EAF2;
}

/* Koyu mod */
:root[data-theme="dark"] {
  --bg: #0B1220;
  --surface: #111A2E;
  --surface-2: #16203A;
  --border: #1F2A44;
  --border-strong: #2A3654;
  --text: #E5EAF3;
  --text-2: #B6C0D2;
  --muted: #8592A8;
  --muted-2: #66728A;
  --blue-soft: rgba(37,99,235,.18);
  --green-soft: rgba(22,163,74,.18);
  --amber-soft: rgba(245,158,11,.18);
  --red-soft: rgba(239,68,68,.18);
  --purple-soft: rgba(124,58,237,.2);
  --gray-soft: rgba(148,163,184,.14);
  --pink-soft: rgba(236,72,153,.18);
  --yellow-soft: rgba(234,179,8,.18);
  --brand-soft: rgba(37,99,235,.18);
  --shadow: 0 1px 2px rgba(0,0,0,.3);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.5);
}
:root[data-theme="dark"] [data-panel="customer"] {
  --sidebar-bg: #0F172A;
  --sidebar-text: #B6C0D2;
  --sidebar-hover: rgba(255,255,255,.06);
  --sidebar-border: #1F2A44;
  --brand-soft: color-mix(in srgb, var(--brand) 22%, #111A2E);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 14px; line-height: 1.45; color: var(--text);
  background: var(--bg); -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0; }
.ico { flex: none; vertical-align: middle; }
.flag { border-radius: 3px; box-shadow: 0 0 0 1px rgba(15,23,42,.08); flex: none; vertical-align: middle; }
.flag-unknown { display: inline-flex; align-items: center; justify-content: center; background: var(--gray-soft); color: var(--muted); font-size: 9px; font-weight: 700; border-radius: 3px; }

/* ---------------------------------------------------------------- Layout */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex: none; background: var(--sidebar-bg); color: var(--sidebar-text);
  border-right: 1px solid var(--sidebar-border); display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; z-index: 40;
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; }
.brand-mark { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.brand-mark.admin { background: linear-gradient(135deg,#2E7BFF,#1F5AE0); color: #fff; box-shadow: 0 6px 14px rgba(37,99,235,.35); }
.brand-mark.customer { background: var(--brand-soft); color: var(--brand); }
.brand-mark img { width: 36px; height: 36px; object-fit: contain; border-radius: 8px; }
.brand-name { font-size: 18px; font-weight: 800; letter-spacing: -.02em; line-height: 1.05; color: var(--sidebar-text-active); }
[data-panel="customer"] .brand-name { color: var(--brand); }
.brand-name .accent { color: var(--blue-2); }
.brand-sub { font-size: 10.5px; color: var(--sidebar-text); opacity: .85; margin-top: 2px; }
.nav { padding: 6px 12px; display: flex; flex-direction: column; gap: 3px; overflow-y: auto; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px;
  font-size: 13.5px; font-weight: 500; color: var(--sidebar-text); min-height: 44px; position: relative;
}
.nav a:hover { background: var(--sidebar-hover); color: var(--sidebar-text-active); }
[data-panel="customer"] .nav a:hover { color: var(--text); }
.nav a.active { background: var(--sidebar-active); color: var(--sidebar-text-active); font-weight: 600; box-shadow: 0 6px 14px color-mix(in srgb, var(--sidebar-active) 35%, transparent); }
.nav a .ico { opacity: .9; }
.nav a.wa .ico { color: #25D366; }
.nav a.active.wa .ico { color: #fff; }
.nav-badge { margin-left: auto; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; display: grid; place-items: center; }
.sidebar-spacer { flex: 1; }
.sidebar-user { border-top: 1px solid var(--sidebar-border); padding: 14px 16px; display: flex; align-items: center; gap: 10px; }
.sidebar-user .name { font-size: 13px; font-weight: 600; color: var(--sidebar-text-active); line-height: 1.2; }
[data-panel="customer"] .sidebar-user .name { color: var(--text); }
.sidebar-user .role { font-size: 11px; color: var(--sidebar-text); }
.sidebar-user .logout { margin-left: auto; color: var(--sidebar-text); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; }
.sidebar-user .logout:hover { background: var(--sidebar-hover); color: var(--red); }
.sidebar-logout-link { display: flex; align-items: center; gap: 11px; padding: 10px 12px; margin: 4px 12px 8px; border-radius: 10px; color: var(--red); font-weight: 500; font-size: 13.5px; min-height: 44px; }
.sidebar-logout-link:hover { background: var(--red-soft); }

.support-card { margin: 8px 12px 12px; padding: 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.support-card .t { display: flex; gap: 10px; align-items: center; font-weight: 600; font-size: 13px; color: var(--text); }
.support-card .t .ico { color: var(--brand); }
.support-card .s { font-size: 11.5px; color: var(--muted); margin: 2px 0 10px 28px; }
.support-card .btn { width: 100%; justify-content: center; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: var(--topbar-h); background: var(--surface); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 14px; padding: 0 24px; position: sticky; top: 0; z-index: 30;
}
.topbar .search { flex: 1; max-width: 420px; position: relative; }
.topbar .search input {
  width: 100%; height: 40px; padding: 0 14px 0 40px; border: 1px solid var(--border); border-radius: var(--radius-pill);
  background: var(--surface-2); outline: none; font-size: 13px; color: var(--text);
}
.topbar .search input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); background: var(--surface); }
.topbar .search .ico { position: absolute; left: 14px; top: 11px; color: var(--muted); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 10px; border: 1px solid transparent; background: transparent; display: grid; place-items: center;
  color: var(--text-2); cursor: pointer; position: relative;
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--border); }
.icon-btn .dot { position: absolute; top: 6px; right: 6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--red); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--surface); }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 12px; background: var(--blue); color: #fff; flex: none; overflow: hidden; }
.avatar.soft { background: var(--brand-soft); color: var(--brand); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 44px; height: 44px; font-size: 14px; }
.avatar.sm { width: 28px; height: 28px; font-size: 10px; }
.topbar-user { display: flex; align-items: center; gap: 10px; padding: 4px 8px 4px 4px; border-radius: 10px; cursor: default; }
.topbar-user .n { font-size: 13px; font-weight: 600; line-height: 1.15; }
.topbar-user .r { font-size: 11px; color: var(--muted); }
.lang-select { height: 36px; border: 1px solid var(--border); background: var(--surface); border-radius: 8px; padding: 0 8px; font-size: 13px; font-weight: 600; }
.vsep { width: 1px; height: 24px; background: var(--border); margin: 0 4px; }
.hamburger { display: none; }

.content { padding: 22px 24px 40px; display: flex; flex-direction: column; gap: var(--gap); }
.page-head { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: 22px; }
.page-head .sub { color: var(--muted); font-size: 13px; margin-top: 3px; }
.page-head .actions { margin-left: auto; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ---------------------------------------------------------------- Buttons / inputs */
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent;
  font-weight: 600; font-size: 13.5px; cursor: pointer; white-space: nowrap; background: var(--surface); color: var(--text); transition: .15s;
}
.btn:hover { filter: brightness(.97); }
.btn-primary { background: var(--brand); color: var(--brand-text); box-shadow: 0 6px 14px color-mix(in srgb, var(--brand) 30%, transparent); }
.btn-primary:hover { filter: brightness(1.05); }
.btn-outline { border-color: var(--border-strong); background: var(--surface); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 8px; }
.btn-xs { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 7px; }
.btn-danger { background: var(--red-soft); color: var(--red); }
.btn-block { width: 100%; justify-content: center; }
.select, .input, textarea.input {
  height: 40px; border: 1px solid var(--border-strong); background: var(--surface); border-radius: 10px; padding: 0 12px; font-size: 13.5px; outline: none; color: var(--text);
}
textarea.input { height: auto; padding: 10px 12px; resize: vertical; }
.input:focus, .select:focus, textarea.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.select-wrap { position: relative; display: inline-flex; align-items: center; }
.select-wrap .ico { position: absolute; right: 10px; pointer-events: none; color: var(--muted); }
.select-wrap .ico.lead { left: 10px; right: auto; }
.select-wrap select { appearance: none; padding-right: 32px; height: 40px; border: 1px solid var(--border-strong); background: var(--surface); border-radius: 10px; padding-left: 12px; font-size: 13px; font-weight: 600; color: var(--text); cursor: pointer; }
.select-wrap.lead select { padding-left: 34px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px 18px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.field .input, .field .select, .field select, .field input[type=text], .field input[type=email], .field input[type=url], .field input[type=number], .field input[type=tel], .field input[type=password], .field textarea {
  width: 100%; height: 40px; border: 1px solid var(--border-strong); background: var(--surface); border-radius: 10px; padding: 0 12px; font-size: 13.5px; outline: none; color: var(--text);
}
.field textarea { height: auto; padding: 10px 12px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.field input[type=color] { width: 60px; height: 40px; padding: 2px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); }
.field input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--brand); vertical-align: middle; }
.field .help { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.field .err, .errorlist { color: var(--red); font-size: 12px; margin: 4px 0 0; padding: 0; list-style: none; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; }

/* ---------------------------------------------------------------- Cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px 6px; }
.card-head h3 { font-size: 14.5px; font-weight: 700; }
.card-head .hint { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.card-head .right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.card-body { padding: 12px 18px 18px; }
.card-body.flush { padding: 0 0 8px; }
.link { color: var(--brand); font-weight: 600; font-size: 12.5px; display: inline-flex; align-items: center; gap: 4px; }
.link:hover { text-decoration: underline; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.xs { font-size: 11px; }
.strong { font-weight: 700; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.grid { display: grid; gap: var(--gap); }
.grid-6 { grid-template-columns: repeat(6, minmax(0,1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-3-2 { grid-template-columns: 1.55fr 1fr 1fr; }
.grid-2-1-1 { grid-template-columns: 1.15fr 1fr 1fr; }
.grid-1-2 { grid-template-columns: 1fr 1.4fr; }
.grid-2-1 { grid-template-columns: 1.4fr 1fr; }
.span-2 { grid-column: span 2; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; align-items: center; gap: 10px; }
.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.ml-auto { margin-left: auto; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mb-8 { margin-bottom: 8px; }
.gap-6 { gap: 6px; } .gap-16 { gap: 16px; }
.center { text-align: center; }
.w-100 { width: 100%; }

/* KPI */
.kpi { display: flex; gap: 11px; padding: 14px; align-items: flex-start; min-width: 0; }
.kpi .kicon { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.kpi .kval { font-size: 22px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.kpi .klabel { font-size: 12px; color: var(--muted); margin-top: 3px; font-weight: 500; white-space: nowrap; }
.kpi .kdelta { font-size: 11.5px; font-weight: 700; margin-top: 6px; display: inline-flex; align-items: center; gap: 3px; }
.kpi .ksub { font-size: 11px; color: var(--muted-2); margin-top: 2px; }
.kpi.compact { padding: 14px; }
.tone-blue { background: var(--blue-soft); color: var(--blue); }
.tone-green { background: var(--green-soft); color: var(--green); }
.tone-orange { background: var(--amber-soft); color: #EA580C; }
.tone-yellow { background: var(--yellow-soft); color: #CA8A04; }
.tone-red { background: var(--red-soft); color: var(--red); }
.tone-purple { background: var(--purple-soft); color: var(--purple); }
.tone-pink { background: var(--pink-soft); color: var(--pink); }
.tone-gray { background: var(--gray-soft); color: var(--text-2); }
.tone-brand { background: var(--brand-soft); color: var(--brand); }
.up { color: var(--green); } .down { color: var(--red); } .flat { color: var(--muted); }

/* Mini stat tiles (Satış ve Komisyon Özeti) */
.stat-tile { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.stat-tile .sicon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.stat-tile .sval { font-size: 18px; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
.stat-tile .slabel { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* ---------------------------------------------------------------- Tables */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tbl th { text-align: left; font-size: 11px; font-weight: 600; color: var(--muted); text-transform: none; padding: 10px 18px; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap; }
.tbl td { padding: 11px 18px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: var(--surface-2); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .nowrap { white-space: nowrap; }
.tbl .firm { font-weight: 600; color: var(--text); }
.tbl .cell-flag { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.tbl a.rowlink { color: var(--text); }
.tbl a.rowlink:hover { color: var(--brand); }
.tbl.compact { font-size: 11.5px; table-layout: fixed; }
.tbl.compact th { padding: 8px 9px; font-size: 10.5px; }
.tbl.compact td { padding: 9px 9px; }
.tbl.compact th:first-child, .tbl.compact td:first-child { padding-left: 16px; }
.tbl.compact th:last-child, .tbl.compact td:last-child { padding-right: 14px; }
.tbl.compact th, .tbl.compact td { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbl.compact td > div { overflow: hidden; text-overflow: ellipsis; }
.tbl.compact .badge { height: 20px; padding: 0 7px; font-size: 10.5px; max-width: 100%; }
.tbl.compact .badge .badge-dot { flex: none; }
.tbl.dense th { padding: 8px 12px; } .tbl.dense td { padding: 8px 12px; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; line-height: 1; }
.badge .badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; }
.badge-blue { background: var(--blue-soft); color: var(--blue); }
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-amber { background: var(--amber-soft); color: #B45309; }
.badge-red { background: var(--red-soft); color: var(--red); }
.badge-purple { background: var(--purple-soft); color: var(--purple); }
.badge-gray { background: var(--gray-soft); color: var(--text-2); }
.badge-new { background: var(--brand); color: #fff; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--gray-soft); font-size: 11.5px; font-weight: 600; color: var(--text-2); }
.chip.on { background: var(--brand-soft); color: var(--brand); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); padding: 0 18px; overflow-x: auto; }
.tabs a { padding: 12px 12px; font-size: 13px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; min-height: 44px; display: inline-flex; align-items: center; gap: 6px; }
.tabs a.active { color: var(--brand); border-color: var(--brand); }
.tabs a .cnt { background: var(--gray-soft); border-radius: 999px; padding: 1px 7px; font-size: 11px; }
.tabs a.active .cnt { background: var(--brand-soft); color: var(--brand); }
.pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pills a { padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--surface); border: 1px solid var(--border-strong); color: var(--text-2); min-height: 32px; display: inline-flex; align-items: center; gap: 6px; }
.pills a.active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* Country bars */
.bars { display: flex; flex-direction: column; gap: 9px; }
.bar-row { display: grid; grid-template-columns: 24px 96px 1fr 36px; align-items: center; gap: 10px; font-size: 12.5px; }
.bar-row .n { color: var(--text-2); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-row .track { display: block; height: 8px; background: var(--gray-soft); border-radius: 999px; overflow: hidden; }
.bar-row .fill { display: block; height: 100%; border-radius: 999px; background: var(--brand); }
.bar-row .v { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.bar-row.perf { grid-template-columns: 1fr 40px 1fr; }
.bar-row.perf .n { color: var(--text); }
.bar-row.perf .v { text-align: left; }

/* Legend + donut */
.legend { display: flex; flex-direction: column; gap: 7px; font-size: 12.5px; }
.legend .li { display: grid; grid-template-columns: 10px 1fr auto; gap: 9px; align-items: center; }
.legend .sw { width: 10px; height: 10px; border-radius: 50%; }
.legend .pv { font-weight: 700; font-variant-numeric: tabular-nums; }
.chart-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.chart-box { position: relative; height: 210px; }
.chart-box.tall { height: 260px; }
.donut-wrap { display: grid; grid-template-columns: 150px 1fr; gap: 14px; align-items: center; }
.donut-box { position: relative; width: 150px; height: 150px; }
.donut-center { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; pointer-events: none; }
.donut-center .t { font-size: 11px; color: var(--muted); }
.donut-center .v { font-size: 18px; font-weight: 800; line-height: 1.1; }

/* Product list (catalog views) */
.plist { display: flex; flex-direction: column; gap: 10px; }
.pitem { display: flex; align-items: center; gap: 12px; }
.pthumb { width: 42px; height: 42px; border-radius: 10px; object-fit: cover; background: var(--gray-soft); display: grid; place-items: center; font-size: 22px; flex: none; overflow: hidden; }
.pthumb img { width: 100%; height: 100%; object-fit: cover; }
.pthumb.lg { width: 100%; height: 96px; border-radius: 12px; font-size: 40px; }
.pitem .pn { font-weight: 600; font-size: 13px; }
.pitem .pv { font-size: 11.5px; color: var(--muted); }
.product-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.product-tile { text-align: center; font-size: 12px; font-weight: 600; }
.product-tile .pthumb { margin-bottom: 6px; }
.hero-banner { border-radius: 12px; padding: 20px 18px; min-height: 92px; color: #fff; display: flex; align-items: flex-end; justify-content: space-between; background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 80%, #000) 0%, var(--brand) 60%, color-mix(in srgb, var(--brand) 60%, #7dd3a0) 100%); position: relative; overflow: hidden; }
.hero-banner h4 { font-size: 20px; font-weight: 800; line-height: 1.15; text-shadow: 0 1px 3px rgba(0,0,0,.25); }
.hero-banner .b { font-size: 11px; font-weight: 700; opacity: .9; }

/* Translated reply card */
.tr-card { border: 1px solid var(--border); border-radius: 12px; padding: 14px; }
.tr-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.tr-head .f { font-weight: 700; }
.tr-head .d { color: var(--muted); font-size: 12px; }
.tr-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tr-col { border-radius: 10px; padding: 12px; font-size: 12.5px; line-height: 1.5; }
.tr-col .h { font-size: 11px; font-weight: 700; margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.tr-col.orig { background: var(--gray-soft); }
.tr-col.orig .h { color: var(--text-2); }
.tr-col.tr { background: var(--green-soft); }
.tr-col.tr .h { color: var(--green); }
.tr-col.en { background: var(--blue-soft); }
.tr-col.en .h { color: var(--blue); }

/* Message thread */
.msg { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; background: var(--surface); }
.msg.in { border-left: 3px solid var(--brand); }
.msg.out { border-left: 3px solid var(--muted-2); background: var(--surface-2); }
.msg .mh { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; font-size: 12px; color: var(--muted); }
.msg .mh b { color: var(--text); font-size: 13px; }
.msg .mb { white-space: pre-wrap; font-size: 13.5px; line-height: 1.55; }
.msg .ai-tag { font-size: 10.5px; padding: 2px 8px; border-radius: 999px; background: var(--purple-soft); color: var(--purple); font-weight: 700; }
.lang-tabs { display: inline-flex; gap: 4px; background: var(--gray-soft); padding: 3px; border-radius: 8px; }
.lang-tabs button { border: 0; background: transparent; padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 600; color: var(--text-2); cursor: pointer; min-height: 28px; }
.lang-tabs button.active { background: var(--surface); color: var(--brand); box-shadow: var(--shadow); }

/* Task list */
.tasks { display: flex; flex-direction: column; }
.task { display: flex; gap: 12px; align-items: center; padding: 11px 18px; border-bottom: 1px solid var(--border); }
.task:last-child { border-bottom: 0; }
.task .ti { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.task .tt { font-weight: 600; font-size: 13px; }
.task .td { font-size: 12px; color: var(--muted); }
.list-plain { display: flex; flex-direction: column; }
.list-plain > * { padding: 10px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.list-plain > *:last-child { border-bottom: 0; }
.list-plain > .empty { display: block; }

/* Alerts / notices */
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; font-size: 13px; border: 1px solid transparent; }
.notice.info { background: var(--blue-soft); color: #1E40AF; border-color: color-mix(in srgb, var(--blue) 25%, transparent); }
.notice.success { background: var(--green-soft); color: #166534; }
.notice.warning { background: var(--amber-soft); color: #92400E; }
.notice.error { background: var(--red-soft); color: #991B1B; }
.notice .ico { margin-top: 1px; flex: none; }
:root[data-theme="dark"] .notice.info { color: #BFD3FF; } :root[data-theme="dark"] .notice.success { color: #BBF7D0; }
:root[data-theme="dark"] .notice.warning { color: #FDE68A; } :root[data-theme="dark"] .notice.error { color: #FECACA; }
.empty { padding: 28px 18px; text-align: center; color: var(--muted); font-size: 13px; }
.empty .ico { color: var(--muted-2); margin-bottom: 8px; }
.empty b { color: var(--text-2); display: block; margin-bottom: 4px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.provider { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--border); }
.provider:last-child { border-bottom: 0; }
.provider .pn { font-weight: 600; font-size: 13px; }
.provider .pd { font-size: 12px; color: var(--muted); }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 8px 14px; font-size: 13px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 500; }
.pagination { display: flex; gap: 6px; align-items: center; justify-content: flex-end; padding: 12px 18px; font-size: 12.5px; color: var(--muted); }
.pagination a { padding: 6px 10px; border: 1px solid var(--border-strong); border-radius: 8px; font-weight: 600; color: var(--text-2); }
.pagination a:hover { border-color: var(--brand); color: var(--brand); }
.dropdown { position: relative; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 6px); width: 340px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); z-index: 50; overflow: hidden; }
.dropdown-menu .dm-head { padding: 12px 14px; font-weight: 700; font-size: 13px; border-bottom: 1px solid var(--border); display: flex; align-items: center; }
.dropdown-menu .dm-item { padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 12.5px; display: flex; gap: 10px; }
.dropdown-menu .dm-item:last-child { border-bottom: 0; }
.dropdown-menu .dm-item.unread { background: var(--brand-soft); }
.ai-card { background: linear-gradient(135deg, #EEF4FF 0%, #FFFFFF 70%); }
:root[data-theme="dark"] .ai-card { background: linear-gradient(135deg, rgba(37,99,235,.18), var(--surface) 70%); }
.ai-card .ai-ico { width: 34px; height: 34px; border-radius: 9px; background: var(--blue); color: #fff; display: grid; place-items: center; }
.feature-list { display: flex; flex-direction: column; gap: 10px; }
.feature-list .f { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.feature-list .f .ico { color: var(--green); }
.stepper { display: flex; gap: 6px; flex-wrap: wrap; }
.stepper .st { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 8px; font-size: 11.5px; font-weight: 600; background: var(--gray-soft); color: var(--muted); }
.stepper .st.done { background: var(--green-soft); color: var(--green); }
.stepper .st.running { background: var(--blue-soft); color: var(--blue); }
.stepper .st.blocked { background: var(--amber-soft); color: #B45309; }
.stepper .st.failed { background: var(--red-soft); color: var(--red); }
.messages-stack { display: flex; flex-direction: column; gap: 8px; }
.dev-hint { border: 1px dashed var(--amber); background: var(--amber-soft); border-radius: 10px; padding: 10px 12px; font-size: 12.5px; color: #92400E; }
.qr { font-family: ui-monospace, monospace; font-size: 12px; word-break: break-all; background: var(--surface-2); padding: 10px; border-radius: 8px; border: 1px solid var(--border); }

/* İş akışı adımları */
.flow { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 10px; }
.flow-step { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); min-height: 108px; transition: .15s; }
.flow-step:hover { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.flow-step.done { background: var(--green-soft); border-color: color-mix(in srgb, var(--green) 30%, transparent); }
.flow-n { position: absolute; top: 10px; right: 10px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; background: var(--gray-soft); color: var(--text-2); }
.flow-step.done .flow-n { background: var(--green); color: #fff; }
.flow-ico { color: var(--brand); }
.flow-t { font-weight: 700; font-size: 13px; }
.flow-h { font-size: 11.5px; color: var(--muted); }
.flow-w { font-size: 11px; color: #B45309; font-weight: 600; margin-top: auto; }
@media (max-width: 1100px) { .flow { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (max-width: 560px) { .flow { grid-template-columns: repeat(2, minmax(0,1fr)); } }

/* ---------------------------------------------------------------- Auth */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-side { background: radial-gradient(1200px 600px at 20% 10%, #1E40AF 0%, #0B1324 55%); color: #fff; padding: 48px; display: flex; flex-direction: column; }
.auth-side .brand-row { display: flex; align-items: center; gap: 12px; }
.auth-side h2 { font-size: 34px; line-height: 1.15; margin-top: auto; max-width: 520px; letter-spacing: -.02em; }
.auth-side p { color: #B6C0D2; margin-top: 12px; max-width: 480px; font-size: 15px; }
.auth-side .feat { margin-top: 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.auth-side .feat div { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #DCE3F0; }
.auth-side .feat .ico { color: #60A5FA; }
.auth-side .foot { margin-top: auto; font-size: 12px; color: #7C8798; }
.auth-form { display: grid; place-items: center; padding: 40px 24px; background: var(--bg); }
.auth-card { width: 100%; max-width: 420px; }
.auth-card .card { padding: 30px; }
.auth-card h1 { font-size: 22px; margin-bottom: 4px; }
.auth-card .sub { color: var(--muted); font-size: 13.5px; margin-bottom: 22px; }
.auth-card .field { margin-bottom: 14px; }
.auth-choice { display: grid; gap: 12px; }
.auth-choice a { display: flex; align-items: center; gap: 14px; padding: 16px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface); }
.auth-choice a:hover { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.auth-choice .ci { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.auth-choice b { display: block; font-size: 14px; }
.auth-choice span { font-size: 12.5px; color: var(--muted); }
.otp-input { text-align: center; font-size: 26px !important; letter-spacing: .4em; font-weight: 700; height: 56px !important; }

/* ---------------------------------------------------------------- Responsive */
@media (max-width: 1400px) {
  .grid-6 { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .grid-3-2, .grid-2-1-1 { grid-template-columns: 1fr 1fr; }
  .grid-3-2 > :first-child, .grid-2-1-1 > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 1100px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1024px) {
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: translateX(0); }
  .backdrop { position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 35; }
  .hamburger { display: grid; }
  .topbar { padding: 0 16px; }
  .content { padding: 16px; }
  .auth { grid-template-columns: 1fr; }
  .auth-side { display: none; }
}
@media (max-width: 760px) {
  .grid-6, .grid-3, .grid-2, .grid-4, .grid-1-2, .grid-2-1, .grid-3-2, .grid-2-1-1 { grid-template-columns: 1fr 1fr; }
  .grid-3-2 > :first-child, .grid-2-1-1 > :first-child, .grid-1-2 > *, .grid-2-1 > *, .grid-2 > *, .grid-3 > * { grid-column: 1 / -1; }
  .kpi { padding: 12px; gap: 10px; } .kpi .kval { font-size: 19px; } .kpi .kicon { width: 36px; height: 36px; }
  .tr-cols { grid-template-columns: 1fr; }
  .donut-wrap { grid-template-columns: 1fr; justify-items: center; }
  .form-grid { grid-template-columns: 1fr; }
  .topbar .search { display: none; }
  .topbar-user .n, .topbar-user .r { display: none; }
  .page-head .actions { width: 100%; }
  /* Uzun tablolar mobilde özet kartlara dönüşür (Plan 5.1) */
  .tbl.cards thead { display: none; }
  .tbl.cards tr { display: block; border-bottom: 1px solid var(--border); padding: 10px 14px; }
  .tbl.cards td { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border: 0; text-align: right; }
  .tbl.cards td::before { content: attr(data-label); color: var(--muted); font-size: 11.5px; font-weight: 600; text-align: left; }
  .tbl.cards td.num { text-align: right; }
  .kv { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .grid-6 { grid-template-columns: 1fr 1fr; }
  .product-tiles { grid-template-columns: repeat(3, 1fr); }
}
@media print { .sidebar, .topbar { display: none; } .main { margin: 0; } }
