* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #f0f2f5;
  --bg2: #ffffff;
  --bg3: #f5f6fa;
  --bg4: #e8ebf0;
  --border: #dde1e9;
  --text: #1e293b;
  --text2: #475569;
  --text3: #94a3b8;
  --primary: #6366f1;
  --primary-dim: rgba(99,102,241,0.1);
  --accent: #8b5cf6;
  --success: #059669;
  --success-dim: rgba(5,150,105,0.1);
  --warning: #d97706;
  --warning-dim: rgba(217,119,6,0.1);
  --danger: #dc2626;
  --danger-dim: rgba(220,38,38,0.08);
  --orange: #ea580c;
  --orange-dim: rgba(234,88,12,0.1);
  --cyan: #0891b2;
  --cyan-dim: rgba(8,145,178,0.1);
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100vh;
  overflow: hidden;
}

/* ==================== LOGIN ==================== */
.login-page {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #8b1a1a 0%, #a52222 40%, #c0392b 100%);
}

.login-card {
  background: #ffffff;
  border: none;
  border-radius: 20px;
  padding: 40px;
  width: 380px;
  max-width: 90vw;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.login-header { text-align: center; margin-bottom: 32px; }
.login-logo-link { display: inline-block; margin-bottom: 20px; transition: transform 0.2s; }
.login-logo-link:hover { transform: scale(1.05); }
.login-logo { width: 120px; height: auto; object-fit: contain; }
.login-header h1 { font-size: 28px; font-weight: 800; background: linear-gradient(135deg, #8b1a1a, #c0392b); -webkit-background-clip: text; -webkit-text-fill-color: transparent; letter-spacing: 3px; margin-top: 4px; }
.login-header p { color: var(--text2); font-size: 13px; margin-top: 4px; }

.login-footer { text-align: center; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }
.login-footer span { font-size: 12px; color: var(--text3); }
.login-footer a { color: #a52222; text-decoration: none; font-weight: 600; }
.login-footer a:hover { text-decoration: underline; }

.login-card .btn-primary { background: linear-gradient(135deg, #8b1a1a, #c0392b); border-color: #8b1a1a; }
.login-card .btn-primary:hover { box-shadow: 0 2px 12px rgba(139,26,26,0.3); }

.login-credit { position: fixed; bottom: 16px; right: 20px; font-size: 11px; color: rgba(255,255,255,0.5); letter-spacing: 0.3px; }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 12px; color: var(--text2); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px; }
.form-group input { width: 100%; padding: 10px 14px; background: var(--bg3); border: 1px solid var(--border); color: var(--text); border-radius: 8px; font-size: 14px; }
.form-group input:focus { outline: none; border-color: var(--primary); }

.btn-block { width: 100%; }

.login-error { margin-top: 12px; padding: 10px; background: var(--danger-dim); color: var(--danger); border-radius: 6px; font-size: 13px; text-align: center; }

/* ==================== LAYOUT ==================== */
.app { display: flex; flex-direction: column; height: 100vh; }

/* ==================== LOGO (banner ici) ==================== */
.logo-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 4px 14px;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.logo-link:hover { transform: translateY(-1px); }
/* Yumusak isik halosu - banner zeminine yumusak gecisli, kesin pill kenari yok */
.logo-link::before {
  content: '';
  position: absolute;
  inset: -2px -8px;
  background: radial-gradient(ellipse at center, rgba(245,245,244,0.96) 0%, rgba(245,245,244,0.88) 45%, rgba(245,245,244,0.55) 70%, rgba(245,245,244,0.18) 88%, transparent 100%);
  border-radius: 12px;
  z-index: 0;
  pointer-events: none;
}
.topbar-logo {
  height: 28px;
  object-fit: contain;
  display: block;
  position: relative;
  z-index: 1;
}

/* ==================== BANNER NAV (sync + sync btn + cikis - en sagda) ==================== */
.rb-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  flex-shrink: 0;
}
.rb-nav .sync-status {
  display: flex;
  align-items: center;
  cursor: help;
}
.sync-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 10px rgba(52,211,153,0.7), 0 0 0 1px rgba(52,211,153,0.25);
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.55; transform: scale(0.92); } }

.rb-nav .btn.btn-icon {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  font-size: 17px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(251,191,36,0.12), rgba(245,158,11,0.06));
  border: 1px solid rgba(251,191,36,0.28);
  color: rgba(251,191,36,0.95);
  font-weight: 600;
  transition: all 0.2s ease;
}
.rb-nav .btn.btn-icon:hover {
  background: linear-gradient(135deg, rgba(251,191,36,0.22), rgba(245,158,11,0.14));
  border-color: rgba(251,191,36,0.5);
  color: #fef3c7;
  box-shadow: 0 0 14px rgba(251,191,36,0.18);
  transform: scale(1.06);
}
.rb-nav .btn.btn-icon.btn-ghost {
  background: transparent;
  border: 1px solid rgba(203,213,225,0.18);
  color: rgba(203,213,225,0.7);
}
.rb-nav .btn.btn-icon.btn-ghost:hover {
  background: rgba(239,68,68,0.10);
  border-color: rgba(239,68,68,0.4);
  color: #fca5a5;
  box-shadow: 0 0 14px rgba(239,68,68,0.15);
}

.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

/* ==================== FILTER BAR ==================== */
.filter-bar {
  display: flex;
  gap: 10px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  align-items: center;
}

/* ==================== REVENUE BANNER (sticky, midnight + altın) ==================== */
.revenue-banner {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 28px;
  margin: 0;
  background:
    radial-gradient(circle at 88% 50%, rgba(251,191,36,0.14), transparent 50%),
    radial-gradient(circle at 12% 50%, rgba(59,130,246,0.12), transparent 55%),
    linear-gradient(120deg, #0a0e1a 0%, #0f1729 35%, #131a2e 65%, #0a0e1a 100%);
  border-bottom: 1px solid rgba(251,191,36,0.20);
  box-shadow:
    0 1px 0 rgba(251,191,36,0.10) inset,
    0 -1px 0 rgba(0,0,0,0.5) inset,
    0 4px 28px rgba(15,23,42,0.5);
  overflow: visible;
}
/* Hairline altin alt cizgi - lux dokunus */
.revenue-banner::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(251,191,36,0.5) 50%, transparent 100%);
  pointer-events: none;
}
/* Shimmer wrapper - banner ic alanina clip et, tooltip ve popup tasabilsin */
.rb-shimmer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  border-bottom: 1px solid transparent;
}
.rb-shimmer::before {
  content: '';
  position: absolute;
  top: 0; left: -40%;
  width: 30%; height: 100%;
  background: linear-gradient(100deg, transparent 0%, rgba(251,191,36,0.10) 45%, rgba(255,255,255,0.05) 50%, rgba(251,191,36,0.10) 55%, transparent 100%);
  animation: rb-shimmer 8s ease-in-out infinite;
}
.rb-info, .rb-tooltip, .rb-popups { position: relative; z-index: 1; }
@keyframes rb-shimmer {
  0%   { left: -40%; opacity: 0; }
  20%  { opacity: 1; }
  80%  { opacity: 1; }
  100% { left: 140%; opacity: 0; }
}
.rb-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.rb-row-top { display: flex; align-items: baseline; gap: 6px; }
.rb-row-main { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.rb-amount-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; line-height: 1; }
.rb-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2.5px;
  color: rgba(251,191,36,0.9);
  text-transform: uppercase;
}
.rb-date {
  font-size: 10px;
  font-weight: 600;
  color: rgba(203,213,225,0.55);
  letter-spacing: 1.2px;
  text-transform: uppercase;
}
.rb-date::before {
  content: '·';
  margin: 0 6px 0 0;
  color: rgba(251,191,36,0.55);
  font-weight: 700;
}
.rb-usd {
  font-size: 13px;
  font-weight: 700;
  color: rgba(226,232,240,0.92);
  letter-spacing: 0.4px;
  font-variant-numeric: tabular-nums;
  margin-top: 3px;
}
.rb-usd::before {
  content: '💰  ≈ ';
  margin-right: 2px;
  color: rgba(203,213,225,0.55);
  font-weight: 600;
}
.rb-amount {
  font-size: 34px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -1px;
  line-height: 1;
  background: linear-gradient(180deg, #fffbeb 0%, #fde68a 40%, #f59e0b 90%, #b45309 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 1px rgba(0,0,0,0.55)) drop-shadow(0 0 12px rgba(251,191,36,0.18));
  display: inline-block;
}
.rb-row2 {
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  font-weight: 600;
  letter-spacing: 0.3px;
}
.rb-trend {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2px;
  background: rgba(100,116,139,0.15);
  color: rgba(255,255,255,0.6);
  border: 1px solid transparent;
  transition: all 0.3s ease;
}
.rb-trend.up {
  background: linear-gradient(135deg, rgba(34,197,94,0.22), rgba(16,185,129,0.18));
  color: #6ee7b7;
  border-color: rgba(34,197,94,0.35);
  box-shadow: 0 0 16px rgba(34,197,94,0.18), 0 1px 0 rgba(255,255,255,0.06) inset;
}
.rb-trend.down {
  background: linear-gradient(135deg, rgba(239,68,68,0.22), rgba(244,63,94,0.18));
  color: #fca5a5;
  border-color: rgba(239,68,68,0.35);
  box-shadow: 0 0 16px rgba(239,68,68,0.18), 0 1px 0 rgba(255,255,255,0.06) inset;
}
.rb-trend.flat {
  background: rgba(100,116,139,0.18);
  color: #cbd5e1;
  border-color: rgba(100,116,139,0.35);
}
.rb-yesterday {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  font-weight: 600;
  letter-spacing: 0.2px;
  font-variant-numeric: tabular-nums;
}
.rb-yesterday::before {
  content: '·';
  margin: 0 8px 0 0;
  color: rgba(251,191,36,0.4);
  font-weight: 700;
}
/* ==================== REVENUE DETAIL BUTON (mini icon) ==================== */
.rb-detail-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.rb-detail-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  font-size: 15px;
  line-height: 1;
  color: rgba(251,191,36,0.95);
  background: linear-gradient(135deg, rgba(251,191,36,0.10), rgba(245,158,11,0.06));
  border: 1px solid rgba(251,191,36,0.30);
  cursor: pointer;
  transition: all 0.2s ease;
}
.rb-detail-btn:hover {
  background: linear-gradient(135deg, rgba(251,191,36,0.20), rgba(245,158,11,0.14));
  border-color: rgba(251,191,36,0.55);
  box-shadow: 0 0 14px rgba(251,191,36,0.22);
  transform: scale(1.05);
}
.rb-detail-btn.active {
  background: linear-gradient(135deg, rgba(251,191,36,0.32), rgba(245,158,11,0.22));
  border-color: rgba(251,191,36,0.7);
  box-shadow: 0 0 20px rgba(251,191,36,0.30), 0 1px 0 rgba(255,255,255,0.08) inset;
  transform: scale(1.05);
}

