/* === ana-css === */
:root {
  --bg: #FAFAF7;
  --surface: #FFFFFF;
  --surface-2: #F4F2EC;
  --border: #E8E5DC;
  --border-strong: #D4D0C4;
  --text: #0A0A0A;
  --text-2: #5C5C56;
  --text-3: #9A9892;
  --accent: #1A4D2E;
  --accent-soft: #E8F0EA;
  --profit: #0F7B3F;
  --profit-bg: #ECF6EE;
  --loss: #B53030;
  --loss-bg: #FCEDEC;
  --warn: #A8580C;
  --warn-bg: #FDF2E4;
  --target: #6B4FBB;
  --target-bg: #F0EBFA;
  --ty: #F27A1A;
  --hb: #FF6000;
  --n11: #951E68;
  --bayi: #C75D2D;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Manrope', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'ss01', 'cv11';
  overscroll-behavior-y: contain;
}
input, button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}
button { background: none; border: none; padding: 0; cursor: pointer; }
input {
  border: 1px solid var(--border-strong);
  background: var(--surface);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  outline: none;
  width: 100%;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}
input:focus { border-color: var(--accent); }
input[type="number"] { -moz-appearance: textfield; }
input::-webkit-outer-spin-button, input::-webkit-inner-spin-button {
  -webkit-appearance: none; margin: 0;
}
.tnum { font-variant-numeric: tabular-nums; }

header {
  padding: calc(var(--safe-top) + 18px) 20px 8px;
  background: var(--bg);
  position: sticky; top: 0;
  z-index: 10;
}
.title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 30px;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1;
  margin: 0;
}
.title em { font-style: italic; color: var(--accent); }
.subtitle {
  font-size: 12.5px;
  color: var(--text-2);
  margin-top: 4px;
}

main {
  padding: 12px 16px calc(var(--safe-bottom) + 30px);
}

/* USD/TL RATE BAR */
.rate-bar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 8px 0 4px;
}
.rate-bar-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
  display: flex; align-items: center; gap: 8px;
}
.rate-bar-label::before {
  content: '$';
  width: 22px; height: 22px;
  background: var(--accent);
  color: var(--bg);
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 13px;
  font-family: 'Instrument Serif', Georgia, serif;
}
.rate-input {
  width: 100px;
  text-align: right;
  font-weight: 700;
  font-size: 15px;
  padding: 8px 10px;
}

/* MODE SWITCHER */
.mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--surface-2);
  border-radius: var(--r-md);
  padding: 4px;
  margin: 12px 0 6px;
  position: relative;
}
.mode-btn {
  padding: 10px 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-2);
  text-align: center;
  border-radius: 8px;
  transition: all .2s;
  position: relative;
  z-index: 1;
}
.mode-btn.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

.section-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--text-2);
  margin: 18px 4px 8px;
  display: flex; align-items: center; justify-content: space-between;
}
.section-label .reset-btn {
  text-transform: none;
  letter-spacing: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  padding: 6px 10px;
  margin-right: -10px;
}

/* PRODUCT PICKER */
.product-picker {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px;
  margin-bottom: 4px;
}
.product-picker-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  background: var(--surface-2);
  border-radius: var(--r-sm);
  text-align: left;
  font-weight: 500;
  color: var(--text-2);
  min-height: 48px;
}
.product-picker-btn.selected {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
.product-picker-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.product-picker-btn .label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.product-picker-btn .clear { 
  color: var(--text-3); 
  font-size: 18px; 
  line-height: 1;
  flex-shrink: 0;
  padding: 0 4px;
}

.selected-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
  font-size: 11.5px;
}
.tag {
  background: var(--surface-2);
  border-radius: 4px;
  padding: 3px 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 10.5px;
  color: var(--text-2);
}
.tag.usd { background: var(--accent-soft); color: var(--accent); }

.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  border-bottom: 1px solid var(--border);
}
.form-row:last-child { border-bottom: none; }
.form-row > label {
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.form-row > label .hint {
  display: block;
  font-size: 11.5px;
  color: var(--text-2);
  font-weight: 500;
  margin-top: 2px;
}
.input-wrap {
  position: relative;
  padding: 8px 12px 8px 0;
  width: 160px;
}
.input-wrap input {
  border: 1px solid transparent;
  background: transparent;
  text-align: right;
  padding-right: 32px;
  font-weight: 600;
}
.input-wrap input:focus { border-color: var(--accent); background: var(--surface); }
.input-wrap .suffix {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  font-size: 13px;
  font-weight: 600;
  pointer-events: none;
}

.form-row.auto > .input-wrap input {
  background: var(--accent-soft);
  color: var(--accent);
}
.form-row.auto > .input-wrap input:focus {
  background: var(--surface);
  color: var(--text);
  border-color: var(--accent);
}
.form-row.target > .input-wrap input {
  background: var(--target-bg);
  color: var(--target);
}
.form-row.target > .input-wrap input:focus {
  background: var(--surface);
  color: var(--text);
  border-color: var(--target);
}
.auto-tag {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 2px 6px;
  border-radius: 3px;
  margin-left: 6px;
  vertical-align: middle;
  text-transform: uppercase;
}
.target-tag {
  background: var(--target-bg);
  color: var(--target);
}
.cargo-detail, .alis-detail {
  font-size: 11px;
  color: var(--text-2);
  text-align: right;
  padding: 0 16px 8px 0;
  margin-top: -4px;
  font-variant-numeric: tabular-nums;
}

.form-row.hidden { display: none; }

.mp-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.mp-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 16px;
  position: relative;
  overflow: hidden;
}
.mp-card.best {
  border-color: var(--profit);
  border-width: 2px;
  padding: 15px;
  box-shadow: 0 4px 16px rgba(15,123,63,.10);
}
.mp-card.best::before {
  content: var(--best-label, '"EN KÂRLI"');
  position: absolute;
  top: 12px; right: 14px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  background: var(--profit);
  color: white;
  padding: 3px 8px;
  border-radius: 4px;
}
.mp-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px;
}
.mp-badge {
  width: 6px; height: 28px; border-radius: 3px;
}
.mp-badge.ty { background: var(--ty); }
.mp-badge.hb { background: var(--hb); }
.mp-badge.n11 { background: var(--n11); }
.mp-badge.bayi { background: var(--bayi); }
.mp-name { font-weight: 700; font-size: 15.5px; flex: 1; }
.mp-commission {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-2);
  background: var(--surface-2);
  padding: 3px 8px;
  border-radius: 4px;
}

.mp-suggested {
  background: var(--target-bg);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  margin-bottom: 12px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.mp-suggested-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--target);
}
.mp-suggested-value {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 24px;
  color: var(--target);
  font-variant-numeric: tabular-nums;
}

.mp-rows {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
}
.mp-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 4px 0;
  font-size: 13px;
}
.mp-line .l { color: var(--text-2); }
.mp-line .v { font-weight: 600; font-variant-numeric: tabular-nums; }

.mp-result {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px;
  align-items: end;
}
.mp-result-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--text-2);
}
.mp-net {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 32px;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.mp-net.profit { color: var(--profit); }
.mp-net.loss { color: var(--loss); }
.mp-margin {
  font-size: 13px;
  font-weight: 700;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.mp-margin.profit { color: var(--profit); }
.mp-margin.loss { color: var(--loss); }
.mp-error {
  font-size: 12px;
  color: var(--warn);
  background: var(--warn-bg);
  padding: 10px 12px;
  border-radius: var(--r-sm);
  margin-bottom: 12px;
}

.com-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
}
.com-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  border-bottom: 1px solid var(--border);
  gap: 12px;
  padding: 4px 16px 4px 14px;
}
.com-row:last-child { border-bottom: none; }
.com-row .mp-badge { height: 24px; }
.com-row .mp-label { font-weight: 600; font-size: 14px; }
.com-row .input-wrap { width: 120px; padding-right: 0; }

.toggle-btn {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%;
  padding: 14px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-weight: 600;
  font-size: 13px;
  color: var(--text-2);
  margin-top: 10px;
}
.toggle-btn svg { width: 18px; height: 18px; transition: transform .2s; }
.toggle-btn.open svg { transform: rotate(180deg); }
.toggle-content { display: none; margin-top: 10px; }
.toggle-content.open { display: block; }

.hint-box {
  background: var(--accent-soft);
  border-radius: var(--r-md);
  padding: 12px 14px;
  font-size: 12.5px;
  color: var(--accent);
  line-height: 1.5;
  margin-top: 16px;
}
.hint-box strong { display: block; margin-bottom: 4px; }

.warn-box {
  background: var(--warn-bg);
  border-radius: var(--r-md);
  padding: 10px 12px;
  font-size: 12px;
  color: var(--warn);
  line-height: 1.4;
  margin-top: 6px;
  display: none;
}
.warn-box.show { display: block; }

/* MODAL */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(10,10,10,.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  display: flex; align-items: flex-end;
  animation: fadeIn .2s;
}
.modal-sheet {
  background: var(--bg);
  width: 100%;
  border-radius: 24px 24px 0 0;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  padding-bottom: var(--safe-bottom);
  animation: slideUp .25s cubic-bezier(.2,.8,.2,1);
}
.modal-handle {
  width: 36px; height: 4px;
  background: var(--border-strong);
  border-radius: 2px;
  margin: 8px auto 12px;
  flex-shrink: 0;
}
.modal-header {
  padding: 0 16px 12px;
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.modal-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 26px;
  margin: 0;
}
.modal-close {
  color: var(--accent);
  font-weight: 600;
  font-size: 15px;
  padding: 8px 4px;
}
.modal-search-wrap {
  padding: 0 16px 10px;
  flex-shrink: 0;
}
.modal-search {
  background: var(--surface-2);
  border: 1px solid transparent;
  padding-left: 38px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235C5C56' stroke-width='2' stroke-linecap='round'><circle cx='11' cy='11' r='7'/><path d='m21 21-4.3-4.3'/></svg>");
  background-repeat: no-repeat;
  background-position: 12px center;
  background-size: 18px;
}
.modal-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 16px 10px;
  scrollbar-width: none;
  flex-shrink: 0;
}
.modal-chips::-webkit-scrollbar { display: none; }
.chip {
  white-space: nowrap;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}
.chip.active {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}
.modal-list {
  flex: 1;
  overflow-y: auto;
  padding: 0 16px 16px;
  -webkit-overflow-scrolling: touch;
}
.product-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 14px;
  margin-bottom: 8px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  cursor: pointer;
  text-align: left;
  width: 100%;
}
.product-item:active { background: var(--surface-2); transform: scale(.99); }
.product-item-info {
  min-width: 0;
}
.product-item-name {
  font-weight: 600;
  font-size: 13.5px;
  line-height: 1.35;
  margin: 0 0 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-item-meta {
  display: flex; gap: 5px; flex-wrap: wrap;
}
.product-item-price {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 19px;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.product-item-price.empty {
  font-size: 11px;
  color: var(--text-3);
  font-family: 'Manrope', sans-serif;
  font-style: italic;
}
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-2);
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* BRAND HEADER */
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand-logo {
  height: 44px;
  width: auto;
  flex-shrink: 0;
}
.brand-text { flex: 1; min-width: 0; }
.brand .title { font-size: 26px; }
.brand .subtitle { font-size: 11.5px; margin-top: 2px; }


/* MANUAL ENTRY BUTTON */
.manual-entry-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 11px 14px;
  margin-top: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: var(--r-sm);
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: 0.01em;
  border: 1px dashed var(--accent);
}
.manual-entry-btn:active { background: #DCE8DF; transform: scale(.99); }
.manual-entry-btn svg { width: 16px; height: 16px; }


/* ALIS DETAIL (KDV breakdown) - matches cargo-detail style */
.alis-detail {
  font-size: 11px;
  color: var(--text-2);
  text-align: right;
  padding: 4px 16px 6px;
  margin: -1px 0 0;
  background: var(--surface);
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}
.alis-detail:empty { display: none; }


/* CUSTOM PRODUCT DELETE BUTTON */
.product-item-delete {
  position: absolute;
  top: 6px; right: 6px;
  width: 24px; height: 24px;
  background: var(--loss-bg);
  color: var(--loss);
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
}
.product-item-delete:active { background: var(--loss); color: white; transform: scale(.9); }


/* TOAST ANIMATIONS */
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, -12px); } to { opacity: 1; transform: translateX(-50%); } }
@keyframes toastOut { to { opacity: 0; transform: translate(-50%, -12px); } }


/* MAIN PAGE TABS */
.page-tabs {
  display: flex;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  position: sticky;
  top: 0;
  z-index: 9;
}
.page-tab {
  padding: 14px 18px;
  font-weight: 700;
  font-size: 14px;
  color: var(--text-3);
  position: relative;
  letter-spacing: 0.01em;
}
.page-tab.active {
  color: var(--accent);
}
.page-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 12px; right: 12px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px 2px 0 0;
}
.page-tab svg {
  width: 16px; height: 16px;
  vertical-align: middle;
  margin-right: 4px;
}
.page-tab .count {
  display: inline-block;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 999px;
  margin-left: 4px;
  font-weight: 700;
}
.page-tab.active .count { background: var(--accent-soft); color: var(--accent); }

.page-content { display: none; }
.page-content.active { display: block; }

/* SAVE SALE BUTTON (on hesap page) */
.save-sale-card {
  margin-top: 16px;
  background: var(--accent);
  color: var(--bg);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  text-align: center;
}
.save-sale-card .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  opacity: 0.8;
  margin-bottom: 6px;
}
.save-sale-card .desc {
  font-size: 12.5px;
  opacity: 0.85;
  margin-bottom: 14px;
  line-height: 1.4;
}
.save-sale-btn {
  background: var(--bg);
  color: var(--accent);
  padding: 12px 24px;
  border-radius: var(--r-md);
  font-weight: 700;
  font-size: 14.5px;
  width: 100%;
}

/* SALES PAGE KPIs */
.kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 0;
}
.kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px;
}
.kpi-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-2);
}
.kpi-value {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 26px;
  font-weight: 400;
  letter-spacing: -0.01em;
  margin-top: 4px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.kpi-value.sm { font-size: 20px; }
.kpi-value.profit { color: var(--profit); }
.kpi-value.loss { color: var(--loss); }
.kpi-sub {
  font-size: 11.5px;
  color: var(--text-2);
  margin-top: 2px;
}

.hero-kpi {
  background: var(--accent);
  color: var(--bg);
  border-radius: var(--r-lg);
  padding: 22px 20px;
  position: relative;
  overflow: hidden;
}
.hero-kpi .hero-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.75;
  font-weight: 600;
}
.hero-kpi .hero-value {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 44px;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}
.hero-kpi .hero-sub {
  margin-top: 6px;
  font-size: 13px;
  opacity: 0.85;
}
.hero-kpi.loss-hero { background: #1A1A1A; }

/* Period switcher */
.period-switch {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--surface-2);
  border-radius: var(--r-md);
  padding: 4px;
  margin: 16px 0 10px;
}
.period-btn {
  padding: 9px 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
  text-align: center;
  border-radius: 8px;
}
.period-btn.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

