:root {
  --bg: #0d1417;
  --line: rgba(255, 255, 255, 0.08);
  --text: #edf4f2;
  --muted: #9db1ad;
  --accent: #00a88f;
  --accent-2: #ffd24d;
  --danger: #ff6666;
  --ok: #73e2a7;
  --pending: #ffa845;
  --shadow: 10px 10px 0px rgba(0, 0, 0, 0.9);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  font-family: "Courier New", Courier, monospace;
  background:
    radial-gradient(circle at top left, #173038 0%, transparent 28%),
    radial-gradient(circle at top right, #2e2213 0%, transparent 24%),
    linear-gradient(180deg, #101a1d 0%, #0b1012 100%);
  color: var(--text);
}
body { padding: 16px; }
.panel-shell { max-width: 1500px; margin: 0 auto; display: grid; gap: 16px; }
.login-shell {
  min-height: calc(100vh - 32px);
  display: grid;
  place-items: center;
}
.login-card {
  width: min(100%, 460px);
  display: grid;
  gap: 18px;
  padding: 24px;
  border-radius: 0;
  background: #10181c;
  border: 4px solid var(--accent);
  box-shadow: 10px 10px 0px rgba(0, 0, 0, 0.9);
  animation: fadeIn 0.4s ease-out forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.login-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}
.login-brand__icon {
  width: 74px;
  height: 74px;
  object-fit: contain;
  border-radius: 0;
  background: rgba(255,255,255,0.04);
  border: 4px solid rgba(255,255,255,0.08);
  padding: 8px;
  image-rendering: pixelated;
}
.login-form {
  display: grid;
  gap: 12px;
}
.login-form__submit {
  margin-top: 4px;
}
.login-message {
  min-height: 22px;
  color: var(--muted);
  font-size: 14px;
}
.login-message[data-state="error"] {
  color: #ff9b9b;
}
.login-message[data-state="info"] {
  color: var(--accent-2);
}
.topbar, .stat-card, .card, .footer-note { box-shadow: var(--shadow); }
.topbar {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 16px 18px; border-radius: 0;
  background: #142025;
  border: 4px solid var(--line);
}
.admin-tools {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 12px;
  border: 4px solid var(--line);
  background: #11191d;
  box-shadow: var(--shadow);
}
.topbar__title { display: flex; flex-direction: column; gap: 6px; }
.eyebrow { font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent-2); }
.eyebrow--panel {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 14px;
  border: 2px solid #e1b343;
  border-radius: 999px;
  background: linear-gradient(180deg, #f6dc8a 0%, #b98418 100%);
  color: #2c1900;
  box-shadow: inset 0 1px 0 rgba(255, 247, 207, 0.72);
  font-weight: 900;
}
h1, h2 { margin: 0; }
h1 { font-size: 30px; line-height: 1; }
.topbar__meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.badge {
  padding: 10px 14px; border-radius: 0; font-size: 13px; font-weight: 700;
  border: 3px solid var(--line); background: rgba(255,255,255,0.03); color: var(--muted);
}
.badge--ok { background: rgba(115,226,167,0.12); color: var(--ok); }
.badge--pending { background: rgba(255,168,69,0.12); color: var(--pending); }
.retro-tool {
  appearance: none;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 3px solid rgba(255, 210, 77, 0.4);
  background: linear-gradient(180deg, #2f2410 0%, #1b1408 100%);
  color: var(--text);
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.92);
  cursor: pointer;
  transition: transform 0.1s ease, filter 0.1s ease, border-color 0.1s ease;
}
.retro-tool:hover {
  transform: translate(-2px, -2px);
  filter: brightness(1.06);
}
.retro-tool:active {
  transform: translate(2px, 2px);
}
.retro-tool--active {
  border-color: #ffd24d;
  background: linear-gradient(180deg, #4f3b13 0%, #24190a 100%);
}
.retro-tool--pending {
  border-color: rgba(255, 168, 69, 0.52);
}
.retro-tool__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  text-align: left;
}
.retro-tool__label {
  font-size: 15px;
  font-weight: 800;
  color: #ffe9a2;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.retro-tool__meta {
  font-size: 12px;
  color: #d8c38a;
}
.retro-tool__icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  position: relative;
  display: grid;
  place-items: center;
  border: 3px solid rgba(255, 210, 77, 0.5);
  background: #0c0d0a;
  image-rendering: pixelated;
}
.retro-tool__icon span {
  position: absolute;
  display: block;
  background: #ffd24d;
}
.retro-tool__icon--partner span:nth-child(1) {
  width: 10px;
  height: 10px;
  top: 6px;
  left: 7px;
}
.retro-tool__icon--partner span:nth-child(2) {
  width: 18px;
  height: 8px;
  top: 19px;
  left: 3px;
}
.retro-tool__icon--partner span:nth-child(3) {
  width: 16px;
  height: 4px;
  right: 5px;
  top: 10px;
}
.retro-tool__icon--partner span:nth-child(4) {
  width: 4px;
  height: 16px;
  right: 11px;
  top: 4px;
}
.retro-tool__icon--pending span {
  background: #ffa845;
}
.retro-tool__icon--pending span:nth-child(1) {
  width: 22px;
  height: 4px;
  top: 8px;
  left: 7px;
}
.retro-tool__icon--pending span:nth-child(2) {
  width: 22px;
  height: 4px;
  top: 16px;
  left: 7px;
}
.retro-tool__icon--pending span:nth-child(3) {
  width: 22px;
  height: 4px;
  top: 24px;
  left: 7px;
}
.retro-tool__icon--pending span:nth-child(4) {
  width: 6px;
  height: 6px;
  top: 6px;
  right: 5px;
  background: #ff6666;
}
.stats-grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 12px; }
.stat-card {
  padding: 16px 18px; border-radius: 0;
  background: #111b1f;
  border: 4px solid var(--line);
}
.stat-card__label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin-bottom: 10px; }
.stat-card__value { font-size: 30px; line-height: 1; font-weight: 800; }
.main-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.card {
  border-radius: 0;
  background: #10181c;
  border: 4px solid var(--line); overflow: hidden;
}
.card__head {
  padding: 18px 18px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border-bottom: 4px solid var(--line);
}
.card__title { font-size: 20px; }
.card__subtitle { font-size: 13px; color: var(--muted); margin-top: 4px; }
.card__body { padding: 10px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { text-align: left; padding: 14px 12px; border-bottom: 3px solid rgba(255,255,255,0.06); font-size: 14px; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; }
tr:last-child td { border-bottom: 0; }
.machine-id { font-family: Consolas, monospace; color: var(--accent-2); font-size: 13px; letter-spacing: 0.04em; }
.status {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 0;
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
}
.status--pending { background: rgba(255,168,69,0.12); color: var(--pending); }
.status--ok { background: rgba(115,226,167,0.12); color: var(--ok); }
.status--blocked { background: rgba(255,102,102,0.12); color: var(--danger); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.button {
  appearance: none; border: 3px solid transparent; border-radius: 0; padding: 10px 14px;
  font-weight: 700; cursor: pointer; color: #081013; background: var(--accent);
  transition: all 0.1s ease;
  box-shadow: 6px 6px 0px rgba(0, 0, 0, 0.9);
}
.button:hover:not(:disabled) {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px rgba(0, 0, 0, 1);
  filter: brightness(1.1);
}
.button:active:not(:disabled) {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0px rgba(0, 0, 0, 1);
}
.button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.button--compact {
  width: auto;
  min-width: 0;
  padding-inline: 12px;
}
.button--ghost { background: rgba(255,255,255,0.06); color: var(--text); border: 3px solid rgba(255,255,255,0.1); }
.button--danger { background: var(--danger); color: #250909; }
.side-stack { display: grid; gap: 16px; }
.mini-list { display: grid; gap: 10px; padding: 16px; }
.mini-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: 0; background: rgba(255,255,255,0.03); border: 3px solid rgba(255,255,255,0.06);
}
.mini-row__title { font-weight: 700; }
.mini-row__meta { font-size: 13px; color: var(--muted); margin-top: 2px; }
.partner-card {
  padding: 14px;
  border-radius: 0;
  background: rgba(255,255,255,0.03);
  border: 3px solid rgba(255,255,255,0.06);
  display: grid;
  gap: 12px;
}
.partner-card__title {
  font-size: 15px;
  font-weight: 800;
}
.station-list {
  display: grid;
  gap: 10px;
}
.station-item {
  padding: 12px;
  border-radius: 0;
  background: rgba(0,0,0,0.18);
  border: 3px solid rgba(255,255,255,0.06);
  display: grid;
  gap: 10px;
}
.station-item__meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.station-item__id {
  font-family: Consolas, monospace;
  color: var(--accent-2);
  font-size: 12px;
}
.station-form {
  display: grid;
  gap: 8px;
}
.field-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.field-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 0;
  border: 3px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  font: inherit;
  transition: all 0.1s ease;
}
.field-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 6px 6px 0px rgba(0, 168, 143, 0.6);
  background: rgba(255, 255, 255, 0.08);
}
.station-form__actions {
  display: flex;
  gap: 8px;
}
.footer-note {
  padding: 16px 20px; border-radius: 0; background: rgba(255,255,255,0.03); border: 4px solid var(--line);
  color: var(--muted); font-size: 13px;
}
@media (min-width: 1100px) { body { padding: 28px; } .main-grid { grid-template-columns: 1.4fr 0.9fr; } }
@media (max-width: 980px) {
  .admin-tools { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar { flex-direction: column; align-items: flex-start; }
  .topbar__meta { justify-content: flex-start; }
}
@media (max-width: 560px) {
  .login-shell {
    min-height: calc(100vh - 16px);
  }
  .login-card {
    padding: 18px;
  }
  .login-brand {
    align-items: flex-start;
  }
  .login-brand__icon {
    width: 62px;
    height: 62px;
  }
  .stats-grid { grid-template-columns: 1fr; }
  .card__head { flex-direction: column; align-items: flex-start; }
  .actions { flex-direction: column; }
  .button { width: 100%; }
  .station-item__meta { align-items: flex-start; }
  .station-form__actions { flex-direction: column; }
}

