:root {
  --bg: #0f1419;
  --surface: #1a2332;
  --surface-2: #243044;
  --text: #e8eef7;
  --muted: #93a4bd;
  --accent: #66c0f4;
  --accent-dark: #1b8fd1;
  --success: #5ba46b;
  --warning: #d4a017;
  --danger: #c75b5b;
  --border: #2f3f57;
  --radius: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #1b2838 0%, var(--bg) 45%);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

a {
  color: var(--accent);
}

.container {
  max-width: 920px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

header h1 {
  margin: 0 0 8px;
  font-size: 2rem;
}

.subtitle {
  color: var(--muted);
  margin: 0;
}

.card {
  background: rgba(26, 35, 50, 0.92);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 20px;
}

.info-card {
  border-color: rgba(102, 192, 244, 0.35);
  background: rgba(27, 40, 56, 0.95);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.card h2 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.hint,
.help {
  color: var(--muted);
  font-size: 0.95rem;
}

.help {
  margin: 12px 0;
  padding: 12px;
  background: var(--surface-2);
  border-radius: 8px;
}

.help ol {
  margin: 8px 0 0;
  padding-left: 20px;
}

textarea,
input[type="file"],
input[type="number"] {
  width: 100%;
  margin-top: 12px;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  font: inherit;
}

.settings {
  margin: 16px 0;
}

.settings label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--muted);
  font-size: 0.95rem;
}

.row {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.btn {
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font: inherit;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

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

.btn-primary {
  background: linear-gradient(180deg, var(--accent), var(--accent-dark));
  color: #0b1622;
  font-weight: 600;
}

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

.btn-ghost {
  background: transparent;
  color: var(--muted);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
  font-weight: 600;
}

.badge {
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
}

.badge-success {
  background: rgba(91, 164, 107, 0.2);
  color: #8fd49f;
}

.badge-warning {
  background: rgba(212, 160, 23, 0.2);
  color: #f0c85a;
}

.file-info {
  margin-top: 12px;
  padding: 12px;
  background: var(--surface-2);
  border-radius: 8px;
  color: var(--muted);
}

.progress-bar {
  width: 100%;
  height: 10px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-dark), var(--accent));
  transition: width 0.2s ease;
}

#progressText {
  color: var(--muted);
  margin: 8px 0 0;
}

.log {
  margin-top: 16px;
  max-height: 220px;
  overflow: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85rem;
  background: #0b111a;
  border-radius: 8px;
  padding: 12px;
}

.log-line {
  padding: 2px 0;
}

.log-line.used {
  color: #8fd49f;
}

.log-line.unused {
  color: var(--muted);
}

.log-line.error {
  color: #f08a8a;
}

.table-wrap {
  overflow: auto;
  margin-top: 12px;
}

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

th,
td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}

th {
  color: var(--muted);
  font-weight: 600;
}

.status-used {
  color: #8fd49f;
  font-weight: 600;
}

.status-unused {
  color: var(--muted);
}

.status-error,
.status-invalid {
  color: #f08a8a;
}

.hidden {
  display: none !important;
}

/* Giriş ekranı */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-box {
  width: 100%;
  max-width: 380px;
  background: rgba(26, 35, 50, 0.95);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
}

.login-box h1 {
  margin: 0 0 6px;
  font-size: 1.5rem;
}

.login-box form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.login-box input {
  margin-top: 0;
  text-align: center;
}

.login-error {
  margin: 14px 0 0;
  color: #f08a8a;
  font-size: 0.9rem;
}

/* Üst bar */
.app-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

/* Uyarı bandı */
.banner {
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: 8px;
  font-size: 0.95rem;
}

.banner-warning {
  background: rgba(212, 160, 23, 0.15);
  border: 1px solid rgba(212, 160, 23, 0.4);
  color: #f0c85a;
}

.banner-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background: rgba(91, 164, 107, 0.12);
  border: 1px solid rgba(91, 164, 107, 0.4);
  color: #a7dcb4;
}

details > summary {
  cursor: pointer;
  font-weight: 600;
  padding: 4px 0;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 20;
}

.modal-content {
  max-width: 480px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

@media (max-width: 640px) {
  .card-header {
    flex-direction: column;
    align-items: flex-start;
  }
}
