:root {
  color-scheme: light;
  --bg: #f7f3ff;
  --panel: #ffffff;
  --panel-border: #e3d9f4;
  --text: #333333;
  --muted: #666666;
  --accent: #7405cc;
  --accent-strong: #5f02a4;
  --accent-soft: #f7dcff;
  --danger: #e34935;
  --shadow: 0 22px 48px rgba(116, 5, 204, 0.12);
  --radius: 16px;
  --font: Inter, "Avenir Next", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background:
    radial-gradient(circle at top left, rgba(220, 122, 252, 0.3), transparent 28%),
    radial-gradient(circle at bottom right, rgba(194, 5, 255, 0.12), transparent 35%),
    linear-gradient(180deg, #fcf8ff 0%, var(--bg) 100%);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-shell {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 32px 20px 48px;
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
}

.app-shell-single {
  max-width: 720px;
  grid-template-columns: 1fr;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, #c205ff 0%, #7405cc 55%, #5f02a4 100%);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.brand-logo {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  box-shadow: 0 12px 24px rgba(116, 5, 204, 0.16);
  display: block;
  object-fit: cover;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-panel {
  max-width: 100%;
}

.header-row,
.users-header,
.user-card-actions,
.footer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.eyebrow {
  margin: 0 0 6px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
}

.brand-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
}

h1,
h2 {
  margin: 0;
}

h1 {
  font-size: 2rem;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

h2 {
  font-size: 1.1rem;
}

.subtle,
.note,
.recent-meta {
  color: var(--muted);
}

.subtle {
  margin: 14px 0 0;
  max-width: 58ch;
  line-height: 1.5;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 18px;
}

.field span {
  font-size: 0.94rem;
  font-weight: 600;
}

input {
  width: 100%;
  border: 1px solid #d8c9f2;
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  color: var(--text);
  background: #fdfbff;
}

input:focus {
  outline: 2px solid rgba(116, 5, 204, 0.15);
  border-color: var(--accent);
}

.users-header {
  margin-top: 30px;
  margin-bottom: 6px;
}

.users-list {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.user-card {
  border: 1px solid #e6daf8;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #fcf7ff 100%);
  padding: 16px;
}

.user-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.user-card .field {
  margin-top: 0;
}

.user-card-actions {
  margin-top: 14px;
  justify-content: flex-end;
}

.button {
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  padding: 12px 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.button:hover {
  background: var(--accent-strong);
}

.button:disabled {
  opacity: 0.6;
  cursor: wait;
}

.button-secondary {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.button-secondary:hover {
  background: #efd0fb;
}

.button-danger {
  background: #f8e7e5;
  color: var(--danger);
}

.button-danger:hover {
  background: #f3d8d4;
}

.message {
  display: none;
  margin-top: 22px;
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 600;
}

.message.is-visible {
  display: block;
}

.message.success {
  background: #f3e9ff;
  color: var(--accent-strong);
}

.message.error {
  background: #ffefec;
  color: #b43625;
}

.admin-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 24px;
}

.footer-actions {
  margin-top: 22px;
  justify-content: flex-start;
}

@media (max-width: 860px) {
  .app-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .header-row,
  .users-header,
  .footer-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .brand-lockup {
    align-items: flex-start;
  }

  .user-grid {
    grid-template-columns: 1fr;
  }

  .field-wide {
    grid-column: auto;
  }

  .admin-actions {
    flex-direction: column;
    align-items: stretch;
  }
}
