:root {
  color-scheme: dark;
  --bg: #101314;
  --panel: #181d1f;
  --panel-2: #202629;
  --text: #f2f5f3;
  --muted: #9da9a5;
  --line: #2d3538;
  --green: #50d890;
  --red: #ff6b6b;
  --yellow: #ffd166;
  --blue: #66a6ff;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

[hidden] {
  display: none !important;
}

.shell {
  width: min(1040px, 100%);
  margin: 0 auto;
  padding: 18px 14px 32px;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px;
}

.login-panel {
  width: min(380px, 100%);
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.login-logo {
  width: min(220px, 100%);
  height: 86px;
  border-radius: 8px;
  object-fit: contain;
}

.topbar,
.brand,
.top-actions,
.panel-title,
.item-row {
  display: flex;
  align-items: center;
}

.topbar {
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
}

.brand {
  gap: 12px;
  color: var(--text);
}

.brand-logo {
  width: 118px;
  height: 54px;
  flex: 0 0 118px;
  border-radius: 8px;
  object-fit: contain;
}

.top-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

h1,
h2,
p {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 30px;
}

h2 {
  font-size: 17px;
}

.eyebrow {
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}

a {
  color: var(--blue);
  overflow-wrap: anywhere;
  text-decoration: none;
}

button,
.nav-button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
}

.icon-button {
  width: 42px;
  font-size: 22px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.stats article,
.panel,
.item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.stats article {
  min-height: 74px;
  padding: 12px;
}

.stats span,
label span,
small,
.status-line,
.panel-title span {
  color: var(--muted);
  font-size: 12px;
}

.stats strong {
  display: block;
  margin-top: 4px;
  font-size: 28px;
}

.panel {
  padding: 14px;
  margin-top: 10px;
}

.action-panel {
  border-color: rgba(102, 166, 255, 0.55);
}

.panel-title {
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.form,
.upload,
.list {
  display: grid;
  gap: 10px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

label {
  display: grid;
  gap: 6px;
}

input {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
}

button[type="submit"] {
  min-height: 48px;
}

.item {
  display: grid;
  gap: 5px;
  padding: 12px;
  overflow-wrap: anywhere;
}

.item.compact {
  padding: 10px;
}

.item-row {
  justify-content: space-between;
  gap: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.badge.green {
  color: var(--green);
}

.badge.red {
  color: var(--red);
}

.badge.yellow {
  color: var(--yellow);
}

.badge.blue {
  color: var(--blue);
}

.error-text {
  color: var(--red);
}

.empty {
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
}

@media (max-width: 720px) {
  .stats,
  .form-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .brand-logo {
    width: 94px;
    flex-basis: 94px;
  }
}
