/* ==========================================================================
   ŞUBELER ARASI SİPARİŞ & MERKEZİ SATINALMA PORTALI
   Modern Açık Tema (Light Theme) & Responsive Tasarım Sistemi
   ========================================================================== */

:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --primary-focus: rgba(37, 99, 235, 0.15);

  --success: #10b981;
  --success-light: #ecfdf5;
  --success-text: #065f46;

  --warning: #f59e0b;
  --warning-light: #fffbeb;
  --warning-text: #92400e;

  --danger: #ef4444;
  --danger-light: #fef2f2;
  --danger-text: #991b1b;

  --info: #0ea5e9;
  --info-light: #f0f9ff;
  --info-text: #075985;

  --purple: #8b5cf6;
  --purple-light: #f5f3ff;

  --bg-app: #f8fafc;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-input: #ffffff;

  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  --border: #e2e8f0;
  --border-focus: #3b82f6;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.05);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.05);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.06);

  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.5;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-subtle);
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ==========================================================================
   Header & Navbar (Kompakt & Yer Tasarruflu)
   ========================================================================== */
.app-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.header-container {
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
  padding: 4px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-sizing: border-box;
  min-height: 44px;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-logo {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary) 0%, #1e40af 100%);
  color: white;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.2);
  flex-shrink: 0;
}

.brand-info h1 {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.2px;
  line-height: 1.2;
  margin: 0;
}

.brand-info p {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.1;
  margin: 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Portal Role Switcher (Kompakt & Simge Odaklı Sağ Alan) */
.role-switcher {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  padding: 2px;
  border-radius: 6px;
  border: 1px solid var(--border);
  gap: 2px;
}

.role-btn {
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 600;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.role-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.8);
}

.role-btn.active {
  background: #ffffff;
  color: var(--primary);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--success-light);
  color: var(--success-text);
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-badge .dot {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3);
}

/* ==========================================================================
   Main Layout & Container
   ========================================================================== */
.main-wrapper {
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
  padding: 14px 20px;
  box-sizing: border-box;
}

/* Nav Tabs for Central Management (Kompakt, Simge Odaklı & Küçük) */
.portal-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  overflow-x: auto;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.tab-btn {
  padding: 6px 11px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: all 0.15s ease-in-out;
  line-height: 1.35;
}

.tab-btn i {
  font-size: 13px;
  color: #64748b;
  transition: color 0.15s ease-in-out;
}

.tab-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.tab-btn:hover i {
  color: var(--primary);
}

.tab-btn.active {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.08);
}

.tab-btn.active i {
  color: #2563eb;
}

.tab-btn.active::after {
  display: none;
}

.tab-count {
  background: #e2e8f0;
  color: #334155;
  padding: 1px 5px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
}

.tab-btn.active .tab-count {
  background: #dbeafe;
  color: #1e40af;
}

/* Konsolidasyon Havuzunda 2 Kod Yan Yana ve Kesin Tek Satır */
.pool-code-cell {
  white-space: nowrap !important;
}

.pool-code-pair {
  display: inline-flex !important;
  align-items: center !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 4px !important;
  white-space: nowrap !important;
  vertical-align: middle;
}

.pool-code-pair .code-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 3px;
  white-space: nowrap !important;
  margin: 0 !important;
  font-size: 10.5px !important;
  padding: 1.5px 5px !important;
  line-height: 1.2 !important;
  border-radius: 4px !important;
}

/* Konsolidasyon Havuzu: Kesin Tek Satır ve Ekrana %100 Sığma */
.pool-single-line-table {
  width: 100% !important;
  table-layout: auto !important;
  border-collapse: collapse !important;
}

.pool-single-line-table th {
  padding: 6px 8px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
  height: 36px !important;
  vertical-align: middle !important;
}

.pool-single-line-table td {
  padding: 4px 8px !important;
  font-size: 12px !important;
  white-space: nowrap !important;
  height: 38px !important;
  vertical-align: middle !important;
  line-height: 1.25 !important;
}

.pool-single-line-table tbody tr {
  height: 38px !important;
}

.pool-single-line-table tbody tr:hover {
  background-color: #f1f5f9 !important;
}

.pool-single-line-table .pool-branch-tag {
  font-size: 10.5px !important;
  padding: 1.5px 5px !important;
  white-space: nowrap !important;
  margin: 0 !important;
}

.pool-single-line-table .pool-qty-ctrl {
  display: inline-flex !important;
  align-items: center !important;
  gap: 2px !important;
}

.pool-single-line-table .pool-qty-btn {
  width: 19px !important;
  height: 22px !important;
  padding: 0 !important;
  font-size: 11px !important;
  line-height: 1 !important;
}

.pool-single-line-table .pool-qty-num {
  width: 40px !important;
  height: 22px !important;
  font-size: 11.5px !important;
  padding: 0 2px !important;
  text-align: center !important;
}

/* Konsolidasyon Tıklanabilir Ürün & 3 Not Alanı Rozetleri */
.pool-product-name-btn {
  font-weight: 700;
  color: var(--text-main);
  font-size: 12.5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 4px;
  padding: 2px 4px;
  margin: -2px -4px;
  transition: all 0.15s ease;
  user-select: none;
}

.pool-product-name-btn:hover {
  color: var(--primary);
  background-color: #eff6ff;
  text-decoration: underline;
}

.pool-product-name-btn .edit-hint-icon {
  font-size: 10px;
  color: var(--primary);
  opacity: 0.6;
  transition: opacity 0.15s ease;
}

.pool-product-name-btn:hover .edit-hint-icon {
  opacity: 1;
}

.pool-note-indicator-group {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 2px;
}

.pool-note-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 9px;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.pool-note-badge:hover {
  transform: scale(1.2);
}

