/* ─── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #0d0f18;
  --bg-card:  rgba(255,255,255,0.04);
  --bg-card2: rgba(255,255,255,0.07);
  --border:   rgba(255,255,255,0.09);
  --border-h: rgba(255,255,255,0.18);
  --text:     #e8eaf0;
  --text-2:   #9ca3b4;
  --text-3:   #5a6378;
  --accent:   #ff6b35;
  --accent-2: #ff9500;
  --accent-g:  linear-gradient(135deg, #ff6b35 0%, #ff9500 100%);
  --blue:     #3b82f6;
  --green:    #22c55e;
  --red:      #ef4444;
  --radius:   14px;
  --radius-sm: 8px;
  --shadow:   0 4px 32px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 48px rgba(0,0,0,0.6);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ─── Animated Background ──────────────────────────────────── */
.bg-orbs {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  overflow: hidden;
}
.orb {
  position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.15;
  animation: drift 20s ease-in-out infinite;
}
.orb-1 { width: 500px; height: 500px; background: #ff6b35; top: -10%; left: -10%; animation-delay: 0s; }
.orb-2 { width: 400px; height: 400px; background: #3b82f6; bottom: -10%; right: -5%; animation-delay: -7s; }
.orb-3 { width: 300px; height: 300px; background: #8b5cf6; top: 40%; left: 50%; animation-delay: -13s; }

@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(30px, -40px) scale(1.08); }
  66%       { transform: translate(-20px, 20px) scale(0.95); }
}

/* ─── Header ───────────────────────────────────────────────── */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(13,15,24,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}
.header-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.logo { display: flex; align-items: center; gap: 12px; }
.logo-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--accent-g);
  display: flex; align-items: center; justify-content: center;
  color: white; flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(255,107,53,0.4);
}
.logo-title { font-size: 15px; font-weight: 700; letter-spacing: -0.3px; }
.logo-sub { font-size: 11px; color: var(--text-2); margin-top: 1px; }
.header-badge {
  font-size: 12px; font-weight: 500;
  background: rgba(255,107,53,0.15);
  color: var(--accent);
  border: 1px solid rgba(255,107,53,0.3);
  padding: 5px 12px; border-radius: 20px;
}

/* ─── Main Layout ──────────────────────────────────────────── */
.main {
  position: relative; z-index: 1;
  max-width: 1200px; margin: 0 auto;
  padding: 32px 24px 80px;
  display: flex; flex-direction: column; gap: 24px;
}

/* ─── Card ─────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  transition: border-color 0.3s;
}
.card:hover { border-color: var(--border-h); }

.card-header {
  display: flex; align-items: flex-start; gap: 16px; margin-bottom: 24px;
}
.step-badge {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent-g);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; color: white; flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(255,107,53,0.35);
}
.card-title { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.card-desc { font-size: 13px; color: var(--text-2); }

/* ─── Settings Grid ─────────────────────────────────────────── */
.settings-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px;
}
.field-group { display: flex; flex-direction: column; gap: 8px; }
.field-label { font-size: 13px; font-weight: 500; color: var(--text-2); }
.field-hint { font-weight: 400; color: var(--text-3); }
.field-input {
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  padding: 11px 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.field-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255,107,53,0.15);
}
.field-select { cursor: pointer; }
.field-select option { background: #1a1d2e; }

.input-wrap { position: relative; }
.input-wrap .field-input { padding-right: 44px; }
.icon-btn {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--text-2); cursor: pointer;
  padding: 4px; border-radius: 4px; transition: color 0.2s;
}
.icon-btn:hover { color: var(--text); }

.durum-btns { display: flex; gap: 10px; }
.durum-btn {
  flex: 1; padding: 10px 16px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--text-2); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.durum-btn:hover { border-color: var(--border-h); color: var(--text); }
.durum-btn.active {
  background: rgba(255,107,53,0.12);
  border-color: rgba(255,107,53,0.4);
  color: var(--accent);
}
.durum-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dot-green { background: var(--green); }
.dot-orange { background: var(--accent-2); }

/* ─── Drop Zone ─────────────────────────────────────────────── */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.drop-zone:hover, .drop-zone.drag-over {
  border-color: var(--accent);
  background: rgba(255,107,53,0.05);
}
.drop-icon { color: var(--accent); opacity: 0.7; margin-bottom: 4px; }
.drop-text { font-size: 16px; font-weight: 600; }
.drop-hint { font-size: 13px; color: var(--text-2); }