/* MARKETPLACE BREAKDOWN */
.mp-row {
  display: flex;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.mp-row:last-child { border-bottom: none; }
.mp-row-badge {
  width: 6px;
  height: 30px;
  border-radius: 3px;
  margin-right: 12px;
}
.mp-row-badge.ty { background: var(--ty); }
.mp-row-badge.hb { background: var(--hb); }
.mp-row-badge.n11 { background: var(--n11); }
.mp-row-badge.bayi { background: var(--bayi, #B07A2B); }
.mp-row-name { font-weight: 600; flex: 1; font-size: 14px; }
.mp-row-stats { text-align: right; }
.mp-row-amount { font-family: 'Instrument Serif', serif; font-size: 17px; font-variant-numeric: tabular-nums; line-height: 1; }
.mp-row-count { font-size: 11px; color: var(--text-2); margin-top: 2px; }

/* SALES LIST */
.day-header {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-2);
  margin: 18px 4px 8px;
  display: flex; justify-content: space-between;
  align-items: baseline;
}
.day-total {
  color: var(--text);
  font-variant-numeric: tabular-nums;
  font-family: 'Instrument Serif', serif;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.sale-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 14px;
  margin-bottom: 8px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  cursor: pointer;
}
.sale-item:active { background: var(--surface-2); transform: scale(.99); }
.sale-mp-bar {
  width: 4px;
  align-self: stretch;
  min-height: 36px;
  border-radius: 2px;
}
.sale-mp-bar.ty { background: var(--ty); }
.sale-mp-bar.hb { background: var(--hb); }
.sale-mp-bar.n11 { background: var(--n11); }
.sale-mp-bar.bayi { background: var(--bayi, #B07A2B); }
.sale-mp-bar.other { background: var(--text-3); }
.sale-info { min-width: 0; }
.sale-product {
  font-weight: 600; font-size: 13.5px;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 3px;
}
.sale-meta { font-size: 11.5px; color: var(--text-2); display: flex; gap: 8px; flex-wrap: wrap; }
.sale-fig { text-align: right; }
.sale-amount {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.sale-profit { font-size: 11.5px; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; }
.sale-profit.profit { color: var(--profit); }
.sale-profit.loss { color: var(--loss); }
.sale-status {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 1px 6px;
  border-radius: 3px;
}
.sale-status.tamamlandi { background: var(--profit-bg); color: var(--profit); }
.sale-status.iade { background: var(--loss-bg); color: var(--loss); }
.sale-status.iptal { background: var(--surface-2); color: var(--text-3); }

/* FAB - floating action button */
.fab {
  position: fixed;
  right: 16px;
  bottom: calc(var(--safe-bottom) + 24px);
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(26,77,46,.35);
  z-index: 40;
}
.fab:active { transform: scale(.94); }
.fab svg { width: 26px; height: 26px; }

/* Top products list */
.top-product-item {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.top-product-item:last-child { border-bottom: none; }
.top-rank {
  font-family: 'Instrument Serif', serif;
  font-size: 18px;
  color: var(--text-3);
}
.top-product-name {
  font-weight: 600;
  font-size: 13px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.top-product-stat {
  text-align: right;
}
.top-product-value {
  font-family: 'Instrument Serif', serif;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.top-product-count {
  font-size: 10.5px;
  color: var(--text-2);
  margin-top: 1px;
}

/* Sale form */
.sale-form-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 16px;
  margin-bottom: 12px;
}
.sale-form-section h3 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--text-2);
  margin: 0 0 12px;
}
.sale-form-grid {
  display: grid;
  gap: 10px;
}
.sale-form-grid label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 4px;
}
.sale-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.empty-state {
  text-align: center;
  padding: 60px 20px;
}
.empty-state .empty-title {
  font-family: 'Instrument Serif', serif;
  font-size: 24px;
  color: var(--text);
  margin: 0 0 6px;
}
.empty-state p { color: var(--text-2); font-size: 13.5px; }


/* === ANALYTICS CSS === */

/* Trend chart */
.trend-chart {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 16px;
  margin-top: 12px;
}
.trend-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 140px;
  margin: 12px 0 8px;
  position: relative;
  padding-bottom: 24px;
}
.trend-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  position: relative;
  min-width: 0;
  height: 100%;
}
.trend-bar-stack {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: stretch;
  flex: 1;
  gap: 0;
}
.trend-bar {
  width: 100%;
  background: var(--accent);
  border-radius: 3px 3px 0 0;
  min-height: 0;
  transition: opacity .15s;
}
.trend-bar.kar-bar { background: var(--profit); border-radius: 3px 3px 0 0; }
.trend-bar.kar-bar.loss { background: var(--loss); }
.trend-bar.ciro-bar { background: var(--accent); opacity: 0.25; border-radius: 0; }
.trend-label {
  position: absolute;
  bottom: 0;
  left: 0; right: 0;
  text-align: center;
  font-size: 9.5px;
  color: var(--text-2);
  font-weight: 600;
  text-transform: uppercase;
}
.trend-bar-col.active .trend-bar { opacity: 1; }
.trend-bar-col.active .trend-label { color: var(--text); }
.trend-legend {
  display: flex;
  gap: 16px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-2);
  margin-top: 4px;
}
.trend-legend-dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 3px;
  margin-right: 5px;
  vertical-align: middle;
}

/* Comparison card */
.compare-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 16px;
  margin-top: 12px;
}
.compare-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.compare-row:last-child { border-bottom: none; }
.compare-label { font-size: 13px; font-weight: 600; color: var(--text); }
.compare-sub { font-size: 11.5px; color: var(--text-2); margin-top: 2px; }
.compare-value {
  font-family: 'Instrument Serif', serif;
  font-size: 18px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.compare-delta {
  font-size: 11.5px;
  font-weight: 700;
  margin-top: 4px;
  text-align: right;
}
.compare-delta.up { color: var(--profit); }
.compare-delta.down { color: var(--loss); }

/* Warnings / alerts (loss detector) */
.alert-card {
  background: var(--warn-bg);
  border: 1px solid var(--warn);
  border-left: 4px solid var(--warn);
  border-radius: var(--r-md);
  padding: 14px;
  margin-top: 12px;
}
.alert-card.loss {
  background: var(--loss-bg);
  border-color: var(--loss);
}
.alert-card-title {
  font-weight: 800;
  font-size: 13px;
  color: var(--warn);
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 6px;
}
.alert-card.loss .alert-card-title { color: var(--loss); }
.alert-card-list {
  list-style: none;
  margin: 0; padding: 0;
}
.alert-card-list li {
  font-size: 12.5px;
  padding: 6px 0;
  border-top: 1px solid rgba(0,0,0,.05);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}
.alert-card-list li:first-child { border-top: none; }
.alert-card-list .name {
  color: var(--text);
  font-weight: 600;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.alert-card-list .stat {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  text-align: right;
  font-size: 12px;
}

/* Product detail page */
.product-detail-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 16px;
  margin-bottom: 12px;
}
.product-detail-mp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.product-detail-mp {
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  position: relative;
}
.product-detail-mp-name {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-2);
  margin-bottom: 4px;
}
.product-detail-mp-name::before {
  content: '';
  width: 4px; height: 12px;
  border-radius: 2px;
  background: var(--text-3);
}
.product-detail-mp.ty .product-detail-mp-name::before { background: var(--ty); }
.product-detail-mp.hb .product-detail-mp-name::before { background: var(--hb); }
.product-detail-mp.n11 .product-detail-mp-name::before { background: var(--n11); }
.product-detail-mp.bayi .product-detail-mp-name::before { background: var(--bayi, #B07A2B); }
.product-detail-mp-stat {
  font-family: 'Instrument Serif', serif;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.product-detail-mp-sub {
  font-size: 11px;
  color: var(--text-2);
  margin-top: 2px;
}

/* Mini KPI for product detail */
.mini-kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}
.mini-kpi {
  background: var(--surface-2);
  border-radius: var(--r-sm);
  padding: 10px;
  text-align: center;
}
.mini-kpi-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-2);
}
.mini-kpi-value {
  font-family: 'Instrument Serif', serif;
  font-size: 18px;
  margin-top: 3px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.mini-kpi-value.profit { color: var(--profit); }
.mini-kpi-value.loss { color: var(--loss); }

/* Hint suggestion in alerts */
.alert-hint {
  background: rgba(0,0,0,.04);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 11.5px;
  color: var(--text);
  margin-top: 10px;
  line-height: 1.5;
}
.alert-hint strong { color: var(--text); }


@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}


/* DRIVE SYNC INDICATOR */
.drive-status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-2);
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  letter-spacing: 0;
  text-transform: none;
}
.drive-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--text-3);
  display: inline-block;
}
.drive-dot.ok { background: var(--profit); }
.drive-dot.syncing { 
  background: var(--accent);
  animation: pulse 1s infinite;
}
.drive-dot.pending { background: var(--warn); }
.drive-dot.error { background: var(--loss); }
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}


/* === v12 Mini ERP Ek Modüller: Ürün Kartları + Cari Hesap === */
.erp-toolbar{display:flex;gap:10px;align-items:center;margin:14px 0;flex-wrap:wrap}.erp-search{flex:1;min-width:180px;background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:12px 14px;color:var(--text);font-size:14px}.erp-select{background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:12px 10px;color:var(--text);font-size:13px;max-width:150px}.erp-btn{border:none;border-radius:12px;padding:12px 14px;font-weight:800;font-size:13px;cursor:pointer;background:var(--accent);color:var(--bg)}.erp-btn.secondary{background:var(--surface-2);color:var(--text);border:1px solid var(--border)}.erp-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:12px;margin:12px 0}.erp-card{background:var(--surface);border:1px solid var(--border);border-radius:18px;padding:14px;box-shadow:0 10px 30px rgba(0,0,0,.05)}.erp-card-head{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}.erp-title{font-weight:800;font-size:14px;line-height:1.25;color:var(--text)}.erp-sub{font-size:11px;color:var(--text-3);margin-top:5px;line-height:1.35}.erp-pill{font-size:10px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;border-radius:999px;padding:5px 7px;background:var(--surface-2);color:var(--text-2);white-space:nowrap}.erp-price{font-size:20px;font-weight:900;margin-top:12px;color:var(--text)}.erp-meta{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:10px}.erp-mini{background:var(--surface-2);border-radius:12px;padding:9px}.erp-mini span{display:block;font-size:10px;color:var(--text-3);font-weight:700;text-transform:uppercase;letter-spacing:.05em}.erp-mini strong{display:block;font-size:13px;margin-top:4px;color:var(--text)}.erp-actions{display:flex;gap:8px;margin-top:12px}.erp-actions button{flex:1;border:none;border-radius:10px;padding:10px 8px;font-weight:800;font-size:12px;cursor:pointer}.erp-actions .primary{background:var(--accent);color:var(--bg)}.erp-actions .ghost{background:var(--surface-2);color:var(--text)}.cari-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:12px 0}@media(max-width:560px){.cari-summary{grid-template-columns:1fr}.erp-toolbar{gap:8px}.erp-select{max-width:100%}}.cari-kpi{background:var(--surface);border:1px solid var(--border);border-radius:16px;padding:13px}.cari-kpi span{font-size:11px;color:var(--text-3);font-weight:800;text-transform:uppercase;letter-spacing:.06em}.cari-kpi strong{display:block;margin-top:6px;font-size:19px;color:var(--text)}.balance-positive{color:var(--loss)!important}.balance-negative{color:var(--profit)!important}.account-row{cursor:pointer;transition:.15s transform}.account-row:active{transform:scale(.99)}.txn-list{display:flex;flex-direction:column;gap:8px;margin-top:10px}.txn-item{display:flex;justify-content:space-between;gap:10px;background:var(--surface-2);border-radius:12px;padding:10px}.txn-item small{display:block;color:var(--text-3);font-size:11px;margin-top:3px}.txn-amt{font-weight:900;white-space:nowrap}.form-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}.form-field{display:flex;flex-direction:column;gap:6px;margin-bottom:10px}.form-field label{font-size:11px;color:var(--text-3);font-weight:800;text-transform:uppercase;letter-spacing:.06em}.form-field input,.form-field select,.form-field textarea{width:100%;background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:12px;color:var(--text);font-size:14px}.form-field textarea{min-height:70px;resize:vertical}.empty-state{background:var(--surface);border:1px dashed var(--border-strong);border-radius:18px;padding:28px 18px;text-align:center;color:var(--text-3);line-height:1.5}


/* === v13 Cari Alt Sekmeler === */
.cari-tabs{display:flex;gap:8px;align-items:center;margin:12px 0 4px;overflow:auto;padding-bottom:4px}
.cari-tab{border:1px solid var(--border);background:var(--surface);color:var(--text-2);border-radius:999px;padding:10px 14px;font-weight:900;font-size:13px;cursor:pointer;white-space:nowrap}
.cari-tab.active{background:var(--text);color:var(--bg);border-color:var(--text)}
.cari-tab .badge{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;border-radius:999px;margin-left:6px;background:var(--surface-2);font-size:11px;color:inherit}
.cari-tab.active .badge{background:rgba(255,255,255,.18)}


/* === v16 Cari Silme Güvenliği === */
.danger-action { color: var(--loss) !important; border-color: var(--loss-bg) !important; }
.danger-action:active { background: var(--loss-bg) !important; }
/* === v14 Cari Modal Düzeltmesi === */
.modal-card{width:min(560px,calc(100vw - 28px));max-height:88vh;overflow:auto;background:var(--bg);border:1px solid var(--border);border-radius:24px;padding:18px;box-shadow:0 24px 80px rgba(0,0,0,.28);}
.modal-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px;}
#modal-root .modal-backdrop{z-index:100100;} /* v427 cari çekmecesi (99000) üstünde kalsın — ekstre + fatura görüntüleyici */
@media(max-width:560px){.modal-card{width:calc(100vw - 18px);border-radius:22px;padding:16px;}}



/* v20 Settings & Themes */
body.theme-night {
  --bg: #0F1115;
  --surface: #171A21;
  --surface-2: #20242D;
  --border: #2A2F3A;
  --border-strong: #394150;
  --text: #F6F2E8;
  --text-2: #BBB6AA;
  --text-3: #858073;
  --accent: #D8B56D;
  --accent-soft: rgba(216,181,109,.16);
  --profit: #4CC883;
  --profit-bg: rgba(76,200,131,.13);
  --loss: #FF7171;
  --loss-bg: rgba(255,113,113,.13);
  --warn: #F0A84B;
  --warn-bg: rgba(240,168,75,.13);
  --target: #A88BFF;
  --target-bg: rgba(168,139,255,.13);
}
.settings-grid { display:grid; grid-template-columns:1fr; gap:12px; }
.settings-card { background:var(--surface); border:1px solid var(--border); border-radius:var(--r-lg); padding:16px; }
.settings-card h3 { margin:0 0 10px; font-size:15px; letter-spacing:-.01em; }
.settings-card .desc { margin-bottom:12px; }
.settings-row { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-bottom:10px; }
.settings-field label { display:block; font-size:11.5px; color:var(--text-2); font-weight:700; margin-bottom:5px; }
.settings-field input, .settings-field select, .settings-field textarea { width:100%; border:1px solid var(--border-strong); background:var(--surface-2); border-radius:10px; padding:11px 12px; }
.settings-field textarea { min-height:72px; resize:vertical; }
.settings-actions { display:flex; gap:8px; flex-wrap:wrap; }
.settings-badge { display:inline-flex; align-items:center; gap:6px; padding:6px 10px; border-radius:999px; background:var(--accent-soft); color:var(--accent); font-size:11.5px; font-weight:800; }
body.theme-night .rate-bar, body.theme-night .form-row, body.theme-night .com-card, body.theme-night .hint-box, body.theme-night .save-sale-card { box-shadow:none; }
@media (max-width: 620px){ .settings-row { grid-template-columns:1fr; } }



/* === v21 Koyu Tema Derinleştirme === */
body.theme-night {
  --bg: #090B10;
  --surface: #11151C;
  --surface-2: #191F29;
  --border: #29313D;
  --border-strong: #3A4454;
  --text: #F8F4EA;
  --text-2: #D2CABD;
  --text-3: #9C9487;
  --accent: #E0BE78;
  --accent-soft: rgba(224,190,120,.17);
  background: var(--bg) !important;
  color: var(--text) !important;
  color-scheme: dark;
}
body.theme-night html,
body.theme-night main,
body.theme-night header,
body.theme-night footer,
body.theme-night .page-content {
  background: var(--bg) !important;
  color: var(--text) !important;
}
body.theme-night .brand,
body.theme-night .title,
body.theme-night h1,
body.theme-night h2,
body.theme-night h3,
body.theme-night h4,
body.theme-night label,
body.theme-night strong,
body.theme-night .tnum,
body.theme-night .erp-price,
body.theme-night .mp-label,
body.theme-night .section-label,
body.theme-night .panel-head h2 {
  color: var(--text) !important;
}
body.theme-night .subtitle,
body.theme-night .desc,
body.theme-night small,
body.theme-night .muted,
body.theme-night .rate-bar-label,
body.theme-night .product-item-sub,
body.theme-night .product-item-price.empty,
body.theme-night .empty-state,
body.theme-night .settings-field label,
body.theme-night .form-field label,
body.theme-night .section-label,
body.theme-night .erp-mini span,
body.theme-night .txn-item small {
  color: var(--text-2) !important;
}
body.theme-night .panel,
body.theme-night .settings-card,
body.theme-night .rate-bar,
body.theme-night .product-picker,
body.theme-night .com-card,
body.theme-night .result-card,
body.theme-night .save-sale-card,
body.theme-night .sales-card,
body.theme-night .sale-card,
body.theme-night .erp-card,
body.theme-night .erp-list-card,
body.theme-night .account-card,
body.theme-night .cari-card,
body.theme-night .txn-card,
body.theme-night .summary-card,
body.theme-night .stat-card,
body.theme-night .filter-card,
body.theme-night .modal-card,
body.theme-night .modal-content,
body.theme-night .modal-sheet,
body.theme-night .modal-body,
body.theme-night .picker-modal,
body.theme-night .backup-menu,
body.theme-night .dropdown-menu,
body.theme-night .toolbar,
body.theme-night .search-box,
body.theme-night .pdf-options,
body.theme-night .empty-card {
  background: var(--surface) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
  box-shadow: none !important;
}
body.theme-night .mode-switch,
body.theme-night .product-picker-btn,
body.theme-night .selected-meta .tag,
body.theme-night .input-wrap,
body.theme-night .chip,
body.theme-night .erp-mini,
body.theme-night .txn-item,
body.theme-night .toggle-btn,
body.theme-night .settings-field input,
body.theme-night .settings-field select,
body.theme-night .settings-field textarea,
body.theme-night .form-field input,
body.theme-night .form-field select,
body.theme-night .form-field textarea,
body.theme-night .cari-tab,
body.theme-night .page-tab,
body.theme-night .product-item,
body.theme-night .sale-row,
body.theme-night .table-row,
body.theme-night .com-row,
body.theme-night .summary-row {
  background: var(--surface-2) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}
