* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: Inter, system-ui, sans-serif;
  color: #240342;
  background: #f4f1fb;
}

body {
  min-height: 100vh;
}

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

.login-card {
  width: min(100%, 420px);
  background: #fff;
  border-radius: 28px;
  padding: 32px;
  box-shadow: 0 30px 60px rgba(36, 3, 66, 0.12);
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  color: #804895;
}

.login-card h1,
.admin-sidebar h1 {
  margin: 0 0 12px;
  font-size: 34px;
  line-height: 1;
}

.muted {
  color: #6f6283;
  line-height: 1.5;
}

.muted.small {
  font-size: 13px;
}

.notice {
  margin: 18px 0;
  padding: 12px 14px;
  border-radius: 14px;
}

.notice-error {
  background: #fff1f3;
  color: #bf1d50;
}

.login-form,
.editor-form {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

label {
  font-weight: 600;
}

input[type='password'],
input[type='file'],
select,
textarea {
  width: 100%;
  border: 1px solid rgba(128, 72, 149, 0.2);
  border-radius: 16px;
  padding: 12px 14px;
  font: inherit;
  background: #fff;
  color: #240342;
}

textarea {
  resize: vertical;
  min-height: 220px;
}

button,
.logout-link {
  border: 0;
  border-radius: 999px;
  background: #804895;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  padding: 14px 22px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

button:hover,
.logout-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(128, 72, 149, 0.22);
}

.admin-app {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  min-height: 100vh;
}

.admin-sidebar {
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: 18px;
  padding: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #f7f3fc 100%);
  border-right: 1px solid rgba(128, 72, 149, 0.14);
}

.panel-group {
  display: grid;
  gap: 14px;
  align-content: start;
}

.panel {
  background: #fff;
  border-radius: 22px;
  padding: 18px;
  box-shadow: 0 14px 30px rgba(36, 3, 66, 0.08);
}

.panel h2 {
  margin: 0 0 10px;
  font-size: 18px;
}

.mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mode-switch-wide {
  margin-bottom: 10px;
}

.mode-button {
  background: #ede7f7;
  color: #5d436f;
  box-shadow: none;
}

.mode-button.active,
.interaction-button.active {
  background: #804895;
  color: #fff;
}

.interaction-button {
  background: #eef5fb;
  color: #466784;
  box-shadow: none;
}

.selection-meta {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.selection-meta code {
  display: block;
  overflow-wrap: anywhere;
  padding: 8px 10px;
  border-radius: 12px;
  background: #f3eef9;
  color: #553971;
}

.sidebar-actions {
  display: grid;
  gap: 10px;
}

.special-editors {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}
.special-editors li {
  padding: 10px 12px;
  background: #f6f1fb;
  border: 1px solid rgba(128, 72, 149, 0.18);
  border-radius: 12px;
}
.special-editors a {
  display: block;
  color: #2f1a4f;
  font-weight: 600;
  text-decoration: none;
}
.special-editors a:hover {
  color: #804895;
}
.special-editors .small {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.4;
}

.publish-button {
  background: #358ac9;
}

.status-box {
  padding: 14px 16px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(36, 3, 66, 0.08);
  color: #553971;
}

.preview-shell {
  min-width: 0;
  background: radial-gradient(circle at top left, rgba(128, 72, 149, 0.12), transparent 26%), #ede9f7;
  padding: 18px;
}

#preview-frame {
  width: 100%;
  height: calc(100vh - 36px);
  border: 0;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 30px 60px rgba(36, 3, 66, 0.12);
}

.help {
  margin-top: 12px;
  color: #6f6283;
  font-size: 13px;
}

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

  .admin-sidebar {
    border-right: 0;
    border-bottom: 1px solid rgba(128, 72, 149, 0.14);
  }
}
