:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --panel: #ffffff;
  --text: #17202a;
  --muted: #697386;
  --line: #d9dee7;
  --accent: #0f766e;
  --accent-dark: #0b5f59;
  --danger: #b42318;
  --soft: #edf7f6;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.45;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.brand h1,
.brand h2 {
  margin: 0;
  font-size: 24px;
}

.brand p,
.muted {
  margin: 4px 0 0;
  color: var(--muted);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 18px;
}

.login-shell {
  max-width: 420px;
  min-height: 100vh;
  display: grid;
  place-items: center;
  margin: 0 auto;
  padding: 24px;
}

.login-card {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
}

label {
  display: block;
  margin: 14px 0 6px;
  font-weight: 700;
}

.login-card input[type="text"],
.login-card input[type="password"],
input[type="email"],
input[type="password"],
input[type="file"] {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 16px;
  min-height: 42px;
  background: #fff;
}

.login-card input {
  width: 100%;
  box-sizing: border-box;
}

button {
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  padding: 10px 14px;
  font-size: 15px;
}

button:hover {
  background: var(--accent-dark);
}

button.secondary {
  background: #eef1f5;
  color: var(--text);
}

button.secondary:hover,
.button-link.secondary:hover {
  background: #e0e5ec;
}

.button-link {
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  font-weight: 700;
  padding: 10px 14px;
  text-decoration: none;
}

.button-link:hover {
  text-decoration: none;
}

.button-link.secondary {
  background: #eef1f5;
  color: var(--text);
}

.actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

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

.section-heading h2 {
  margin: 0;
}

.error {
  color: var(--danger);
  margin-top: 12px;
}

.success {
  color: var(--accent-dark);
  margin-top: 12px;
}

.table-wrap {
  overflow-x: auto;
}

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

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
}

.status {
  display: inline-block;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 13px;
  font-weight: 700;
}

.status-uploaded {
  background: #fff7ed;
  color: #9a3412;
}

.status-processing {
  background: #eff6ff;
  color: #1d4ed8;
}

.status-completed {
  background: var(--soft);
  color: var(--accent-dark);
}

.status-failed {
  background: #fef2f2;
  color: var(--danger);
}

.info-box {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  color: #9a3412;
  margin-bottom: 18px;
  padding: 14px 16px;
}

.segment {
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}

.segment:last-child {
  border-bottom: 0;
}

.segment-meta {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 4px;
}

pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #111827;
  color: #f8fafc;
  border-radius: 8px;
  padding: 14px;
}

@media (max-width: 700px) {
  .shell {
    padding: 18px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }
}
