/* Copyright by Ralph Maurer 2026 */
:root {
  --ink: #1b1f24;
  --muted: #5c6773;
  --line: #dfe3e8;
  --bg: #f6f7f9;
  --panel: #ffffff;
  --accent: #943634;          /* the converter's first "KOM neu" red */
  --accent-dark: #742a28;
  --ok: #1f7a3d;
  --warn: #9a6b00;
  --err: #b3261e;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font: 15px/1.55 "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

a { color: var(--accent); }
code { font: 13px/1.4 Consolas, "SF Mono", Menlo, monospace; background: #eef0f3;
       padding: 0 3px; border-radius: 3px; }

/* -- top bar ------------------------------------------------------------ */
.topbar {
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
  padding: 12px 24px; background: var(--panel); border-bottom: 1px solid var(--line);
}
.brand { font-weight: 700; font-size: 17px; color: var(--ink); text-decoration: none; }
.topbar nav { display: flex; gap: 18px; flex-wrap: wrap; }
.topbar nav a { color: var(--ink); text-decoration: none; }
.topbar nav a:hover { color: var(--accent); }
.topbar .account { margin-left: auto; display: flex; align-items: center; gap: 14px;
                   font-size: 14px; }
.balance { background: #eef2f6; border-radius: 999px; padding: 3px 11px; font-weight: 600; }

/* -- layout ------------------------------------------------------------- */
main { max-width: 940px; margin: 28px auto 60px; padding: 0 24px; }
h1 { font-size: 25px; margin: 0 0 6px; }
h2 { font-size: 18px; margin: 30px 0 10px; }
h3 { font-size: 16px; margin: 0 0 10px; }
.muted { color: var(--muted); }
.wrap { overflow-wrap: anywhere; }
.optional, .hint { color: var(--muted); font-weight: 400; font-size: 13px; }
.hint { display: block; margin-top: 3px; }

footer { max-width: 940px; margin: 0 auto 40px; padding: 20px 24px 0;
         border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
footer p { margin: 4px 0; }

/* -- cards -------------------------------------------------------------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
        padding: 22px 24px; margin-bottom: 22px; }
.card.narrow { max-width: 460px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
         gap: 18px; margin: 18px 0; }
.card.action { text-decoration: none; color: inherit; display: block; }
.card.action:hover { border-color: var(--accent); }
.card.action h2 { margin-top: 0; }
.price { color: var(--muted); font-size: 13px; margin-bottom: 0; }
.big-balance { font-size: 34px; font-weight: 700; margin: 8px 0; }

/* -- forms -------------------------------------------------------------- */
fieldset { border: 1px solid var(--line); border-radius: 6px; padding: 16px 18px 18px;
           margin: 0 0 18px; }
legend { font-weight: 600; padding: 0 6px; }
label { display: block; margin-bottom: 14px; font-weight: 600; }
label.check { font-weight: 400; display: flex; gap: 8px; align-items: baseline; }
input[type=text], input[type=email], input[type=password], input[type=url],
input[type=number], input[type=date], input[type=file], select {
  display: block; width: 100%; margin-top: 5px; padding: 8px 10px; font: inherit;
  border: 1px solid var(--line); border-radius: 5px; background: #fff; font-weight: 400;
}
input.tiny { display: inline-block; width: 90px; margin: 0 4px 0 0; }
input[type=checkbox] { width: auto; display: inline; margin: 0; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 18px; }
.or { color: var(--muted); text-align: center; margin: 4px 0 14px; font-size: 13px; }
details summary { cursor: pointer; color: var(--muted); margin-bottom: 12px; }
.filters { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 18px; }
.filters label { margin: 0; }

button, .button {
  font: inherit; padding: 8px 16px; border-radius: 5px; border: 1px solid var(--line);
  background: #fff; cursor: pointer; text-decoration: none; color: var(--ink);
  display: inline-block;
}
button:hover, .button:hover { border-color: var(--muted); }
button.primary, .primary.button {
  background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600;
}
button.primary:hover, .primary.button:hover { background: var(--accent-dark); }
button.link { border: 0; background: none; padding: 0; color: var(--accent); }
form.inline { display: inline; }
.actions { white-space: nowrap; }
.actions form { margin-right: 6px; }

/* -- messages ----------------------------------------------------------- */
.flash { padding: 11px 15px; border-radius: 6px; margin-bottom: 16px; border: 1px solid; }
.flash.info    { background: #eef4fb; border-color: #c5d9ef; }
.flash.success { background: #eef8f1; border-color: #bfe3ca; }
.flash.error   { background: #fdeeed; border-color: #f2c4c1; }

/* -- tables ------------------------------------------------------------- */
table { width: 100%; border-collapse: collapse; background: var(--panel);
        border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line);
         font-size: 14px; vertical-align: top; }
th { background: #f0f2f5; font-size: 13px; }
tbody tr:last-child td { border-bottom: 0; }
td.plus { color: var(--ok); font-weight: 600; }
td.minus { color: var(--muted); }
.tag { background: #eef2f6; border-radius: 3px; padding: 1px 6px; font-size: 12px; }

.status { font-size: 13px; font-weight: 600; text-transform: capitalize;
          text-decoration: none; }
.status.done, .status.accepted { color: var(--ok); }
.status.warned { color: var(--warn); }
.status.failed, .status.timeout, .status.refused_no_credits,
.status.refused_invalid { color: var(--err); }
.status.queued, .status.running { color: var(--muted); }

/* -- job page ----------------------------------------------------------- */
.progress { height: 8px; background: #e8ebef; border-radius: 999px; overflow: hidden;
            margin: 16px 0 8px; }
.progress .bar { height: 100%; width: 0; background: var(--accent);
                 transition: width .3s ease; }
.progress .bar.failed, .progress .bar.timeout { background: var(--err); }
.progress .bar.warned { background: var(--warn); }
.progress-text { margin: 0 0 6px; font-size: 14px; }
pre.log {
  background: #10141a; color: #dbe2ea; padding: 14px 16px; border-radius: 6px;
  font: 12.5px/1.5 Consolas, "SF Mono", Menlo, monospace;
  max-height: 380px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere;
}
ul.files { list-style: none; padding: 0; }
ul.files li { padding: 8px 0; border-bottom: 1px solid var(--line); }
ul.files li:last-child { border-bottom: 0; }

dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0 0 24px; }
dt { color: var(--muted); }
dd { margin: 0; }