.pool-note-badge.sube-note {
  background: #dbeafe;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.pool-note-badge.tedarikci-note {
  background: #d1fae5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.pool-note-badge.merkez-note {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

/* Yanıp Sönen (Pulsing / Flashing) Yeni Not Animasyonları */
@keyframes notePulseBlink {

  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  }

  50% {
    transform: scale(1.18);
    box-shadow: 0 0 10px 4px rgba(245, 158, 11, 0.6);
  }
}

@keyframes noteBoxGlow {

  0%,
  100% {
    border-color: #ef4444 !important;
    background-color: #fef2f2 !important;
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.35) !important;
  }

  50% {
    border-color: #f59e0b !important;
    background-color: #fffbeb !important;
    box-shadow: 0 0 14px rgba(245, 158, 11, 0.55) !important;
  }
}

.note-badge-unread-pulse {
  animation: notePulseBlink 1.4s infinite ease-in-out !important;
  position: relative !important;
}

.note-badge-unread-pulse::after {
  content: '';
  position: absolute;
  top: -2px;
  right: -2px;
  width: 7px;
  height: 7px;
  background: #ef4444;
  border-radius: 50%;
  border: 1.5px solid white;
  box-shadow: 0 0 4px #ef4444;
}

.note-box-unread-glow {
  animation: noteBoxGlow 1.8s infinite ease-in-out !important;
}

/* Canlı Açılır Ürün Arama Listesi (Autocomplete Dropdown) */
.change-prod-item {
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.15s ease;
}

.change-prod-item:last-child {
  border-bottom: none;
}

.change-prod-item:hover,
.change-prod-item.active {
  background-color: #eff6ff;
}

.change-prod-item-name {
  font-weight: 700;
  color: var(--text-main);
  font-size: 13px;
}

.change-prod-item-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  display: flex;
  gap: 6px;
  align-items: center;
}

.change-prod-item-price {
  text-align: right;
  white-space: nowrap;
}

/* Şube Portalı: Onaylanan & Sipariş Verilen Filtre Hapları */
.branch-status-filter-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.branch-status-pill {
  border: 1px solid var(--border);
  background: white;
  color: var(--text-main);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.branch-status-pill:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.branch-status-pill.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.branch-status-pill .pill-count {
  background: rgba(0, 0, 0, 0.08);
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 10px;
}

.branch-status-pill.active .pill-count {
  background: rgba(255, 255, 255, 0.25);
  color: white;
}

/* Dashboard İstatistikleri Stilleri */
.dashboard-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 6px;
  transition: background 0.15s ease;
  border-bottom: 1px solid #f1f5f9;
}

.dashboard-stat-row:last-child {
  border-bottom: none;
}

.dashboard-stat-row:hover {
  background: #f8fafc;
}

.dashboard-progress-bar-bg {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 5px;
}

.dashboard-progress-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s ease;
}

/* ==========================================================================
   KPI Summary Cards
   ========================================================================== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.kpi-icon.blue {
  background: var(--primary-light);
  color: var(--primary);
}

.kpi-icon.orange {
  background: var(--warning-light);
  color: var(--warning-text);
}

.kpi-icon.green {
  background: var(--success-light);
  color: var(--success);
}

.kpi-icon.purple {
  background: var(--purple-light);
  color: var(--purple);
}

.kpi-data .kpi-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.kpi-data .kpi-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 2px;
}

/* ==========================================================================
   Card Component
   ========================================================================== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
  overflow: hidden;
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-body {
  padding: 20px;
}

/* ==========================================================================
   Buttons & Form Controls
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.btn-secondary {
  background: var(--bg-subtle);
  color: var(--text-main);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: #e2e8f0;
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-success:hover {
  background: #059669;
}

.btn-danger {
  background: var(--danger-light);
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
  background: var(--danger);
  color: white;
}

.btn-outline-primary {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline-primary:hover {
  background: var(--primary-light);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 6px;
}

.form-control {
  width: 100%;
  padding: 8px 12px;
  font-size: 13px;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--text-main);
  outline: none;
  transition: var(--transition);
}

.form-select {
  width: 100%;
  padding: 7px 28px 7px 10px;
  font-size: 12.5px;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background-color: var(--bg-input);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
  background-position: right 8px center;
  background-repeat: no-repeat;
  background-size: 14px 14px;
  color: var(--text-main);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  transition: var(--transition);
  cursor: pointer;
}

.form-select-sm {
  padding: 4px 26px 4px 8px;
  font-size: 12px;
  height: 32px;
  line-height: 1.4;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-focus);
}

.search-box {
  position: relative;
  min-width: 260px;
}

.search-box input {
  padding-left: 36px;
}

.search-box .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  pointer-events: none;
}

/* ==========================================================================
   Tables
   ========================================================================== */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.custom-table th {
  background: #f8fafc;
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.custom-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-main);
  vertical-align: middle;
}

.custom-table tbody tr {
  transition: var(--transition);
}

.custom-table tbody tr:hover {
  background-color: #f8fafc;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.badge-warning {
  background: var(--warning-light);
  color: var(--warning-text);
}

.badge-info {
  background: var(--info-light);
  color: var(--info-text);
}

.badge-success {
  background: var(--success-light);
  color: var(--success-text);
}

.badge-danger {
  background: var(--danger-light);
  color: var(--danger-text);
}

.badge-purple {
  background: var(--purple-light);
  color: var(--purple);
}

.badge-neutral {
  background: var(--bg-subtle);
  color: var(--text-muted);
}

/* Urgency Tags */
.urgency-pill {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  display: inline-block;
}

.urgency-Normal {
  background: #e2e8f0;
  color: #475569;
}

.urgency-Acil {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
}

.urgency-Kritik {
  background: #7f1d1d;
  color: #ffffff;
  animation: pulse 2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.75;
  }
}

/* ==========================================================================
   Consolidation Pool Grouped List Tables
   ========================================================================== */
.pool-grouped-list .custom-table tbody tr {
  transition: background-color 0.15s ease;
}

