/* =====================================================
   modal.css — Modal pencereler + Misc utilities
   ===================================================== */

/* ============================================
   Modal
   ============================================ */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
  animation: fadeIn 0.15s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal-card {
  background: var(--card);
  border-radius: var(--r);
  width: 100%;
  max-width: 920px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.2s ease-out;
}

.modal-card.modal-md { max-width: 600px; }
.modal-card.modal-sm { max-width: 480px; }

@keyframes slideUp {
  from { transform: translateY(10px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

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

.modal-header h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.modal-body {
  padding: 22px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.hint {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 10px;
  line-height: 1.55;
}

.hata-msg {
  background: var(--danger-soft);
  border: 1px solid #fecaca;
  color: var(--danger-text);
  padding: 11px 13px;
  border-radius: var(--r-sm);
  font-size: 13px;
  margin-top: 12px;
}

/* Import-specific */
#ictDosya {
  display: block;
  width: 100%;
  padding: 22px;
  border: 2px dashed var(--border-strong);
  border-radius: var(--r);
  font-size: 13px;
  background: var(--bg);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

#ictDosya:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.checkbox-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 14px;
  padding: 11px 13px;
  background: var(--warning-soft);
  border: 1px solid #fcd34d;
  border-radius: var(--r-sm);
  font-size: 13px;
  color: var(--warning-text);
  cursor: pointer;
}

.checkbox-row input { cursor: pointer; }

.ict-ozet {
  background: var(--success-soft);
  border: 1px solid #a7f3d0;
  color: var(--success-text);
  padding: 11px 13px;
  border-radius: var(--r-sm);
  font-size: 13px;
  margin-bottom: 12px;
}

.ict-preview-wrap {
  overflow: auto;
  max-height: 400px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
}

#ictPreview {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

#ictPreview th {
  background: #f9fafb;
  text-align: left;
  padding: 8px;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
}

#ictPreview td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--border-soft);
  white-space: nowrap;
}

/* ============================================
   Misc utilities
   ============================================ */
.barkod-alt {
  font-size: 11px;
  color: var(--muted);
  font-family: ui-monospace, "SF Mono", "Cascadia Code", "Roboto Mono", "Consolas", monospace;
  margin-top: 2px;
  letter-spacing: 0.02em;
}

.mono {
  font-family: ui-monospace, "SF Mono", "Cascadia Code", "Roboto Mono", "Consolas", monospace;
  font-size: 12px;
}

.dim {
  color: var(--muted);
  font-weight: 400;
  margin-left: 4px;
  font-size: 11px;
}

.sub {
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 2px;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.net-tutar {
  color: var(--success);
  font-variant-numeric: tabular-nums;
}

.kar-tutar {
  color: var(--success);
  font-variant-numeric: tabular-nums;
}

.zarar-tutar {
  color: var(--danger);
  font-variant-numeric: tabular-nums;
}

.kar-yuzde {
  font-style: normal;
  font-weight: 700;
  margin-left: 2px;
  font-size: 12px;
}

/* Trendyol PDF link */
#trTablo tbody td a {
  display: inline-block;
  padding: 3px 10px;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 5px;
  font-weight: 600;
  font-size: 11px;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: background 0.15s, color 0.15s;
}

#trTablo tbody td a:hover {
  background: var(--primary);
  color: white;
  text-decoration: none;
}

/* Selection */
::selection {
  background: var(--primary-soft);
  color: var(--primary);
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 999px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--muted-2); }

/* Responsive */
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .nav-item.active::before { display: none; }