:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --text: #16191d;
  --muted: #656d78;
  --line: #e2e5ea;
  --accent: #2563eb;
  --color: #d4380d;
  --mono: #475569;
  --radius: 12px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161a;
    --card: #1c1f24;
    --text: #e9ecef;
    --muted: #9aa3ad;
    --line: #2b2f36;
    --accent: #60a5fa;
    --color: #fb7a52;
    --mono: #94a3b8;
  }
}

* { box-sizing: border-box; }

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

.wrap { max-width: 900px; margin: 0 auto; padding: 40px 20px 64px; }

.head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 20px; margin-bottom: 28px; flex-wrap: wrap;
}

h1 { margin: 0 0 4px; font-size: 24px; font-weight: 650; letter-spacing: -0.01em; }
.sub { margin: 0; color: var(--muted); font-size: 14px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

/* ---------- nahrávání ---------- */

.drop { padding: 28px; display: flex; flex-direction: column; gap: 20px; }

.drop-inner {
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  padding: 44px 20px;
  text-align: center;
  cursor: pointer;
  color: var(--muted);
  transition: border-color .15s, background .15s;
}
.drop-inner:hover, .drop-inner.is-over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, transparent); }

.drop-title { margin: 12px 0 2px; font-size: 16px; font-weight: 600; color: var(--text); }
.drop-hint { margin: 0; font-size: 13.5px; }
.drop-file { margin: 14px 0 0; font-size: 13.5px; font-weight: 600; color: var(--accent); word-break: break-all; }

.link {
  background: none; border: 0; padding: 0; font: inherit;
  color: var(--accent); text-decoration: underline; cursor: pointer;
}

.btn {
  display: inline-block; align-self: flex-start;
  background: var(--accent); color: #fff;
  border: 0; border-radius: 8px;
  padding: 11px 22px; font: inherit; font-weight: 600;
  cursor: pointer; text-decoration: none;
  transition: opacity .15s;
}
.btn:hover { opacity: .9; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.btn-ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--line); padding: 9px 16px; font-weight: 500;
}

/* ---------- stav ---------- */

.status {
  margin-top: 16px; padding: 13px 16px;
  border-radius: 8px; font-size: 14px; border: 1px solid var(--line);
}
.status-busy { background: color-mix(in srgb, var(--accent) 10%, transparent); border-color: var(--accent); }
.status-error { background: color-mix(in srgb, var(--color) 12%, transparent); border-color: var(--color); }

/* ---------- souhrn ---------- */

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 22px; }

.stat {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px;
  display: flex; flex-direction: column; gap: 3px;
}
.stat-num { font-size: 30px; font-weight: 660; line-height: 1.1; letter-spacing: -0.02em; }
.stat-label { font-size: 13px; color: var(--muted); }
.stat-color .stat-num { color: var(--color); }
.stat-mono .stat-num { color: var(--mono); }

/* ---------- tabulka ---------- */

.card table { width: 100%; border-collapse: collapse; font-size: 14px; }

th, td { padding: 10px 16px; text-align: left; border-bottom: 1px solid var(--line); }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
tbody tr:last-child td { border-bottom: 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
th:not(:first-child):not(:nth-child(2)) { text-align: right; }

.tag {
  display: inline-block; padding: 2px 9px; border-radius: 20px;
  font-size: 12px; font-weight: 600;
}
.tag-color { background: color-mix(in srgb, var(--color) 15%, transparent); color: var(--color); }
.tag-mono { background: color-mix(in srgb, var(--mono) 15%, transparent); color: var(--mono); }

.note { margin: 20px 0 0; font-size: 13px; color: var(--muted); line-height: 1.6; }

.empty { padding: 48px 28px; text-align: center; }
.empty h1 { margin-bottom: 8px; }
.empty p { color: var(--muted); margin: 0 0 22px; }

@media (max-width: 620px) {
  .stats { grid-template-columns: 1fr; }
  th, td { padding: 9px 11px; }
  .wrap { padding: 26px 14px 44px; }
}
