:root,
html[data-theme="dark"] {
  color-scheme: dark;
  --primary: #7c5cff;
  --secondary: #101522;
  --accent: #2dd4bf;
  --primary-fg: #f9fbff;
  --body-fg: #e8eefc;
  --body-bg: #0b0f17;
  --body-quiet-color: #b6c0d9;
  --body-loud-color: #ffffff;
  --header-color: #f7f9ff;
  --header-branding-color: #ffffff;
  --header-bg: #0f1420;
  --header-link-color: #dfe7ff;
  --breadcrumbs-bg: #111827;
  --breadcrumbs-fg: #c4d0ef;
  --breadcrumbs-link-fg: #ffffff;
  --link-fg: #8ab4ff;
  --link-hover-color: #b5ccff;
  --link-selected-fg: #2dd4bf;
  --hairline-color: rgba(255, 255, 255, 0.08);
  --border-color: rgba(162, 176, 209, 0.16);
  --error-fg: #ff8e8e;
  --message-success-bg: rgba(45, 212, 191, 0.16);
  --message-warning-bg: rgba(245, 158, 11, 0.14);
  --message-error-bg: rgba(239, 68, 68, 0.15);
  --darkened-bg: #0d121d;
  --selected-bg: rgba(124, 92, 255, 0.15);
  --selected-row: rgba(124, 92, 255, 0.10);
  --close-button-bg: #ef4444;
  --close-button-hover-bg: #f87171;
}

html, body {
  background:
    radial-gradient(circle at top left, rgba(124, 92, 255, 0.18), transparent 26%),
    radial-gradient(circle at top right, rgba(45, 212, 191, 0.14), transparent 22%),
    linear-gradient(180deg, #0b0f17, #0d111a 48%, #0a0d14);
  color: var(--body-fg);
  font-size: 17px;
}

body,
input,
textarea,
select,
button {
  font-family: "Segoe UI", "Inter", "SF Pro Text", system-ui, sans-serif;
}

#container {
  min-height: 100vh;
}

#header {
  background: rgba(15, 20, 32, 0.94);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(162, 176, 209, 0.12);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
}

#site-name,
#site-name a,
#branding h1,
#branding h1 a:link,
#branding h1 a:visited {
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0.01em;
}

#user-tools,
#user-tools a {
  color: #d8e1f8;
  font-size: 15px;
}

div.breadcrumbs {
  background: rgba(11, 16, 25, 0.82);
  border-bottom: 1px solid rgba(162, 176, 209, 0.10);
  font-size: 15px;
  padding-top: 14px;
  padding-bottom: 14px;
}

#content {
  padding: 28px 32px 40px;
}

h1 {
  color: #ffffff;
  font-size: 42px;
  line-height: 1.12;
  font-weight: 900;
}

h2 {
  color: #f3f7ff;
  font-size: 28px;
  line-height: 1.2;
}

a {
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.16em;
}

.module,
.inline-group,
.submit-row,
#content-related,
#changelist-filter,
.selector,
.results,
.paginator,
.object-tools a,
.button,
input[type="submit"],
input[type="button"],
.submit-row input,
.form-row input,
.form-row textarea,
.form-row select {
  border-radius: 16px;
}

.module,
.inline-group,
#content-related,
#changelist-filter,
.results,
.paginator,
.submit-row {
  background: rgba(18, 24, 36, 0.88);
  border: 1px solid rgba(162, 176, 209, 0.12);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.22);
}

.module h2,
.module caption,
.inline-group h2 {
  background: transparent;
  color: #f8fbff;
  font-weight: 800;
  font-size: 19px;
  padding: 16px 18px 8px;
}

table thead th {
  background: rgba(124, 92, 255, 0.12);
  color: #f4f7ff;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

table thead th,
table tbody td,
table tbody th {
  padding: 14px 16px;
}

tr:nth-child(even),
tr:nth-child(odd) {
  background: transparent;
}

.row1,
.row2,
tbody tr {
  background: transparent;
}

tbody tr:hover,
tbody tr.selected {
  background: rgba(124, 92, 255, 0.10);
}

input,
textarea,
select,
.vTextField {
  background: rgba(11, 16, 25, 0.88);
  color: #f4f8ff;
  border: 1px solid rgba(162, 176, 209, 0.18);
  min-height: 48px;
  font-size: 16px;
}

textarea {
  min-height: 140px;
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid rgba(45, 212, 191, 0.55);
  border-color: rgba(45, 212, 191, 0.6);
  box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.12);
}

.button,
input[type="submit"],
input[type="button"],
.submit-row input,
.object-tools a {
  background: linear-gradient(135deg, #7c5cff, #2dd4bf);
  color: #0b0f17;
  border: none;
  font-size: 15px;
  font-weight: 800;
  padding: 12px 18px;
}

.button.default,
input[type="submit"].default,
.submit-row input.default {
  background: linear-gradient(135deg, #8b5cf6, #06b6d4);
}

.button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
.submit-row input:hover,
.object-tools a:hover {
  filter: brightness(1.08);
}

#changelist-filter h2 {
  padding-bottom: 12px;
}

#nav-sidebar {
  background: rgba(14, 19, 29, 0.96);
  border-right: 1px solid rgba(162, 176, 209, 0.12);
}

#nav-sidebar .current-app .section:link,
#nav-sidebar .current-app .section:visited,
#nav-sidebar .current-model {
  color: #ffffff;
}

.messagelist li {
  border-radius: 16px;
  font-size: 15px;
  padding: 16px 18px;
}

.help,
p.help,
form .help,
div.help,
div.help li {
  color: #b5c0d9;
  font-size: 14px;
}

body.login {
  background:
    radial-gradient(circle at 10% 10%, rgba(124, 92, 255, 0.18), transparent 28%),
    radial-gradient(circle at 90% 0%, rgba(45, 212, 191, 0.14), transparent 24%),
    linear-gradient(180deg, #070b12, #0b1019 55%, #090d15);
}

.login #container {
  background: transparent;
}

.login #content {
  padding-top: 7vh;
}

.login .form-row,
.login .submit-row {
  background: transparent;
  border: none;
  box-shadow: none;
  padding-left: 0;
  padding-right: 0;
}

.login #content-main {
  max-width: 540px;
  margin: 0 auto;
}

.login .submit-row input {
  width: 100%;
  min-height: 54px;
}

@media (max-width: 900px) {
  #content {
    padding: 22px 16px 36px;
  }

  h1 {
    font-size: 34px;
  }
}