.pool-grouped-list .custom-table tbody tr:hover {
  background: #f8fafc;
}

.pool-grouped-list .custom-table tfoot tr {
  background: #f8fafc;
  border-top: 2px solid var(--border);
}

/* Eski sürümden kalan kart sınıfları, başka ekranlardaki olası kullanımlar için korunuyor. */
.pool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 20px;
}

.pool-supplier-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.pool-supplier-card:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-md);
}

.pool-supplier-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #8b5cf6 0%, #d946ef 100%);
}

.pool-branch-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.pool-branch-card:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-md);
}

.pool-branch-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #0284c7 0%, #06b6d4 100%);
}

.pool-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.pool-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.pool-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

.pool-items-list {
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  margin: 12px 0 16px;
  max-height: 200px;
  overflow-y: auto;
  font-size: 12px;
}

.pool-item-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid #e2e8f0;
}

.pool-item-row:last-child {
  border-bottom: none;
}

.pool-total-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  margin-top: auto;
  border-top: 1px solid var(--border);
}

.pool-total-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.pool-total-amount {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
}

/* ==========================================================================
   Consolidation Pool View Switcher & Product List Styles
   ========================================================================== */
.pool-view-switcher {
  display: inline-flex;
  background: var(--bg-subtle);
  padding: 3px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  gap: 3px;
}

.pool-view-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.pool-view-btn:hover {
  color: var(--text-main);
  background: rgba(0, 0, 0, 0.04);
}

.pool-view-btn.active {
  background: var(--bg-card);
  color: var(--primary);
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.pool-branch-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  margin: 2px 4px 2px 0;
  white-space: nowrap;
}

.pool-branch-tag i {
  color: var(--primary);
  font-size: 10px;
}

.pool-stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: white;
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  color: var(--text-muted);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.pool-stat-chip strong {
  color: var(--text-main);
  font-weight: 700;
}

.pool-group-header-row td {
  background: #f8fafc !important;
  border-top: 2px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
}

/* ==========================================================================
   Gelişmiş Konsolidasyon Havuzu: Sticky Bar, Şube Kırılımı ve Filtre Çipleri
   ========================================================================== */

/* Yapışkan Alt Aksiyon Çubuğu (Sticky Action Bar) */
.pool-sticky-bar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(140%);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 10px 20px;
  box-shadow: 0 12px 35px -4px rgba(15, 23, 42, 0.15), 0 4px 6px -2px rgba(15, 23, 42, 0.05);
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 1000;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
  opacity: 0;
  pointer-events: none;
}

.pool-sticky-bar.active {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.pool-sticky-info {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text-main);
  padding-right: 8px;
  border-right: 1px solid var(--border);
}

.pool-sticky-count {
  background: var(--primary);
  color: white;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
}

.pool-sticky-total {
  font-size: 15px;
  font-weight: 800;
  color: var(--primary);
}

.pool-sticky-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Şube Kırılımı & Genişletme */
.pool-branch-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #e0e7ff;
  color: #3730a3;
  border: 1px solid #c7d2fe;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
}

.pool-branch-more-btn:hover {
  background: #c7d2fe;
  transform: translateY(-1px);
}

.pool-branch-subrow {
  background: #fafbfc !important;
  border-bottom: 2px solid var(--border);
}

.pool-branch-subtable-wrapper {
  padding: 12px 16px;
  background: #f8fafc;
  border-radius: var(--radius-md);
  margin: 6px 12px 10px 12px;
  border: 1px solid var(--border);
}

.pool-branch-subtable {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.pool-branch-subtable th {
  background: #e2e8f0;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
}

.pool-branch-subtable td {
  padding: 6px 10px;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: middle;
}

.pool-inline-qty-input {
  width: 75px;
  padding: 4px 6px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid var(--border);
  border-radius: 4px;
  text-align: right;
  color: var(--primary);
  background: white;
}

.pool-inline-qty-input:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

/* Tablo Yoğunluk Seçenekleri (Density) */
.table-compact th {
  padding: 6px 8px !important;
  font-size: 11px !important;
  white-space: nowrap !important;
}

.table-compact td {
  padding: 4px 8px !important;
  font-size: 12px !important;
  white-space: nowrap !important;
  line-height: 1.25 !important;
}

.table-comfortable th {
  padding: 12px 16px !important;
  font-size: 12px !important;
}

.table-comfortable td {
  padding: 14px 16px !important;
  font-size: 13px !important;
}

/* Sıralanabilir Sütun Başlıkları */
th.sortable {
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease;
}

th.sortable:hover {
  background: #e2e8f0 !important;
  color: var(--text-main) !important;
}

th.sortable i.sort-icon {
  margin-left: 4px;
  font-size: 10px;
  color: var(--text-light);
}

th.sortable.active-sort {
  color: var(--primary) !important;
}

th.sortable.active-sort i.sort-icon {
  color: var(--primary);
}

/* Filtre Çipleri (Chips) */
.pool-active-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 8px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
}

.filter-chip-remove {
  cursor: pointer;
  color: #3b82f6;
  font-size: 12px;
  font-weight: bold;
}

.filter-chip-remove:hover {
  color: #1d4ed8;
}

/* Talep Yaşı ve Durum Rozetleri */
.demand-age-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
}

.demand-age-fresh {
  background: #f1f5f9;
  color: #475569;
}

.demand-age-warning {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.demand-age-critical {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
  animation: pulse 2s infinite;
}

.open-po-alert-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fef9c3;
  color: #854d0e;
  border: 1px solid #fef08a;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
}

.moq-warning-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fed7aa;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
}

