:root {
  --bg: #f4f5f7;
  --card-bg: #ffffff;
  --fg: #1f2933;
  --muted: #6D6E71;
  --border: #e5e7eb;
  --primary: #C8102E;
  --primary-hover: #A60D26;
  --error: #991B1B;
  --code-bg: #0b1120;
  --code-fg: #e0e7ff;
  --header-bg: #1F2933;
  --header-fg: #ffffff;
  --radius: 8px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
}

.centered {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 32px;
  background: var(--header-bg);
  color: var(--header-fg);
}

.topbar .brand { display: flex; align-items: center; gap: 14px; }

.topbar img.logo { height: 32px; width: auto; display: block; }

.topbar h1 {
  font-size: 18px;
  margin: 0;
  color: var(--header-fg);
  font-weight: 600;
}

.topbar .user-area .muted { color: rgba(255, 255, 255, 0.7); }

.topbar button.link { color: var(--header-fg); }

.topbar button.link:hover { color: var(--header-fg); opacity: 0.85; }

.login-logo {
  display: block;
  margin: 0 auto 24px;
  height: 56px;
  width: auto;
  filter: invert(1) brightness(0.15);
}

.user-area { display: flex; align-items: center; gap: 16px; }

.container {
  max-width: 920px;
  margin: 0 auto;
  padding: 24px 16px 64px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.card h2 {
  font-size: 16px;
  margin: 0 0 16px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

form { display: flex; flex-direction: column; gap: 16px; }

label { display: flex; flex-direction: column; gap: 6px; font-weight: 500; }

label > small { font-weight: 400; }

input[type="text"],
input[type="password"],
input[type="file"] {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  background: #fff;
}

input[type="file"] { padding: 6px; }

button, .button {
  display: inline-block;
  padding: 9px 18px;
  border: 0;
  border-radius: var(--radius);
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

button:hover, .button:hover { background: var(--primary-hover); }

button:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

button.link {
  background: transparent;
  color: var(--primary);
  padding: 0;
  font-weight: 500;
}

button.link:hover { background: transparent; text-decoration: underline; }

.actions { margin: 12px 0; }

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

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

.log {
  background: var(--code-bg);
  color: var(--code-fg);
  padding: 16px;
  border-radius: var(--radius);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 180px;
  max-height: 480px;
  overflow: auto;
}

.summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px 24px;
  margin-bottom: 16px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

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

th { background: #f9fafb; font-weight: 600; }

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

ul { margin: 8px 0; padding-left: 20px; }
