:root {
  --bg: #060606;
  --panel: rgba(20, 20, 20, 0.92);
  --panel-strong: #191919;
  --text: #f3efe6;
  --muted: #b1a89a;
  --accent: #b3261e;
  --accent-strong: #871912;
  --accent-soft: rgba(179, 38, 30, 0.18);
  --gold: #d7b15a;
  --gold-strong: #f0cc77;
  --line: rgba(240, 204, 119, 0.16);
  --danger: #b3261e;
  --danger-bg: rgba(179, 38, 30, 0.18);
  --success: #f0cc77;
  --success-bg: rgba(215, 177, 90, 0.14);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Outfit", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(215, 177, 90, 0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(179, 38, 30, 0.1), transparent 22%),
    radial-gradient(circle at bottom center, rgba(215, 177, 90, 0.08), transparent 24%),
    linear-gradient(180deg, #070707 0%, #101010 52%, #050505 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  width: min(1180px, calc(100% - 32px));
  margin: 24px auto 0;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(12, 12, 12, 0.82);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

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

.site-nav a {
  color: #ddd3c1;
  font-weight: 600;
}

.ghost-button,
button {
  border: 0;
  border-radius: 14px;
  padding: 12px 18px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #fff;
  font-weight: 700;
  transition: transform 140ms ease, background 140ms ease;
}

.ghost-button {
  background: rgba(255, 255, 255, 0.02);
  color: var(--gold-strong);
  border: 1px solid rgba(240, 204, 119, 0.26);
}

button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 48px;
}

.hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
  align-items: stretch;
}

.hero-copy,
.panel,
.stat-card,
.flash {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 34px;
  min-height: 340px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.hero-copy::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -40px;
  bottom: -30px;
  background: rgba(215, 177, 90, 0.18);
  border-radius: 50%;
}

.hero-logo-wrap {
  width: 104px;
  height: 104px;
  border-radius: 28px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #1f1b14, #0d0d0d);
  border: 1px solid rgba(240, 204, 119, 0.3);
  box-shadow: inset 0 0 0 1px rgba(240, 204, 119, 0.08);
}

.hero-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.eyebrow {
  margin: 18px 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--gold-strong);
  font-size: 0.8rem;
  font-weight: 800;
}

.hero h1,
.page-intro h1 {
  margin: 0;
  font-size: clamp(2.1rem, 4vw, 4rem);
  line-height: 0.98;
}

.hero-total {
  margin: 16px 0 12px;
  font-size: clamp(3rem, 9vw, 6.8rem);
  font-weight: 800;
  color: var(--gold-strong);
  text-shadow: 0 10px 28px rgba(215, 177, 90, 0.25);
}

.hero-subtitle,
.panel p,
.page-intro p {
  margin: 0;
  color: var(--muted);
  max-width: 60ch;
  line-height: 1.5;
}

.stats-grid,
.panel-grid {
  display: grid;
  gap: 20px;
}

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

.panel-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 24px;
}

.stat-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 146px;
}

.stat-card span {
  color: var(--muted);
  font-weight: 600;
}

.stat-card strong {
  margin-top: 8px;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
  color: var(--gold-strong);
}

.panel {
  padding: 28px;
}

.panel-wide {
  margin-top: 24px;
}

.instruction-panel {
  padding: 0;
  overflow: hidden;
}

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

.instruction-card {
  padding: 28px;
}

.instruction-card:first-child {
  border-right: 1px solid var(--line);
}

.instruction-card p {
  margin: 0 0 14px;
}

.instruction-card p:last-child {
  margin-bottom: 0;
}

.instruction-list {
  margin: 0 0 16px 20px;
  padding: 0;
  color: var(--text);
}

.instruction-list li {
  margin-bottom: 12px;
  line-height: 1.55;
}

.instruction-list li:last-child {
  margin-bottom: 0;
}

.panel h2 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 1.5rem;
}

.stack-form {
  margin-top: 18px;
  display: grid;
  gap: 12px;
}

.stack-form label {
  font-size: 0.95rem;
  font-weight: 700;
}

.stack-form input {
  width: 100%;
  padding: 13px 14px;
  border-radius: 14px;
  color: var(--text);
  border: 1px solid rgba(240, 204, 119, 0.16);
  background: #101010;
}

.stack-form input:focus,
.table-input:focus {
  outline: 2px solid rgba(201, 163, 74, 0.45);
  outline-offset: 1px;
  border-color: rgba(201, 163, 74, 0.8);
}

.flash {
  margin-bottom: 20px;
  padding: 16px 18px;
  font-weight: 700;
}

.flash-error {
  color: var(--danger);
  background: var(--danger-bg);
}

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

.page-intro {
  margin-bottom: 24px;
}

.summary-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.summary-list div {
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.summary-list span {
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}

th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(240, 204, 119, 0.08);
  text-align: left;
}

th {
  color: var(--muted);
  font-size: 0.92rem;
  border-bottom: 1px solid rgba(201, 163, 74, 0.45);
}

.table-input {
  width: 92px;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--text);
  border: 1px solid rgba(240, 204, 119, 0.16);
  background: #101010;
}

.table-save-button {
  padding: 10px 14px;
  border-radius: 12px;
  white-space: nowrap;
}

.table-delete-button {
  padding: 10px 14px;
  border-radius: 12px;
  white-space: nowrap;
  background: transparent;
  color: #f0b0aa;
  border: 1px solid rgba(179, 38, 30, 0.45);
}

.status-badge {
  display: inline-flex;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
}

.status-ok {
  color: var(--gold-strong);
  background: var(--success-bg);
}

.status-pending {
  color: var(--accent-strong);
  background: var(--accent-soft);
}

@media (max-width: 920px) {
  .hero,
  .panel-grid,
  .stats-grid,
  .instruction-grid {
    grid-template-columns: 1fr;
  }

  .instruction-card:first-child {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-nav {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }
}

@media (max-width: 640px) {
  .site-header,
  .page-shell {
    width: min(100% - 20px, 1180px);
  }

  .hero-copy,
  .panel,
  .stat-card {
    padding: 22px;
    border-radius: 22px;
  }

  .brand span {
    font-size: 0.96rem;
  }
}