/* Tıklanıp Kopyalanabilir Rozet */
.copyable-badge {
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.copyable-badge:hover {
  transform: translateY(-1px) scale(1.03);
  filter: brightness(0.95);
}

.copyable-badge:active {
  transform: scale(0.98);
}

/* Satır Miktar Düzenleme Kontrolleri */
.pool-qty-ctrl {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: white;
  overflow: hidden;
}

.pool-qty-btn {
  background: var(--bg-subtle);
  border: none;
  padding: 4px 7px;
  font-size: 11px;
  font-weight: bold;
  cursor: pointer;
  color: var(--text-main);
  transition: background 0.15s ease;
}

.pool-qty-btn:hover {
  background: #e2e8f0;
}

.pool-qty-num {
  width: 55px;
  border: none;
  text-align: center;
  font-weight: 800;
  font-size: 13px;
  color: var(--primary);
  outline: none;
  padding: 2px 4px;
}

/* ==========================================================================
   Branch Portal Layout (Storefront & Cart)
   ========================================================================== */
.branch-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
  align-items: start;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 1200px) {
  .branch-layout {
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 12px;
  }
}

@media (max-width: 992px) {
  .branch-layout {
    grid-template-columns: 1fr;
  }
}

/* Şube Portalı Kompakt Navigasyon & Şube Seçim Çubuğu (Tek Satır) */
.branch-nav-toolbar {
  background: var(--bg-card);
  padding: 6px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 12px;
  flex-wrap: wrap;
}

.branch-tabs-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.branch-tabs-group .tab-btn {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
}

.branch-tabs-group .tab-btn.active {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: var(--primary);
}

.branch-select-inline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.branch-select-bar {
  background: var(--bg-card);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 12px;
  flex-wrap: wrap;
}

.category-pills {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.category-pill {
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.category-pill:hover,
.category-pill.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

/* Product Catalog Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.product-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  background: var(--bg-subtle);
  color: var(--text-muted);
  border-radius: 4px;
}

.product-code {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}

.product-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
  line-height: 1.3;
}

.product-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 32px;
}

.product-pricing {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
}

.product-price {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
}

.product-unit {
  font-size: 12px;
  color: var(--text-muted);
}

.product-add-action {
  display: flex;
  gap: 8px;
}

.qty-input {
  width: 70px;
  text-align: center;
  font-weight: 700;
}

/* Sticky Order Cart (Right Panel) */
.cart-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 84px;
  overflow: hidden;
  box-sizing: border-box;
}

.cart-header {
  background: #f8fafc;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-header h3 {
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Sepet İçi Arama Çubuğu */
.cart-search-wrapper {
  padding: 8px 12px;
  background: #f1f5f9;
  border-bottom: 1px solid var(--border);
}

.cart-search-inner {
  position: relative;
  display: flex;
  align-items: center;
}

.cart-search-inner i {
  position: absolute;
  left: 10px;
  color: var(--text-muted);
  font-size: 11px;
}

.cart-search-inner input {
  width: 100%;
  padding: 6px 26px 6px 28px;
  font-size: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: white;
  outline: none;
  box-sizing: border-box;
  transition: var(--transition);
}

.cart-search-inner input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.cart-search-clear {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  cursor: pointer;
  padding: 2px 4px;
}

.cart-search-clear:hover {
  color: var(--danger);
}

.cart-items-container {
  padding: 8px 14px;
  max-height: 270px;
  overflow-y: auto;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #f1f5f9;
  gap: 8px;
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* Sepet İçi Mini Miktar Ayarlayıcı */
.cart-mini-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: white;
  overflow: hidden;
}

.cart-mini-btn {
  width: 20px;
  height: 22px;
  border: none;
  background: #f1f5f9;
  color: var(--text-main);
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  padding: 0;
}

.cart-mini-btn:hover {
  background: #e2e8f0;
}

.cart-mini-input {
  width: 34px;
  height: 22px;
  border: none;
  border-left: 1px solid #cbd5e1;
  border-right: 1px solid #cbd5e1;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  outline: none;
  padding: 0;
}

.btn-remove-item {
  background: none;
  border: none;
  color: #ef4444;
  cursor: pointer;
  font-size: 12px;
  padding: 3px 5px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.btn-remove-item:hover {
  background: #fee2e2;
}

.cart-footer {
  background: #f8fafc;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
}

.cart-summary-line {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 8px;
  color: var(--text-muted);
}

.cart-summary-line.total {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
  border-top: 1px dashed var(--border);
  padding-top: 8px;
  margin-top: 8px;
}

/* ==========================================================================
   Modals
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

#quick-prices, #product-offers, #bulk-offers {
  width: min(880px, calc(100% - 24px));
  max-width: none;
  margin: auto;
  padding: 0;
  border: 1px solid var(--border);
  color: var(--text-main);
  overflow: auto;
}

#quick-prices:not([open]), #product-offers:not([open]), #bulk-offers:not([open]) {
  display: none;
}

#quick-prices::backdrop, #product-offers::backdrop, #bulk-offers::backdrop {
  background: rgb(15 23 42 / 55%);
}

.quick-prices-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.quick-prices-table {
  max-height: 50vh;
  overflow: auto;
}

#bulk-offers {
  width: min(1060px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
}

#bulk-offers .quick-prices-table {
  max-height: 42vh;
}

#bulk-offers td small {
  display: block;
  color: var(--text-muted);
}

.bulk-offers-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-block: 10px;
}

.bulk-offers-pagination {
  justify-content: flex-end;
}

#quick-prices {
  max-height: calc(100dvh - 24px);
  overflow: hidden;
}

#quick-prices form {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

#quick-prices .modal-header,
#quick-prices .modal-footer {
  flex-shrink: 0;
}

#quick-prices .modal-footer {
  flex-wrap: wrap;
}

#quick-prices .quick-prices-table {
  max-height: none;
}

#quick-prices .custom-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

#quick-prices .custom-table th,
#quick-prices .custom-table td {
  padding: 8px;
  white-space: normal;
  overflow-wrap: anywhere;
}

#quick-prices th:last-child {
  width: clamp(165px, 32%, 230px);
}

#quick-prices td input {
  width: 100%;
  min-width: 0;
}

#quick-prices .quick-price-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
}

#quick-prices .quick-price-actions button {
  white-space: nowrap;
}

#product-offers .quick-prices-filters {
  align-items: end;
}

@media (min-width: 850px) {
  #quick-prices .quick-prices-filters {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, .9fr) minmax(0, .9fr);
  }

  #product-offers .quick-prices-filters {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto auto;
  }
}

@media (max-width: 420px) {
  #quick-prices th:last-child { width: 100px; }
  #quick-prices .quick-price-actions { grid-template-columns: 1fr; }
  #quick-prices .quick-price-actions button { padding-inline: 4px; }
}

.quick-price-last {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 11px;
}

#quick-prices [role="status"] {
  margin-top: 12px;
}

.modal-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 16px;
  font-weight: 700;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 20px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  border-radius: 4px;
}

.modal-close:hover {
  color: var(--text-main);
  background: var(--bg-subtle);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: #f8fafc;
}

/* ==========================================================================
   Purchase Order Print / Document View
   ========================================================================== */
.po-document {
  background: white;
  padding: 32px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  color: #1e293b;
}

.po-header-grid {
  display: flex;
  justify-content: space-between;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 20px;
  margin-bottom: 24px;
}

.po-company-name {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
}

.po-badge-title {
  font-size: 22px;
  font-weight: 800;
  color: #334155;
  text-align: right;
}

.po-info-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 20px;
  font-size: 13px;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: white;
  border-radius: var(--radius-md);
  padding: 12px 18px;
  box-shadow: var(--shadow-lg);
  border-left: 4px solid var(--primary);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInRight 0.3s ease-out;
  min-width: 280px;
}

.toast.success {
  border-left-color: var(--success);
}

.toast.error {
  border-left-color: var(--danger);
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@media print {
  body * {
    visibility: hidden;
  }

  .po-document,
  .po-document * {
    visibility: visible;
  }

  .po-document {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    border: none;
    padding: 0;
  }

  .no-print {
    display: none !important;
  }
}


/* ==========================================================================
   3 KOD ETİKETLERİ (SATINALMA, MOD, SİMPRA)
   ========================================================================== */
.code-tags-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.code-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing: -0.2px;
  border: 1px solid transparent;
  white-space: nowrap !important;
}

/* Mal Kabul & İrsaliye Tablosu - Tek Satır & Kompakt Düzen */
#rec-open-departments[hidden],
#rec-save-departments[hidden],
#rec-copy-invoice[hidden],
#rec-copy-stock[hidden] {
  display: none;
}

.rec-items-table {
  width: 100%;
  border-collapse: collapse;
}

.rec-items-table th,
.rec-items-table td {
  padding: 4px 6px;
  vertical-align: middle;
  white-space: nowrap;
  font-size: 11.5px;
}

.rec-items-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.1s ease;
  height: 34px;
}