/* ==================== SCALE PANEL (inline banner sutunu) ==================== */
/* Buton info'nun hemen yaninda dursun (margin-left:auto kaldirildi) */

.rb-scale-panel {
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  padding-left: 0;
  margin-left: 0;
  border-left: 1px solid transparent;
  transition: max-width 0.4s ease, opacity 0.3s ease, padding 0.3s ease, margin 0.3s ease, border-color 0.3s ease;
  white-space: nowrap;
}
.rb-scale-panel.open {
  max-width: 720px;
  opacity: 1;
  padding-left: 16px;
  margin-left: 4px;
  border-left: 1px solid rgba(251,191,36,0.22);
}
.rb-scale-panel .rsp-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, auto));
  grid-template-rows: auto auto;
  column-gap: 20px;
  row-gap: 4px;
}
.rb-scale-panel .rsp-ytd {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 16px;
  border-left: 1px dashed rgba(251,191,36,0.20);
}
.rb-scale-panel .rsp-cell {
  display: flex;
  flex-direction: column;
  font-variant-numeric: tabular-nums;
  min-width: 0;
}
.rb-scale-panel .rsp-label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: rgba(251,191,36,0.78);
}
.rb-scale-panel .rsp-val {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,251,235,0.95);
  line-height: 1.2;
}
.rb-scale-panel .rsp-val em {
  font-size: 10px;
  font-style: normal;
  font-weight: 600;
  color: rgba(148,163,184,0.75);
  margin-left: 4px;
}
.rbt-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 4px 0;
  border-bottom: 1px dashed rgba(251,191,36,0.10);
  font-variant-numeric: tabular-nums;
}
.rbt-row:last-child { border-bottom: none; }
.rbt-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(203,213,225,0.7);
}
.rbt-val {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,251,235,0.95);
}
.rbt-val em {
  font-size: 10px;
  font-style: normal;
  font-weight: 600;
  color: rgba(148,163,184,0.7);
  margin-left: 4px;
}

