:root {
  color-scheme: dark;
  --bg: #061611;
  --panel: #0d261e;
  --panel-strong: #123329;
  --line: #285044;
  --text: #f7f3df;
  --muted: #aabcae;
  --mint: #54e0b5;
  --blue: #5ab9ff;
  --lime: #c9f36a;
  --orange: #ff7a3d;
  --danger: #ff9a79;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 10% 0, #10352b 0, transparent 34rem),
    radial-gradient(circle at 100% 100%, rgb(90 185 255 / 0.12), transparent 28rem),
    var(--bg);
  color: var(--text);
  font: 16px/1.45 system-ui, sans-serif;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

button,
.admin-actions a {
  min-height: 44px;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-strong);
  color: var(--text);
  font-weight: 850;
  cursor: pointer;
}

.admin-actions a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

button:hover,
button:focus-visible,
.admin-actions a:hover,
.admin-actions a:focus-visible {
  border-color: var(--mint);
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 70px;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 0.95;
}

.kicker {
  color: var(--mint);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.muted,
.updated {
  color: var(--muted);
}

.admin-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.admin-header > div:first-child {
  max-width: 720px;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.admin-actions form {
  margin: 0;
}

.updated {
  margin: 0.8rem 0 1.3rem;
  font-size: 0.82rem;
  font-weight: 720;
}

.targets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0;
}

.target,
section {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(145deg, rgb(24 57 47 / 0.9), rgb(10 28 23 / 0.94));
  box-shadow: 0 18px 60px rgb(0 0 0 / 0.18);
}

.target {
  padding: 18px;
}

.target span {
  display: block;
  min-height: 46px;
  color: var(--muted);
}

.target strong {
  display: block;
  margin: 6px 0 12px;
  font-size: 2rem;
}

.target small {
  color: var(--muted);
  font-size: 0.55em;
}

.target progress {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: #07120f;
}

.target progress::-webkit-progress-bar {
  background: #07120f;
}

.target progress::-webkit-progress-value {
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), var(--mint), var(--lime));
}

.target progress::-moz-progress-bar {
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), var(--mint), var(--lime));
}

.grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 18px;
}

section {
  padding: 20px;
  overflow: auto;
}

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

table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid rgb(84 224 181 / 0.14);
  text-align: right;
}

th:first-child {
  text-align: left;
}

thead th {
  color: var(--mint);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

tbody th {
  color: var(--text);
  font-weight: 650;
}

.admin-login {
  display: grid;
  place-items: center;
}

.login-shell {
  width: min(100%, 520px);
  padding-block: 28px;
}

.login-card {
  padding: clamp(24px, 6vw, 44px);
  overflow: visible;
}

.admin-brand {
  display: inline-block;
  margin-bottom: 2rem;
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 950;
  text-decoration: none;
}

.login-card form,
.login-card label {
  display: grid;
  gap: 0.45rem;
}

.login-card form {
  gap: 1rem;
  margin-top: 1.4rem;
}

.login-card label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.login-card input {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
  background: #071a14;
  color: var(--text);
}

.login-card input:focus {
  border-color: var(--mint);
  box-shadow: 0 0 0 3px rgb(84 224 181 / 0.12);
}

.login-card button {
  width: 100%;
  margin-top: 0.4rem;
  border-color: var(--orange);
  background: var(--orange);
  color: #1d0a03;
}

.login-error {
  padding: 0.8rem 0.9rem;
  border: 1px solid rgb(255 154 121 / 0.45);
  border-radius: 10px;
  background: rgb(255 107 53 / 0.1);
  color: var(--danger);
  font-weight: 760;
}

.back-link {
  display: inline-block;
  margin-top: 1.3rem;
  color: var(--muted);
  font-weight: 720;
}

@media (max-width: 760px) {
  main {
    width: min(100% - 22px, 1180px);
    padding-top: 24px;
  }

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

  .targets,
  .grid {
    grid-template-columns: 1fr;
  }

  section.full {
    grid-column: auto;
  }

  .admin-actions,
  .admin-actions a,
  .admin-actions form,
  .admin-actions button {
    width: 100%;
  }

  .admin-actions a,
  .admin-actions button {
    justify-content: center;
  }
}
