:root {
  --bg: #0f1115;
  --card: #171a21;
  --card-2: #1e222b;
  --line: #2a2f3a;
  --text: #e8eaf0;
  --muted: #9aa3b2;
  --accent: #4f8cff;
  --ok: #3ecf8e;
  --warn: #f5a623;
  --err: #ff5f56;
  --radius: 14px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 14px 48px;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 0 16px;
}

/* Dar ekranda basligin alt satira kaymasi icin daralabilmesi gerekiyor */
.header-info { flex: 1 1 auto; min-width: 0; }

header h1 {
  font-size: 19px;
  margin: 0;
  letter-spacing: -0.01em;
}

.disk { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }

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

.linkbtn {
  white-space: nowrap;
  flex-shrink: 0;
  color: var(--muted);
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
}

.linkbtn.danger { color: var(--err); border-color: rgba(255, 95, 86, .35); }
.linkbtn:disabled { opacity: .5; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 14px;
}

textarea, input[type="text"], input[type="password"], select {
  width: 100%;
  background: var(--card-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  font-size: 16px; /* 16px: iOS'ta odaklaninca zoom yapmasin */
  font-family: inherit;
  outline: none;
}

textarea { resize: vertical; min-height: 78px; }

textarea:focus, input:focus, select:focus { border-color: var(--accent); }

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

button.primary {
  flex: 1;
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 13px 18px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}
button.primary:disabled { opacity: .55; }

.msg { margin-top: 10px; font-size: 14px; }
.msg.err { color: var(--err); }
.msg.ok { color: var(--ok); }

.job {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px 14px;
  margin-bottom: 10px;
}

.job .title {
  font-size: 15px;
  font-weight: 600;
  word-break: break-word;
  margin-bottom: 6px;
}

.meta {
  font-size: 12.5px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-bottom: 8px;
}

.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--card-2);
  color: var(--muted);
}
.badge.done { background: rgba(62,207,142,.15); color: var(--ok); }
.badge.downloading, .badge.processing { background: rgba(79,140,255,.15); color: var(--accent); }
.badge.queued { background: rgba(245,166,35,.15); color: var(--warn); }
.badge.error, .badge.canceled { background: rgba(255,95,86,.15); color: var(--err); }

.bar {
  height: 6px;
  background: var(--card-2);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 10px;
}
.bar > i {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width .4s ease;
}

.actions { display: flex; flex-wrap: wrap; gap: 8px; }

.actions a, .actions button {
  flex: 1 1 auto;
  text-align: center;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--card-2);
  color: var(--text);
  cursor: pointer;
}
.actions a.dl { background: var(--ok); border-color: var(--ok); color: #06231a; }
.actions button.danger { color: var(--err); }

.err-text {
  font-size: 12.5px;
  color: var(--err);
  word-break: break-word;
  margin-bottom: 8px;
}

.empty { text-align: center; color: var(--muted); padding: 28px 0; font-size: 14px; }

/* login */
.login-wrap {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.login-card { width: 100%; max-width: 360px; }
.login-card h1 { font-size: 20px; margin: 0 0 4px; }
.login-card p.sub { margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.login-card label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 6px; }
.login-card button { width: 100%; margin-top: 18px; }