/* ==================== POP-UP (+₺X yeni siparis) ==================== */
.rb-popups {
  position: absolute;
  top: 0;
  right: 18%;
  pointer-events: none;
}
.rb-pop {
  position: absolute;
  top: 12px;
  font-size: 18px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #6ee7b7;
  text-shadow: 0 0 14px rgba(34,197,94,0.6), 0 1px 2px rgba(0,0,0,0.6);
  white-space: nowrap;
  animation: rb-pop 2.2s ease-out forwards;
}
@keyframes rb-pop {
  0%   { opacity: 0; transform: translateY(8px) scale(0.92); }
  18%  { opacity: 1; transform: translateY(0) scale(1.05); }
  30%  { transform: translateY(-4px) scale(1); }
  100% { opacity: 0; transform: translateY(-32px) scale(0.96); }
}

@media (max-width: 700px) {
  .revenue-banner { padding: 12px 16px; gap: 12px; }
  .rb-amount { font-size: 26px; }
  .rb-row-main { gap: 10px; }
  .rb-usd { font-size: 12px; }
  .rb-scale-panel.open { max-width: 100%; padding-left: 12px; column-gap: 14px; }
  .rb-scale-panel .rsp-val { font-size: 12px; }
}

.filter-search { flex: 1; max-width: 200px; padding: 7px 10px; background: var(--bg3); border: 1px solid var(--border); color: var(--text); border-radius: 8px; font-size: 12px; }
.filter-search:focus { outline: none; border-color: var(--primary); }

