:root {
  color-scheme: dark;
  --bg: #05060a;
  --panel: #0d1020;
  --panel-2: #090a12;
  --muted: rgba(255, 255, 255, 0.55);
  --text: #ffffff;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(103, 232, 249, 0.35);
  --cyan: #67e8f9;
  --cyan-soft: rgba(103, 232, 249, 0.12);
  --accent: #d946ef;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(0, 221, 255, 0.18), transparent 32%),
    radial-gradient(circle at bottom right, rgba(217, 70, 239, 0.16), transparent 30%),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  min-height: 100vh;
}

.shell,
.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.settings-card,
.login-card {
  width: min(720px, 100%);
  border-radius: 28px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(13, 16, 32, 0.96), rgba(9, 10, 18, 0.98));
  box-shadow:
    0 0 24px rgba(0, 215, 255, 0.16),
    0 0 34px rgba(217, 70, 239, 0.14);
  padding: 28px;
}

.page-settings-card {
  width: min(840px, 100%);
}

.title-wrap {
  width: min(840px, 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.page-title-wrap {
  position: absolute;
  top: 24px;
}

.title-pill {
  margin-inline: auto;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  padding: 10px 18px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
}

.nav-btn,
button {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-radius: 999px;
  padding: 11px 16px;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-btn:hover,
button:hover {
  border-color: var(--line-strong);
  background: rgba(103, 232, 249, 0.09);
}

button:disabled {
  opacity: 0.6;
  cursor: default;
}

h1, h3, p {
  margin-top: 0;
}

label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.82);
}

input,
select,
textarea {
  width: 100%;
  margin-top: 8px;
  margin-bottom: 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #120f1b;
  color: var(--text);
  padding: 14px 16px;
  font-size: 14px;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 1px rgba(103, 232, 249, 0.18);
}

.settings-line,
.page-divider {
  height: 1px;
  background: linear-gradient(90deg, rgba(103, 232, 249, 0.5), rgba(217, 70, 239, 0.35), transparent);
  margin: 18px 0 22px;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.helper {
  margin-top: 14px;
  font-size: 14px;
  color: var(--muted);
  white-space: pre-wrap;
}

.hidden {
  display: none !important;
}

.login-card {
  width: min(460px, 100%);
  text-align: center;
}

.login-logo {
  width: 92px;
  height: 92px;
  object-fit: contain;
  margin-bottom: 18px;
}

.login-kicker {
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.58);
  margin-bottom: 10px;
}

.login-title {
  font-size: 34px;
  margin-bottom: 10px;
}

.login-helper {
  color: var(--muted);
  margin-bottom: 20px;
}

.login-form {
  text-align: left;
}

.embed-mode body {
  background: transparent;
}

.embed-mode .shell {
  min-height: auto;
  padding: 0;
}

.embed-mode .page-title-wrap .back {
  display: none;
}

@media (max-width: 720px) {
  .shell,
  .login-shell {
    padding: 16px;
  }

  .settings-card,
  .login-card {
    padding: 20px;
    border-radius: 24px;
  }

  .title-wrap {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .page-title-wrap {
    position: static;
    margin-bottom: 16px;
  }
}
