:root {
  --kt-primary: #1b84ff;
  --kt-primary-active: #056ee9;
  --kt-success: #17c653;
  --kt-danger: #f8285a;
  --kt-warning: #f6c000;
  --kt-info: #7239ea;
  --kt-dark: #1e2129;
  --kt-aside: #0f1218;
  --kt-aside-w: 220px;
  --kt-header: 56px;
  --kt-bg: #f6f7f9;
  --kt-card: #ffffff;
  --kt-text: #1f2937;
  --kt-muted: #6b7280;
  --kt-border: #e5e7eb;
  --kt-radius: 8px;
  --kt-shadow: none;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: Inter, system-ui, -apple-system, Segoe UI, sans-serif;
  background: var(--kt-bg);
  color: var(--kt-text);
  font-size: 14px;
}
a { color: inherit; text-decoration: none; }
.app { display: flex; min-height: 100vh; }
.app-aside {
  width: var(--kt-aside-w);
  background: var(--kt-aside);
  color: #9aa4b8;
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  padding: 16px 12px;
  z-index: 20;
}
.brand { display: flex; gap: 10px; align-items: center; padding: 4px 8px 18px; color: #fff; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 8px;
  background: #1b84ff;
  color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 15px;
}
.brand strong { display: block; font-size: 16px; }
.brand small { color: #7e8798; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.nav-group { margin: 16px 10px 6px; font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: #5d6778; }
.nav a {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 6px; color: #b5b5c3; font-weight: 500; font-size: 13px;
}
.nav a i { font-size: 16px; width: 20px; text-align: center; }
.nav a:hover { background: rgba(255,255,255,.04); color: #fff; }
.nav a.active { background: rgba(27,132,255,.16); color: #69b4ff; }
.app-wrap { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app-header {
  height: var(--kt-header);
  background: #fff;
  border-bottom: 1px solid var(--kt-border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; gap: 12px; position: sticky; top: 0; z-index: 10;
}
.header-search { flex: 1; max-width: 420px; position: relative; }
.header-search i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--kt-muted); }
.header-search input {
  width: 100%; height: 36px; border: 1px solid var(--kt-border); border-radius: 6px;
  padding: 0 12px 0 34px; background: #f9f9fb; font: inherit;
}
.header-search input:focus { outline: none; border-color: var(--kt-primary); background: #fff; }
.app-content { padding: 20px 24px 48px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.page-head .sub { color: var(--kt-muted); margin-top: 4px; }
.card {
  background: var(--kt-card); border: 1px solid var(--kt-border);
  border-radius: var(--kt-radius); box-shadow: var(--kt-shadow);
}
.card-body { padding: 16px 18px; }
.card-header {
  padding: 12px 18px; border-bottom: 1px solid var(--kt-border);
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.card-header h3 { margin: 0; font-size: 14px; font-weight: 600; }
.kpi-row { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; }
.kpi {
  background: #fff; border: 1px solid var(--kt-border); border-radius: var(--kt-radius);
  padding: 14px 16px;
}
.kpi span { display: block; font-size: 12px; color: var(--kt-muted); margin-bottom: 6px; }
.kpi strong { display: block; font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.kpi em { display: block; font-style: normal; font-size: 12px; color: var(--kt-muted); margin-top: 4px; }
.kpi.bad { border-color: #fecdd3; }
.kpi.hot { border-color: #fde68a; }
.grid { display: grid; gap: 16px; }
.g-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.g-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.stat {
  display: flex; gap: 14px; align-items: center;
}
.stat-icon {
  width: 48px; height: 48px; border-radius: 10px; display: grid; place-items: center;
  font-size: 20px; flex-shrink: 0;
}
.stat-icon.blue { background: #e9f3ff; color: var(--kt-primary); }
.stat-icon.green { background: #e8fff3; color: var(--kt-success); }
.stat-icon.red { background: #ffeef3; color: var(--kt-danger); }
.stat-icon.yellow { background: #fff8dd; color: #c59a00; }
.stat-icon.purple { background: #f1ebff; color: var(--kt-info); }
.stat .label { font-size: 12px; color: var(--kt-muted); font-weight: 600; }
.stat .value { font-size: 22px; font-weight: 800; letter-spacing: -.03em; margin-top: 2px; }
.kpi-sub { font-size: 12px; color: var(--kt-muted); margin-top: 2px; }
.badge, .pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 8px; border-radius: 6px; font-size: 11px; font-weight: 700;
  background: #f1f1f4; color: var(--kt-text);
}
.pill.ok, .badge-ok { background: #e8fff3; color: #06a644; }
.pill.bad, .badge-bad { background: #ffeef3; color: #d9214e; }
.pill.warn, .badge-warn { background: #fff8dd; color: #c59a00; }
.pill.info, .badge-info { background: #e9f3ff; color: var(--kt-primary); }
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left; color: var(--kt-muted); font-size: 11px; letter-spacing: .06em;
  text-transform: uppercase; padding: 12px 10px; border-bottom: 1px solid var(--kt-border); font-weight: 700;
}
td { padding: 12px 10px; border-bottom: 1px solid #f1f1f4; vertical-align: middle; }
tr:hover td { background: #f9f9fb; }
.btn {
  border: 0; cursor: pointer; border-radius: 8px; padding: 10px 16px;
  font-weight: 700; font-family: inherit; font-size: 13px; display: inline-flex; align-items: center; gap: 6px;
}
.btn-gold, .btn-primary { background: var(--kt-primary); color: #fff; }
.btn-primary:hover { background: var(--kt-primary-active); color: #fff; }
.btn-navy { background: var(--kt-dark); color: #fff; }
.btn-ghost { background: #fff; border: 1px solid var(--kt-border); color: var(--kt-text); }
.btn-success { background: var(--kt-success); color: #fff; }
.btn-danger { background: #ffeef3; color: var(--kt-danger); }
.btn-sm { padding: 6px 10px; font-size: 12px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.form-control, input, select, textarea {
  width: 100%; min-height: 44px; padding: 10px 14px; border-radius: 8px; border: 1px solid var(--kt-border);
  background: #fff; font: inherit; color: var(--kt-text);
}
textarea { min-height: 96px; }
.chk { display: inline-flex; align-items: center; gap: 8px; margin: 0; color: var(--kt-text); font-size: 13px; }
.chk input { width: auto; min-height: 0; }
.lang-switch { display: flex; gap: 4px; background: #f4f6fa; padding: 4px; border-radius: 8px; }
.lang-switch a { padding: 6px 8px; border-radius: 6px; font-size: 11px; font-weight: 800; color: var(--kt-muted); }
.lang-switch a.on { background: #fff; color: var(--kt-primary); box-shadow: var(--kt-shadow); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--kt-primary); box-shadow: 0 0 0 3px rgba(27,132,255,.12); }
label { display: block; font-size: 12px; font-weight: 700; margin-bottom: 6px; color: var(--kt-muted); }
.flash { padding: 12px 14px; border-radius: 8px; margin-bottom: 16px; font-weight: 600; }
.flash.ok { background: #e8fff3; color: #06a644; }
.flash.bad { background: #ffeef3; color: #d9214e; }
.toolbar { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.money { font-variant-numeric: tabular-nums; font-weight: 700; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.split { display: grid; grid-template-columns: 1.3fr .9fr; gap: 16px; }
.tiny { font-size: 12px; }
.muted { color: var(--kt-muted); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.filters > div { min-width: 160px; }
.plan-row { display: grid; grid-template-columns: 140px 140px 1fr 40px; gap: 8px; margin-bottom: 8px; align-items: center; }
.table-wrap { overflow-x: auto; }
.page-title small { display: block; font-size: 13px; color: var(--kt-muted); margin-top: 6px; font-weight: 500; }
.empty { padding: 32px; text-align: center; color: var(--kt-muted); }
.progress { height: 6px; background: #eef0f8; border-radius: 99px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--kt-primary); }
.side-foot { margin-top: auto; padding: 12px 8px; color: #6d7686; font-size: 12px; }
.side-foot a { color: #9aa4b8; }
.user-chip { display: flex; align-items: center; gap: 10px; }
.user-av {
  width: 36px; height: 36px; border-radius: 8px; background: #e9f3ff; color: var(--kt-primary);
  display: grid; place-items: center; font-weight: 800;
}
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; }
.login-art {
  background: radial-gradient(circle at 20% 20%, #1b84ff 0%, transparent 40%),
              radial-gradient(circle at 80% 80%, #7239ea 0, transparent 42%),
              #0f1218;
  position: relative; color: #fff;
}
.login-art .copy { position: absolute; left: 48px; bottom: 48px; max-width: 460px; }
.login-art h1 { font-size: 40px; margin: 8px 0 12px; letter-spacing: -.03em; }
.login-box { display: grid; place-items: center; padding: 40px; background: #fff; }
.login-card { width: min(420px, 100%); }
.steps { display: flex; gap: 8px; margin-bottom: 18px; }
.steps span { flex: 1; height: 4px; background: #eef0f8; border-radius: 99px; }
.steps span.on { background: var(--kt-primary); }
.extract { max-width: 920px; margin: 28px auto; background: #fff; padding: 40px; border: 1px solid var(--kt-border); border-radius: 12px; }
.pay-desk {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.pay-search-card, .pay-work-card { min-width: 0; }
.pay-search-card { position: sticky; top: 72px; }
.pay-search { position: relative; }
.pay-search i {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--kt-muted); pointer-events: none;
}
.pay-search input { padding-left: 40px; height: 48px; }
.pay-results {
  display: flex; flex-direction: column; gap: 6px;
  margin-top: 12px; max-height: calc(100vh - 280px); overflow: auto;
}
.result-item {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
  width: 100%; text-align: left; font: inherit; color: inherit;
  padding: 12px 14px; border: 1px solid var(--kt-border); border-radius: 10px;
  background: #fff; cursor: pointer;
}
.result-item .who { min-width: 0; }
.result-item .who strong { display: block; margin-bottom: 2px; }
.result-item .who .pill { margin-top: 6px; }
.result-item .amt { text-align: right; flex-shrink: 0; }
.result-item .amt span { display: block; margin-bottom: 2px; }
.result-item .amt strong { font-variant-numeric: tabular-nums; }
.result-item:hover, .result-item.on { border-color: var(--kt-primary); box-shadow: 0 0 0 3px rgba(27,132,255,.12); }
.pay-empty { padding: 56px 28px; text-align: center; color: var(--kt-muted); }
.pay-empty .stat-icon { margin: 0 auto 16px; }
.pay-empty strong { display: block; color: var(--kt-text); font-size: 16px; margin-bottom: 8px; }
.pay-empty p { margin: 0 auto; max-width: 380px; line-height: 1.55; }
.pay-who {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 12px; margin-bottom: 18px;
}
.pay-who h2 { margin: 2px 0 4px; font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.pay-unit {
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--kt-primary);
}
.pay-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.pay-kpis .kpi { padding: 12px 14px; }
.pay-kpis .kpi strong { font-size: 18px; }
.pay-inst { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow: auto; margin: 0 0 8px; }
.pay-inst-item {
  display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center;
  width: 100%; text-align: left; border: 1px solid var(--kt-border); background: #fff;
  border-radius: 8px; padding: 10px 12px; cursor: pointer; font: inherit; color: inherit;
}
.pay-inst-item .money { font-variant-numeric: tabular-nums; }
.pay-inst-item:hover, .pay-inst-item.on { border-color: var(--kt-primary); background: #e9f3ff; }
.pay-form { margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--kt-border); }
.pay-save { width: 100%; justify-content: center; height: 48px; font-size: 15px; }
.alloc-box { background: #f4f6fa; border-radius: 8px; padding: 10px 12px; min-height: 44px; }
.alloc-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 4px 0; font-size: 13px; }
.page-pay .header-search { display: none; }
@media (max-width: 720px) {
  .pay-desk { grid-template-columns: 1fr; }
  .pay-results { max-height: 280px; }
  .pay-kpis { grid-template-columns: 1fr 1fr; }
  .pay-kpis .kpi:first-child { grid-column: 1 / -1; }
}
@media (max-width: 1100px) {
  .kpi-row { grid-template-columns: 1fr 1fr; }
  .g-4, .g-3 { grid-template-columns: 1fr 1fr; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .split { grid-template-columns: 1fr; }
}
.sale-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.sale-layout.one { grid-template-columns: 1fr; }
.sale-stack { display: flex; flex-direction: column; gap: 20px; }
.sale-ledger { position: sticky; top: 94px; }
#odeme-gecmisi { margin-top: 24px; }
.ledger-formula {
  font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--kt-muted); margin-bottom: 16px; line-height: 1.5;
}
.ledger-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: 13px; }
.ledger-row span:last-child { font-variant-numeric: tabular-nums; font-weight: 700; }
.ledger-row.add span:last-child { color: var(--kt-success); }
.ledger-row.sub span:last-child { color: var(--kt-danger); }
.ledger-row.total {
  margin-top: 8px; padding-top: 14px; border-top: 1px dashed var(--kt-border);
  font-size: 15px;
}
.ledger-row.total span:last-child { color: var(--kt-primary); font-size: 22px; font-weight: 800; letter-spacing: -.03em; }
.ledger-note { margin-top: 14px; padding: 12px; background: #f4f6fa; border-radius: 8px; color: var(--kt-muted); font-size: 12px; line-height: 1.5; }
.opt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.opt {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  border: 1px solid var(--kt-border); border-radius: 10px; background: #fafbfe; cursor: pointer; margin: 0;
}
.opt input { width: auto; min-height: 0; }
.opt.on { border-color: var(--kt-primary); background: #e9f3ff; }
.plan-row { display: grid; grid-template-columns: 1fr 1fr 40px; gap: 10px; margin-bottom: 10px; align-items: center; }
.inst-head, .inst-line {
  display: grid; grid-template-columns: 36px 1fr 1fr 40px; gap: 10px;
  align-items: center; margin-bottom: 8px;
}
.inst-no { font-weight: 800; color: var(--kt-muted); text-align: center; }
.section-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.section-title h4 { margin: 0; font-size: 14px; }
@media (max-width: 1100px) {
  .sale-layout { grid-template-columns: 1fr; }
  .sale-ledger { position: relative; top: 0; }
}
.nav a { justify-content: flex-start; }
.nav-badge {
  margin-left: auto;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 99px; background: #f8285a; color: #fff;
  font-size: 10px; font-weight: 800; display: inline-grid; place-items: center;
}
.person { display: flex; align-items: center; gap: 10px; }
.fact-split { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.fact-block h4 {
  margin: 0 0 12px; font-size: 11px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--kt-muted);
}
.fact-grid {
  display: grid; grid-template-columns: 120px 1fr; gap: 8px 14px;
  margin: 0; font-size: 13.5px; align-items: start;
}
.fact-grid dt { margin: 0; color: var(--kt-muted); font-weight: 500; }
.fact-grid dd { margin: 0; font-weight: 600; word-break: break-word; }
.fact-empty { color: #9aa4b8; font-weight: 500; }
.fact-agent { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--kt-border); }
.fact-note {
  margin: 16px 0 0; padding: 12px 14px; background: #f4f6fa;
  border-radius: 8px; font-size: 13px; line-height: 1.5;
}
@media (max-width: 900px) {
  .fact-split { grid-template-columns: 1fr; gap: 20px; }
}
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: #e9f3ff; color: var(--kt-primary); border-radius: 99px;
  padding: 6px 10px 6px 12px; font-size: 12px; font-weight: 700;
}
.chip form { display: inline; }
.chip button {
  border: 0; background: transparent; color: inherit; cursor: pointer;
  font-size: 16px; line-height: 1; padding: 0 2px;
}
.tpl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.tpl-preview {
  background: #f4f6fa; border-radius: 10px; padding: 14px 16px;
  font-size: 13px; line-height: 1.55; max-height: 200px; overflow: auto;
}
.tpl-preview strong { display: block; margin-bottom: 8px; }
.tpl-preview p { margin: 0; color: var(--kt-muted); white-space: pre-wrap; }
.inbox { display: grid; grid-template-columns: 360px minmax(0,1fr); gap: 16px; align-items: start; }
.inbox-list { overflow: hidden; max-height: 72vh; overflow-y: auto; }
.inbox-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px; border-bottom: 1px solid #f1f1f4; color: inherit;
}
.inbox-item:hover { background: #f9f9fb; }
.inbox-item.on { background: #e9f3ff; }
.inbox-item.unread strong { font-weight: 800; }
.inbox-meta { min-width: 0; flex: 1; }
.inbox-snip { color: var(--kt-muted); font-size: 12px; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inbox-item .dot {
  width: 8px; height: 8px; border-radius: 99px; background: var(--kt-primary);
  margin-top: 8px; flex-shrink: 0;
}
.msg-contact { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 18px; font-size: 13px; }
.msg-contact a { color: var(--kt-primary); font-weight: 700; }
.msg-body { white-space: pre-wrap; line-height: 1.65; font-size: 15px; }
.unit-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px; padding: 16px 20px 20px;
}
.unit-tile {
  display: block; padding: 12px; border: 1px solid var(--kt-border);
  border-radius: 10px; background: #fafbfe; color: inherit;
}
.unit-tile:hover { border-color: var(--kt-primary); }
.unit-tile.sold { background: #fff; }
.unit-no { font-weight: 800; letter-spacing: -.02em; margin-bottom: 4px; }
.click-row { cursor: pointer; }
.file-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.alarm-strip {
  display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px;
  margin-bottom: 18px;
}
.alarm-strip a {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--kt-border); border-radius: 10px;
  padding: 12px 14px; font-size: 13px; font-weight: 600; color: var(--kt-text);
}
.alarm-strip a.hot { border-color: #f6c000; background: #fff8dd; }
.alarm-strip a.bad { border-color: #f8285a; background: #ffeef3; }
.alert-wrap { position: relative; }
.alert-bell {
  width: 42px; height: 42px; border-radius: 8px; border: 1px solid var(--kt-border);
  display: grid; place-items: center; background: #fff; color: var(--kt-text); position: relative;
}
.alert-bell.hot { color: #c59a00; }
.alert-bell span {
  position: absolute; top: -4px; right: -4px;
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px;
  background: #f8285a; color: #fff; font-size: 10px; font-weight: 800;
  display: grid; place-items: center;
}
.alert-pop {
  display: none; position: absolute; right: 0; top: 48px; width: 300px;
  background: #fff; border: 1px solid var(--kt-border); border-radius: 10px;
  box-shadow: var(--kt-shadow); z-index: 30; overflow: hidden;
}
.alert-wrap:hover .alert-pop { display: block; }
.alert-pop a {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 12px 14px; border-bottom: 1px solid #f1f1f4; font-size: 13px;
}
.alert-pop a:last-child { border: 0; }
.alert-pop em { font-style: normal; font-weight: 800; color: var(--kt-primary); }
@media (max-width: 1100px) {
  .alarm-strip { grid-template-columns: 1fr 1fr; }
}
.section-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
@media (max-width: 1100px) {
  .tpl-grid, .inbox { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .app { display: block; }
  .app-aside { position: relative; height: auto; width: 100%; }
  .g-4, .g-3, .g-2, .form-grid, .opt-grid, .kpi-row { grid-template-columns: 1fr; }
  .plan-row { grid-template-columns: 1fr; }
  .app-content { padding: 16px; }
}
