:root {
  --color-primary: #2563eb;
  --color-primary-hover: #1d4ed8;
  --color-bg: #f3f4f6;
  --color-surface: #ffffff;
  --color-text: #111827;
  --color-text-muted: #6b7280;
  --color-border: #e5e7eb;

  --color-pending: #d97706;
  --color-processing: #d97706;
  --color-done: #16a34a;
  --color-failed: #dc2626;

  --radius: 6px;
  --shadow: 0 1px 3px rgba(0, 0, 0, .1);
  --max-width: 960px;
}

/* TEMEL RESET VE BODY */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.5;
}

/* LAYOUT BİLEŞENLERİ */
.page-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 0.75rem 1.5rem;
  margin-bottom: 1.5rem;
}

.topbar__title {
  font-weight: 700;
  font-size: 1.1rem;
}

.topbar__user {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.topbar__actions {
  display: flex;
  gap: 0.75rem;
}

/* KART BİLEŞENİ */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
}

.card--selected {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px var(--color-primary);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

@media (max-width: 768px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
}

/* TABLO BİLEŞENİ */
.table-wrapper {
  overflow-x: auto;
}

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

.data-table th {
  text-align: left;
  padding: 0.625rem 0.75rem;
  border-bottom: 2px solid var(--color-border);
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  font-weight: 600;
}

.data-table td {
  padding: 0.625rem 0.75rem;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.875rem;
}

.data-table tbody tr:hover {
  background: #f9fafb;
}

/* DURUM BADGE BİLEŞENİ */
.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge--pending,
.badge--processing {
  background: #fef3c7;
  color: var(--color-pending);
}

.badge--done {
  background: #dcfce7;
  color: var(--color-done);
}

.badge--failed {
  background: #fee2e2;
  color: var(--color-failed);
}

/* BUTON BİLEŞENİ */
.btn {
  display: inline-block;
  cursor: pointer;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius);
  border: none;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: background 0.15s;
  text-decoration: none;
  text-align: center;
}

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

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

.btn--secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn--secondary:hover {
  background: var(--color-bg);
}

.btn--danger {
  background: var(--color-failed);
  color: #fff;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn--full {
  width: 100%;
}

/* FORM BİLEŞENİ */
.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  margin-bottom: 0.375rem;
  font-weight: 500;
}

.form-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 0.9375rem;
}

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

.form-error {
  color: var(--color-failed);
  font-size: 0.8125rem;
  margin-top: 0.375rem;
}

/* ÖZEL BİLEŞENLER */
.login-box {
  max-width: 400px;
  margin: 4rem auto;
}

.quota-card .quota-bar {
  height: 8px;
  background: var(--color-border);
  border-radius: 4px;
  margin-top: 0.5rem;
  overflow: hidden;
}

.quota-card .quota-bar__fill {
  height: 100%;
  background: var(--color-primary);
  border-radius: 4px;
  transition: width 0.3s;
}

.dropzone {
  border: 2px dashed var(--color-border);
  border-radius: var(--radius);
  padding: 3rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s;
}

.dropzone:hover,
.dropzone--active {
  border-color: var(--color-primary);
}

.dropzone__preview img {
  max-width: 100%;
  max-height: 280px;
  margin-top: 1rem;
}

.steps {
  display: flex;
  gap: 0;
  margin-bottom: 2rem;
}

.step {
  flex: 1;
  text-align: center;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--color-border);
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.step--active {
  border-bottom-color: var(--color-primary);
  color: var(--color-primary);
  font-weight: 600;
}

.spinner {
  display: inline-block;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.spinner--lg {
  width: 3rem;
  height: 3rem;
  border-width: 4px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.pagination {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 1rem;
}

.pagination__btn {
  /* Inherit from btn--secondary with smaller padding */
  padding: 0.375rem 0.75rem;
}

.pagination__info {
  align-self: center;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.processing-screen {
  text-align: center;
  padding: 3rem 1rem;
}

.processing-screen__spinner {
  margin: 0 auto 1rem;
}

.processing-screen__message {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.processing-screen__sub {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

/* RESPONSIVE KURALLAR */
@media (max-width: 640px) {
  .topbar {
    flex-direction: column;
    gap: 0.5rem;
  }

  .data-table th,
  .data-table td {
    font-size: 0.8125rem;
    padding: 0.5rem;
  }
}