.rec-items-table tbody tr:hover {
  background: #f8fafc;
}

.rec-row-not-delivered {
  background: #f8fafc !important;
  opacity: 0.72;
}

.rec-row-not-delivered td strong {
  text-decoration: line-through;
  color: var(--text-muted) !important;
}

.code-badge.sat {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.code-badge.mod {
  background: #f5f3ff;
  color: #6d28d9;
  border-color: #ddd6fe;
}

.code-badge.smp {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

.code-badge.logo {
  background: #fff7ed;
  color: #c2410c;
  border-color: #fed7aa;
}

/* ==========================================================================
   HIZLI SİPARİŞ LİSTE TABLOSU (ŞUBE PORTALI)
   ========================================================================== */
.fast-order-table-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.branch-catalog-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
}

.branch-catalog-page-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

#branch-catalog-page-indicator {
  min-width: 54px;
  text-align: center;
  font-weight: 800;
}

.fast-order-table {
  width: 100%;
  border-collapse: collapse;
}

.fast-order-table th {
  background: #f8fafc;
  padding: 9px 10px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

.fast-order-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
  vertical-align: middle;
}

.fast-order-table tbody tr:hover {
  background-color: #f8fafc;
}

.fast-order-table tbody tr.has-qty {
  background-color: #f0fdf4;
}

/* Miktar Giriş Butonları & Input */
.qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  background: white;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.qty-step-btn {
  width: 26px;
  height: 28px;
  border: none;
  background: #f8fafc;
  color: var(--text-main);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.qty-step-btn:hover {
  background: #e2e8f0;
  color: var(--primary);
}

.qty-step-input {
  width: 44px;
  height: 28px;
  border: none;
  border-left: 1px solid #cbd5e1;
  border-right: 1px solid #cbd5e1;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-main);
  outline: none;
  font-family: inherit;
}

.qty-step-input:focus {
  background: #eff6ff;
  color: var(--primary);
}

/* ==========================================================================
   OTURUM AÇMA (LOGIN) VE KULLANICI PROFİLİ
   ========================================================================== */
.user-profile-header {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-subtle);
  padding: 3px 6px 3px 8px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
}

.user-avatar {
  width: 26px;
  height: 26px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  font-weight: 700;
  flex-shrink: 0;
}

.user-info-text {
  line-height: 1.15;
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
}

.user-role-label {
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1;
}

.user-role-label .badge {
  padding: 1px 5px;
  font-size: 9.5px;
  font-weight: 600;
}

/* Veritabanı Durumu Butonu (Çıkış Butonunun Önünde) */
.btn-db-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  background: #ecfdf5;
  color: #065f46;
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: 1px solid #a7f3d0;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-db-status:hover {
  background: #d1fae5;
  border-color: #6ee7b7;
  color: #047857;
  box-shadow: 0 1px 3px rgba(16, 185, 129, 0.2);
}

.btn-db-status .dot {
  width: 6px;
  height: 6px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
}