.filter-bar select { padding: 8px 12px; background: var(--bg3); border: 1px solid var(--border); color: var(--text); border-radius: 8px; font-size: 13px; cursor: pointer; }
.filter-bar input[type="date"] { padding: 8px 10px; background: var(--bg3); border: 1px solid var(--border); color: var(--text); border-radius: 8px; font-size: 12px; color-scheme: light; }
.filter-bar input[type="date"]:focus { outline: none; border-color: var(--primary); }

.bulk-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  padding: 4px 12px;
  background: var(--primary-dim);
  border: 1px solid var(--primary);
  border-radius: 8px;
}

.bulk-actions span { font-size: 12px; color: var(--primary); font-weight: 600; white-space: nowrap; }

/* ==================== TABLE ==================== */
.content-area { flex: 1; display: flex; overflow: hidden; }
.orders-panel { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.table-wrap { flex: 1; overflow-y: auto; overflow-x: auto; }

table { width: 100%; border-collapse: collapse; }

th {
  position: sticky; top: 0; z-index: 10;
  padding: 10px 16px; text-align: left;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--text2); background: var(--bg3);
  border-bottom: 2px solid var(--border); white-space: nowrap;
}

td { padding: 8px 10px; font-size: 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }

.th-check { width: 36px; text-align: center; }
.th-num { width: 40px; }
.th-order { width: 60px; }
.th-koli { width: 120px; text-align: center; }
.th-action { width: 180px; }

tr { cursor: pointer; transition: background 0.15s; }
tr:hover td { background: rgba(99,102,241,0.06); }
tr.active td { background: var(--primary-dim); }
tr.row-done td { background: rgba(16,185,129,0.06); }
tr.row-done:hover td { background: rgba(16,185,129,0.12); }

.empty-cell { text-align: center; color: var(--text2); padding: 60px 16px !important; }

