:root {
  --bg: #0a0d11;
  --panel: #131921;
  --panel-soft: #181f28;
  --line: #2b3441;
  --ink: #eef3fb;
  --muted: #9facbd;
  --accent: #f24f2b;
  --ok: #22c55e;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 8% -10%, rgba(242, 79, 43, 0.22), transparent 32%),
    radial-gradient(circle at 92% 2%, rgba(255, 216, 77, 0.15), transparent 28%),
    linear-gradient(180deg, #090b0f, #0a0d11 52%, #07090d 100%);
  color: var(--ink);
  font-family: "Manrope", sans-serif;
}

.admin-wrap {
  width: min(1280px, 94vw);
  margin: 0 auto;
  padding: 1.2rem 0 2rem;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
}

.login-shell {
  min-height: 82vh;
  display: grid;
  place-items: center;
}

.login-card {
  max-width: 540px;
  width: 100%;
  position: relative;
  overflow: hidden;
  margin: 0 auto;
  padding: 1.25rem;
  background:
    radial-gradient(circle at 80% 12%, rgba(255, 216, 77, 0.18), transparent 24%),
    radial-gradient(circle at 16% 18%, rgba(242, 79, 43, 0.16), transparent 30%),
    linear-gradient(180deg, rgba(22, 28, 38, 0.98), rgba(13, 17, 24, 0.98));
}

.login-card::after {
  content: "";
  position: absolute;
  inset: auto -24px -48px auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 79, 163, 0.28), transparent 68%);
  filter: blur(8px);
}

.login-copy {
  max-width: 40ch;
  color: var(--muted);
}

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

h1,
h2,
h3,
h4 {
  margin: 0 0 0.7rem;
  font-family: "Bebas Neue", sans-serif;
  letter-spacing: 0.06em;
}

.eyebrow {
  margin: 0 0 0.45rem;
  font-family: "Manrope", sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #ffb04a;
}

h1 {
  font-size: 2rem;
}

h2 {
  font-size: 1.9rem;
}

h3 {
  font-size: 1.55rem;
}

h4 {
  font-size: 1.3rem;
}

p,
label,
input,
textarea,
button,
a {
  font-size: 0.92rem;
}

form {
  display: grid;
  gap: 0.7rem;
}

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

.form-grid label,
form label {
  display: grid;
  gap: 0.4rem;
  color: var(--muted);
}

input,
textarea,
button {
  font: inherit;
  border-radius: 10px;
  border: 1px solid var(--line);
}

input,
textarea {
  background: var(--panel-soft);
  color: var(--ink);
  padding: 0.6rem 0.7rem;
}

textarea {
  resize: vertical;
}

button,
a {
  background: var(--accent);
  color: #fff;
  border: 1px solid #cf3f1d;
  padding: 0.62rem 0.85rem;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
}

button:hover,
a:hover {
  filter: brightness(1.06);
}

.hint {
  color: var(--muted);
}

.hidden {
  display: none;
}

.top-panel {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.top-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.grid {
  display: grid;
  gap: 1rem;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.tab {
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  border-color: var(--line);
  padding-inline: 1rem;
}

.tab.active {
  color: #111318;
  background: linear-gradient(135deg, #ffcf4a, #f24f2b);
  border-color: transparent;
}

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

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  margin-bottom: 0.9rem;
}

.panel-head p {
  margin: 0;
  color: var(--muted);
  max-width: 48ch;
}

.products-list {
  display: grid;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.product-edit {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.7rem;
  display: grid;
  gap: 0.6rem;
  background: #10161e;
}

.product-edit .row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.45rem;
}

.product-edit .actions {
  display: flex;
  gap: 0.4rem;
}

.product-edit .actions button {
  flex: 1;
}

.wide {
  grid-column: 1 / -1;
}

.divider {
  height: 1px;
  margin: 1rem 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
}

.backup-grid {
  display: grid;
  gap: 0.75rem;
}

.top-actions button,
.top-actions a {
  min-width: max-content;
}

.danger {
  background: #8f2020;
  border-color: #6f1717;
}

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

  .product-edit .row {
    grid-template-columns: 1fr;
  }

  .wide {
    grid-column: auto;
  }

  .top {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }

  .top-panel {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .panel-head {
    flex-direction: column;
    align-items: flex-start;
  }
}