.btn-logout {
  background: transparent;
  border: 1px solid transparent;
  color: var(--danger);
  cursor: pointer;
  padding: 3px 8px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-logout:hover {
  background: var(--danger-light);
  border-color: rgba(239, 68, 68, 0.15);
}

/* Login Modal / Overlay */
.login-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #eaf4ff url("../../index.jpg") center / contain no-repeat;
  z-index: 1000;
  display: none;
  align-items: safe center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

.login-overlay.active {
  display: flex;
}

.login-card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  max-width: 440px;
  width: 100%;
  padding: 32px;
  border: 1px solid var(--border);
  animation: modalFadeIn 0.3s ease-out;
}

@media (min-width: 1120px) and (min-height: 680px) {
  .login-overlay--installed {
    --login-art-width: min(100vw, 179.1667dvh);
  }

  .login-overlay--installed .login-card {
    /* Align the form with the empty area below the logo in index.jpg. */
    left: calc(-0.283 * var(--login-art-width));
    top: calc(0.060 * var(--login-art-width));
    max-width: min(390px, calc(0.25 * var(--login-art-width)));
    padding: 12px 8px;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .login-overlay--installed .login-logo {
    display: none;
  }

  .login-overlay--installed .login-header {
    margin-bottom: 14px;
  }
}

@media (max-width: 720px) {
  .login-overlay {
    background-position: center top;
    background-size: 100% auto;
    padding-top: min(45vw, 220px);
  }

  .login-card {
    padding: 24px;
  }
}

.login-header {
  text-align: center;
  margin-bottom: 24px;
}

.login-logo {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  background: linear-gradient(135deg, var(--primary) 0%, #1e40af 100%);
  color: white;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.login-quick-picks {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px dashed var(--border);
}

.quick-pick-btn {
  padding: 8px 12px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--transition);
}

.quick-pick-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: #bfdbfe;
}

/* ==========================================================================
   YENİ: ŞUBE KOD SİSTEMİ & HIZLI GİRİŞ & BULUT TASLAK STİLLERİ
   ========================================================================== */

/* Tekil Kod Rozetleri (Şube Kod Sistemine Göre Özel) */
.code-badges-pair {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}

@media (min-width: 1400px) {
  .code-badges-pair {
    flex-direction: row;
    align-items: center;
    gap: 6px;
  }
}

.single-code-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.single-code-badge.simpra {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.single-code-badge.mod {
  background: #f5f3ff;
  color: #6b21a8;
  border: 1px solid #ddd6fe;
}

.single-code-badge.logo {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fed7aa;
}

.single-code-badge.sat {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.single-code-badge.clickable {
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.single-code-badge.clickable:hover {
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  filter: brightness(0.96);
}

.single-code-badge.clickable:active {
  transform: scale(0.98);
}

/* Kullanıcı Profilinde Kod Tercihi Kutusu */
.user-code-pref-box {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 11px;
  color: var(--text-muted);
  margin-left: 6px;
  margin-right: 4px;
}

.user-code-pref-box label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
}

.user-code-pref-select {
  border: 1px solid var(--border);
  background: white;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
  color: var(--primary);
  cursor: pointer;
  outline: none;
  padding: 2px 6px;
  transition: all 0.2s ease;
}

.user-code-pref-select:hover,
.user-code-pref-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

/* Satır Eklendi Vurgusu (Flash) */
@keyframes rowAddedFlash {
  0% {
    background-color: #bbf7d0;
  }

  100% {
    background-color: #f0fdf4;
  }
}

.fast-order-table tbody tr.flash-added {
  animation: rowAddedFlash 0.8s ease-out;
}

/* Hızlı Klavye Giriş İpucu Bandı */
.fast-keyboard-hint {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-md);
  padding: 10px 16px;
  margin-bottom: 14px;
  font-size: 12px;
  color: #1e40af;
  box-shadow: var(--shadow-sm);
}

.fast-keyboard-hint kbd {
  background: white;
  border: 1px solid #93c5fd;
  border-radius: 4px;
  padding: 2px 6px;
  font-family: monospace;
  font-weight: 700;
  font-size: 11px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

/* Şube Kod Sistemi Seçim Kutusu */
.branch-code-system-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-subtle);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.branch-code-system-selector label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Bulut Taslak Durum Rozeti */
.draft-cloud-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: #f1f5f9;
  color: var(--text-muted);
  border: 1px solid var(--border);
  transition: all 0.25s ease;
}

.draft-cloud-status.saved {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
}

.draft-cloud-status.saving {
  background: #fef3c7;
  color: #92400e;
  border-color: #fde68a;
}

/* Şube Portalı Sekmeleri ve Mal Kabul Stilleri */
.branch-view-pane {
  animation: fadeIn 0.2s ease-in-out;
}

@keyframes pulseDiffBadge {

  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(224, 36, 36, 0.4);
  }

  50% {
    transform: scale(1.05);
    box-shadow: 0 0 0 4px rgba(224, 36, 36, 0.15);
  }
}

.badge-variance-danger {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
  animation: pulseDiffBadge 2s infinite ease-in-out;
  font-weight: 700;
}

.badge-variance-success {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
  font-weight: 700;
}

.badge-variance-neutral {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
  font-weight: 600;
}

/* Mal Kabul Modalı Tablo Giriş Alanları */
.rec-input-qty,
.rec-input-price {
  font-weight: 700;
  text-align: right;
  padding: 2px 4px;
  font-size: 11.5px;
  border-radius: 4px;
  height: 26px !important;
}