.city-tag { color: var(--text2); font-size: 11px; font-weight: 600; }
.local-region-tag { display: inline-block; font-size: 10px; font-weight: 800; color: #fff; background: #dc2626; padding: 2px 8px; border-radius: 10px; margin-left: 4px; letter-spacing: 0.3px; box-shadow: 0 1px 3px rgba(220,38,38,0.4); white-space: nowrap; }
.region-toggle { font-weight: 600; }
.region-toggle.active { background: #dc2626; border-color: #dc2626; color: #fff; box-shadow: 0 1px 3px rgba(220,38,38,0.4); }
.order-count-tag { display: inline-block; font-size: 10px; color: #6366f1; background: rgba(99,102,241,0.1); padding: 1px 6px; border-radius: 10px; margin-left: 4px; font-weight: 600; }
.note-tag { display: inline-block; font-size: 10px; font-weight: 800; padding: 2px 8px; border-radius: 10px; margin-left: 4px; letter-spacing: 0.3px; white-space: nowrap; }
.note-tag-warn { color: #78350f; background: #fde68a; box-shadow: 0 1px 3px rgba(217,119,6,0.35); }
.note-tag-ack { color: #fff; background: #15803d; box-shadow: 0 1px 3px rgba(21,128,61,0.35); }
.pay-method-tag { font-size: 9px; color: var(--text3); text-align: center; margin-top: 2px; font-weight: 600; letter-spacing: 0.5px; }
.order-num { font-weight: 700; color: var(--primary); font-size: 11px; letter-spacing: -0.3px; }
.td-customer { max-width: 280px; font-size: 13px; font-weight: 600; vertical-align: middle; line-height: 1.3; }
.td-customer .customer-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 280px; }
.td-customer .customer-meta { margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 280px; font-weight: 500; display: flex; align-items: center; gap: 4px; flex-wrap: nowrap; }
.order-date { font-size: 12px; color: var(--text2); }
.order-item-count { font-size: 10px; color: var(--text3); margin-top: 2px; font-weight: 500; }
.product-tooltip { position: absolute; background: #ffffff; color: #1f2937; padding: 12px; border-radius: 10px; font-size: 13px; box-shadow: 0 12px 32px rgba(0,0,0,0.18), 0 0 0 1px rgba(0,0,0,0.06); max-width: 420px; min-width: 280px; z-index: 9999; opacity: 0; pointer-events: none; transform: translateY(-4px); transition: opacity 0.12s ease, transform 0.12s ease; }
.product-tooltip.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.product-tooltip .pt-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid #f0f0f0; }
.product-tooltip .pt-row:last-child { border-bottom: none; }
.product-tooltip .pt-img { width: 40px; height: 40px; object-fit: contain; border-radius: 4px; border: 1px solid #e5e7eb; background: #f9fafb; flex-shrink: 0; }
.product-tooltip .pt-img-empty { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: #f3f4f6; border: 1px solid #e5e7eb; border-radius: 4px; color: #9ca3af; font-size: 14px; flex-shrink: 0; }
.product-tooltip .pt-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.product-tooltip .pt-name { color: #111827; font-weight: 600; line-height: 1.3; word-break: break-word; }
.product-tooltip .pt-price { color: #6b7280; font-size: 11px; font-weight: 500; }
.product-tooltip .pt-qty { color: #1f2937; font-weight: 700; font-size: 14px; white-space: nowrap; padding: 4px 10px; background: #fef3c7; border-radius: 6px; flex-shrink: 0; }
.tracking-num { font-family: 'Courier New', monospace; font-size: 11px; color: var(--success); }

/* BADGES */
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.badge-waiting { background: var(--orange-dim); color: var(--orange); }
.badge-done { background: var(--success-dim); color: var(--success); }
.badge-paid { background: var(--success-dim); color: var(--success); }
.badge-unpaid { background: var(--danger-dim); color: var(--danger); }
.badge-partial { background: var(--warning-dim); color: var(--warning); }
.badge-kg-none { background: var(--bg3); color: var(--text3); font-size: 10px; }
.badge-kg-pending { background: var(--orange-dim); color: var(--orange); font-size: 10px; }
.badge-kg-olumlu { background: var(--success-dim); color: var(--success); font-size: 10px; }
.badge-kg-olumsuz { background: var(--danger-dim); color: var(--danger); font-size: 10px; }
.badge-kg-notr { background: var(--cyan-dim); color: var(--cyan); font-size: 10px; }

/* KOLI +/- */
.koli-control {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg3);
}

.koli-btn {
  width: 22px;
  height: 22px;
  border: none;
  background: var(--bg4);
  color: var(--text2);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.koli-btn:hover { background: var(--primary-dim); color: var(--primary); }
.koli-btn:active { background: var(--primary); color: #fff; }

.koli-val {
  width: 26px;
  height: 22px;
  border: none;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  background: var(--bg3);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  -moz-appearance: textfield;
}

.koli-val::-webkit-outer-spin-button,
.koli-val::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.koli-val:focus { outline: none; background: var(--bg4); }

.koli-static {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 22px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--success);
}

/* CHECKBOX */
.row-check, #selectAll { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }

/* ==================== PAGINATION ==================== */
.pagination { display: flex; justify-content: center; align-items: center; gap: 6px; padding: 12px; border-top: 1px solid var(--border); flex-shrink: 0; }
.pagination button { padding: 6px 12px; background: var(--bg3); border: 1px solid var(--border); color: var(--text); border-radius: 6px; cursor: pointer; font-size: 12px; }
.pagination button.active { background: linear-gradient(135deg, #6366f1, #8b5cf6); border-color: #6366f1; color: #fff; }
.pagination button:disabled { opacity: 0.4; cursor: not-allowed; }

/* ==================== DETAIL PANEL ==================== */
.detail-panel {
  width: 0; overflow: hidden; transition: width 0.25s ease;
  border-left: 1px solid var(--border); background: var(--bg2);
  display: flex; flex-direction: column; flex-shrink: 0;
}
.detail-panel.open { width: 420px; }

.detail-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.detail-header h2 { font-size: 16px; font-weight: 700; }
.detail-body { flex: 1; overflow-y: auto; padding: 20px; }

.d-section { margin-bottom: 20px; }
.d-section-title { font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text3); margin-bottom: 8px; padding-bottom: 4px; border-bottom: 1px solid var(--border); }
.d-row { display: flex; justify-content: space-between; padding: 4px 0; font-size: 13px; }
.d-row .d-label { color: var(--text2); }
.d-row .d-value { font-weight: 500; text-align: right; }
.d-address { font-size: 13px; line-height: 1.5; color: var(--text); padding: 8px 12px; background: var(--bg3); border-radius: 8px; }

.d-product { display: flex; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; gap: 10px; }
.d-product:last-child { border-bottom: none; }
.d-product-img { width: 40px; height: 40px; object-fit: contain; border-radius: 4px; border: 1px solid var(--border); flex-shrink: 0; background: var(--bg4); }
.d-product-img-empty { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: var(--bg4); border: 1px solid var(--border); border-radius: 4px; color: var(--text3); font-size: 14px; flex-shrink: 0; }
.d-product-info { flex: 1; margin-right: 8px; display: flex; flex-direction: column; gap: 2px; }
.d-product-name { word-break: break-word; white-space: normal; }
.d-product-codes { font-size: 11px; color: var(--text3); font-family: 'Courier New', monospace; }
.d-product-qty { font-weight: 600; color: var(--text2); margin-right: 12px; white-space: nowrap; }
.d-product-price { font-weight: 600; white-space: nowrap; }

.d-shipment-box { background: var(--bg3); border: 1px solid var(--border); border-radius: 10px; padding: 16px; margin-bottom: 8px; }
.d-tracking-no { font-family: 'Courier New', monospace; font-size: 16px; font-weight: 700; color: var(--success); text-align: center; margin-bottom: 4px; }
.d-barcode-list { font-size: 12px; color: var(--text2); text-align: center; }
.d-kg-status { margin-top: 6px; font-size: 12px; color: var(--text2); text-align: center; }
.d-notified { margin-top: 4px; font-size: 11px; color: var(--success); text-align: center; }
.d-shipment-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.d-shipment-ref { font-size: 13px; color: var(--primary); font-weight: 700; }
.d-shipment-date { font-size: 11px; color: var(--text3); }

/* ==================== FOOTER ==================== */
.app-footer { padding: 6px 24px; text-align: right; font-size: 11px; color: var(--text3); border-top: 1px solid var(--border); flex-shrink: 0; }

/* ==================== BUTTONS ==================== */
.btn { padding: 8px 16px; border: 1px solid var(--border); background: var(--bg3); color: var(--text); border-radius: 8px; cursor: pointer; font-size: 13px; transition: all 0.2s; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn:hover { border-color: var(--text2); }
.btn-primary { background: linear-gradient(135deg, #6366f1, #8b5cf6); border-color: #6366f1; color: #fff; }
.btn-primary:hover { opacity: 0.9; box-shadow: 0 2px 12px rgba(99,102,241,0.3); }
.btn-outline { background: transparent; border: 1.5px solid #6366f1; color: #6366f1; }
.btn-outline:hover { background: #6366f1; color: #fff; }
.btn-success { background: var(--success); border-color: var(--success); color: #000; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { opacity: 0.9; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text2); }
.btn-ghost:hover { color: var(--text); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-close { background: none; border: none; color: var(--text2); font-size: 24px; cursor: pointer; padding: 0; line-height: 1; }
.btn-close:hover { color: var(--text); }

/* ==================== MODAL ==================== */
.modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.35); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.modal-content { background: #ffffff; border: 1px solid var(--border); border-radius: 16px; max-width: 600px; width: 90%; max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.15); }
.modal-print { max-width: 540px; }
.modal-confirm { max-width: 440px; }
.modal-manual { max-width: 420px; }
.modal-templates { max-width: 560px; }

.template-card { border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; margin-bottom: 14px; background: var(--bg2); }
.template-card:last-child { margin-bottom: 0; }
.template-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; gap: 12px; }
.template-title { font-size: 14px; font-weight: 700; color: var(--text); }
.template-body { margin: 0; padding: 10px 12px; background: var(--bg3); border: 1px solid var(--border); border-radius: 6px; font-family: inherit; font-size: 13px; color: var(--text2); white-space: pre-wrap; word-wrap: break-word; line-height: 1.5; max-height: 260px; overflow-y: auto; }

.manual-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.manual-field label { display: block; font-size: 11px; color: var(--text2); margin-bottom: 3px; text-transform: uppercase; letter-spacing: 0.3px; font-weight: 600; }
.manual-field input, .manual-field select, .manual-field textarea { width: 100%; padding: 7px 10px; background: var(--bg3); border: 1px solid var(--border); color: var(--text); border-radius: 6px; font-size: 13px; font-family: inherit; }
.manual-field input:focus, .manual-field select:focus, .manual-field textarea:focus { outline: none; border-color: var(--primary); }
.manual-field textarea { resize: vertical; min-height: 42px; }
.manual-address { grid-column: 1 / -1; }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; border-bottom: 1px solid var(--border); }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }

.confirm-warning { padding: 12px 16px; background: var(--warning-dim); border: 1px solid var(--warning); border-radius: 8px; color: var(--warning); font-size: 13px; line-height: 1.6; }

/* PRINTABLE LABEL */
.printable-label { background: #fff; color: #000; padding: 20px; border-radius: 8px; font-family: 'Segoe UI', system-ui, sans-serif; font-size: 13px; line-height: 1.5; }
.barcode-header { display: flex; justify-content: space-between; align-items: center; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; margin-bottom: 16px; }
.barcode-header h3 { font-size: 18px; font-weight: 800; color: #16a34a; }
.barcode-header span { font-size: 13px; color: #6b7280; }
.barcode-body { min-height: 60px; }
.barcode-number { font-size: 16px; font-weight: 700; font-family: 'Courier New', monospace; color: #1f2937; text-align: center; padding: 10px; background: #f9fafb; border-radius: 6px; margin-bottom: 6px; }

/* ==================== LOADING / TOAST ==================== */
.loading-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(255,255,255,0.7); backdrop-filter: blur(4px); display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 2000; }
.spinner { width: 36px; height: 36px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { margin-top: 14px; color: var(--text2); font-size: 13px; }

.toast-container { position: fixed; top: 64px; right: 20px; z-index: 3000; display: flex; flex-direction: column; gap: 8px; }
.toast { padding: 10px 18px; border-radius: 8px; font-size: 13px; max-width: 380px; animation: slideIn 0.3s ease; font-weight: 500; }
.toast-success { background: #059669; color: #fff; }
.toast-error { background: #dc2626; color: #fff; }
.toast-info { background: #6366f1; color: #fff; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ==================== IRSALIYE BUTTON ==================== */
.btn-done-action { background: var(--success-dim); border-color: var(--success); color: var(--success); font-weight: 600; }
.btn-done-action:hover { background: var(--success); color: #fff; }
.btn-irsaliye { background: var(--warning-dim); border-color: var(--warning); color: var(--warning); font-weight: 600; }
.btn-irsaliye:hover { background: var(--warning); color: #000; }
.btn-pay { background: var(--danger-dim); border-color: var(--danger); color: var(--danger); font-weight: 600; }
.btn-pay:hover { background: var(--danger); color: #fff; }
.order-price { font-size: 12px; font-weight: 600; color: var(--text); white-space: nowrap; }

/* ==================== IRSALIYE MODAL ==================== */
.modal-irsaliye { max-width: 700px; width: 95%; }
.modal-loading-list { max-width: 900px; width: 95%; }

.irs-printable { background: #fff; color: #1a1a1a; padding: 24px; border-radius: 10px; font-family: 'Segoe UI', system-ui, sans-serif; }
.irs-header { display: flex; justify-content: space-between; align-items: flex-start; padding-bottom: 14px; border-bottom: 2px solid #333; margin-bottom: 16px; }
.irs-logo { font-size: 22px; font-weight: 800; color: #2563eb; }
.irs-meta { text-align: right; font-size: 13px; color: #334155; }
.irs-meta-label { color: #64748b; }
.irs-customer { margin-bottom: 16px; padding: 12px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 6px; }
.irs-customer-title { font-size: 10px; text-transform: uppercase; letter-spacing: .5px; color: #64748b; margin-bottom: 6px; }
.irs-customer-name { font-size: 15px; font-weight: 700; color: #1e293b; margin-bottom: 4px; }
.irs-customer-line { font-size: 13px; color: #475569; line-height: 1.6; }
.irs-table { width: 100%; border-collapse: collapse; margin-bottom: 16px; }
.irs-table th { text-align: left; padding: 8px 10px; border-bottom: 2px solid #e2e8f0; font-size: 11px; text-transform: uppercase; color: #64748b; background: transparent; position: static; }
.irs-table td { padding: 10px; border-bottom: 1px solid #e2e8f0; vertical-align: middle; font-size: 13px; color: #1e293b; white-space: normal; }
.irs-th-img { width: 60px; }
.irs-th-brand { width: 110px; }
.irs-th-qty { width: 65px; text-align: center; }
.irs-td-img { width: 60px; }
.irs-td-brand { color: #64748b; }
.irs-td-qty { text-align: center; }
.irs-thumb { width: 50px; height: 50px; object-fit: contain; border-radius: 4px; border: 1px solid #e2e8f0; }
.irs-thumb-empty { width: 50px; height: 50px; display: flex; align-items: center; justify-content: center; background: #f1f5f9; border-radius: 4px; color: #94a3b8; font-size: 16px; }
.irs-qty { font-size: 16px; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; color: #1e293b; }
.irs-footer { display: flex; justify-content: space-between; padding-top: 12px; border-top: 2px solid #333; font-size: 13px; font-weight: 600; color: #334155; }

/* ==================== YUKLEME LISTESI ==================== */
.ll-printable { background: #fff; color: #1a1a1a; padding: 24px; border-radius: 10px; font-family: 'Segoe UI', system-ui, sans-serif; }
.ll-header { display: flex; justify-content: space-between; align-items: center; padding-bottom: 16px; border-bottom: 2px solid #333; margin-bottom: 20px; }
.ll-logo { font-size: 22px; font-weight: 800; color: #2563eb; }
.ll-meta { text-align: right; font-size: 14px; font-weight: 600; color: #334155; }
.ll-meta-sub { font-size: 12px; color: #666; font-weight: 400; margin-top: 2px; }
.ll-brand-group { margin-bottom: 24px; }
.ll-brand-title { font-size: 16px; font-weight: 800; background: #f1f5f9; padding: 8px 14px; border-left: 4px solid #2563eb; margin-bottom: 8px; border-radius: 0 6px 6px 0; color: #1e293b; }
.ll-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ll-table th { text-align: left; padding: 6px 10px; border-bottom: 2px solid #e2e8f0; font-size: 11px; text-transform: uppercase; color: #64748b; background: transparent; position: static; }
.ll-table td { padding: 8px 10px; border-bottom: 1px solid #e2e8f0; vertical-align: middle; white-space: normal; color: #1e293b; }
.ll-th-img { width: 55px; }
.ll-th-total { width: 70px; text-align: center; }
.ll-td-img { width: 55px; }
.ll-td-total { text-align: center; }
.ll-thumb { width: 45px; height: 45px; object-fit: contain; border-radius: 4px; border: 1px solid #e2e8f0; }
.ll-total-qty { font-size: 18px; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; color: #1e293b; }
.ll-td-detail { font-size: 12px; }
.ll-order-tag { display: inline-block; font-size: 11px; background: #f1f5f9; padding: 2px 8px; border-radius: 4px; margin: 2px; color: #334155; }

/* ==================== PRINT - Honeywell PCD42D 203 DPI (100x150mm) ==================== */
@media print {
  body * { visibility: hidden; }
  .printable-label, .printable-label * { visibility: visible; }
  .printable-label { position: absolute; left: 0; top: 0; width: 100mm; height: 150mm; padding: 2mm; font-size: 11px; background: #fff; color: #000; }
  .printable-label iframe { width: 100% !important; height: 140mm !important; }
  .barcode-header { padding-bottom: 4px; margin-bottom: 4px; border-bottom: 1px solid #333; }
  .barcode-header h3 { font-size: 14px; }
  .barcode-header span { font-size: 10px; }
  .barcode-body { min-height: 40px; }
  @page { size: 100mm 150mm; margin: 0; }
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1200px) { .detail-panel.open { width: 360px; } }
@media (max-width: 900px) {
  .detail-panel.open { width: 100%; position: absolute; right: 0; top: 56px; bottom: 0; z-index: 100; }
  .filter-bar { padding: 10px 16px; }
  th, td { padding: 8px 10px; }
}
.btn-trendyol { background: #f27a1a; border-color: #f27a1a; color: #fff; font-weight: 600; }
.btn-trendyol:hover { background: #e06b10; border-color: #e06b10; }

@media (max-width: 600px) {
  .filter-bar { flex-wrap: wrap; }
  .filter-search { max-width: 100%; }
  .bulk-actions { width: 100%; justify-content: space-between; }
}