body.theme-night input,
body.theme-night select,
body.theme-night textarea {
  background-color: #0D1118 !important;
  color: var(--text) !important;
  border-color: var(--border-strong) !important;
  caret-color: var(--accent) !important;
  -webkit-text-fill-color: var(--text) !important;
}
body.theme-night input:focus,
body.theme-night select:focus,
body.theme-night textarea:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(224,190,120,.13) !important;
}
body.theme-night input::placeholder,
body.theme-night textarea::placeholder {
  color: var(--text-3) !important;
  -webkit-text-fill-color: var(--text-3) !important;
}
body.theme-night input:-webkit-autofill,
body.theme-night textarea:-webkit-autofill,
body.theme-night select:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px #0D1118 inset !important;
  -webkit-text-fill-color: var(--text) !important;
  transition: background-color 9999s ease-in-out 0s;
}
body.theme-night .mode-btn.active,
body.theme-night .page-tab.active,
body.theme-night .chip.active,
body.theme-night .cari-tab.active {
  background: var(--accent) !important;
  color: #101010 !important;
  border-color: var(--accent) !important;
  box-shadow: none !important;
}
body.theme-night .page-tab:not(.active),
body.theme-night .mode-btn:not(.active),
body.theme-night .chip:not(.active),
body.theme-night .cari-tab:not(.active) {
  color: var(--text-2) !important;
}
body.theme-night .erp-btn,
body.theme-night .save-btn,
body.theme-night .primary-btn,
body.theme-night .fab {
  background: var(--accent) !important;
  color: #111111 !important;
  border-color: var(--accent) !important;
}
body.theme-night .erp-btn.secondary,
body.theme-night .secondary-btn,
body.theme-night .ghost-btn,
body.theme-night .reset-btn {
  background: var(--surface-2) !important;
  color: var(--text) !important;
  border-color: var(--border-strong) !important;
}
body.theme-night .danger-action,
body.theme-night .delete-btn,
body.theme-night .product-item-delete {
  background: rgba(255,113,113,.12) !important;
  color: var(--loss) !important;
  border-color: rgba(255,113,113,.25) !important;
}
body.theme-night .hint-box {
  background: rgba(224,190,120,.12) !important;
  color: var(--accent) !important;
}
body.theme-night .warn-box {
  background: var(--warn-bg) !important;
  color: var(--warn) !important;
}
body.theme-night .modal-backdrop,
body.theme-night #modal-root .modal-backdrop {
  background: rgba(0,0,0,.72) !important;
}
body.theme-night table,
body.theme-night th,
body.theme-night td {
  background: var(--surface) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}
body.theme-night ::selection {
  background: rgba(224,190,120,.35);
  color: var(--text);
}



