:root {
  --ink: #10233a;
  --muted: #5a6d82;
  --line: rgba(16, 35, 58, 0.12);
  --panel: rgba(245, 249, 252, 0.92);
  --accent: #1f7a8c;
  --danger: #b42318;
  --log: #0b1622;
  --radius: 18px;
  --shadow: 0 18px 50px rgba(16, 35, 58, 0.12);
  font-family: 'Source Sans 3', 'PingFang SC', sans-serif;
  color: var(--ink);
  background: #dce7f0;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 500px at 8% -10%, rgba(31, 122, 140, 0.25), transparent 60%),
    radial-gradient(700px 420px at 100% 0%, rgba(47, 84, 135, 0.16), transparent 55%),
    linear-gradient(160deg, #e8f1f5 0%, #eef3f8 48%, #e4ebf2 100%);
}

.shell {
  width: min(1040px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2.25rem 0 3rem;
}

.top,
.row-between {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
}

.top {
  margin-bottom: 1.5rem;
}

.top-actions,
.actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.brand {
  margin: 0;
  font-family: Outfit, 'Source Sans 3', sans-serif;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: var(--accent);
}

h1,
h2,
h3 {
  font-family: Outfit, 'Source Sans 3', sans-serif;
  margin: 0.15rem 0 0;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2rem, 4vw, 2.7rem);
}

h2 {
  font-size: 1.35rem;
}

h3 {
  font-size: 1.1rem;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  padding: 1.25rem 1.35rem 1.4rem;
  margin-bottom: 1rem;
}

.hint {
  color: var(--muted);
  margin: 0.45rem 0 1rem;
  line-height: 1.5;
}

.stack {
  display: grid;
  gap: 0.85rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem 1rem;
  margin-top: 1rem;
}

.form-grid .full {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 0.95rem;
}

input[type='password'],
input[type='text'],
input[type='file'],
input:not([type]) {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  font: inherit;
  background: #fff;
}

button,
.ghost {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 0.8rem 1.15rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

button {
  background: var(--ink);
  color: #f7faf8;
}

button:hover {
  background: #1a344f;
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.ghost:hover {
  background: rgba(255, 255, 255, 0.55);
}

.danger {
  color: var(--danger);
  border-color: rgba(180, 35, 24, 0.35);
}

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

.hidden {
  display: none !important;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 0.5rem;
}

.project-card {
  text-align: left;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 1.1rem 1.15rem 1.2rem;
  cursor: pointer;
  display: grid;
  gap: 0.35rem;
}

.project-card:hover {
  transform: translateY(-1px);
  border-color: rgba(31, 122, 140, 0.35);
}

.project-card strong {
  font-family: Outfit, 'Source Sans 3', sans-serif;
  font-size: 1.15rem;
}

.project-card span {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
}

.grid.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.code,
.log {
  margin: 0.75rem 0 0;
  border-radius: 14px;
  background: var(--log);
  color: #d7e7df;
  padding: 1rem 1.05rem;
  font-size: 0.86rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  overflow: auto;
}

.log {
  min-height: 280px;
  max-height: 420px;
}

@media (max-width: 820px) {
  .form-grid,
  .grid.two {
    grid-template-columns: 1fr;
  }

  .top,
  .row-between {
    align-items: start;
    flex-direction: column;
  }
}
