:root {
  color-scheme: light;
  --bg: #160f24;
  --panel: rgba(28, 22, 45, 0.94);
  --panel-soft: rgba(31, 25, 54, 0.92);
  --border: rgba(164, 139, 224, 0.26);
  --text: #f8f5ff;
  --muted: #b9afd2;
  --violet: #7b36d9;
  --blue: #18aef5;
  --green: #25dc41;
  --coral: #ff745f;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(135deg, #241235 0%, #101323 48%, #181d2b 100%);
  color: var(--text);
  font-family: Inter, Segoe UI, Arial, sans-serif;
}

button,
input {
  font: inherit;
}

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

.hidden {
  display: none !important;
}

.admin-shell {
  width: min(1180px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 34px 0 64px;
}

.admin-hero {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 26px;
}

.admin-hero img {
  width: 88px;
  height: 88px;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  object-fit: cover;
}

.admin-hero h1,
.admin-panel h2,
.access-section h3 {
  margin: 4px 0 0;
  letter-spacing: 0;
}

.admin-hero h1 {
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1;
}

.admin-hero p:last-child {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.eyebrow {
  margin: 0;
  color: #a48be0;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-panel,
.access-section {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.admin-panel {
  padding: 24px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.user-label {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.admin-form {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}

input {
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(10, 7, 18, 0.7);
  color: var(--text);
  padding: 0 14px;
}

input:focus {
  border-color: var(--blue);
  outline: 2px solid rgba(24, 174, 245, 0.18);
}

button,
.access-button {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, #7b36d9, #075e85);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
}

button {
  padding: 0 18px;
}

.ghost-button {
  min-height: 38px;
  border: 1px solid var(--border);
  background: rgba(31, 25, 54, 0.92);
}

.status-message {
  min-height: 22px;
  margin: 0;
  color: var(--coral);
  font-weight: 700;
}

.access-section {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 22px;
  align-items: center;
  padding: 22px;
}

.access-section + .access-section {
  margin-top: 18px;
}

.section-copy p:last-child {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.button-grid {
  display: grid;
  gap: 12px;
}

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

.access-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 0 14px;
  text-align: center;
  transition:
    transform 0.16s ease,
    filter 0.16s ease;
}

.access-button:hover,
.access-button:focus {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.admin-link {
  background: linear-gradient(135deg, #25dc41, #0a7b4f);
}

@media (max-width: 900px) {
  .access-section,
  .button-grid.three-columns {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 560px) {
  .admin-shell {
    width: min(100% - 24px, 1180px);
    padding-top: 22px;
  }

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

  .admin-hero img {
    width: 72px;
    height: 72px;
  }

  .admin-panel,
  .access-section {
    padding: 18px;
  }
}
