:root {
  --bg: #050705;
  --panel: #0b100c;
  --panel-2: #101810;
  --line: #213221;
  --text: #efffee;
  --muted: #8aa08b;
  --green: #80ff00;
  --green-2: #b9ff55;
  --danger: #ff5c7a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 10%, rgba(128, 255, 0, 0.15), transparent 28rem),
    linear-gradient(135deg, #020302, #091009 55%, #020302);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 40px 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
}

.brand,
.nav-link {
  color: var(--text);
  text-decoration: none;
}

.brand {
  font-size: 20px;
  font-weight: 950;
}

.brand::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 10px;
  background: var(--green);
  box-shadow: 0 0 18px var(--green);
}

.nav-link {
  color: var(--green);
  font-weight: 800;
}

.nav-link.current {
  color: var(--text);
}

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

.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  min-height: 220px;
  padding: 28px 0;
}

.visitor-shell,
.auth-shell {
  min-height: 100vh;
}

.visitor-hero {
  display: grid;
  align-content: center;
  min-height: calc(100vh - 140px);
  max-width: 760px;
}

.visitor-hero h1,
.auth-card h1,
.dashboard-shell h1 {
  font-size: clamp(38px, 7vw, 88px);
  line-height: 0.95;
}

.access-form {
  width: min(520px, 100%);
  margin-top: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 10, 7, 0.82);
  padding: 18px;
}

.auth-shell {
  display: grid;
  grid-template-rows: auto 1fr;
}

.auth-card {
  width: min(540px, 100%);
  align-self: center;
  justify-self: center;
}

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

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

h1 {
  font-size: clamp(44px, 9vw, 104px);
  line-height: 0.9;
}

h2 {
  font-size: 24px;
}

.hero-copy {
  max-width: 620px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.signal {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  padding: 14px 16px;
  background: rgba(11, 16, 12, 0.72);
}

.signal span {
  width: 11px;
  height: 11px;
  background: var(--green);
  box-shadow: 0 0 22px var(--green);
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.single-grid {
  grid-template-columns: minmax(0, 1fr);
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(16, 24, 16, 0.96), rgba(7, 10, 7, 0.96));
  padding: 22px;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.28);
}

.panel-head {
  margin-bottom: 18px;
}

.row,
.workspace-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

label {
  display: block;
  margin: 14px 0;
}

label span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

input {
  width: 100%;
  border: 1px solid #243824;
  border-radius: 6px;
  background: #050805;
  color: var(--text);
  font: inherit;
  padding: 13px 14px;
  outline: none;
}

input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(128, 255, 0, 0.12);
}

button {
  width: 100%;
  border: 1px solid var(--green);
  border-radius: 6px;
  background: var(--green);
  color: #061006;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  padding: 13px 16px;
}

button:hover {
  background: var(--green-2);
}

button:disabled {
  cursor: wait;
  opacity: 0.55;
}

button.ghost {
  width: auto;
  background: transparent;
  color: var(--green);
}

.hint,
.message {
  min-height: 20px;
  color: var(--muted);
  font-size: 13px;
}

.message.error {
  color: var(--danger);
}

.message.ok {
  color: var(--green);
}

.guide-download {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.guide-download:hover {
  color: var(--green-2);
}

.workspace {
  margin-top: 16px;
}

.workspace-head {
  margin: 26px 0 16px;
}

.hidden {
  display: none;
}

.list-panel {
  margin-top: 16px;
}

.project-list {
  display: grid;
  gap: 10px;
}

.project-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  border: 1px solid #1d2b1d;
  border-radius: 8px;
  background: var(--panel-2);
  padding: 14px;
}

.project-title {
  font-weight: 800;
}

.project-meta {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.code {
  border: 1px solid var(--green);
  border-radius: 6px;
  color: var(--green);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-weight: 900;
  padding: 10px 12px;
}

.project-actions {
  display: grid;
  grid-template-columns: auto auto auto;
  gap: 8px;
  align-items: center;
}

.code-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.uploader-list {
  display: grid;
}

.uploader-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.uploader-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.uploader-name {
  font-size: 17px;
  font-weight: 900;
}

.uploader-note,
.uploader-meta {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.uploader-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.status-badge {
  border: 1px solid rgba(128, 255, 0, 0.45);
  color: var(--green);
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 900;
}

.status-badge.disabled {
  border-color: var(--line);
  color: var(--muted);
}

.account-dialog {
  width: min(520px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  padding: 22px;
}

.account-dialog::backdrop {
  background: rgba(0, 0, 0, 0.76);
}

.dialog-actions {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  margin-top: 18px;
}

button.mini {
  width: auto;
  padding: 10px 12px;
  font-size: 13px;
}

button.danger {
  border-color: rgba(255, 92, 122, 0.6);
  background: rgba(255, 92, 122, 0.12);
  color: #ff8ea2;
}

button.danger:hover {
  background: rgba(255, 92, 122, 0.22);
}

@media (max-width: 780px) {
  .hero,
  .grid,
  .project-card,
  .project-actions {
    grid-template-columns: 1fr;
  }

  .code-actions {
    align-items: stretch;
  }

  .code-actions .code,
  .code-actions button {
    width: 100%;
  }

  .topbar,
  .topbar-actions {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .uploader-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .uploader-actions {
    justify-content: flex-start;
  }

  .hero {
    display: block;
  }

  .signal {
    margin-top: 20px;
    width: max-content;
  }
}