/* === v23 Premium Ürün Liste + Teklif Modülü === */
.product-list-area{margin-top:12px;}
.product-list-wrap{overflow:visible;}
.product-premium-list{display:flex;flex-direction:column;gap:10px;}
.product-premium-head{display:grid;grid-template-columns:minmax(260px,2fr) 110px 110px 132px 86px 86px 185px;gap:10px;align-items:center;padding:0 14px 6px;color:var(--text-3);font-size:10px;font-weight:900;text-transform:uppercase;letter-spacing:.09em;}
.product-line{display:grid;grid-template-columns:minmax(260px,2fr) 110px 110px 132px 86px 86px 185px;gap:10px;align-items:center;padding:14px;border:1px solid var(--border);border-radius:20px;background:linear-gradient(180deg,var(--surface),var(--bg));box-shadow:0 10px 30px rgba(0,0,0,.045);position:relative;overflow:hidden;}
.product-line::before{content:'';position:absolute;left:0;top:12px;bottom:12px;width:4px;border-radius:0 999px 999px 0;background:var(--accent);opacity:.85;}
.product-line:hover{border-color:var(--border-strong);transform:translateY(-1px);box-shadow:0 16px 38px rgba(0,0,0,.07);}
.product-line-main{min-width:0;padding-left:4px;}
.product-row-title{font-size:14px;font-weight:900;letter-spacing:-.02em;line-height:1.22;color:var(--text);}
.product-row-note{font-size:11.5px;color:var(--text-2);line-height:1.35;margin-top:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.product-tags{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px;}
.product-mini-tag{display:inline-flex;align-items:center;max-width:100%;padding:5px 8px;border-radius:999px;background:var(--surface-2);border:1px solid var(--border);font-size:10.5px;font-weight:800;color:var(--text-2);}
.product-source-badge{display:inline-flex;align-items:center;padding:5px 8px;border-radius:999px;background:var(--accent-soft);color:var(--accent);font-size:10.5px;font-weight:900;}
.product-source-badge.library{background:var(--surface-2);color:var(--text-3);}
.product-price-box{min-width:0;}
.product-price-label{display:none;font-size:10px;color:var(--text-3);font-weight:800;text-transform:uppercase;letter-spacing:.06em;margin-bottom:4px;}
.product-price-value{font-size:13px;font-weight:900;color:var(--text);font-variant-numeric:tabular-nums;white-space:nowrap;}
.product-price-value.suggested-cell{color:var(--profit);font-size:14px;}
.product-stock-pill{display:inline-flex;align-items:center;justify-content:center;min-width:48px;padding:7px 10px;border-radius:999px;background:var(--surface-2);border:1px solid var(--border);font-weight:900;font-size:12px;color:var(--text);}
.product-actions-cell{display:flex;gap:6px;justify-content:flex-end;flex-wrap:wrap;}
.product-row-btn{border:1px solid var(--border-strong);background:var(--surface);color:var(--text);padding:8px 10px;border-radius:999px;font-size:11.5px;font-weight:900;white-space:nowrap;}
.product-row-btn.primary{background:var(--accent);border-color:var(--accent);color:var(--bg);}
.product-row-btn.secondary{background:var(--surface-2);}
.product-row-btn:hover{transform:translateY(-1px);}
body.theme-night .product-line{background:linear-gradient(180deg,#151A23,#0F131A);box-shadow:0 12px 34px rgba(0,0,0,.25);} 
body.theme-night .product-line:hover{box-shadow:0 18px 42px rgba(0,0,0,.35);} 
@media(max-width:980px){
  .product-premium-head{display:none;}
  .product-line{grid-template-columns:1fr 1fr;gap:12px;padding:14px 12px 14px 16px;}
  .product-line-main{grid-column:1/-1;}
  .product-price-label{display:block;}
  .product-actions-cell{grid-column:1/-1;justify-content:flex-start;}
}
@media(max-width:560px){.product-line{grid-template-columns:1fr;}.product-price-box{display:flex;align-items:center;justify-content:space-between;gap:10px}.product-price-label{display:block;margin:0}.product-actions-cell .product-row-btn{flex:1;text-align:center;}}

.quote-layout{display:grid;grid-template-columns:1.05fr .95fr;gap:14px;align-items:start;}
.quote-card{background:var(--surface);border:1px solid var(--border);border-radius:22px;padding:16px;box-shadow:0 10px 30px rgba(0,0,0,.04);}
.quote-card h3{margin:0 0 12px;font-size:15px;letter-spacing:-.01em;}
.quote-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;}
.quote-field label{display:block;font-size:11px;color:var(--text-2);font-weight:900;margin:0 0 5px;}
.quote-field input,.quote-field textarea,.quote-field select{width:100%;border:1px solid var(--border-strong);background:var(--bg);color:var(--text);border-radius:12px;padding:11px 12px;font-size:13px;}
.quote-field textarea{min-height:88px;resize:vertical;}
.quote-add-grid{display:grid;grid-template-columns:1.4fr 76px 105px 88px;gap:9px;align-items:end;}
.quote-table{display:flex;flex-direction:column;gap:8px;margin-top:10px;}
.quote-line{display:grid;grid-template-columns:1fr 70px 112px 112px 72px;gap:8px;align-items:center;padding:11px;border:1px solid var(--border);border-radius:16px;background:var(--bg);}
.quote-line-title{font-weight:900;font-size:13px;line-height:1.25;}
.quote-line-meta{font-size:11px;color:var(--text-2);margin-top:3px;}
.quote-line input{width:100%;border:1px solid var(--border);background:var(--surface);color:var(--text);border-radius:10px;padding:8px 9px;font-weight:800;font-size:12px;}
.quote-delete-btn{background:var(--loss-bg);color:var(--loss);border:1px solid rgba(255,113,113,.25);border-radius:999px;padding:8px 10px;font-weight:900;font-size:11px;}
.quote-total-box{margin-top:12px;border-radius:20px;background:linear-gradient(135deg,var(--accent),#F4D58E);color:#111;padding:16px;}
.quote-total-box .l{font-size:11px;text-transform:uppercase;letter-spacing:.09em;font-weight:900;opacity:.72;}
.quote-total-box .v{font-size:30px;font-weight:950;letter-spacing:-.04em;margin-top:3px;}
.quote-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px;}
.quote-actions .erp-btn{flex:1;min-width:140px;}
.quote-empty{padding:18px;border:1px dashed var(--border-strong);border-radius:18px;text-align:center;color:var(--text-2);font-size:13px;}
body.theme-night .quote-card{background:#11151C;box-shadow:0 14px 38px rgba(0,0,0,.24);} body.theme-night .quote-line{background:#0D1117;} body.theme-night .quote-field input, body.theme-night .quote-field textarea, body.theme-night .quote-field select{background:#0D1117;}
@media(max-width:900px){.quote-layout{grid-template-columns:1fr}.quote-add-grid{grid-template-columns:1fr 1fr}.quote-add-grid .quote-field:first-child{grid-column:1/-1}.quote-line{grid-template-columns:1fr 72px 105px}.quote-line .quote-line-total{font-weight:900}.quote-line .quote-line-actions{grid-column:1/-1}.quote-delete-btn{width:100%;}}
@media(max-width:560px){.quote-form-grid{grid-template-columns:1fr}.quote-add-grid{grid-template-columns:1fr}.quote-line{grid-template-columns:1fr}.quote-line input{text-align:left}.quote-total-box .v{font-size:24px}.page-tabs{overflow-x:auto}.page-tab{white-space:nowrap;}}


/* v30 Professional Cari Module */
.accounts-pro-wrap{display:grid;gap:14px}
.accounts-hero{
  background:linear-gradient(135deg,rgba(26,77,46,.10),rgba(255,255,255,.72));
  border:1px solid var(--border);
  border-radius:22px;
  padding:18px;
  box-shadow:0 10px 30px rgba(16,24,40,.05);
}
.accounts-hero-top{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;flex-wrap:wrap}
.accounts-hero h2{margin:0;font-size:24px;letter-spacing:-.04em}
.accounts-hero .desc{max-width:720px}
.accounts-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.accounts-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:16px}
.accounts-kpi{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:18px;
  padding:14px;
  min-height:96px;
}
.accounts-kpi .k{font-size:10px;text-transform:uppercase;letter-spacing:.09em;color:var(--text-3);font-weight:800}
.accounts-kpi .v{font-size:20px;font-weight:900;letter-spacing:-.035em;margin-top:8px;font-variant-numeric:tabular-nums}
.accounts-kpi .s{font-size:11px;color:var(--text-2);margin-top:4px}
.accounts-filter-panel{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:20px;
  padding:12px;
}
.accounts-tabs-pro{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  background:var(--surface-2);
  border-radius:16px;
  padding:5px;
  margin-bottom:12px;
}
.accounts-tab-pro{
  border-radius:13px;
  padding:12px 14px;
  font-weight:850;
  color:var(--text-2);
  display:flex;
  justify-content:center;
  align-items:center;
  gap:8px;
}
.accounts-tab-pro.active{
  background:var(--surface);
  color:var(--text);
  box-shadow:0 2px 10px rgba(16,24,40,.08);
}
.accounts-tools{
  display:grid;
  grid-template-columns:1.5fr .8fr .8fr auto;
  gap:8px;
  align-items:center;
}
.accounts-tools input,.accounts-tools select{
  border:1px solid var(--border-strong);
  background:var(--surface);
  color:var(--text);
  border-radius:14px;
  padding:12px 13px;
  min-height:46px;
}
.accounts-list-head{
  display:grid;
  grid-template-columns:1.5fr .7fr .7fr .6fr 154px;
  gap:10px;
  align-items:center;
  padding:0 14px 8px;
  color:var(--text-3);
  font-size:10px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.accounts-list{display:grid;gap:10px}
.account-row-pro{
  display:grid;
  grid-template-columns:1.5fr .7fr .7fr .6fr 154px;
  gap:10px;
  align-items:center;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:18px;
  padding:14px;
  box-shadow:0 8px 24px rgba(16,24,40,.045);
  transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease;
}
.account-row-pro:hover{transform:translateY(-1px);border-color:var(--border-strong);box-shadow:0 12px 28px rgba(16,24,40,.07)}
.acc-main{min-width:0}
.acc-name{font-weight:900;font-size:15px;letter-spacing:-.02em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.acc-meta{display:flex;gap:6px;flex-wrap:wrap;margin-top:7px;color:var(--text-2);font-size:11.5px}
.acc-chip{
  display:inline-flex;
  align-items:center;
  gap:5px;
  border:1px solid var(--border);
  background:var(--surface-2);
  border-radius:999px;
  padding:4px 8px;
  line-height:1;
}
.acc-chip.customer{background:var(--accent-soft);color:var(--accent);border-color:rgba(26,77,46,.18)}
.acc-chip.supplier{background:var(--warn-bg);color:var(--warn);border-color:rgba(168,88,12,.18)}
.acc-cell-label{display:none}
.acc-cell .num{font-weight:900;font-variant-numeric:tabular-nums}
.acc-cell .mini{font-size:11px;color:var(--text-3);margin-top:3px}
.acc-actions-pro{display:flex;gap:6px;justify-content:flex-end;flex-wrap:wrap}
.acc-actions-pro button{
  padding:8px 10px;
  border-radius:11px;
  border:1px solid var(--border);
  background:var(--surface-2);
  font-size:12px;
  font-weight:850;
}
.acc-actions-pro button.primary{background:var(--accent);border-color:var(--accent);color:var(--bg)}
.acc-actions-pro button.danger-action{color:var(--loss);background:var(--loss-bg);border-color:rgba(181,48,48,.18)}
.acc-status-dot{width:8px;height:8px;border-radius:50%;display:inline-block;background:var(--text-3)}
.acc-status-dot.pos{background:var(--profit)}
.acc-status-dot.neg{background:var(--loss)}
.acc-status-dot.zero{background:var(--text-3)}
.accounts-mini-summary{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:10px;color:var(--text-2);font-size:12px}
.accounts-mini-summary strong{color:var(--text)}
.account-detail-head{
  border:1px solid var(--border);
  background:linear-gradient(135deg,var(--surface),var(--surface-2));
  border-radius:18px;
  padding:14px;
  margin-bottom:12px;
}
.account-detail-top{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}
.account-detail-title{font-size:20px;font-weight:950;letter-spacing:-.04em}
.account-detail-balance{text-align:right}
.account-detail-balance .big{font-size:24px;font-weight:950;font-variant-numeric:tabular-nums;letter-spacing:-.04em}
.account-info-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:12px 0}
.account-info-box{border:1px solid var(--border);background:var(--surface);border-radius:14px;padding:10px}
.account-info-box .l{font-size:9.5px;text-transform:uppercase;letter-spacing:.08em;color:var(--text-3);font-weight:850}
.account-info-box .v{font-size:12.5px;font-weight:800;margin-top:4px;word-break:break-word}
.statement-table{border:1px solid var(--border);border-radius:16px;overflow:hidden;margin-top:12px}
.statement-row{display:grid;grid-template-columns:90px 1fr 100px 100px 110px 30px;gap:8px;align-items:center;padding:9px 10px;border-bottom:1px solid var(--border);font-size:12px}
.statement-row.head{background:var(--surface-2);font-size:9.5px;text-transform:uppercase;letter-spacing:.07em;color:var(--text-3);font-weight:900}
.statement-row:last-child{border-bottom:none}
.statement-row .right{text-align:right;font-variant-numeric:tabular-nums}
.account-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.account-form-grid .full{grid-column:1/-1}
.account-form-section{
  margin-top:12px;
  padding-top:12px;
  border-top:1px solid var(--border);
}
.account-form-section-title{
  font-size:11px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.09em;
  color:var(--text-3);
  margin-bottom:8px;
}
@media(max-width:760px){
  .accounts-kpi-grid{grid-template-columns:1fr 1fr}
  .accounts-tools{grid-template-columns:1fr}
  .accounts-list-head{display:none}
  .account-row-pro{grid-template-columns:1fr;gap:9px}
  .acc-cell{display:flex;justify-content:space-between;gap:12px;border-top:1px solid var(--border);padding-top:8px}
  .acc-cell-label{display:block;color:var(--text-3);font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.06em}
  .acc-actions-pro{justify-content:flex-start}
  .account-info-grid{grid-template-columns:1fr 1fr}
  .statement-row{grid-template-columns:70px 1fr;gap:6px}
  .statement-row.head{display:none}
  .statement-row .right{text-align:left}
  .statement-row > div:nth-child(3)::before{content:'Borç: ';color:var(--text-3);font-weight:700}
  .statement-row > div:nth-child(4)::before{content:'Ödeme: ';color:var(--text-3);font-weight:700}
  .statement-row > div:nth-child(5)::before{content:'Bakiye: ';color:var(--text-3);font-weight:700}
  .statement-row > div:nth-child(6){position:absolute;right:14px}
  .account-form-grid{grid-template-columns:1fr}
}
body.theme-night .accounts-hero{background:linear-gradient(135deg,rgba(120,180,130,.10),rgba(20,20,20,.72))!important}
body.theme-night .accounts-filter-panel,
body.theme-night .accounts-kpi,
body.theme-night .account-row-pro,
body.theme-night .account-info-box{background:var(--surface)!important}
body.theme-night .accounts-tab-pro.active{background:var(--surface)!important}
body.theme-night .acc-chip{background:var(--surface-2)!important}


.n11-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.n11-panel{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-md);padding:16px;box-shadow:var(--shadow-sm)}.n11-panel h3{font-size:15px;margin:0 0 10px}.n11-row{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:10px}.n11-row label,.n11-field label{font-size:11px;font-weight:700;color:var(--text-2);text-transform:uppercase;letter-spacing:.06em;margin-bottom:5px;display:block}.n11-row input,.n11-row select,.n11-field input,.n11-field select{width:100%;background:var(--surface-2);border:1px solid var(--line);border-radius:10px;padding:11px;color:var(--text);font-size:14px}.n11-status{font-size:12px;color:var(--text-2);line-height:1.45}.n11-order{border:1px solid var(--line);background:var(--surface);border-radius:14px;padding:12px;margin:10px 0}.n11-order-top{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}.n11-order-title{font-weight:800}.n11-order-sub{font-size:12px;color:var(--text-2);margin-top:3px}.n11-badge{display:inline-flex;align-items:center;border-radius:999px;padding:4px 8px;background:var(--accent-soft);color:var(--accent);font-size:11px;font-weight:800}.n11-lines{margin-top:10px;border-top:1px dashed var(--line);padding-top:8px}.n11-line{display:grid;grid-template-columns:1fr auto;gap:8px;font-size:12px;padding:5px 0}.n11-import-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:12px 0}.n11-mini{background:var(--surface-2);border:1px solid var(--line);border-radius:12px;padding:10px}.n11-mini span{display:block;font-size:10px;color:var(--text-2);text-transform:uppercase;letter-spacing:.06em;font-weight:800}.n11-mini strong{display:block;margin-top:4px;font-size:16px}@media(max-width:680px){.n11-grid,.n11-row{grid-template-columns:1fr}.n11-import-summary{grid-template-columns:1fr}.n11-order-top{flex-direction:column}.n11-line{grid-template-columns:1fr}}


/* === yalin-tabbar-v2-css === */
  /* Eski üst sekme barını gizle (JS bozulmasın diye DOM'da kalıyor) */
  .page-tabs { display: none !important; }

  /* Main'in altında bottom tab bar için boşluk */
  main { padding-bottom: calc(var(--safe-bottom) + 96px) !important; }

  /* Yeni alt sticky tab bar */
  .bottom-tabbar {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    background: rgba(250, 250, 247, 0.95);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-top: 0.5px solid var(--border);
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    padding: 4px 4px max(4px, calc(var(--safe-bottom) - 10px));
    z-index: 90;
  }
  .bottom-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 6px 4px 2px;
    border: none;
    background: none;
    color: var(--text-3);
    font-size: 10.5px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 10px;
    transition: color .15s;
    -webkit-tap-highlight-color: transparent;
  }
  .bottom-tab svg { width: 22px; height: 22px; stroke-width: 1.8; }
  .bottom-tab.active { color: var(--accent); }
  .bottom-tab .label { letter-spacing: 0.01em; }

  /* "Daha" bottom sheet */
  .ms-backdrop {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s;
    z-index: 100;
  }
  .ms-backdrop.open { opacity: 1; pointer-events: all; }
  .ms-sheet {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    background: var(--surface);
    border-radius: 18px 18px 0 0;
    padding: 8px 16px calc(var(--safe-bottom) + 22px);
    transform: translateY(100%);
    transition: transform .28s ease-out;
    z-index: 101;
    max-height: 80vh;
    overflow-y: auto;
  }
  .ms-sheet.open { transform: translateY(0); }
  .ms-handle {
    width: 38px; height: 4px;
    background: var(--border-strong);
    border-radius: 2px;
    margin: 6px auto 14px;
  }
  .ms-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-2);
    font-weight: 600;
    padding: 0 4px 10px;
  }
  .ms-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 8px;
    border: none;
    border-bottom: 0.5px solid var(--border);
    background: none;
    width: 100%;
    cursor: pointer;
    text-align: left;
    color: inherit;
  }
  .ms-item:last-child { border-bottom: none; }
  .ms-item:active { background: var(--surface-2); }
  .ms-item svg {
    width: 22px; height: 22px;
    color: var(--text-2);
    stroke-width: 1.8;
    flex-shrink: 0;
  }
  .ms-item .ms-label { flex: 1; font-size: 15px; font-weight: 500; color: var(--text); }
  .ms-item .ms-chev { color: var(--text-3); font-size: 22px; font-weight: 300; line-height: 1; }

  /* ========== HESAP DASHBOARD ========== */
  #hesap-dash-wrap { padding: 4px 2px 32px; }
  .hd-greet {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; padding: 6px 4px 18px;
  }
  .hd-title {
    font-size: 24px; font-weight: 500; margin: 0;
    letter-spacing: -0.01em; line-height: 1.1; color: var(--text);
  }
  .hd-title em {
    font-style: italic; font-weight: 400;
    color: var(--accent); font-family: var(--font-serif, ui-serif, Georgia, serif);
  }
  .hd-sub {
    font-size: 12.5px; color: var(--text-2); margin-top: 4px;
    font-weight: 500;
  }
  .hd-rate {
    display: flex; flex-direction: column; align-items: flex-end;
    gap: 1px; padding: 8px 14px; border-radius: 12px;
    background: var(--surface); border: 0.5px solid var(--border);
    cursor: pointer; -webkit-tap-highlight-color: transparent;
  }
  .hd-rate-l {
    font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--text-3); font-weight: 600;
  }
  .hd-rate-v {
    font-size: 16px; font-weight: 600;
    font-variant-numeric: tabular-nums; color: var(--text);
  }
  .hd-stats {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
    margin-bottom: 24px;
  }
  .hd-stat {
    background: var(--surface); border: 0.5px solid var(--border);
    border-radius: 14px; padding: 14px 16px;
    text-align: left; cursor: default;
  }
  button.hd-stat { cursor: pointer; -webkit-tap-highlight-color: transparent; font-family: inherit; }
  .hd-stat-l {
    font-size: 10.5px; color: var(--text-3); text-transform: uppercase;
    letter-spacing: 0.07em; font-weight: 600; margin-bottom: 6px;
  }
  .hd-stat-v {
    font-size: 21px; font-weight: 600;
    font-variant-numeric: tabular-nums; line-height: 1.1;
    color: var(--text); letter-spacing: -0.01em;
  }
  .hd-stat.profit .hd-stat-v { color: var(--accent); }
  .hd-stat.profit .hd-stat-v.loss { color: var(--loss, #b53030); }
  .hd-stat-s {
    font-size: 11.5px; color: var(--text-2); margin-top: 4px;
    font-variant-numeric: tabular-nums; font-weight: 500;
  }
  .hd-section {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 4px 10px; margin-top: 4px;
  }
  .hd-section > span {
    font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--text-3); font-weight: 600;
  }
  .hd-filter {
    background: none; border: none; cursor: pointer;
    font-size: 12px; color: var(--accent); font-weight: 600;
    padding: 4px 8px; -webkit-tap-highlight-color: transparent;
  }
  .hd-list {
    background: var(--surface); border: 0.5px solid var(--border);
    border-radius: 14px; overflow: hidden;
  }
  .hd-row {
    display: flex; align-items: center; gap: 11px;
    padding: 13px 14px; width: 100%;
    background: none; border: none; cursor: pointer;
    border-bottom: 0.5px solid var(--border);
    text-align: left; -webkit-tap-highlight-color: transparent;
    font-family: inherit; color: inherit;
  }
  .hd-row:last-child { border-bottom: none; }
  .hd-row:active { background: var(--surface-2); }
  .hd-mp { width: 5px; height: 34px; border-radius: 3px; flex-shrink: 0; background: var(--text-3); }
  .hd-mp-n11 { background: #951E68; }
  .hd-mp-ty, .hd-mp-trendyol { background: #F27A1A; }
  .hd-mp-hb, .hd-mp-hepsiburada { background: #FF6000; }
  .hd-mp-bayi { background: #C75D2D; }
  .hd-row-main { flex: 1; min-width: 0; }
  .hd-row-name {
    font-size: 14px; font-weight: 500;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    color: var(--text);
  }
  .hd-row-meta {
    font-size: 11.5px; color: var(--text-2); margin-top: 2px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    font-weight: 500;
  }
  .hd-row-amt { text-align: right; flex-shrink: 0; }
  .hd-row-amt b {
    font-size: 14px; font-weight: 600;
    font-variant-numeric: tabular-nums; display: block; color: var(--text);
  }
  .hd-row-amt .p {
    font-size: 11.5px; color: var(--accent); font-weight: 600;
    font-variant-numeric: tabular-nums; margin-top: 2px;
  }
  .hd-row-amt .l {
    font-size: 11.5px; color: var(--loss, #b53030); font-weight: 600;
    font-variant-numeric: tabular-nums; margin-top: 2px;
  }
  .hd-empty {
    padding: 28px 16px; text-align: center;
    color: var(--text-3); font-size: 13px;
  }
  .hd-fab {
    position: fixed; right: 18px;
    bottom: calc(var(--safe-bottom) + 92px);
    z-index: 80;
    display: flex; align-items: center; gap: 8px;
    padding: 13px 18px 13px 15px;
    background: var(--accent); color: var(--bg, #fff);
    border: none; border-radius: 999px;
    font-size: 14.5px; font-weight: 600;
    cursor: pointer; -webkit-tap-highlight-color: transparent;
    box-shadow: 0 6px 20px rgba(0,0,0,0.18), 0 2px 4px rgba(0,0,0,0.08);
    font-family: inherit;
  }
  .hd-fab svg { width: 20px; height: 20px; }
  .hd-fab:active { transform: scale(0.96); }
  .hd-back {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 10px 6px 6px; margin-bottom: 12px;
    background: none; border: none; cursor: pointer;
    color: var(--text-2); font-size: 13.5px; font-weight: 500;
    border-radius: 8px; font-family: inherit;
    -webkit-tap-highlight-color: transparent;
  }
  .hd-back:active { background: var(--surface-2); }
  .hd-back svg { width: 18px; height: 18px; }

  /* Hesap sayfasında alttaki yapışkan FAB için boşluk */
  #page-hesap.active { padding-bottom: 8px; }

/* === yalin-sales-v3-css === */
  /* Satış sayfası — yalın */
  #page-sales.active { padding-bottom: 8px; }

  .sd-top {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px; padding: 4px 4px 14px;
  }
  .sd-period {
    display: inline-flex; background: var(--surface-2);
    border-radius: 10px; padding: 3px;
    border: 0.5px solid var(--border);
  }
  .sd-period-btn {
    border: none; background: none;
    padding: 7px 11px; font-size: 12.5px; font-weight: 600;
    color: var(--text-2); cursor: pointer; border-radius: 8px;
    font-family: inherit; -webkit-tap-highlight-color: transparent;
    transition: background .15s, color .15s;
    font-variant-numeric: tabular-nums;
  }
  .sd-period-btn.active {
    background: var(--surface); color: var(--text);
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  }
  .sd-ecom-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 12px; border-radius: 10px;
    background: var(--surface); border: 0.5px solid var(--border);
    font-size: 12.5px; font-weight: 600; color: var(--text-2);
    cursor: pointer; font-family: inherit;
    -webkit-tap-highlight-color: transparent;
    white-space: nowrap;
  }
  .sd-ecom-btn svg { width: 16px; height: 16px; }

  .sd-hero {
    background: var(--surface); border: 0.5px solid var(--border);
    border-radius: 16px; padding: 18px 18px 20px;
    margin-bottom: 12px;
  }
  .sd-hero-l {
    font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--text-3); font-weight: 600; margin-bottom: 8px;
  }
  .sd-hero-v {
    font-size: 32px; font-weight: 600;
    font-variant-numeric: tabular-nums; line-height: 1.05;
    letter-spacing: -0.02em; color: var(--accent);
  }
  .sd-hero-v.loss { color: var(--loss, #b53030); }
  .sd-hero-s {
    font-size: 12.5px; color: var(--text-2); margin-top: 8px;
    font-variant-numeric: tabular-nums; font-weight: 500;
  }
  .sd-mini {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
    margin-bottom: 22px;
  }
  .sd-mini-card {
    background: var(--surface); border: 0.5px solid var(--border);
    border-radius: 14px; padding: 12px 14px;
  }
  .sd-mini-l {
    font-size: 10.5px; color: var(--text-3); text-transform: uppercase;
    letter-spacing: 0.07em; font-weight: 600; margin-bottom: 5px;
  }
  .sd-mini-v {
    font-size: 18px; font-weight: 600;
    font-variant-numeric: tabular-nums; line-height: 1.1;
    color: var(--text);
  }
  .sd-mini-s {
    font-size: 11px; color: var(--text-2); margin-top: 3px;
    font-variant-numeric: tabular-nums; font-weight: 500;
  }

  .sd-card {
    background: var(--surface); border: 0.5px solid var(--border);
    border-radius: 14px; overflow: hidden; margin-bottom: 14px;
  }
  .sd-card-hd {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 14px; cursor: pointer;
    border: none; background: none; width: 100%;
    font-family: inherit; -webkit-tap-highlight-color: transparent;
    text-align: left; color: inherit;
  }
  .sd-card-hd-l {
    font-size: 13px; font-weight: 600; color: var(--text);
    display: flex; align-items: center; gap: 8px;
  }
  .sd-card-hd-l .badge {
    font-size: 10px; padding: 2px 7px; border-radius: 999px;
    background: var(--surface-2); color: var(--text-2);
    font-weight: 600;
  }
  .sd-card-hd-r {
    display: flex; align-items: center; gap: 6px;
    color: var(--text-3);
  }
  .sd-card-hd-r svg { width: 18px; height: 18px; transition: transform .2s; }
  .sd-card.collapsed .sd-card-hd-r svg { transform: rotate(-90deg); }
  .sd-card-body { padding: 0 14px 14px; }
  .sd-card.collapsed .sd-card-body { display: none; }

  /* Pazaryeri satırları */
  .sd-mp-row {
    display: flex; align-items: center; gap: 11px;
    padding: 10px 0; border-bottom: 0.5px solid var(--border);
  }
  .sd-mp-row:last-child { border-bottom: none; }
  .sd-mp-bar {
    width: 5px; height: 32px; border-radius: 3px;
    flex-shrink: 0; background: var(--text-3);
  }
  .sd-mp-bar.n11 { background: #951E68; }
  .sd-mp-bar.ty, .sd-mp-bar.trendyol { background: #F27A1A; }
  .sd-mp-bar.hb, .sd-mp-bar.hepsiburada { background: #FF6000; }
  .sd-mp-bar.bayi { background: #C75D2D; }
  .sd-mp-info { flex: 1; min-width: 0; }
  .sd-mp-name { font-size: 13.5px; font-weight: 500; color: var(--text); }
  .sd-mp-meta {
    font-size: 11.5px; color: var(--text-2); margin-top: 2px;
    font-variant-numeric: tabular-nums; font-weight: 500;
  }
  .sd-mp-fig { text-align: right; }
  .sd-mp-fig b {
    font-size: 13.5px; font-weight: 600;
    font-variant-numeric: tabular-nums; display: block;
    color: var(--text);
  }
  .sd-mp-fig small {
    font-size: 11px; color: var(--text-3);
    font-variant-numeric: tabular-nums; font-weight: 600;
  }

  /* Top products / segment */
  .sd-seg {
    display: inline-flex; background: var(--surface-2);
    border-radius: 8px; padding: 2px; margin-bottom: 10px;
    border: 0.5px solid var(--border);
  }
  .sd-seg-btn {
    border: none; background: none;
    padding: 5px 10px; font-size: 11.5px; font-weight: 600;
    color: var(--text-2); cursor: pointer; border-radius: 6px;
    font-family: inherit; -webkit-tap-highlight-color: transparent;
  }
  .sd-seg-btn.active {
    background: var(--surface); color: var(--text);
  }
  .sd-tp-row {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 0; border-bottom: 0.5px solid var(--border);
    cursor: pointer; -webkit-tap-highlight-color: transparent;
  }
  .sd-tp-row:last-child { border-bottom: none; }
  .sd-tp-row:active { opacity: 0.7; }
  .sd-tp-rank {
    width: 22px; height: 22px; border-radius: 50%;
    background: var(--surface-2); color: var(--text-2);
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 600; flex-shrink: 0;
  }
  .sd-tp-row:nth-child(1) .sd-tp-rank,
  .sd-tp-row[data-rank="1"] .sd-tp-rank {
    background: var(--accent); color: var(--bg, #fff);
  }
  .sd-tp-name {
    flex: 1; font-size: 13px; font-weight: 500; color: var(--text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .sd-tp-fig { text-align: right; }
  .sd-tp-fig b {
    font-size: 13px; font-weight: 600;
    font-variant-numeric: tabular-nums; display: block;
  }
  .sd-tp-fig b.profit { color: var(--accent); }
  .sd-tp-fig small {
    font-size: 11px; color: var(--text-3);
    font-variant-numeric: tabular-nums; font-weight: 500;
  }

  /* Section header */
  .sd-section {
    display: flex; align-items: center; justify-content: space-between;
    padding: 6px 4px 10px; margin-top: 18px;
  }
  .sd-section > span {
    font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--text-3); font-weight: 600;
  }

  /* Günlere göre liste */
  .sd-day {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 4px 6px; font-size: 11px;
    text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--text-3); font-weight: 600;
  }
  .sd-day strong {
    font-size: 12.5px; font-weight: 600; color: var(--text);
    font-variant-numeric: tabular-nums; text-transform: none; letter-spacing: 0;
  }

  /* Loss alert (kayıp uyarısı) */
  .sd-loss-alert {
    background: rgba(181, 48, 48, 0.06);
    border: 0.5px solid rgba(181, 48, 48, 0.2);
    border-radius: 12px; padding: 12px 14px;
    margin-bottom: 14px;
    display: flex; gap: 10px; align-items: flex-start;
  }
  .sd-loss-alert svg {
    width: 18px; height: 18px; flex-shrink: 0;
    color: var(--loss, #b53030); margin-top: 1px;
  }
  .sd-loss-alert > div { flex: 1; min-width: 0; }
  .sd-loss-alert-t {
    font-size: 12.5px; font-weight: 600; color: var(--loss, #b53030);
    margin-bottom: 4px;
  }
  .sd-loss-alert-d {
    font-size: 11.5px; color: var(--text-2); line-height: 1.4;
  }
  .sd-loss-alert button {
    margin-top: 6px; background: none; border: none;
    color: var(--loss, #b53030); font-size: 11.5px; font-weight: 600;
    cursor: pointer; padding: 0; font-family: inherit;
    -webkit-tap-highlight-color: transparent;
  }

  /* Empty state */
  .sd-empty {
    background: var(--surface); border: 0.5px solid var(--border);
    border-radius: 14px; padding: 28px 16px;
    text-align: center;
  }
  .sd-empty-t {
    font-size: 14px; font-weight: 600; color: var(--text);
    margin-bottom: 6px;
  }
  .sd-empty-d {
    font-size: 12.5px; color: var(--text-2);
    line-height: 1.5;
  }

  /* FAB */
  .sd-fab {
    position: fixed; right: 18px;
    bottom: calc(var(--safe-bottom) + 92px);
    z-index: 80;
    display: flex; align-items: center; gap: 7px;
    padding: 13px 18px 13px 14px;
    background: var(--accent); color: var(--bg, #fff);
    border: none; border-radius: 999px;
    font-size: 14.5px; font-weight: 600;
    cursor: pointer; -webkit-tap-highlight-color: transparent;
    box-shadow: 0 6px 20px rgba(0,0,0,0.18), 0 2px 4px rgba(0,0,0,0.08);
    font-family: inherit;
  }
  .sd-fab svg { width: 20px; height: 20px; }
  .sd-fab:active { transform: scale(0.96); }

  /* Satış satırı (Hesap dashboard'undan uyarlama) */
  .sd-sale-row {
    display: flex; align-items: center; gap: 11px;
    padding: 13px 14px; width: 100%;
    background: var(--surface); border: 0.5px solid var(--border);
    border-radius: 14px; margin-bottom: 6px;
    cursor: pointer; -webkit-tap-highlight-color: transparent;
    text-align: left; font-family: inherit; color: inherit;
  }
  .sd-sale-row:active { opacity: 0.85; }
  .sd-sale-mp {
    width: 5px; height: 34px; border-radius: 3px;
    flex-shrink: 0; background: var(--text-3);
  }
  .sd-sale-mp.n11 { background: #951E68; }
  .sd-sale-mp.ty, .sd-sale-mp.trendyol { background: #F27A1A; }
  .sd-sale-mp.hb, .sd-sale-mp.hepsiburada { background: #FF6000; }
  .sd-sale-mp.bayi { background: #C75D2D; }
  .sd-sale-main { flex: 1; min-width: 0; }
  .sd-sale-name {
    font-size: 13.5px; font-weight: 500; color: var(--text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .sd-sale-meta {
    font-size: 11.5px; color: var(--text-2); margin-top: 2px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    font-weight: 500;
  }
  .sd-sale-status {
    display: inline-block; font-size: 10px; padding: 1px 6px;
    border-radius: 999px; font-weight: 600; margin-left: 4px;
    background: rgba(181,48,48,0.1); color: var(--loss, #b53030);
    text-transform: uppercase; letter-spacing: 0.04em;
  }
  .sd-sale-fig { text-align: right; flex-shrink: 0; }
  .sd-sale-fig b {
    font-size: 13.5px; font-weight: 600;
    font-variant-numeric: tabular-nums; display: block;
  }
  .sd-sale-fig .p {
    font-size: 11.5px; color: var(--accent); font-weight: 600;
    font-variant-numeric: tabular-nums; margin-top: 2px;
  }
  .sd-sale-fig .l {
    font-size: 11.5px; color: var(--loss, #b53030); font-weight: 600;
    font-variant-numeric: tabular-nums; margin-top: 2px;
  }

/* === v45-bottom-tabs === */
.page-tabs {
  position: fixed !important;
  top: auto !important;
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  gap: 0;
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-top: 0.5px solid var(--border);
  border-bottom: none;
  padding: 6px 6px calc(var(--safe-bottom, 0px) + 8px);
  overflow: visible;
}
.page-tab {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 8px 4px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text-3);
  border-radius: 10px;
  position: relative;
  white-space: nowrap;
  background: transparent;
}
.page-tab svg { width: 22px; height: 22px; margin: 0 0 1px; vertical-align: baseline; stroke-width: 1.75; }
.page-tab .lbl { line-height: 1; }
.page-tab.active { color: var(--accent); }
.page-tab.active::after { display: none !important; }
.page-tab .count {
  position: absolute; top: 4px; right: calc(50% - 22px);
  background: var(--loss); color: #fff;
  font-size: 9.5px; font-weight: 800;
  min-width: 16px; height: 16px; padding: 0 5px;
  border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  line-height: 1; margin: 0;
}
.page-tab.active .count { background: var(--accent); }
.page-tab.in-more { display: none !important; }
main { padding-bottom: calc(var(--safe-bottom, 0px) + 86px) !important; }
@media (max-width: 560px) {
  .page-tabs { overflow-x: visible; }
  .page-tab { white-space: nowrap; }
}
body.theme-night .page-tabs {
  background: rgba(20, 20, 22, 0.94) !important;
  border-top-color: var(--border) !important;
}
body.theme-night .page-tab,
body.theme-night .page-tab:not(.active),
body.theme-night .page-tab.active {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}
body.theme-night .page-tab:not(.active) { color: var(--text-3) !important; }
body.theme-night .page-tab.active { color: var(--accent) !important; }

.sheet-overlay {
  position: fixed; inset: 0;
  background: rgba(10, 10, 10, 0.32);
  z-index: 90;
  display: none;
  align-items: flex-end;
  justify-content: center;
}
.sheet-overlay.open { display: flex; animation: v45-fade .18s ease-out; }
@keyframes v45-fade { from { opacity: 0; } to { opacity: 1; } }
.sheet {
  width: 100%;
  max-width: 720px;
  background: var(--surface);
  border-radius: 22px 22px 0 0;
  padding: 8px 14px calc(var(--safe-bottom, 0px) + 18px);
  max-height: 80vh;
  overflow-y: auto;
  transform: translateY(100%);
  animation: v45-up .26s cubic-bezier(.25,.85,.35,1) forwards;
}
@keyframes v45-up { to { transform: translateY(0); } }
.sheet-handle {
  width: 40px; height: 4px;
  background: var(--border-strong);
  border-radius: 999px;
  margin: 6px auto 14px;
}
.sheet-title {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-2); font-weight: 700; padding: 0 6px 12px;
}
.sheet-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.sheet-item {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px 6px; border-radius: 14px;
  font-size: 11.5px; font-weight: 600; color: var(--text);
  text-align: center; background: transparent; border: none; cursor: pointer;
}
.sheet-item:active { background: var(--surface-2); }
.sheet-ic {
  width: 44px; height: 44px; border-radius: 14px;
  background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
}
.sheet-ic svg { width: 20px; height: 20px; stroke-width: 1.75; }
.sheet-item .lbl { line-height: 1.2; }
body.theme-night .sheet { background: var(--surface-2); }
body.theme-night .sheet-ic { background: rgba(255,255,255,0.06); color: var(--accent); }

/* === yalin-detail-v4-css === */
  .yd-backdrop {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.45);
    -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
    opacity: 0; pointer-events: none;
    transition: opacity .22s;
    z-index: 1000;
  }
  .yd-backdrop.open { opacity: 1; pointer-events: all; }
  .yd-sheet {
    position: fixed; left: 0; right: 0; bottom: 0;
    background: var(--surface, #fff);
    border-radius: 18px 18px 0 0;
    transform: translateY(100%);
    transition: transform .28s cubic-bezier(.2, .8, .2, 1);
    z-index: 1001;
    display: flex; flex-direction: column;
    max-height: 92vh;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.12);
  }
  .yd-sheet.open { transform: translateY(0); }
  .yd-handle {
    width: 38px; height: 4px;
    background: var(--border-strong, #d4d2c8);
    border-radius: 2px;
    margin: 8px auto 4px;
    flex-shrink: 0;
  }
  .yd-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 14px 12px;
    flex-shrink: 0;
  }
  .yd-header h2 {
    margin: 0; font-size: 16px; font-weight: 600;
    color: var(--text, #0a0a0a); letter-spacing: -0.005em;
  }
  .yd-header h2 small {
    display: block; font-size: 11px; font-weight: 500;
    color: var(--text-2); margin-top: 2px;
    text-transform: uppercase; letter-spacing: 0.06em;
  }
  .yd-close {
    background: none; border: none; cursor: pointer;
    width: 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-2); font-size: 22px; font-weight: 300;
    -webkit-tap-highlight-color: transparent; font-family: inherit;
  }
  .yd-close:active { background: var(--surface-2); }

  .yd-body {
    flex: 1; overflow-y: auto;
    padding: 0 14px 14px;
    -webkit-overflow-scrolling: touch;
  }

  .yd-cust {
    background: var(--surface-2, #f4f2ec);
    border-radius: 14px; padding: 14px;
    margin-bottom: 12px;
  }
  .yd-cust-top {
    display: flex; align-items: center; gap: 12px;
  }
  .yd-avatar {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--accent-soft, rgba(26, 77, 46, 0.12));
    color: var(--accent, #1A4D2E);
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 600;
    flex-shrink: 0;
  }
  .yd-cust-main { flex: 1; min-width: 0; }
  .yd-cust-name {
    font-size: 14.5px; font-weight: 600; color: var(--text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .yd-cust-sub {
    font-size: 12px; color: var(--text-2); margin-top: 2px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    font-weight: 500;
  }
  .yd-pills {
    display: flex; gap: 5px; margin-top: 10px; flex-wrap: wrap;
  }
  .yd-pill {
    font-size: 10.5px; padding: 3px 9px; border-radius: 999px;
    font-weight: 600; letter-spacing: 0.02em;
    text-transform: uppercase;
    background: var(--surface); color: var(--text-2);
    border: 0.5px solid var(--border);
  }
  .yd-pill.n11 { background: rgba(149, 30, 104, 0.12); color: #951E68; border-color: transparent; }
  .yd-pill.ty, .yd-pill.trendyol { background: rgba(242, 122, 26, 0.15); color: #c45e10; border-color: transparent; }
  .yd-pill.hb, .yd-pill.hepsiburada { background: rgba(255, 96, 0, 0.13); color: #d44e00; border-color: transparent; }
  .yd-pill.bayi { background: rgba(199, 93, 45, 0.15); color: #a04920; border-color: transparent; }
  .yd-pill.ok { background: rgba(15, 123, 63, 0.14); color: #0F7B3F; border-color: transparent; }
  .yd-pill.warn { background: rgba(181, 48, 48, 0.12); color: #b53030; border-color: transparent; }

  .yd-money {
    display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1px;
    background: var(--border, #e8e5dc);
    border-radius: 14px; overflow: hidden;
    margin-bottom: 12px;
  }
  .yd-money-cell {
    background: var(--surface);
    padding: 12px 8px; text-align: center;
  }
  .yd-money-l {
    font-size: 10px; color: var(--text-3);
    text-transform: uppercase; letter-spacing: 0.06em;
    font-weight: 600; margin-bottom: 4px;
  }
  .yd-money-v {
    font-size: 16px; font-weight: 600;
    font-variant-numeric: tabular-nums;
    line-height: 1.1; color: var(--text);
    letter-spacing: -0.01em;
  }
  .yd-money-cell.profit .yd-money-v { color: var(--accent, #0F7B3F); }
  .yd-money-cell.loss .yd-money-v { color: var(--loss, #b53030); }

  .yd-card {
    background: var(--surface);
    border: 0.5px solid var(--border);
    border-radius: 12px; overflow: hidden;
    margin-bottom: 10px;
  }
  .yd-card-hd {
    display: flex; align-items: center; justify-content: space-between;
    padding: 11px 14px;
    background: none; border: none; width: 100%;
    cursor: pointer; -webkit-tap-highlight-color: transparent;
    font-family: inherit; text-align: left; color: inherit;
  }
  .yd-card-hd-l {
    font-size: 11px; text-transform: uppercase; letter-spacing: 0.07em;
    color: var(--text-2); font-weight: 600;
  }
  .yd-card-hd-r {
    color: var(--text-3); display: flex; align-items: center; gap: 4px;
  }
  .yd-card-hd-r svg {
    width: 16px; height: 16px;
    transition: transform .2s;
  }
  .yd-card.collapsed .yd-card-hd-r svg { transform: rotate(-90deg); }
  .yd-card-body {
    padding: 2px 14px 12px;
  }
  .yd-card.collapsed .yd-card-body { display: none; }

  .yd-prod {
    display: flex; gap: 10px; align-items: flex-start;
    padding: 7px 0;
    border-bottom: 0.5px solid var(--border);
  }
  .yd-prod:last-child { border-bottom: none; }
  .yd-prod-main { flex: 1; min-width: 0; }
  .yd-prod-name {
    font-size: 12.5px; font-weight: 500; color: var(--text);
    line-height: 1.35;
  }
  .yd-prod-q {
    font-size: 11px; color: var(--text-2); margin-top: 3px;
    font-variant-numeric: tabular-nums; font-weight: 500;
  }
  .yd-prod-a {
    font-size: 12.5px; font-weight: 600; color: var(--text);
    font-variant-numeric: tabular-nums; flex-shrink: 0;
  }

  .yd-cost {
    display: flex; justify-content: space-between;
    padding: 6px 0; font-size: 12px;
  }
  .yd-cost-l { color: var(--text-2); }
  .yd-cost-r {
    color: var(--text); font-weight: 500;
    font-variant-numeric: tabular-nums;
  }
  .yd-cost.sum {
    border-top: 0.5px solid var(--border);
    margin-top: 6px; padding-top: 10px;
  }
  .yd-cost.sum .yd-cost-l {
    color: var(--text); font-weight: 600;
    text-transform: uppercase; font-size: 11px; letter-spacing: 0.05em;
  }
  .yd-cost.sum .yd-cost-r {
    color: var(--accent); font-weight: 600; font-size: 13.5px;
  }
  .yd-cost.sum .yd-cost-r.loss { color: var(--loss); }

  .yd-note {
    background: var(--surface-2);
    border-radius: 10px; padding: 10px 12px;
    font-size: 12px; color: var(--text-2);
    line-height: 1.45; margin-bottom: 12px;
  }
  .yd-note-l {
    font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em;
    font-weight: 600; color: var(--text-3); margin-bottom: 4px;
  }

  .yd-actions {
    display: flex; gap: 6px;
    padding: 10px 14px calc(var(--safe-bottom) + 12px);
    border-top: 0.5px solid var(--border);
    background: var(--surface);
    flex-shrink: 0;
  }
  .yd-btn {
    flex: 1; padding: 12px 8px;
    border-radius: 11px; font-size: 13.5px; font-weight: 600;
    text-align: center;
    display: flex; align-items: center; justify-content: center; gap: 6px;
    border: none; cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    font-family: inherit;
    transition: transform .1s;
  }
  .yd-btn:active { transform: scale(0.97); }
  .yd-btn svg { width: 16px; height: 16px; }
  .yd-btn.primary {
    background: var(--accent); color: var(--bg, #fff);
  }
  .yd-btn.secondary {
    background: var(--surface-2); color: var(--text);
    border: 0.5px solid var(--border);
  }
  .yd-btn.icon { flex: 0 0 46px; padding: 12px; }
  .yd-btn.icon svg { width: 18px; height: 18px; }

  /* Üç nokta menüsü */
  .yd-menu {
    position: absolute;
    right: 14px; bottom: calc(var(--safe-bottom) + 60px);
    background: var(--surface);
    border: 0.5px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.14);
    padding: 4px;
    z-index: 1002;
    min-width: 180px;
    opacity: 0; transform: translateY(8px);
    pointer-events: none;
    transition: opacity .18s, transform .18s;
  }
  .yd-menu.open { opacity: 1; transform: translateY(0); pointer-events: all; }
  .yd-menu button {
    display: flex; align-items: center; gap: 10px;
    width: 100%; padding: 10px 12px;
    background: none; border: none; cursor: pointer;
    text-align: left; font-family: inherit; font-size: 13px;
    color: var(--text); border-radius: 8px;
    -webkit-tap-highlight-color: transparent;
  }
  .yd-menu button:active { background: var(--surface-2); }
  .yd-menu button svg { width: 16px; height: 16px; color: var(--text-2); }
  .yd-menu button.danger { color: var(--loss, #b53030); }
  .yd-menu button.danger svg { color: var(--loss, #b53030); }

  /* Toast (kopyalama bildirimi) */
  .yd-toast {
    position: fixed; left: 50%; bottom: calc(var(--safe-bottom) + 110px);
    transform: translateX(-50%) translateY(20px);
    background: var(--text, #0a0a0a); color: var(--bg, #fff);
    padding: 10px 16px; border-radius: 999px;
    font-size: 12.5px; font-weight: 500;
    z-index: 1100;
    opacity: 0;
    transition: opacity .18s, transform .18s;
    pointer-events: none;
    white-space: nowrap;
  }
  .yd-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }


/* === v148: drive-zombileri-gizle === */
/* Supabase'e geçişten sonra Drive UI'ı yanıltıcı; setStatus/refreshDriveStatus
   stub olarak çalışıyor ama bantlar görünüyordu — CSS ile gizlendi.
   İleride drive ile ilgili JS'ler temizlenince bu blok da kaldırılır. */
#v95-status-bar,
#v132-drive-bar {
  display: none !important;
}

/* === v149-performance === */
/* Performans sayfası yeniden tasarım — hero, KPI, pazaryeri kırılımı,
   trend grafiği, hedef barı, sipariş detay sheet. */

.v149-page { padding: 12px 4px 96px; }

/* Period seçici — 4 buton segment */
.v149-period { display: flex; gap: 4px; background: var(--surface-2); border-radius: 12px; padding: 4px; margin: 0 0 14px; }
.v149-period-btn { flex: 1; padding: 8px 4px; border: none; border-radius: 8px; background: transparent; color: var(--text-2); font-size: 13px; font-weight: 700; cursor: pointer; transition: background .12s, color .12s; }
.v149-period-btn.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.12); }

/* Hero */
.v149-hero { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 20px; margin-bottom: 10px; }
.v149-hero-eyebrow { font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); margin-bottom: 6px; }
.v149-net-kar { font-family: 'Instrument Serif', serif; font-size: 44px; font-weight: 400; line-height: 1; margin-bottom: 10px; }
.v149-net-kar.profit { color: #16a34a; }
.v149-net-kar.loss { color: #8B3A3A; }
.v149-hero-sub { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--text-2); }
.v149-hero-sub span { display: flex; align-items: center; gap: 4px; }
.v149-hero-sub b { color: var(--text); font-weight: 800; }

/* 4 Mini KPI */
.v149-kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 10px; }
.v149-kpi { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; }
.v149-kpi-label { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--text-2); margin-bottom: 5px; }
.v149-kpi-value { font-size: 20px; font-weight: 900; color: var(--text); line-height: 1.1; }
.v149-kpi-value.warn { color: #b45309; }
.v149-kpi-value.muted { color: var(--text-2); font-size: 16px; }
.v149-kpi-sub { font-size: 11px; color: var(--text-2); margin-top: 3px; }

/* Hedef barı */
.v149-goal { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px; margin-bottom: 10px; }
.v149-goal-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.v149-goal-title { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--text-2); }
.v149-goal-pct { font-size: 14px; font-weight: 900; color: var(--text); }
.v149-goal-bar-track { background: var(--surface-2); border-radius: 999px; height: 8px; overflow: hidden; margin-bottom: 8px; }
.v149-goal-bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #175f30, #16a34a); transition: width .4s; }
.v149-goal-bar-fill.over { background: #16a34a; }
.v149-goal-bar-fill.behind { background: linear-gradient(90deg, #92400e, #b45309); }
.v149-goal-hint { font-size: 11px; color: var(--text-2); }

/* Pazaryeri kırılımı */
.v149-section { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 14px; margin-bottom: 10px; }
.v149-section-title { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--text-2); margin-bottom: 12px; }
.v149-mp-row { padding: 10px 0; border-bottom: 1px solid var(--border); }
.v149-mp-row:last-child { border-bottom: none; padding-bottom: 0; }
.v149-mp-top { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.v149-mp-bar-track { background: var(--surface-2); border-radius: 999px; height: 4px; margin-bottom: 8px; overflow: hidden; }
.v149-mp-bar-fill { height: 100%; border-radius: 999px; min-width: 4px; transition: width .3s; }
.v149-mp-bar-fill.n11 { background: #f97316; }
.v149-mp-bar-fill.trendyol { background: #e53e3e; }
.v149-mp-bar-fill.hepsiburada { background: #3182ce; }
.v149-mp-bar-fill.bayi { background: #16a34a; }
.v149-mp-bar-fill.other { background: #6b7280; }
.v149-mp-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.v149-mp-stat { text-align: center; }
.v149-mp-stat span { display: block; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--text-2); }
.v149-mp-stat b { display: block; font-size: 12px; font-weight: 900; color: var(--text); margin-top: 2px; white-space: nowrap; }
.v149-mp-stat b.profit { color: #16a34a; }
.v149-mp-stat b.loss { color: #8B3A3A; }

/* Pazaryeri chip renkleri */
.v149-chip { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 900; white-space: nowrap; }
.v149-chip.n11 { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
.v149-chip.trendyol { background: #fff1f2; color: #be123c; border: 1px solid #fecdd3; }
.v149-chip.hepsiburada { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.v149-chip.bayi { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.v149-chip.other { background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); }

/* Top 5 ürün */
.v149-product-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.v149-product-row:last-child { border-bottom: none; padding-bottom: 0; }
.v149-product-row:active { opacity: .65; }
.v149-product-rank { font-size: 13px; font-weight: 900; color: var(--text-2); min-width: 18px; text-align: center; }
.v149-product-info { flex: 1; min-width: 0; }
.v149-product-name { font-size: 14px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v149-product-sub { font-size: 11px; color: var(--text-2); margin-top: 2px; }
.v149-product-profit { font-size: 15px; font-weight: 900; white-space: nowrap; }
.v149-product-profit.profit { color: #16a34a; }
.v149-product-profit.loss { color: #8B3A3A; }

/* Mini trend grafiği */
.v149-chart { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 14px; margin-bottom: 10px; }
.v149-chart-title { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--text-2); margin-bottom: 10px; }
.v149-chart svg { width: 100%; display: block; overflow: visible; }

/* Sipariş detay sheet */
.v149-detail-tabs { display: flex; gap: 4px; background: var(--surface-2); border-radius: 10px; padding: 3px; margin-bottom: 14px; }
.v149-detail-tab { flex: 1; padding: 7px; border: none; border-radius: 7px; background: transparent; color: var(--text-2); font-size: 13px; font-weight: 700; cursor: pointer; transition: background .12s; }
.v149-detail-tab.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.v149-group-title { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--text-2); padding: 10px 0 5px; border-top: 1px solid var(--border); margin-top: 6px; }
.v149-group-title:first-child { border-top: none; margin-top: 0; padding-top: 0; }
.v149-line-row { display: flex; justify-content: space-between; align-items: baseline; padding: 5px 0; font-size: 13px; }
.v149-line-label { color: var(--text-2); flex: 1; }
.v149-line-label small { font-size: 10px; display: block; margin-top: 1px; color: var(--text-2); }
.v149-line-value { font-weight: 800; color: var(--text); text-align: right; }
.v149-line-value.deduction { color: #8B3A3A; }
.v149-line-value.empty { color: var(--text-2); font-weight: 400; font-style: italic; }
.v149-total-row { display: flex; justify-content: space-between; align-items: baseline; padding: 8px 0 4px; margin-top: 4px; border-top: 1.5px solid var(--border); font-size: 14px; font-weight: 900; }
.v149-net-kar-row { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 12px; background: var(--surface-2); border-radius: 10px; margin-top: 10px; font-size: 16px; font-weight: 900; }
.v149-detail-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; margin-left: auto; }
.v149-detail-badge.detailed { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.v149-detail-badge.summary { background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); }
.v149-raw-pre { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 12px; font-size: 10px; font-family: monospace; overflow-x: auto; white-space: pre-wrap; word-break: break-all; color: var(--text-2); margin: 0; max-height: 55vh; overflow-y: auto; }
.v149-tooltip-hint { font-size: 10px; color: var(--text-2); border-top: 1px solid var(--border); padding-top: 8px; margin-top: 8px; line-height: 1.5; }

/* Boş durum */
.v149-empty { padding: 32px 16px; text-align: center; color: var(--text-2); font-size: 14px; }

@media (min-width: 520px) {
  .v149-kpis { grid-template-columns: repeat(4, 1fr); }
  .v149-mp-stats { grid-template-columns: repeat(5, 1fr); }
}
.v149-kpi-value { font-variant-numeric: tabular-nums; }
.v149-net-kar   { font-variant-numeric: tabular-nums; }

/* === v150-detail-sheet === */
.v150-overlay {
  position: fixed; inset: 0; z-index: 900;
  background: rgba(0,0,0,.46);
  backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none;
  transition: opacity .22s;
}
.v150-overlay.open { opacity: 1; pointer-events: all; }
.v150-sheet {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 901;
  background: var(--surface);
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -6px 36px rgba(0,0,0,.18);
  transform: translateY(102%);
  transition: transform .28s cubic-bezier(.32,1,.6,1);
  max-height: 93vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(env(safe-area-inset-bottom,0px) + 20px);
}
.v150-sheet.open { transform: translateY(0); }
.v150-sheet-handle {
  width: 40px; height: 4px;
  background: var(--border-strong); border-radius: 999px;
  margin: 14px auto 0;
}
.v150-sheet-header {
  position: sticky; top: 0;
  background: var(--surface);
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px 12px;
  border-bottom: 1px solid var(--border);
  z-index: 1;
}
.v150-sheet-title { font-size: 15px; font-weight: 900; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v150-close-btn {
  width: 32px; height: 32px; flex-shrink: 0;
  border-radius: 50%; background: var(--surface-2);
  border: none; cursor: pointer; font-size: 15px;
  color: var(--text-2); display: flex; align-items: center; justify-content: center;
}
.v150-body { padding: 14px 16px; }
.v150-info-card {
  background: var(--surface-2); border-radius: 14px;
  padding: 12px 14px; margin-bottom: 14px; font-size: 13px;
}
.v150-info-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 3px 0; }
.v150-info-label { color: var(--text-2); flex-shrink: 0; }
.v150-info-value { font-weight: 700; color: var(--text); text-align: right; }
.v150-group { margin-bottom: 12px; }
.v150-group-header {
  font-size: 10px; font-weight: 900; text-transform: uppercase;
  letter-spacing: .1em; padding: 7px 12px;
  border-radius: 8px 8px 0 0;
}
.v150-group-header.blue  { background: #EFF4FF; color: #1F5DB8; }
.v150-group-header.grey  { background: var(--surface-2); color: var(--text-2); }
.v150-group-header.yellow{ background: #FFFBEB; color: #92400E; }
.v150-group-body {
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 12px 12px;
  overflow: hidden;
}
.v150-line {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background .1s;
}
.v150-line:last-child { border-bottom: none; }
.v150-line:active { background: var(--surface-2); }
.v150-line.no-tap { cursor: default; }
.v150-line.no-tap:active { background: none; }
.v150-line-name { flex: 1; font-size: 13px; color: var(--text-2); min-width: 0; }
.v150-line-sub  { font-size: 10px; color: var(--text-2); margin-top: 1px; }
.v150-line-right{ display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.v150-line-value{ font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text); }
.v150-line-value.deduction { color: #B53030; }
.v150-line-value.empty     { color: var(--text-2); font-weight: 400; font-style: italic; font-size: 13px; }
.v150-badge {
  display: inline-flex; align-items: center;
  padding: 2px 7px; border-radius: 999px;
  font-size: 9px; font-weight: 900; letter-spacing: .05em;
  text-transform: uppercase; white-space: nowrap; flex-shrink: 0;
}
.v150-badge.api    { background: #DCFCE7; color: #15803D; border: 1px solid #BBF7D0; }
.v150-badge.manuel { background: #DBEAFE; color: #1D4ED8; border: 1px solid #BFDBFE; }
.v150-badge.hesap  { background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); }
.v150-badge.miss   { background: #FEF2F2; color: #B91C1C; border: 1px solid #FECACA; }
.v150-divider { height: 1px; background: var(--border); margin: 0 12px; }
.v150-total-line {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 12px;
}
.v150-total-line.blue { background: #F0F5FF; }
.v150-total-name  { flex: 1; font-size: 13px; font-weight: 900; color: var(--text); }
.v150-total-value { font-size: 15px; font-weight: 900; font-variant-numeric: tabular-nums; }
.v150-total-value.blue { color: #1F5DB8; }
.v150-total-value.warn { color: #92400E; }
.v150-input-line {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; background: #F8FBFF;
  border-bottom: 1px solid var(--border);
}
.v150-input-line:last-child { border-bottom: none; }
.v150-alis-input {
  width: 96px; text-align: right;
  border: 1.5px solid #BFDBFE; border-radius: 8px;
  padding: 6px 8px; font-size: 14px; font-weight: 800;
  background: #fff; color: var(--text);
  font-variant-numeric: tabular-nums; font-family: inherit;
  flex-shrink: 0;
}
.v150-alis-input:focus { outline: none; border-color: #1F5DB8; box-shadow: 0 0 0 3px #DBEAFE; }
.v150-override-form {
  background: #F8FBFF; border: 1.5px solid #BFDBFE;
  border-radius: 10px; padding: 12px; margin: 0 12px 10px;
}
.v150-override-form label { display: block; font-size: 11px; color: var(--text-2); margin-bottom: 6px; }
.v150-override-row  { display: flex; gap: 8px; }
.v150-override-input {
  flex: 1; text-align: right;
  border: 1.5px solid #BFDBFE; border-radius: 8px;
  padding: 6px 8px; font-size: 14px; font-weight: 800;
  background: #fff; font-family: inherit;
  font-variant-numeric: tabular-nums;
}
.v150-override-input:focus { outline: none; border-color: #1F5DB8; box-shadow: 0 0 0 3px #DBEAFE; }
.v150-save-btn {
  padding: 7px 12px; border-radius: 8px;
  background: #1F5DB8; color: #fff;
  font-size: 12px; font-weight: 800; font-family: inherit;
  border: none; cursor: pointer; white-space: nowrap;
}
.v150-save-btn:active { opacity: .8; }
.v150-cancel-btn {
  padding: 7px 10px; border-radius: 8px;
  background: var(--surface-2); font-size: 12px; font-weight: 800;
  font-family: inherit; border: 1px solid var(--border); cursor: pointer;
}
.v150-hero {
  background: linear-gradient(135deg,#1A3A6B 0%,#1F5DB8 100%);
  border-radius: 18px; padding: 20px;
  margin-top: 14px; text-align: center; color: #fff;
}
.v150-hero-label { font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: .1em; opacity: .7; margin-bottom: 6px; }
.v150-hero-amount { font-size: 30px; font-weight: 900; line-height: 1.1; font-variant-numeric: tabular-nums; color: #fff; }
.v150-hero-amount.profit { color: #4ADE80; }
.v150-hero-amount.loss   { color: #FCA5A5; }
.v150-hero-sub {
  display: flex; justify-content: center; gap: 12px;
  margin-top: 10px; flex-wrap: wrap;
}
.v150-hero-sub span { font-size: 11px; opacity: .75; }
.v150-hero-sub b    { font-weight: 900; opacity: 1; }
.v150-hero-note { font-size: 10px; opacity: .45; margin-top: 8px; }
@media (min-width: 520px) {
  .v150-sheet { left: auto; right: 0; width: 420px; max-height: 100vh; top: 0; bottom: 0; border-radius: 22px 0 0 22px; transform: translateX(120%); }
  .v150-sheet.open { transform: translateX(0); }
  .v150-sheet-handle { display: none; }
}

/* v150 eşleşme uyarısı */
.v150-esl-warn {
  background: #FEF3C7; border: 1px solid #FDE68A; border-radius: 10px;
  padding: 10px 12px; margin-bottom: 4px;
  display: flex; align-items: flex-start; gap: 8px;
}
.v150-esl-warn-text { font-size: 12px; color: #92400E; flex: 1; line-height: 1.4; }
.v150-esl-btns { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.v150-esl-btn-pick {
  padding: 6px 10px; border-radius: 8px; font-size: 11px; font-weight: 800;
  background: #1F5DB8; color: #fff; border: none; cursor: pointer; font-family: inherit;
}
.v150-esl-btn-pick:active { opacity: .8; }
.v150-esl-btn-manual {
  padding: 6px 10px; border-radius: 8px; font-size: 11px; font-weight: 800;
  background: var(--surface-2); color: var(--text); border: 1px solid var(--border);
  cursor: pointer; font-family: inherit;
}

/* v150 product picker */
.v150-picker-wrap { padding: 6px 0 4px; }
.v150-picker-search {
  width: 100%; box-sizing: border-box;
  border: 1.5px solid #BFDBFE; border-radius: 8px;
  padding: 8px 10px; font-size: 13px; background: #fff;
  color: var(--text); font-family: inherit;
}
.v150-picker-search:focus { outline: none; border-color: #1F5DB8; box-shadow: 0 0 0 3px #DBEAFE; }
.v150-picker-list {
  max-height: 200px; overflow-y: auto;
  border: 1px solid var(--border); border-radius: 8px; margin-top: 6px;
}
.v150-picker-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 10px; cursor: pointer; font-size: 12px;
  border-bottom: 1px solid var(--border); transition: background .1s;
}
.v150-picker-item:last-child { border-bottom: none; }
.v150-picker-item:hover, .v150-picker-item:active { background: #EFF4FF; }
.v150-picker-item-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.v150-picker-item-price { font-weight: 800; font-variant-numeric: tabular-nums; color: #1F5DB8; flex-shrink: 0; margin-left: 8px; font-size: 13px; }

/* === v160 Sabit Giderler (Cari → 💰 Sabit Giderler sekmesi) === */
.fex-wrap { display: flex; flex-direction: column; gap: 14px; padding: 4px 0 18px; }
.fex-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.fex-kpi {
  background: var(--surface, #fff); border: 1px solid var(--border, #e5e7eb);
  border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px;
}
.fex-kpi span { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--text-2, #6b7280); }
.fex-kpi strong { font-size: 19px; font-weight: 900; color: var(--text); }
.fex-kpi small { font-size: 11px; color: var(--text-3, #9ca3af); font-weight: 600; }
.fex-toolbar { display: flex; }
.fex-add-btn { padding: 11px 18px !important; }
.fex-form {
  background: var(--surface, #fff); border: 1.5px solid var(--accent, #2563eb);
  border-radius: 16px; padding: 16px; box-shadow: 0 6px 20px rgba(0,0,0,.06); width: 100%;
}
.fex-form-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font-size: 14px; }
.fex-x { background: none; border: 1px solid var(--border, #e5e7eb); border-radius: 8px; width: 30px; height: 30px; cursor: pointer; color: var(--text-2); font-size: 18px; line-height: 1; }
.fex-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fex-form-grid label { display: flex; flex-direction: column; gap: 5px; font-size: 11px; font-weight: 800; color: var(--text-2, #6b7280); text-transform: uppercase; letter-spacing: .04em; }
.fex-form-grid .fex-full { grid-column: 1 / -1; }
.fex-form-grid input, .fex-form-grid select {
  padding: 10px 12px; border: 1px solid var(--border, #d1d5db); border-radius: 10px;
  background: var(--bg-soft, #fff); color: var(--text, #111); font-size: 14px; font-weight: 700; font-family: inherit;
}
.fex-form-actions { display: flex; gap: 8px; margin-top: 14px; }
.fex-list { display: flex; flex-direction: column; gap: 8px; }
.fex-card {
  background: var(--surface, #fff); border: 1px solid var(--border, #e5e7eb); border-radius: 14px;
  padding: 13px 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  transition: box-shadow .12s;
}
.fex-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.06); }
.fex-card.fex-inactive { opacity: .55; }
.fex-card-left { flex: 1; min-width: 0; }
.fex-card-label { font-weight: 800; font-size: 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fex-card-meta { font-size: 11.5px; color: var(--text-2, #6b7280); margin-top: 4px; font-weight: 600; line-height: 1.5; }
.fex-cat { font-size: 10px; font-weight: 900; padding: 2px 8px; border-radius: 6px; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.fex-card-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.fex-btn-row { display: flex; gap: 6px; }
.fex-btn-sm {
  padding: 6px 10px; border: 1px solid var(--border, #e5e7eb); background: var(--bg-soft, #fafafa);
  color: var(--text, #111); border-radius: 8px; font-size: 12px; font-weight: 700; cursor: pointer; transition: .12s;
}
.fex-btn-sm:hover { background: var(--surface-2, #f3f4f6); }
.fex-btn-del { color: #b91c1c; border-color: #fecaca; background: #fef2f2; }
.fex-btn-del:hover { background: #fee2e2; }
.fex-toggle { position: relative; cursor: pointer; display: inline-block; width: 38px; height: 20px; }
.fex-toggle input { opacity: 0; width: 0; height: 0; }
.fex-toggle-slot { position: absolute; inset: 0; background: #d1d5db; border-radius: 999px; transition: .15s; }
.fex-toggle-slot::before { content: ''; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; background: #fff; border-radius: 50%; transition: .15s; }
.fex-toggle input:checked + .fex-toggle-slot { background: #16a34a; }
.fex-toggle input:checked + .fex-toggle-slot::before { transform: translateX(18px); }
.fex-empty {
  text-align: center; padding: 36px 20px; color: var(--text-2, #6b7280);
  background: var(--bg-soft, #fafafa); border: 1px dashed var(--border, #e5e7eb); border-radius: 14px;
  font-size: 13px;
}
.fex-note {
  font-size: 12px; color: var(--text-2, #6b7280); padding: 10px 14px;
  background: var(--bg-soft, #f0f9ff); border-left: 3px solid var(--accent, #2563eb);
  border-radius: 8px; line-height: 1.5;
}
@media (max-width: 760px) {
  .fex-kpis { grid-template-columns: 1fr; gap: 8px; }
  .fex-form-grid { grid-template-columns: 1fr; }
  .fex-card { flex-direction: column; align-items: stretch; gap: 10px; }
  .fex-card-right { flex-direction: row; justify-content: space-between; align-items: center; }
  .fex-form-actions { flex-direction: column; }
  .fex-form-actions button { width: 100%; }
}

/* === v161 Hakediş Ekstre Yükleme modalı === */
.v161-modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 250000;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 24px 12px; overflow-y: auto; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.v161-card {
  background: var(--surface, #fff); color: var(--text, #111); border-radius: 18px;
  max-width: 720px; width: 100%; box-shadow: 0 22px 48px rgba(0,0,0,.28); overflow: hidden;
  display: flex; flex-direction: column; max-height: calc(100vh - 48px);
}
.v161-head {
  padding: 18px 22px; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
  border-bottom: 1px solid var(--border, #edf1f5);
}
.v161-eyebrow { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--text-2, #6b7280); }
.v161-head h2 { margin: 4px 0 0; font-size: 20px; font-weight: 900; }
.v161-sub { font-size: 12px; color: var(--text-2, #6b7280); margin-top: 4px; line-height: 1.5; }
.v161-x { background: none; border: 1px solid var(--border, #e5e7eb); border-radius: 10px; width: 34px; height: 34px; font-size: 20px; line-height: 1; cursor: pointer; color: var(--text-2); flex-shrink: 0; }
.v161-body { padding: 18px 22px; overflow-y: auto; flex: 1; }
.v161-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.v161-field { display: flex; flex-direction: column; gap: 5px; font-size: 11px; font-weight: 800; color: var(--text-2); text-transform: uppercase; letter-spacing: .04em; }
.v161-field select, .v161-field input[type="file"] {
  padding: 10px 12px; border: 1px solid var(--border, #d1d5db); border-radius: 10px;
  background: var(--bg-soft, #fff); color: var(--text, #111); font-size: 13px; font-weight: 700; font-family: inherit;
}
.v161-status {
  margin-top: 14px; padding: 10px 14px; border-radius: 10px;
  background: var(--bg-soft, #f9fafb); border: 1px solid var(--border, #edf1f5);
  font-size: 12px; color: var(--text); line-height: 1.5;
}
.v161-mapping { margin-top: 14px; padding: 14px; background: var(--bg-soft, #f8fafc); border: 1px solid var(--border, #e5e7eb); border-radius: 12px; }
.v161-map-title { font-weight: 900; font-size: 13px; margin-bottom: 4px; }
.v161-map-sub { font-size: 11px; color: var(--text-2); margin-bottom: 10px; }
.v161-map-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.v161-map-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 11px; font-weight: 800; color: var(--text-2); text-transform: uppercase; letter-spacing: .04em; }
.v161-map-grid select { padding: 9px 11px; border: 1px solid var(--border, #d1d5db); border-radius: 9px; background: var(--bg-soft, #fff); font-size: 12px; font-weight: 700; font-family: inherit; }
.v161-map-btn { width: 100%; }
.v161-preview { margin-top: 14px; }
.v161-prev-title { font-weight: 900; font-size: 13px; margin-bottom: 6px; }
.v161-prev-tbl { width: 100%; border-collapse: collapse; font-size: 13px; border: 1px solid var(--border, #edf1f5); border-radius: 10px; overflow: hidden; }
.v161-prev-tbl th { background: var(--bg-soft, #f8fafc); padding: 8px 11px; text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-2); }
.v161-prev-tbl td { padding: 9px 11px; border-top: 1px solid var(--border, #edf1f5); }
.v161-prev-tbl tfoot td { background: #f0fdf4; border-top: 2px solid var(--border, #e5e7eb); }
.v161-prev-note { font-size: 11px; color: var(--text-2); margin-top: 8px; line-height: 1.5; }
.v161-prev-note code { background: var(--bg-soft, #f3f4f6); padding: 1px 6px; border-radius: 4px; font-family: monospace; font-size: 10.5px; }
.v161-foot { padding: 14px 22px; display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--border, #edf1f5); background: var(--bg-soft, #fafbfc); }
@media (max-width: 760px) {
  .v161-row { grid-template-columns: 1fr; }
  .v161-map-grid { grid-template-columns: 1fr; }
  .v161-card { max-height: calc(100vh - 24px); }
  .v161-head h2 { font-size: 17px; }
  .v161-foot { flex-direction: column-reverse; }
  .v161-foot button { width: 100%; }
}

/* === v162 Ödeme Dağıtım Planlayıcı === */
.v162-modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 250000;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 24px 12px; overflow-y: auto; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.v162-card {
  background: var(--surface, #fff); color: var(--text, #111); border-radius: 18px;
  max-width: 860px; width: 100%; box-shadow: 0 22px 48px rgba(0,0,0,.28); overflow: hidden;
  display: flex; flex-direction: column; max-height: calc(100vh - 48px);
}
.v162-head {
  padding: 18px 22px; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
  border-bottom: 1px solid var(--border, #edf1f5);
}
.v162-eyebrow { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--text-2, #6b7280); }
.v162-head h2 { margin: 4px 0 0; font-size: 20px; font-weight: 900; }
.v162-sub { font-size: 12px; color: var(--text-2, #6b7280); margin-top: 4px; line-height: 1.5; }
.v162-x { background: none; border: 1px solid var(--border, #e5e7eb); border-radius: 10px; width: 34px; height: 34px; font-size: 20px; line-height: 1; cursor: pointer; color: var(--text-2); flex-shrink: 0; }
.v162-viewbar {
  display: flex; gap: 6px; padding: 12px 22px; background: var(--bg-soft, #fafbfc);
  border-bottom: 1px solid var(--border, #edf1f5);
}
.v162-vbtn {
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border, #e5e7eb);
  background: var(--surface, #fff); cursor: pointer; font-size: 12px; font-weight: 800; color: var(--text-2);
  transition: .15s;
}
.v162-vbtn.active { background: var(--accent, #2563eb); color: #fff; border-color: var(--accent, #2563eb); }
.v162-body { padding: 18px 22px; overflow-y: auto; flex: 1; }
.v162-step-head {
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
  font-weight: 900; font-size: 14px;
}
.v162-step-num {
  width: 26px; height: 26px; border-radius: 50%; background: var(--accent, #2563eb); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 900; font-size: 13px;
}
.v162-step-head small { font-weight: 600; color: var(--text-2); margin-left: 4px; font-size: 11px; }
.v162-empty {
  text-align: center; padding: 36px 20px; color: var(--text-2, #6b7280);
  background: var(--bg-soft, #fafafa); border: 1px dashed var(--border, #e5e7eb); border-radius: 14px;
  font-size: 13px; line-height: 1.6;
}
/* Step 1: settlement list */
.v162-slist { display: flex; flex-direction: column; gap: 6px; }
.v162-srow {
  display: grid; grid-template-columns: auto auto 1fr auto auto auto; gap: 10px; align-items: center;
  padding: 11px 14px; border: 1px solid var(--border, #e5e7eb); border-radius: 11px; cursor: pointer;
  background: var(--surface, #fff); transition: .12s; font-size: 13px;
}
.v162-srow input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent, #2563eb); cursor: pointer; }
.v162-srow:hover { border-color: var(--accent, #2563eb); }
.v162-srow.sel { background: #eff6ff; border-color: var(--accent, #2563eb); }
.v162-srow.used { opacity: .55; cursor: not-allowed; background: #f9fafb; }
.v162-mp { display: inline-block; padding: 3px 9px; border-radius: 5px; font-size: 10px; font-weight: 900; color: #fff; white-space: nowrap; }
.v162-sdate { font-weight: 800; }
.v162-scount { color: var(--text-2); font-size: 11.5px; }
.v162-snet { font-weight: 900; color: #16a34a; font-size: 14px; white-space: nowrap; }
.v162-used-pill { background: #dcfce7; color: #15803d; padding: 2px 8px; border-radius: 5px; font-size: 10px; font-weight: 900; }
/* Step 2: distribution */
.v162-cash-bar {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 1px solid #bbf7d0; border-radius: 12px;
  padding: 12px 16px; margin-bottom: 14px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  font-size: 13px;
}
.v162-cash-bar b { font-size: 17px; color: #15803d; }
.v162-sel-summary { display: flex; gap: 6px; flex-wrap: wrap; }
.v162-pill { background: rgba(255,255,255,.7); border: 1px solid rgba(0,0,0,.06); padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; color: var(--text); }
.v162-drows { display: flex; flex-direction: column; gap: 8px; }
.v162-drow {
  display: flex; gap: 12px; align-items: center;
  padding: 12px 14px; border: 1px solid var(--border, #e5e7eb); border-radius: 12px;
  background: var(--surface, #fff);
}
.v162-drow.v162-overdue { border-left: 4px solid #dc2626; }
.v162-drow.v162-due_this_month { border-left: 4px solid #ea580c; }
.v162-drow.v162-fixed { border-left: 4px solid #2563eb; }
.v162-drow-main { flex: 1; min-width: 0; }
.v162-drow-label { font-weight: 800; font-size: 13.5px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.v162-kind { font-size: 10px; font-weight: 900; padding: 2px 7px; border-radius: 5px; background: var(--bg-soft, #f3f4f6); color: var(--text-2); white-space: nowrap; }
.v162-drow-sub { font-size: 11.5px; color: var(--text-2, #6b7280); margin-top: 3px; font-weight: 600; }
.v162-warn { display: inline-block; margin-top: 4px; color: #d97706; font-size: 11px; font-weight: 700; }
.v162-drow-amt { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.v162-amt-lbl { font-size: 10px; color: var(--text-2); font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.v162-drow-amt input {
  width: 130px; padding: 8px 10px; border: 1px solid var(--border, #d1d5db); border-radius: 9px;
  background: var(--bg-soft, #fff); font-size: 14px; font-weight: 800; text-align: right; color: var(--text); font-family: inherit;
}
.v162-live-totals {
  margin-top: 14px; padding: 12px 16px; background: var(--bg-soft, #f8fafc);
  border: 1px solid var(--border, #edf1f5); border-radius: 12px;
  display: flex; justify-content: space-between; gap: 14px; font-size: 13px; font-weight: 800;
}
/* History */
.v162-hlist { display: flex; flex-direction: column; gap: 8px; }
.v162-hgroup { border: 1px solid var(--border, #e5e7eb); border-radius: 12px; background: var(--surface, #fff); overflow: hidden; }
.v162-hgroup summary { padding: 13px 16px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; list-style: none; }
.v162-hgroup summary::-webkit-details-marker { display: none; }
.v162-hsum-left { display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.v162-hsum-count { font-size: 11px; color: var(--text-2); font-weight: 600; }
.v162-hsum-right b { font-size: 16px; font-weight: 900; color: #16a34a; }
.v162-hgroup-body { padding: 0 16px 14px; border-top: 1px solid var(--border, #edf1f5); background: var(--bg-soft, #fafbfc); }
.v162-hg-pills, .v162-hg-dists { margin-top: 12px; font-size: 12px; }
.v162-hg-pills b, .v162-hg-dists b { display: block; margin-bottom: 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-2); }
.v162-hg-pills .v162-pill { background: #fff; }
.v162-hd-row { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; padding: 7px 10px; border-bottom: 1px solid var(--border, #edf1f5); align-items: center; font-size: 12.5px; background: #fff; }
.v162-hd-row:last-child { border-bottom: none; }
.v162-hd-row b { font-weight: 800; color: #16a34a; }
.v162-hg-actions { margin-top: 12px; display: flex; justify-content: flex-end; }
.v162-foot {
  padding: 14px 22px; display: flex; align-items: center; gap: 10px;
  border-top: 1px solid var(--border, #edf1f5); background: var(--bg-soft, #fafbfc);
}
.v162-foot-meta { font-size: 13px; color: var(--text-2); }
.v162-foot-meta b { color: var(--text); font-weight: 900; font-size: 15px; }
.v162-foot-btns { display: flex; gap: 8px; margin-left: auto; }
@media (max-width: 760px) {
  .v162-card { max-height: calc(100vh - 24px); }
  .v162-srow { grid-template-columns: auto 1fr; gap: 8px; row-gap: 6px; padding: 12px; font-size: 12.5px; }
  .v162-srow .v162-mp, .v162-srow .v162-sdate { grid-column: span 1; }
  .v162-srow .v162-scount, .v162-srow .v162-snet, .v162-srow .v162-used-pill { grid-column: 2 / -1; justify-self: end; }
  .v162-drow { flex-direction: column; align-items: stretch; }
  .v162-drow-amt { flex-direction: row; justify-content: space-between; align-items: center; }
  .v162-drow-amt input { width: 160px; }
  .v162-foot { flex-direction: column; align-items: stretch; }
  .v162-foot-meta { text-align: center; }
  .v162-foot-btns { width: 100%; }
  .v162-foot-btns button { flex: 1; }
  .v162-head h2 { font-size: 17px; }
}

/* === v162 İYİ 1: Marka bazlı dağıtım + ayarlar modal === */
.v162-head-actions { display: flex; align-items: center; gap: 6px; }
.v162-icon-btn {
  background: var(--surface-2, #f3f4f6); border: 1px solid var(--border, #e5e7eb);
  border-radius: 10px; width: 34px; height: 34px; font-size: 16px; line-height: 1;
  cursor: pointer; color: var(--text-2); transition: .12s;
}
.v162-icon-btn:hover { background: var(--accent, #2563eb); color: #fff; border-color: var(--accent, #2563eb); }

.v162-section-title {
  font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-2, #6b7280); margin: 18px 0 8px;
  padding-bottom: 6px; border-bottom: 1px solid var(--border, #edf1f5);
}
.v162-brand-list { display: flex; flex-direction: column; gap: 8px; }
.v162-brow {
  border: 1px solid var(--border, #e5e7eb); border-left: 4px solid #7c3aed;
  border-radius: 12px; background: var(--surface, #fff); padding: 12px 14px;
}
.v162-brow-unmatched { border-left-color: #d97706; background: #fffbeb; }
.v162-brow-head {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 10px;
}
.v162-brow-title { font-size: 14px; }
.v162-brow-count { color: var(--text-2); font-weight: 700; font-size: 11px; margin-left: 6px; }
.v162-brow-total { font-weight: 900; font-size: 15px; color: #16a34a; white-space: nowrap; }
.v162-brow-body { display: grid; grid-template-columns: 1fr 160px; gap: 10px; }
.v162-brow-field { display: flex; flex-direction: column; gap: 4px; font-size: 11px; font-weight: 800; color: var(--text-2); text-transform: uppercase; letter-spacing: .04em; }
.v162-brow-field select, .v162-brow-field input {
  padding: 9px 11px; border: 1px solid var(--border, #d1d5db); border-radius: 9px;
  background: var(--bg-soft, #fff); color: var(--text, #111); font-size: 13px; font-weight: 700; font-family: inherit;
}
.v162-brow-field input { text-align: right; font-size: 14px; }
.v162-brow-meta { font-size: 11.5px; color: var(--text-2); margin-top: 8px; }
.v162-brand-totals {
  margin-top: 8px; padding: 8px 12px; background: var(--bg-soft, #f8fafc);
  border-radius: 8px; font-size: 12px; font-weight: 800; color: var(--text);
  display: flex; justify-content: flex-end;
}
.v162-brand-totals b { color: #16a34a; margin-left: 6px; font-size: 14px; }
.v162-remaining-pool {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid #bfdbfe; border-radius: 10px;
  padding: 10px 14px; margin-bottom: 10px; font-weight: 800; color: #1e3a8a;
}
.v162-remaining-pool b { color: #1e40af; font-size: 15px; }

/* Marka ayarları modalı */
.v162-bs-modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 250010;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 24px 12px; overflow-y: auto; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.v162-bs-card {
  background: var(--surface, #fff); color: var(--text, #111); border-radius: 18px;
  max-width: 720px; width: 100%; box-shadow: 0 22px 48px rgba(0,0,0,.32);
  display: flex; flex-direction: column; max-height: calc(100vh - 48px); overflow: hidden;
}
.v162-bs-head { padding: 18px 22px; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; border-bottom: 1px solid var(--border, #edf1f5); }
.v162-bs-head h2 { margin: 4px 0 0; font-size: 19px; font-weight: 900; }
.v162-bs-body { padding: 16px 22px; overflow-y: auto; flex: 1; }
.v162-bs-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.v162-bs-row {
  border: 1px solid var(--border, #e5e7eb); border-radius: 12px;
  background: var(--bg-soft, #fafafa); padding: 12px 14px;
}
.v162-bs-row-head { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.v162-bs-brand {
  flex: 1; padding: 9px 11px; border: 1px solid var(--border, #d1d5db); border-radius: 9px;
  background: var(--surface, #fff); font-size: 14px; font-weight: 800; color: var(--text); font-family: inherit;
}
.v162-bs-del {
  background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c;
  border-radius: 9px; width: 36px; height: 36px; cursor: pointer; font-size: 14px;
}
.v162-bs-del:hover { background: #fee2e2; }
.v162-bs-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 10px; }
.v162-bs-field > span { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--text-2); }
.v162-bs-keywords {
  padding: 9px 11px; border: 1px solid var(--border, #d1d5db); border-radius: 9px;
  background: var(--surface, #fff); font-size: 13px; color: var(--text); font-family: inherit;
}
.v162-bs-chips { display: flex; gap: 5px; flex-wrap: wrap; padding: 4px 0; }
.v162-bs-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 999px;
  border: 1px solid var(--border, #e5e7eb); background: var(--surface, #fff);
  font-size: 12px; cursor: pointer; transition: .12s; user-select: none;
}
.v162-bs-chip:hover { border-color: var(--accent, #2563eb); }
.v162-bs-chip input { width: 14px; height: 14px; accent-color: var(--accent, #2563eb); }
.v162-bs-chip:has(input:checked) { background: var(--accent, #2563eb); color: #fff; border-color: var(--accent, #2563eb); }
.v162-bs-foot {
  padding: 14px 22px; display: flex; align-items: center; gap: 8px;
  border-top: 1px solid var(--border, #edf1f5); background: var(--bg-soft, #fafbfc);
}
.v162-pill-manual { background: #fef3c7 !important; color: #92400e; }

@media (max-width: 760px) {
  .v162-brow-body { grid-template-columns: 1fr; }
  .v162-brow-field input { text-align: left; }
  .v162-bs-card { max-height: calc(100vh - 24px); }
  .v162-bs-foot { flex-wrap: wrap; }
}

/* === v162 İYİ 2: Manuel tahsilat === */
.v162-add-manual-btn {
  margin-left: auto; padding: 7px 12px; border-radius: 999px;
  background: var(--accent, #2563eb); color: #fff; border: none;
  font-weight: 800; font-size: 12px; cursor: pointer; transition: .12s;
}
.v162-add-manual-btn:hover { filter: brightness(0.95); }
.v162-section-mini { font-size: 11px; margin-top: 12px; }
.v162-manuals { display: flex; flex-direction: column; gap: 6px; }
.v162-mrow {
  display: grid; grid-template-columns: auto auto 1fr auto auto; gap: 10px; align-items: center;
  padding: 10px 14px; border: 1px solid #fde68a; border-radius: 11px;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%); font-size: 13px;
}
.v162-mp-manual { background: #d97706 !important; }
.v162-mrow-del {
  background: rgba(255,255,255,.6); border: 1px solid #fbbf24; color: #92400e;
  width: 26px; height: 26px; border-radius: 50%; cursor: pointer; font-size: 14px; line-height: 1;
}
.v162-mrow-del:hover { background: #fcd34d; }
.v162-mform {
  border: 1.5px solid var(--accent, #2563eb); background: var(--surface, #fff);
  border-radius: 14px; padding: 14px; margin-bottom: 10px;
  box-shadow: 0 6px 16px rgba(37,99,235,.08);
}
.v162-mform-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.v162-mform-row label { display: flex; flex-direction: column; gap: 5px; font-size: 11px; font-weight: 800; color: var(--text-2); text-transform: uppercase; letter-spacing: .04em; }
.v162-mform-row .v162-mf-full { grid-column: 1 / -1; }
.v162-mform-row input, .v162-mform-row select {
  padding: 9px 11px; border: 1px solid var(--border, #d1d5db); border-radius: 9px;
  background: var(--bg-soft, #fff); color: var(--text, #111); font-size: 13px; font-weight: 700; font-family: inherit;
}
.v162-mform-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }

@media (max-width: 760px) {
  .v162-add-manual-btn { width: 100%; margin: 6px 0 0; }
  .v162-step-head { flex-wrap: wrap; }
  .v162-mform-row { grid-template-columns: 1fr; }
  .v162-mrow { grid-template-columns: auto 1fr; row-gap: 6px; }
  .v162-mrow .v162-scount, .v162-mrow .v162-snet, .v162-mrow .v162-mrow-del { grid-column: 2 / -1; justify-self: end; }
}

/* === v162 İYİ 3: Sticky özet bar + segmentli progress === */
.v162-sticky-summary {
  position: sticky; top: -18px; z-index: 5;
  margin: -18px -22px 14px;
  padding: 14px 22px 12px;
  background: var(--surface, #fff);
  border-bottom: 1px solid var(--border, #edf1f5);
  box-shadow: 0 6px 14px rgba(0,0,0,.04);
}
.v162-stick-line { display: flex; gap: 14px; justify-content: space-between; margin-bottom: 10px; flex-wrap: wrap; }
.v162-stick-cell { display: flex; flex-direction: column; gap: 2px; }
.v162-stick-cell span { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--text-2, #6b7280); }
.v162-stick-cell b { font-size: 17px; font-weight: 900; color: var(--text); font-variant-numeric: tabular-nums; }
.v162-stick-rem b { color: #16a34a; }

.v162-progress {
  height: 12px; border-radius: 7px; overflow: hidden;
  display: flex; background: var(--surface-2, #f1f5f9);
  border: 1px solid var(--border, #e5e7eb);
  margin-bottom: 8px;
  transition: box-shadow .2s;
}
.v162-progress[data-over="true"] { box-shadow: 0 0 0 2px rgba(220,38,38,.35); border-color: #dc2626; }
.v162-seg { height: 100%; transition: width .25s ease; }
.v162-seg-brand { background: linear-gradient(180deg, #a78bfa 0%, #7c3aed 100%); }
.v162-seg-debt  { background: linear-gradient(180deg, #f87171 0%, #dc2626 100%); }
.v162-seg-fixed { background: linear-gradient(180deg, #60a5fa 0%, #2563eb 100%); }
.v162-seg-free  { background: linear-gradient(180deg, #4ade80 0%, #16a34a 100%); }

.v162-legend { display: flex; gap: 10px; flex-wrap: wrap; font-size: 11.5px; font-weight: 700; color: var(--text-2); }
.v162-leg { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 6px; background: var(--bg-soft, #f8fafc); border: 1px solid var(--border, #edf1f5); }
.v162-leg b { color: var(--text); font-variant-numeric: tabular-nums; }
.v162-leg.leg-brand b { color: #6d28d9; }
.v162-leg.leg-debt b  { color: #b91c1c; }
.v162-leg.leg-fixed b { color: #1d4ed8; }
.v162-leg.leg-free b  { color: #15803d; }

.v162-warn-bar {
  margin-top: 8px; padding: 7px 11px; border-radius: 8px;
  background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca;
  font-size: 12px; font-weight: 800; display: flex; align-items: center; gap: 6px;
}
.v162-stick-src { margin-top: 8px; font-size: 11px; }
.v162-stick-src summary { cursor: pointer; color: var(--text-2); font-weight: 700; user-select: none; padding: 4px 0; list-style: none; }
.v162-stick-src summary::-webkit-details-marker { display: none; }
.v162-stick-src summary::before { content: '▸'; display: inline-block; margin-right: 6px; transition: .15s; }
.v162-stick-src[open] summary::before { transform: rotate(90deg); }
.v162-stick-src-body { display: flex; gap: 5px; flex-wrap: wrap; padding-top: 6px; }

@media (max-width: 760px) {
  .v162-sticky-summary { padding: 12px 22px 10px; }
  .v162-stick-cell b { font-size: 15px; }
  .v162-legend { gap: 6px; font-size: 10.5px; }
  .v162-leg { padding: 2px 6px; }
}