.rec-input-qty:focus,
.rec-input-price:focus {
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.rec-variance-highlight-danger {
  background: #fff5f5 !important;
}

.rec-variance-highlight-success {
  background: #f0fdf4 !important;
}

/* Merkez İnceleme Modalı Mal Kabul Rapor Kutusu */
.order-receipt-card {
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.order-receipt-card.has-variance {
  background: #fff8f8;
  border-color: #fca5a5;
}

.order-receipt-card.no-variance {
  background: #f0fdf4;
  border-color: #86efac;
}

/* 3 Görünüm Düğmeleri (Ürün - Tedarikçi - Şube) */
.view-mode-buttons {
  display: inline-flex;
  align-items: center;
  background: #e2e8f0;
  padding: 3px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  gap: 2px;
}

.btn-segmented {
  background: transparent;
  border: none;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-segmented:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.6);
}

.btn-segmented.active {
  background: #ffffff;
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Tek Satıra Sığan Tablolar & Modallar & Tam Ekran Uyum */
.table-single-line {
  width: 100% !important;
  table-layout: auto;
}
.table-single-line th,
.table-single-line td {
  white-space: nowrap !important;
  vertical-align: middle !important;
  padding: 6px 8px !important;
  font-size: 12px;
}

.table-single-line .cell-truncate-prod {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}

.table-single-line .cell-truncate-branch {
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}

.table-single-line .cell-truncate-supplier {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}

.table-single-line .code-badges-inline {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  white-space: nowrap;
}

/* Fiyat Farkı Karar Rozetleri */
.badge-decision-kesilecek {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #f87171;
  font-weight: 800;
}

.badge-decision-kesilmeyecek {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
  font-weight: 800;
}

.badge-decision-beklemede {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
  font-weight: 700;
}

/* ==========================================================================
   HAFTALIK GEZİNME & FİLTRELEME ÇUBUĞU (Pazartesi - Pazar)
   ========================================================================== */
.week-navigator-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 6px 14px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
}

.week-nav-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.week-nav-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.week-current-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.week-nav-btn {
  padding: 4px 9px;
  font-size: 11.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.week-badge-current {
  background: #e0e7ff;
  color: #3730a3;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.week-badge-past {
  background: #f1f5f9;
  color: #475569;
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.week-badge-future {
  background: #ecfdf5;
  color: #065f46;
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.week-badge-all {
  background: #fef3c7;
  color: #92400e;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ================================================================ */
/* Sipariş Talepleri: Tek Satır Toolbar & Durum İkon Butonları      */
/* ================================================================ */
.single-row-toolbar {
  min-height: 48px;
  background: #ffffff !important;
}

.orders-status-icon-bar {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #f8fafc;
  padding: 2px 4px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
}

.status-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 28px;
  padding: 0 8px;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-main);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
  line-height: 1;
}

.status-icon-btn i {
  font-size: 12.5px;
  transition: transform 0.15s ease;
}

.status-icon-btn:hover {
  background: #e2e8f0;
  color: var(--text-main);
}

.status-icon-btn:hover i {
  transform: scale(1.15);
}

.status-icon-count {
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 8px;
  background: #e2e8f0;
  color: #64748b;
  transition: all 0.15s ease;
}

/* Tekil Aktif Durumlar (Kriter Aktif Olduğunda) */
.status-icon-btn.active {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.status-icon-btn.is-all.active {
  background: #1e293b;
  color: #ffffff;
  border-color: #1e293b;
}
.status-icon-btn.is-all.active .status-icon-count {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.status-icon-btn.status-beklemede.active {
  background: #f59e0b;
  color: #ffffff;
  border-color: #d97706;
}
.status-icon-btn.status-beklemede.active i {
  color: #ffffff !important;
}
.status-icon-btn.status-beklemede.active .status-icon-count {
  background: rgba(255, 255, 255, 0.28);
  color: #ffffff;
}

.status-icon-btn.status-inceleniyor.active {
  background: #3b82f6;
  color: #ffffff;
  border-color: #2563eb;
}
.status-icon-btn.status-inceleniyor.active i {
  color: #ffffff !important;
}
.status-icon-btn.status-inceleniyor.active .status-icon-count {
  background: rgba(255, 255, 255, 0.28);
  color: #ffffff;
}

.status-icon-btn.status-konsolide.active {
  background: #a855f7;
  color: #ffffff;
  border-color: #9333ea;
}
.status-icon-btn.status-konsolide.active i {
  color: #ffffff !important;
}
.status-icon-btn.status-konsolide.active .status-icon-count {
  background: rgba(255, 255, 255, 0.28);
  color: #ffffff;
}

.status-icon-btn.status-siparis.active {
  background: #0284c7;
  color: #ffffff;
  border-color: #0369a1;
}
.status-icon-btn.status-siparis.active i {
  color: #ffffff !important;
}
.status-icon-btn.status-siparis.active .status-icon-count {
  background: rgba(255, 255, 255, 0.28);
  color: #ffffff;
}

.status-icon-btn.status-teslim.active {
  background: #10b981;
  color: #ffffff;
  border-color: #059669;
}
.status-icon-btn.status-teslim.active i {
  color: #ffffff !important;
}
.status-icon-btn.status-teslim.active .status-icon-count {
  background: rgba(255, 255, 255, 0.28);
  color: #ffffff;
}

.status-icon-btn.status-iptal.active {
  background: #f43f5e;
  color: #ffffff;
  border-color: #e11d48;
}
.status-icon-btn.status-iptal.active i {
  color: #ffffff !important;
}
.status-icon-btn.status-iptal.active .status-icon-count {
  background: rgba(255, 255, 255, 0.28);
  color: #ffffff;
}

/* Talepler Arama Alanı (Kompakt & Modern) */
.orders-search-box {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.orders-search-box input {
  height: 32px !important;
  font-size: 11.5px !important;
  padding-left: 26px !important;
  padding-right: 22px !important;
  width: 170px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}
.orders-search-box input:focus {
  width: 210px;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.orders-search-box .search-clear-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 4px;
}
.orders-search-box .search-clear-btn:hover {
  color: var(--danger);
}

/* Modal Ürün Bazlı Fiyat Farkı Karar Seçicisi */
.item-variance-decision-select {
  height: 28px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  border-radius: 6px !important;
  padding: 2px 6px !important;
  transition: all 0.15s ease;
  cursor: pointer;
}
.item-variance-decision-select:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.12);
}

/* Sepet İçi Ürün Not Butonları & Rozetleri */
.cart-item-notes-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 5px;
  padding-top: 4px;
  border-top: 1px dashed #e2e8f0;
  gap: 6px;
  flex-wrap: wrap;
}
.btn-cart-note {
  background: transparent;
  border: 1px dashed #cbd5e1;
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}
.btn-cart-note:hover {
  background: #f1f5f9;
  border-color: var(--primary);
  color: var(--primary);
}
.btn-cart-note.has-notes {
  background: #eff6ff;
  border-color: #93c5fd;
  color: var(--primary);
  border-style: solid;
}
.cart-note-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 9.5px;
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 700;
}
.cart-note-chip.sube {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}
.cart-note-chip.merkez {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}
.cart-note-chip.tedarikci {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

/* Sipariş Havuzu & Talepler: 2. Satır Açıklama / Not Şeridi */
.pool-single-line-table tbody tr.pool-note-subrow,
.table-single-line tbody tr.pool-note-subrow,
.rec-items-table tbody tr.pool-note-subrow,
tr.pool-note-subrow {
  height: auto !important;
  background: #fafcff !important;
  cursor: pointer;
}
.pool-single-line-table tbody tr.pool-note-subrow:hover,
.table-single-line tbody tr.pool-note-subrow:hover,
.rec-items-table tbody tr.pool-note-subrow:hover,
tr.pool-note-subrow:hover {
  background: #f1f5f9 !important;
}
.pool-single-line-table tbody tr.pool-note-subrow td,
.table-single-line tbody tr.pool-note-subrow td,
.rec-items-table tbody tr.pool-note-subrow td,
tr.pool-note-subrow td {
  height: auto !important;
  white-space: normal !important;
  padding: 2px 8px 7px 8px !important;
  border-top: none !important;
  vertical-align: middle !important;
}
.rec-items-table tbody tr.pool-main-row-has-notes,
tr.pool-main-row-has-notes,
tr.pool-main-row-has-notes td {
  border-bottom: none !important;
}
.pool-inline-notes-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-left: 3px solid #3b82f6;
  border-radius: 6px;
  font-size: 11px;
  line-height: 1.35;
}
.pool-inline-note-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  word-break: break-word;
}
.pool-inline-note-item.sube {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}
.pool-inline-note-item.tedarikci {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.pool-inline-note-item.merkez {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}
.pool-inline-note-item.siparis {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
}
.pool-inline-note-item.is-unread {
  font-weight: 600;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.25);
}

/* 3 ve 2 Sütunlu Satır İçi Not Grid (Merkez: Şube | Satıcı | Merkez - Şube: Şube | Tedarikçi) */
.inline-notes-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}
.inline-notes-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}
@media (max-width: 768px) {
  .inline-notes-grid-3,
  .inline-notes-grid-2 {
    grid-template-columns: 1fr;
    gap: 5px;
  }
}
.inline-note-box {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  min-width: 0;
}
.inline-note-box.sube {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e40af;
}
.inline-note-box.tedarikci {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}
.inline-note-box.merkez {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}
.inline-note-box:focus-within {
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}
.inline-note-box.tedarikci:focus-within {
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.22);
}
.inline-note-box.merkez:focus-within {
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.25);
}
.inline-note-icon {
  flex-shrink: 0;
  font-size: 12px;
  width: 15px;
  text-align: center;
}
.inline-note-input {
  border: none;
  background: transparent;
  width: 100%;
  min-width: 0;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-main);
  outline: none;
  padding: 2px 0;
  font-family: inherit;
}
.inline-note-input::placeholder {
  color: #94a3b8;
  font-weight: 400;
  font-size: 11px;
}
.inline-note-readonly-text {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

/* Fiyat Farkı İade Kesildi & Tek Satır İkon Tik Rozetleri */
.badge-decision-iade-kesildi {
  background: #ede9fe;
  color: #5b21b6;
  border: 1px solid #c4b5fd;
  font-weight: 800;
}

.badge-icon-tick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
  line-height: 1;
}
.badge-icon-tick.success {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}
.badge-icon-tick.danger {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #f87171;
}
.badge-icon-tick.warning {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}
.badge-icon-tick.clickable,
.badge-decision-iade-kesildi.clickable {
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease;
}
.badge-icon-tick.clickable:hover,
.badge-decision-iade-kesildi.clickable:hover {
  transform: scale(1.06);
  filter: brightness(0.96);
}

