:root {
  --ink: #18211f;
  --muted: #64706c;
  --line: #dbe3df;
  --paper: #f7faf8;
  --panel: #ffffff;
  --accent: #0f766e;
  --accent-dark: #115e59;
  --warning: #8a4b00;
  --warning-bg: #fff3d8;
  --success: #126239;
  --success-bg: #d7f3e4;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(135deg, #eef6f1 0%, #f7faf8 42%, #eff5f6 100%);
  font-family: Avenir Next, Avenir, Verdana, sans-serif;
}

.topbar {
  align-items: center;
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 18px clamp(20px, 4vw, 56px);
}

.topbar nav {
  align-items: center;
  display: flex;
  gap: 16px;
}

.topbar nav span {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.nav-form {
  margin: 0;
}

.nav-form button {
  background: transparent;
  border: 0;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 0;
}

.brand,
.topbar a {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.shell {
  margin: 0 auto;
  max-width: 1180px;
  padding: 40px clamp(18px, 4vw, 48px) 72px;
}

.hero,
.page-title,
.panel-heading {
  align-items: center;
  display: flex;
  gap: 24px;
  justify-content: space-between;
}

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

.hero h1,
.page-title h1 {
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1;
  margin: 0;
  max-width: 780px;
}

.eyebrow {
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 10px;
  text-transform: uppercase;
}

.button {
  background: var(--accent);
  border: 0;
  border-radius: 7px;
  color: white;
  cursor: pointer;
  display: inline-block;
  font: inherit;
  font-weight: 800;
  padding: 12px 18px;
  text-decoration: none;
}

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

.button.secondary {
  background: #dce9e5;
  color: var(--ink);
}

.button.danger {
  background: #9f2f2f;
}

.button.danger:hover {
  background: #7d2424;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.button.is-busy {
  cursor: progress;
  opacity: 0.78;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(22, 45, 39, 0.08);
  margin-top: 28px;
  padding: 24px;
}

.notice {
  border-radius: 8px;
  margin-top: 24px;
  padding: 14px 16px;
}

.warning {
  background: var(--warning-bg);
  color: var(--warning);
}

.success {
  background: var(--success-bg);
  color: var(--success);
}

.login-shell {
  display: grid;
  min-height: calc(100vh - 170px);
  place-items: center;
}

.login-panel {
  width: min(100%, 460px);
}

.login-panel h1 {
  font-size: 2.4rem;
  line-height: 1;
  margin: 0;
}

.run-progress {
  background: #edf7f4;
  border: 1px solid #b8d9d2;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  margin: 18px 0;
  padding: 16px;
}

.run-progress div {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.run-progress span {
  color: var(--muted);
  font-weight: 800;
}

.run-progress progress {
  accent-color: var(--accent);
  height: 12px;
  width: 100%;
}

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

.table-wrap {
  overflow-x: auto;
  width: 100%;
}

.scroll-frame {
  border: 1px solid var(--line);
  border-radius: 8px;
  max-height: 560px;
  overflow: auto;
}

.scroll-frame table th {
  background: var(--panel);
  position: sticky;
  top: 0;
  z-index: 1;
}

.data-table {
  min-width: 860px;
  table-layout: fixed;
}

.bots-table {
  min-width: 1040px;
}

.bot-name-col { width: 13%; }
.version-col { width: 7%; }
.context-col { width: 13%; }
.bot-id-col { width: 15%; }
.zip-col { width: 38%; }
.token-col { width: 8%; }
.action-col { width: 6%; }

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

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

.mono {
  font-family: Menlo, Consolas, monospace;
  font-size: 0.84rem;
}

.filename {
  font-size: 0.94rem;
  line-height: 1.35;
}

.badge {
  border-radius: 999px;
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 5px 9px;
}

.badge.pass {
  background: #d7f3e4;
  color: #126239;
}

.badge.fail {
  background: #ffe1dc;
  color: #9b2719;
}

.empty {
  padding: 38px 16px;
  text-align: center;
}

.meta-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 28px;
}

.metric {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 16px;
}

.metric span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.metric strong {
  overflow-wrap: anywhere;
}

.form {
  display: grid;
  gap: 20px;
  max-width: 760px;
}

label {
  color: var(--muted);
  display: grid;
  font-weight: 700;
  gap: 8px;
}

input[type="text"],
input[type="password"] {
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  font: inherit;
  padding: 12px 14px;
}

.dropzone {
  align-items: center;
  border: 2px dashed #8cb8af;
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  gap: 10px;
  justify-items: center;
  min-height: 220px;
  padding: 28px;
  text-align: center;
}

.dropzone input {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.dropzone.is-dragging {
  background: #e4f4ef;
  border-color: var(--accent);
}

.dropzone-title {
  font-size: 1.35rem;
  font-weight: 800;
}

.dropzone-copy,
.dropzone-file {
  color: var(--muted);
}

@media (max-width: 760px) {
  .hero,
  .page-title,
  .panel-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .meta-grid {
    grid-template-columns: 1fr;
  }

  .topbar,
  .topbar nav,
  .run-progress div {
    align-items: flex-start;
    flex-direction: column;
  }
}