:root {
  --bg: #0f1218;
  --panel: #171c25;
  --panel-soft: #1d2430;
  --line: rgba(255,255,255,0.12);
  --text: #eef1f8;
  --muted: #abb6cd;
  --brand: #4b56d1;
  --brand-soft: rgba(75,86,209,0.18);
  --radius: 18px;
  --shadow: 0 18px 48px rgba(0,0,0,0.28);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(75,86,209,0.22), transparent 28%),
    var(--bg);
  color: var(--text);
}

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

img { max-width: 100%; display: block; }

button, input, textarea {
  font: inherit;
}

.admin-shell {
  min-height: 100vh;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.2rem;
}

.login-card {
  width: min(520px, 100%);
  background: rgba(23, 28, 37, 0.9);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 1.6rem;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.login-brand img {
  width: 76px;
  height: 76px;
  object-fit: contain;
  background: #fff;
  border-radius: 18px;
  padding: 0.45rem;
}

.login-card h1 {
  margin: 0 0 0.4rem;
  font-size: 2rem;
}

.login-card p {
  color: var(--muted);
  margin-top: 0;
}

.flash {
  padding: 0.9rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  margin-bottom: 1rem;
}

.flash--success {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.35);
}

.flash--error {
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.35);
}

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

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
  background: rgba(15, 18, 24, 0.85);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.admin-topbar__left h1 {
  margin: 0;
  font-size: 1.25rem;
}

.admin-topbar__left p {
  margin: 0.25rem 0 0;
  color: var(--muted);
}

.admin-topbar__actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.8rem 1.1rem;
  font-weight: 600;
  background: rgba(255,255,255,0.02);
  color: var(--text);
  cursor: pointer;
}

.button--primary {
  background: var(--brand-soft);
  border-color: rgba(75,86,209,0.55);
}

.button--danger {
  background: rgba(239,68,68,0.12);
  border-color: rgba(239,68,68,0.28);
}

.admin-layout {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 1.25rem;
  padding: 1.25rem;
}

.admin-sidebar {
  position: sticky;
  top: 92px;
  align-self: start;
  background: rgba(23, 28, 37, 0.88);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 1rem;
}

.admin-sidebar h2 {
  font-size: 1rem;
  margin-top: 0;
}

.admin-sidebar nav {
  display: grid;
  gap: 0.4rem;
}

.admin-sidebar a {
  color: var(--muted);
  border-radius: 14px;
  padding: 0.75rem 0.9rem;
  border: 1px solid transparent;
}

.admin-sidebar a:hover {
  color: var(--text);
  border-color: var(--line);
  background: rgba(255,255,255,0.04);
}

.admin-content {
  display: grid;
  gap: 1rem;
}

.admin-card {
  background: rgba(23, 28, 37, 0.88);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 1.2rem;
}

.admin-card h2 {
  margin-top: 0;
  margin-bottom: 0.35rem;
  font-size: 1.3rem;
}

.admin-card > p {
  color: var(--muted);
  margin-top: 0;
}

.grid-2,
.grid-3 {
  display: grid;
  gap: 1rem;
}

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

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

.field {
  display: grid;
  gap: 0.45rem;
}

label {
  font-weight: 600;
  font-size: 0.95rem;
}

input,
textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.2);
  color: var(--text);
  outline: none;
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: rgba(75,86,209,0.8);
  box-shadow: 0 0 0 4px rgba(75,86,209,0.18);
}

.help {
  color: var(--muted);
  font-size: 0.88rem;
}

.preview-image {
  width: 100%;
  max-width: 260px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
}

.preview-image--logo {
  max-width: 140px;
  aspect-ratio: 1;
  object-fit: contain;
  background: #fff;
  padding: 0.35rem;
}

.inline-actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 0.4rem;
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--muted);
}

.section-split {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.small-title {
  margin: 0 0 0.55rem;
  font-size: 1rem;
}

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

  .admin-sidebar {
    position: static;
  }

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