:root {
  --primary: #1d5f95;
  --secondary: #164d7a;
  --accent: #2f8f4e;
  --primary-fg: #ffffff;
  --body-bg: #eef4f9;
  --body-fg: #162535;
  --body-quiet-color: #607081;
  --link-fg: #1d5f95;
  --link-hover-color: #164d7a;
  --header-bg: #ffffff;
  --header-color: #162535;
  --breadcrumbs-bg: #e3edf7;
  --breadcrumbs-fg: #607081;
  --breadcrumbs-link-fg: #1d5f95;
  --hairline-color: #d8e2ec;
  --border-color: #d8e2ec;
  --selected-bg: #ddecf8;
  --selected-row: #edf4ff;
}

body {
  background:
    radial-gradient(circle at top left, #ffffff 0%, rgba(255, 255, 255, 0) 28%),
    linear-gradient(180deg, #e3edf7 0%, #eef4f9 240px, #eef4f9 100%);
  color: var(--body-fg);
}

#header {
  position: relative;
  min-height: 72px;
  align-items: center;
  padding: 0 32px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 8px 24px rgba(21, 37, 52, 0.08);
}

#branding {
  display: flex;
  align-items: center;
  width: 100%;
}

#site-name {
  margin: 0;
  font-size: 0;
  line-height: 1;
}

#site-name a:link,
#site-name a:visited {
  color: var(--body-fg);
}

.uei-admin-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.uei-admin-brand__logo {
  display: block;
  width: 176px;
  height: auto;
}

.uei-admin-title {
  position: absolute;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  transform: translateX(-50%);
  pointer-events: none;
}

.uei-admin-title__system {
  color: var(--body-quiet-color);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  text-transform: uppercase;
}

.uei-admin-title__section {
  color: var(--body-fg);
  font-size: 27px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.1;
  white-space: nowrap;
}

#user-tools {
  position: absolute;
  right: 32px;
  bottom: 20px;
  width: max-content;
  max-width: calc(100% - 64px);
  color: var(--body-quiet-color);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  text-align: right;
  white-space: nowrap;
}

#header #user-tools,
#header #user-tools a,
#header #user-tools a:link,
#header #user-tools a:visited,
#header #logout-form button {
  border-bottom: 0;
  color: var(--body-quiet-color);
  font-weight: 700;
}

#header #user-tools a:hover,
#header #user-tools a:focus,
#header #logout-form button:hover,
#header #logout-form button:focus {
  color: var(--primary);
}

#user-tools strong,
#user-tools .theme-toggle svg {
  color: var(--body-quiet-color);
  fill: var(--body-quiet-color);
}

#user-tools .theme-toggle {
  color: var(--body-quiet-color);
  background: transparent;
}

#content h1 {
  color: var(--body-fg);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0;
}

.module {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(21, 37, 52, 0.08);
}

.module h2,
.module caption,
.inline-group h2 {
  background: var(--primary);
  color: var(--primary-fg);
  font-weight: 700;
  letter-spacing: 0;
}

div.breadcrumbs {
  border-bottom: 1px solid var(--border-color);
}

#nav-sidebar,
.toggle-nav-sidebar {
  border-right: 0;
}

.uei-admin-test-notice {
  margin: 18px 0 0;
  padding: 14px 16px;
  border: 1px solid #f0c8c8;
  border-radius: 8px;
  background: #fff7f7;
  color: #8d3030;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 700;
  text-align: center;
}

@media (max-width: 1024px) {
  #header {
    flex-direction: row;
    justify-content: space-between;
  }

  #user-tools {
    margin: 0;
    line-height: 1;
  }
}

@media (max-width: 767px) {
  #header {
    min-height: 88px;
    padding: 16px;
  }

  .uei-admin-brand {
    flex-wrap: wrap;
  }

  .uei-admin-brand__logo {
    width: 142px;
  }

  .uei-admin-title {
    position: absolute;
    top: 14px;
    right: 16px;
    left: auto;
    margin-left: 0;
    transform: none;
  }

  .uei-admin-title__system {
    display: none;
  }

  .uei-admin-title__section {
    font-size: 18px;
  }

  #user-tools {
    right: 16px;
    top: 48px;
    bottom: auto;
    max-width: calc(100% - 32px);
    text-align: right;
  }
}