/* Şube Mal Kabul Tablosu - Ekrana Tam Sığan Kompakt Düzen */
.table-compact-receiving th {
  padding: 7px 6px !important;
  font-size: 10.5px !important;
  letter-spacing: 0.2px;
  white-space: nowrap;
}
.table-compact-receiving td {
  padding: 6px 6px !important;
  font-size: 11.5px !important;
  vertical-align: middle !important;
}
.table-compact-receiving .badge {
  font-size: 10px !important;
  padding: 2px 6px !important;
}
.table-compact-receiving tbody tr.pool-note-subrow td {
  padding: 2px 6px 6px 6px !important;
}

/* Mal Kabul Modalı: Fatura Edildi (Gelecek) Satırı */
.rec-row-billed-future {
  background: #f0f9ff !important;
}
.rec-row-billed-future td:first-child {
  box-shadow: inset 3px 0 0 #0284c7;
}
.rec-status-select {
  height: 24px !important;
  padding: 1px 4px !important;
  font-size: 10.5px !important;
  font-weight: 700 !important;
  border-radius: 5px !important;
  min-width: 118px;
}
.login-required > .app-header,
.login-required > .main-wrapper {
  display: none;
}

.settings-list-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.settings-list-actions input[type="search"] {
  width: min(220px, 100%);
}
