:root {
  --primary: #d4a853;
  --secondary: #1a1a1a;
  --accent: #047857;
  --primary-fg: #ffffff;
  --body-bg: #0d0d0d;
  --body-fg: #ffffff;
  --header-color: #ffffff;
  --header-branding-color: #ffffff;
  --header-bg: rgba(13, 13, 13, 0.96);
  --header-link-color: #9e9e9e;
  --breadcrumbs-fg: #9e9e9e;
  --breadcrumbs-link-fg: #d4a853;
  --breadcrumbs-bg: #1a1a1a;
  --link-fg: #d4a853;
  --link-hover-color: #b89235;
  --link-selected-fg: #047857;
  --hairline-color: #333333;
  --border-color: #333333;
  --error-fg: #ef4444;
  --message-success-bg: rgba(4, 120, 87, 0.14);
  --message-warning-bg: rgba(212, 168, 83, 0.14);
  --message-error-bg: rgba(239, 68, 68, 0.14);
  --darkened-bg: #121212;
  --selected-bg: rgba(212, 168, 83, 0.12);
  --selected-row: rgba(255, 255, 255, 0.03);
  --close-button-bg: #ef4444;
  --close-button-hover-bg: #dc2626;
  --card-bg: rgba(26, 26, 26, 0.6);
  --glass-border: rgba(255, 255, 255, 0.08);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-teal {
  0% { box-shadow: 0 0 0 0 rgba(4, 120, 87, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(4, 120, 87, 0); }
  100% { box-shadow: 0 0 0 0 rgba(4, 120, 87, 0); }
}

html,
html[data-theme="light"],
html[data-theme="dark"],
body {
  color-scheme: dark;
  background: linear-gradient(180deg, #0d0d0d 0%, #0d0d0d 100%);
  color: #9e9e9e;
}

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

.theme-toggle {
  display: none !important;
}

#header {
  background: var(--header-bg);
  border-bottom: 1px solid #333333;
}

#branding h1,
#branding h1 a:link,
#branding h1 a:visited {
  color: #ffffff;
  font-weight: 700;
}

#branding {
  display: flex;
  align-items: center;
  gap: 12px;
}

#branding::before {
  content: "F";
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, #d4a853, #047857);
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
}

#user-tools {
  font-size: 13px;
  color: #9e9e9e;
}

div.breadcrumbs {
  background: #1a1a1a;
  border-bottom: 1px solid #333333;
}

a:link,
a:visited {
  color: #d4a853;
}

a:hover,
a:focus {
  color: #b89235;
}

.module,
.inline-group,
#changelist-filter,
#changelist .actions,
.paginator,
.submit-row,
.selector,
.results,
.dashboard-metrics .metric-card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  animation: fadeIn 0.5s ease-out forwards;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.3s;
  border-radius: 12px;
}

.dashboard-metrics .metric-card:hover {
  transform: translateY(-5px) scale(1.02);
  border-color: var(--accent);
}

.dashboard #content-related {
  background: var(--card-bg);
  backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
}

.module h2,
.module caption,
.inline-group h2 {
  background: rgba(255, 255, 255, 0.02);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  border-bottom: 1px solid #333333;
}

#nav-sidebar {
  background: #1a1a1a;
  border-right: 1px solid #333333;
}

#nav-filter {
  background: #111111;
  color: #ffffff;
  border: 1px solid #333333;
  border-radius: 10px;
}

#nav-sidebar .current-model,
#nav-sidebar .current-app .section,
#nav-sidebar a:hover {
  background: rgba(212, 168, 83, 0.12);
  color: #ffffff;
  border-radius: 10px;
}

.dashboard .module table,
.results table {
  background: transparent;
}

.results th,
.results td,
.dashboard .module th,
.dashboard .module td {
  border-color: #333333;
}

tbody tr:nth-child(odd) {
  background: rgba(255, 255, 255, 0.015);
}

.results tbody tr:hover,
.dashboard .module tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

input,
textarea,
select,
.vTextField,
.vLargeTextField {
  background: #111111;
  color: #ffffff;
  border: 1px solid #333333;
  border-radius: 8px;
}

input:focus,
textarea:focus,
select:focus {
  border-color: #d4a853;
  box-shadow: 0 0 0 3px rgba(212, 168, 83, 0.16);
}

form .aligned div.form-row {
  border-bottom: 1px solid rgba(51, 51, 51, 0.55);
}

label,
.help,
.helptext,
.quiet {
  color: #9e9e9e;
}

.button,
input[type="submit"],
input[type="button"],
.submit-row input,
a.button,
.object-tools a,
input.default,
.button.default {
  background: #d4a853;
  color: #ffffff;
  border: 0;
  border-radius: 999px;
  font-weight: 600;
}

.button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
.submit-row input:hover,
a.button:hover,
.object-tools a:hover {
  background: #b89235;
}

input.default,
.button.default {
  background: #047857;
}

.deletelink,
.button.deletelink,
.submit-row .deletelink {
  background: #ef4444 !important;
}

.messagelist li {
  border-radius: 10px;
}

.messagelist li.success {
  background: rgba(4, 120, 87, 0.14);
}

.messagelist li.warning {
  background: rgba(212, 168, 83, 0.14);
}

.messagelist li.error {
  background: rgba(239, 68, 68, 0.14);
}

.login #container {
  background: transparent;
}

.login #content {
  background: #1a1a1a;
  border: 1px solid #333333;
  border-radius: 14px;
}