/* ─── Upload Result ─────────────────────────────────────────── */
.upload-result {
  margin-top: 20px;
  background: rgba(34,197,94,0.08);
  border: 1px solid rgba(34,197,94,0.2);
  border-radius: var(--radius-sm);
  padding: 16px;
}
.result-row { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.result-icon { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 700; }
.result-icon.success { background: rgba(34,197,94,0.2); color: var(--green); }
.result-title { font-size: 14px; font-weight: 600; }
.result-count { font-size: 12px; color: var(--text-2); }

.preview-title { font-size: 13px; font-weight: 500; color: var(--text-2); margin-bottom: 8px; }
.preview-table-wrap { overflow-x: auto; border-radius: var(--radius-sm); }
.preview-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.preview-table th {
  background: rgba(255,255,255,0.06); padding: 8px 12px;
  text-align: left; color: var(--text-2); font-weight: 600; white-space: nowrap;
}
.preview-table td { padding: 7px 12px; border-top: 1px solid var(--border); max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-table tr:hover td { background: rgba(255,255,255,0.03); }

/* ─── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 600;
  cursor: pointer; border: none; transition: all 0.2s;
  text-decoration: none; white-space: nowrap;
}
.btn:disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }
.btn-primary {
  background: var(--accent-g);
  color: white;
  box-shadow: 0 4px 16px rgba(255,107,53,0.35);
}
.btn-primary:hover { box-shadow: 0 6px 24px rgba(255,107,53,0.5); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-2);
}
.btn-outline:hover { border-color: var(--border-h); color: var(--text); background: rgba(255,255,255,0.04); }
.btn-danger-outline {
  background: transparent;
  border: 1px solid rgba(239,68,68,0.4);
  color: #ef4444;
}
.btn-danger-outline:hover { background: rgba(239,68,68,0.1); }
.btn-lg { padding: 14px 32px; font-size: 16px; }
.btn-sm { padding: 7px 14px; font-size: 13px; }

/* ─── Process Area ──────────────────────────────────────────── */
.process-center { display: flex; justify-content: center; margin: 8px 0 24px; }

.progress-area {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 24px;
}
.progress-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.progress-label { font-size: 14px; font-weight: 500; }
.progress-pct { font-size: 14px; font-weight: 700; color: var(--accent); }
.progress-bar-bg {
  height: 8px; background: rgba(255,255,255,0.08); border-radius: 99px; overflow: hidden; margin-bottom: 10px;
}
.progress-bar-fill {
  height: 100%; background: var(--accent-g); border-radius: 99px;
  width: 0%; transition: width 0.4s ease; position: relative;
}
.progress-bar-fill::after {
  content: ''; position: absolute; right: 0; top: 0;
  width: 30px; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4));
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer { 0% { opacity: 0 } 50% { opacity: 1 } 100% { opacity: 0 } }
.progress-stats { font-size: 12px; color: var(--text-2); margin-bottom: 16px; }
.progress-actions { display: flex; justify-content: center; margin-top: 16px; }

.live-preview {
  background: rgba(0,0,0,0.2); border-radius: var(--radius-sm);
  padding: 12px; font-size: 12px; color: var(--text-2);
  min-height: 60px; max-height: 120px; overflow: hidden;
  border: 1px solid var(--border);
}
.live-item { padding: 3px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.live-item:last-child { border-bottom: none; }
.live-kod { color: var(--accent); font-weight: 600; }
.live-marka { color: var(--blue); }

.error-log {
  margin-top: 12px; background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: var(--radius-sm); padding: 12px;
  font-size: 12px; color: #fca5a5; max-height: 80px; overflow-y: auto;
}

.done-area { text-align: center; padding: 24px; }
.done-icon { font-size: 48px; margin-bottom: 12px; animation: pop 0.5s ease; }
@keyframes pop { 0% { transform: scale(0) } 80% { transform: scale(1.15) } 100% { transform: scale(1) } }
.done-title { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.done-sub { font-size: 14px; color: var(--text-2); }

/* ─── Results Section ───────────────────────────────────────── */
.bulk-actions {
  display: flex; align-items: center; gap: 12px; margin-bottom: 16px;
  flex-wrap: wrap;
}
.search-wrap { flex: 1; min-width: 200px; }
.search-input { max-width: 300px; }
.bulk-btns { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.table-info { font-size: 12px; color: var(--text-2); margin-bottom: 10px; }

.results-table-wrap { overflow-x: auto; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.results-table {
  width: 100%; border-collapse: collapse; font-size: 13px; min-width: 800px;
}
.results-table th {
  background: rgba(255,255,255,0.06); padding: 10px 12px;
  text-align: left; color: var(--text-2); font-weight: 600;
  white-space: nowrap; border-bottom: 1px solid var(--border);
  position: sticky; top: 0;
}
.results-table td {
  padding: 9px 12px; border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: middle;
}
.results-table tr:last-child td { border-bottom: none; }
.results-table tr:hover td { background: rgba(255,255,255,0.03); }

.results-table td input[type="text"],
.results-table td input[type="number"],
.results-table td select {
  background: transparent; border: 1px solid transparent;
  color: var(--text); font-family: inherit; font-size: 13px;
  padding: 4px 6px; border-radius: 4px; width: 100%;
  transition: border-color 0.2s;
}
.results-table td input:hover,
.results-table td select:hover {
  border-color: var(--border); background: rgba(255,255,255,0.04);
}
.results-table td input:focus,
.results-table td select:focus {
  border-color: var(--accent); outline: none; background: rgba(255,255,255,0.06);
}
.results-table td select option { background: #1a1d2e; }

.row-num { color: var(--text-3); font-size: 11px; }
.req { color: var(--accent); font-size: 11px; }
.edit-row-btn {
  background: none; border: 1px solid var(--border); color: var(--text-2);
  border-radius: 4px; padding: 4px 8px; cursor: pointer; font-size: 11px;
  transition: all 0.2s;
}
.edit-row-btn:hover { border-color: var(--accent); color: var(--accent); background: rgba(255,107,53,0.08); }

/* ─── Pagination ────────────────────────────────────────────── */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 16px; flex-wrap: wrap; }
.page-btn {
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.05); border: 1px solid var(--border);
  color: var(--text-2); font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: center;
}
.page-btn:hover { border-color: var(--border-h); color: var(--text); }
.page-btn.active { background: var(--accent-g); border-color: transparent; color: white; }
.page-btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* ─── Toast ─────────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 32px; right: 32px; z-index: 9999;
  background: rgba(30,32,44,0.95); border: 1px solid var(--border);
  backdrop-filter: blur(20px);
  padding: 14px 20px; border-radius: var(--radius-sm);
  font-size: 14px; max-width: 350px;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s ease;
}
@keyframes slideUp { from { transform: translateY(20px); opacity: 0 } to { transform: translateY(0); opacity: 1 } }
.toast.success { border-color: rgba(34,197,94,0.4); }
.toast.error { border-color: rgba(239,68,68,0.4); }

/* ─── Modal ─────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.modal {
  background: #1a1d2e; border: 1px solid var(--border);
  border-radius: var(--radius); width: 100%; max-width: 520px;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.25s ease;
}
@keyframes modalIn { from { transform: scale(0.95); opacity: 0 } to { transform: scale(1); opacity: 1 } }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 16px; font-weight: 700; }
.modal-close { background: none; border: none; color: var(--text-2); font-size: 24px; cursor: pointer; line-height: 1; padding: 0 4px; }
.modal-body { padding: 20px 24px; display: flex; flex-direction: column; gap: 14px; }
.modal-field { display: flex; flex-direction: column; gap: 6px; }
.modal-field label { font-size: 13px; font-weight: 500; color: var(--text-2); }
.modal-field textarea.field-input { resize: vertical; }
.readonly-field .readonly-val {
  font-size: 12px; color: var(--text-3);
  background: rgba(255,255,255,0.03); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px 12px;
  word-break: break-word;
}
.modal-footer {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 16px 24px; border-top: 1px solid var(--border);
}

/* ─── Utility ───────────────────────────────────────────────── */
.hidden { display: none !important; }

@media (max-width: 640px) {
  .main { padding: 16px 12px 60px; }
  .card { padding: 20px 16px; }
  .header-inner { gap: 8px; }
  .logo-title { font-size: 13px; }
  .bulk-actions { flex-direction: column; align-items: stretch; }
  .bulk-btns { flex-direction: column; }
}

/* ─── Ürün Durumu Bar ─────────────────────────────────────── */
.durum-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 22px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.durum-bar-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
  min-width: 100px;
}
.durum-bar-hint {
  font-size: 11px;
  color: var(--text-3);
  margin-left: auto;
}
@media (max-width: 640px) {
  .durum-bar { flex-direction: column; align-items: flex-start; }
  .durum-bar-hint { margin-left: 0; }
}

/* ─── Upload Loading State ────────────────────────────────── */
.upload-spinner {
  width: 52px; height: 52px; margin: 0 auto 16px;
  border: 3px solid rgba(255,107,53,0.15);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.upload-loading-name {
  font-size: 14px; font-weight: 600; color: var(--text);
  margin-bottom: 14px; word-break: break-all;
  max-width: 320px; margin-left: auto; margin-right: auto;
}
.upload-loading-bar-wrap {
  width: 100%; max-width: 320px; height: 5px;
  background: rgba(255,255,255,0.07); border-radius: 99px;
  overflow: hidden; margin: 0 auto 12px;
}
.upload-loading-bar {
  height: 100%; width: 0%;
  background: var(--accent-g);
  border-radius: 99px;
  transition: width 0.3s ease;
  animation: indeterminate 1.5s ease-in-out infinite;
}
@keyframes indeterminate {
  0%   { width: 0%;   margin-left: 0%; }
  50%  { width: 70%;  margin-left: 15%; }
  100% { width: 0%;   margin-left: 100%; }
}
.upload-loading-text {
  font-size: 12px; color: var(--text-3);
}
