:root {
  --portal-surface: #f7f9fb;
  --portal-surface-low: #f2f4f6;
  --portal-surface-card: #ffffff;
  --portal-surface-high: #e6e8ea;
  --portal-surface-highest: #e0e3e5;
  --portal-text: #191c1e;
  --portal-muted: #444651;
  --portal-outline: #c5c5d3;
  --portal-outline-strong: #757682;
  --portal-primary: #00236f;
  --portal-primary-strong: #1e3a8a;
  --portal-primary-soft: #dce1ff;
  --portal-secondary: #006591;
  --portal-secondary-soft: #39b8fd;
  --portal-secondary-text: #004666;
  --portal-error: #ba1a1a;
  --portal-success: #067647;
  --portal-success-soft: #ecfdf3;
  --portal-warning: #b54708;
  --portal-warning-soft: #fffaeb;
  --portal-sidebar-width: 260px;
  --portal-toolbar-height: 64px;
  --portal-radius: 8px;
  --portal-radius-lg: 16px;
  --portal-shadow-sm: 0 1px 3px rgba(15, 23, 42, .04), 0 1px 2px rgba(15, 23, 42, .05);
  --primary: var(--portal-primary);
  --secondary: var(--portal-secondary);
  --accent: var(--portal-secondary);
  --primary-fg: #fff;
  --body-fg: var(--portal-text);
  --body-bg: var(--portal-surface);
  --body-quiet-color: var(--portal-muted);
  --body-loud-color: var(--portal-text);
  --header-color: #fff;
  --header-branding-color: #fff;
  --header-bg: var(--portal-primary);
  --header-link-color: #fff;
  --breadcrumbs-fg: var(--portal-muted);
  --breadcrumbs-link-fg: var(--portal-primary);
  --breadcrumbs-bg: transparent;
  --link-fg: var(--portal-primary);
  --link-hover-color: var(--portal-secondary);
  --link-selected-fg: var(--portal-primary);
  --hairline-color: var(--portal-outline);
  --border-color: var(--portal-outline);
  --button-fg: #fff;
  --button-bg: var(--portal-primary);
  --button-hover-bg: var(--portal-primary-strong);
  --default-button-bg: var(--portal-secondary);
  --default-button-hover-bg: var(--portal-primary-strong);
  --delete-button-bg: var(--portal-error);
  --delete-button-hover-bg: #93000a;
  --object-tools-fg: #fff;
  --object-tools-bg: var(--portal-primary);
  --object-tools-hover-bg: var(--portal-primary-strong);
  --font-family-primary: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-family-monospace: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

html,
body {
  min-height: 100%;
  background: var(--portal-surface);
}

body {
  font-family: var(--font-family-primary);
  color: var(--portal-text);
  font-size: 14px;
  line-height: 20px;
}

body.admin-portal {
  letter-spacing: 0;
}

.material-symbols-outlined {
  font-family: "Material Symbols Outlined";
  font-weight: normal;
  font-style: normal;
  font-size: 22px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  direction: ltr;
  -webkit-font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
}

#container {
  min-height: 100vh;
  background: var(--portal-surface);
}

#header {
  position: fixed;
  top: 0;
  left: var(--portal-sidebar-width);
  right: 0;
  z-index: 40;
  height: var(--portal-toolbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 24px;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--portal-outline);
  color: var(--portal-text);
  box-shadow: var(--portal-shadow-sm);
  box-sizing: border-box;
}

#branding {
  min-width: 0;
}

#branding h1,
#branding h1 a:link,
#branding h1 a:visited,
#site-name,
#site-name a:link,
#site-name a:visited {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--portal-primary);
  font-size: 18px;
  font-weight: 800;
  line-height: 24px;
  text-decoration: none;
}

.admin-portal-brand-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--portal-primary-strong);
  color: #fff;
  font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 24;
}

#user-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  color: var(--portal-muted);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
}

#user-tools .admin-portal-welcome-text {
  color: var(--portal-muted);
}

#user-tools strong {
  color: var(--portal-primary);
  font-weight: 700;
}

#user-tools a,
#logout-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 128px;
  height: 42px;
  border: 1px solid var(--portal-outline);
  border-radius: var(--portal-radius);
  background: var(--portal-primary);
  color: #fff;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
  text-decoration: none;
  text-transform: none;
  white-space: nowrap;
}

#logout-form {
  display: inline-flex;
}

#logout-form button {
  cursor: pointer;
  font-family: inherit;
}

#user-tools a:hover,
#logout-form button:hover {
  background: var(--portal-surface-low);
  border-color: var(--portal-primary-soft);
  color: var(--portal-primary);
}

.theme-toggle {
  border-radius: var(--portal-radius);
}

.main {
  display: flex;
  width: calc(100vw - var(--portal-sidebar-width));
  min-height: 100vh;
  margin-left: var(--portal-sidebar-width);
  padding-top: var(--portal-toolbar-height);
  background: var(--portal-surface);
  box-sizing: border-box;
}

#toggle-nav-sidebar {
  display: none;
}

#nav-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 50;
  width: var(--portal-sidebar-width);
  box-sizing: border-box;
  padding: 16px 10px;
  overflow-y: auto;
  background: var(--portal-surface-low);
  border-right: 1px solid var(--portal-outline);
}

#nav-sidebar.admin-portal-resizing {
  user-select: none;
}

.admin-portal-sidebar-resizer {
  position: fixed;
  top: 0;
  bottom: 0;
  left: calc(var(--portal-sidebar-width) - 3px);
  z-index: 70;
  width: 6px;
  cursor: col-resize;
  background: transparent;
}

.admin-portal-sidebar-resizer::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 2px;
  width: 1px;
  background: transparent;
  transition: background .16s ease;
}

.admin-portal-sidebar-resizer:hover::after,
#nav-sidebar.admin-portal-resizing .admin-portal-sidebar-resizer::after {
  background: var(--portal-secondary);
}

.admin-portal-sidebar-brand {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  margin: 0 6px 16px;
  padding: 8px 12px;
  border: 1px solid var(--portal-outline);
  border-radius: 14px;
  background: var(--portal-surface-card);
  color: var(--portal-primary);
  box-shadow: var(--portal-shadow-sm);
  text-decoration: none;
}

.admin-portal-sidebar-logo {
  display: block;
  width: 100%;
  max-width: 220px;
  max-height: 52px;
  object-fit: contain;
}

.admin-portal-sidebar-brand-icon {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--portal-primary-strong);
  color: #fff;
  font-size: 22px;
  font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 24;
}

.admin-portal-sidebar-brand-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.admin-portal-sidebar-brand-copy strong {
  overflow: hidden;
  color: var(--portal-primary);
  font-size: 16px;
  font-weight: 800;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-portal-sidebar-brand-copy small {
  overflow: hidden;
  color: var(--portal-muted);
  font-size: 12px;
  line-height: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-portal-sidebar-brand-toggle {
  margin-left: auto;
  color: var(--portal-primary);
  font-size: 20px;
}

.admin-portal-brand-align-center .admin-portal-sidebar-brand {
  justify-content: center;
  text-align: center;
}

.admin-portal-brand-align-center .admin-portal-sidebar-brand-toggle {
  display: none;
}

#nav-sidebar.no-sidebar-brand {
  padding-top: 16px;
}

#nav-sidebar::-webkit-scrollbar {
  width: 4px;
}

#nav-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

#nav-sidebar::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #cbd5e1;
}

#nav-filter {
  width: calc(100% - 12px);
  min-height: 38px;
  margin: 0 6px 14px;
  border: 1px solid var(--portal-outline);
  border-radius: var(--portal-radius);
  background: var(--portal-surface-card);
  color: var(--portal-text);
  padding: 8px 10px;
  font-size: 13px;
}

#nav-filter:focus,
input:focus,
textarea:focus,
select:focus,
.vTextField:focus,
.vURLField:focus,
.vIntegerField:focus,
.vBigIntegerField:focus,
.vForeignKeyRawIdAdminField:focus {
  border-color: var(--portal-secondary);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, .14);
  outline: 0;
}

.admin-portal-accordion {
  display: grid;
  gap: 8px;
}

.admin-portal-app-group {
  border: 1px solid var(--portal-outline);
  border-radius: 12px;
  background: var(--portal-surface-card);
  box-shadow: var(--portal-shadow-sm);
  overflow: hidden;
}

.admin-portal-app-group summary {
  min-height: 42px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 22px;
  gap: 10px;
  align-items: center;
  padding: 9px 12px;
  color: var(--portal-primary);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  list-style: none;
}

.admin-portal-app-group summary::-webkit-details-marker {
  display: none;
}

.admin-portal-app-icon {
  color: var(--portal-primary);
  font-size: 20px;
}

.admin-portal-chevron {
  color: var(--portal-primary);
  font-size: 20px;
  transition: transform .16s ease;
}

.admin-portal-app-group[open] .admin-portal-chevron {
  transform: rotate(180deg);
}

.admin-portal-models {
  display: grid;
  gap: 2px;
  padding: 0 6px 8px;
}

.admin-portal-model {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px;
  align-items: center;
}

.admin-portal-model-link,
#nav-sidebar .model a {
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: var(--portal-radius);
  color: var(--portal-primary);
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: background .16s ease, color .16s ease;
  min-width: 0;
}

#nav-sidebar,
#nav-sidebar a,
#nav-sidebar summary,
#nav-sidebar span {
  color: var(--portal-primary);
}

.admin-portal-model-link span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-portal-model-link:hover,
#nav-sidebar .model a:hover {
  background: var(--portal-surface-highest);
  color: var(--portal-primary);
}

.admin-portal-model.current-model .admin-portal-model-link,
.admin-portal-model-link.admin-portal-active,
#nav-sidebar .model a.admin-portal-active,
#nav-sidebar .model.current-model a {
  background: var(--portal-surface-card);
  box-shadow: inset 3px 0 0 var(--portal-primary);
  color: var(--portal-primary);
  font-weight: 800;
}

.admin-portal-nav-icon {
  color: currentColor;
  font-size: 20px;
  flex: 0 0 auto;
}

.admin-portal-model-actions {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.admin-portal-action,
#nav-sidebar td a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0 !important;
  border-radius: var(--portal-radius);
  color: var(--portal-primary);
  background: transparent !important;
  background-image: none !important;
  font-size: 0;
  text-decoration: none;
  box-sizing: border-box;
}

.admin-portal-action .material-symbols-outlined {
  font-size: 17px;
}

.admin-portal-action.addlink .material-symbols-outlined {
  color: var(--portal-success);
}

.admin-portal-action.changelink .material-symbols-outlined {
  color: var(--portal-primary);
}

.admin-portal-action.viewlink .material-symbols-outlined {
  color: var(--portal-secondary-text);
}

.admin-portal-action:hover {
  background: var(--portal-surface-high) !important;
}

#nav-sidebar td a::before {
  content: "add";
  font-family: "Material Symbols Outlined";
  font-size: 18px;
}

#nav-sidebar td a.changelink::before {
  content: "edit";
}

#nav-sidebar td a.viewlink::before {
  content: "visibility";
}

#nav-sidebar td a:hover {
  background: var(--portal-surface-high);
}

.content {
  flex: 1 1 auto !important;
  width: 100%;
  min-width: 0;
  padding: 20px;
  box-sizing: border-box;
}

.main > #nav-sidebar + .content,
.main.shifted > #nav-sidebar + .content {
  max-width: none;
}

#content {
  width: 100% !important;
  max-width: none !important;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.dashboard #content,
.change-list #content,
.change-form #content,
.delete-confirmation #content {
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

#content h1 {
  margin: 0 0 6px;
  color: var(--portal-primary);
  font-size: 28px;
  font-weight: 800;
  line-height: 36px;
  letter-spacing: 0;
}

#content h2 {
  color: var(--portal-primary);
  font-size: 18px;
  font-weight: 700;
}

.breadcrumbs {
  margin-left: var(--portal-sidebar-width);
  padding: 76px 20px 0;
  background: transparent;
  color: var(--portal-muted);
  font-size: 12px;
}

.breadcrumbs a {
  color: var(--portal-primary);
  font-weight: 700;
}

.messagelist {
  max-width: none;
  margin: 0 0 16px;
  padding: 0;
}

.messagelist li {
  border: 1px solid var(--portal-outline);
  border-radius: var(--portal-radius);
  background-position: 12px 50%;
  box-shadow: var(--portal-shadow-sm);
}

.module,
#changelist,
.inline-group,
fieldset.module,
#content-related {
  border: 1px solid var(--portal-outline);
  border-radius: var(--portal-radius-lg);
  background: var(--portal-surface-card);
  box-shadow: var(--portal-shadow-sm);
  overflow: hidden;
}

.module h2,
.module caption,
.inline-group h2,
fieldset.module h2 {
  background: var(--portal-surface-card);
  border-bottom: 1px solid var(--portal-outline);
  color: var(--portal-primary);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
  padding: 12px 16px;
}

#content-main {
  width: 100% !important;
  max-width: none !important;
  min-width: 0;
  margin-right: 0 !important;
  box-sizing: border-box;
}

.change-form #content.colM,
.change-form #content-main,
.change-form #content-main form,
.change-form #content-main form > div {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  box-sizing: border-box;
}

.change-form #content-main form {
  display: block;
}

.change-form fieldset.module,
.change-form .module.aligned,
.change-form .inline-group,
.change-form .submit-row,
.change-form #ivr-flow-builder-panel,
.change-form #ivr-flow-builder-root,
.change-form .ivr-builder-shell {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  box-sizing: border-box;
}

.change-form .form-row,
.change-form .form-row > div,
.change-form .flex-container,
.change-form .related-widget-wrapper {
  max-width: 100%;
  box-sizing: border-box;
}

.dashboard #content {
  display: block !important;
}

.portal-dashboard {
  display: grid;
  gap: 24px;
}

.portal-dashboard-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.portal-dashboard-header h1 {
  margin-bottom: 4px !important;
  font-size: 32px !important;
  line-height: 40px !important;
}

.portal-dashboard-header p {
  margin: 0;
  color: var(--portal-muted);
  font-size: 16px;
  line-height: 24px;
}

.portal-dashboard-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.portal-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: var(--portal-radius);
  padding: 9px 14px;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: var(--portal-shadow-sm);
}

.portal-button-primary {
  border: 1px solid var(--portal-primary);
  background: var(--portal-primary);
  color: #fff !important;
}

.portal-button-secondary {
  border: 1px solid var(--portal-outline);
  background: #fff;
  color: var(--portal-primary) !important;
}

.portal-summary-grid {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  gap: 16px;
}

.portal-summary-card {
  min-height: 156px;
  border: 1px solid var(--portal-outline);
  border-radius: var(--portal-radius-lg);
  background: #fff;
  box-shadow: var(--portal-shadow-sm);
  padding: 20px;
  box-sizing: border-box;
}

.portal-summary-card header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.portal-summary-card header .material-symbols-outlined {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--portal-radius);
  background: var(--portal-primary-soft);
  color: var(--portal-primary);
  font-size: 22px;
}

.portal-summary-card h2 {
  margin: 0;
  color: var(--portal-primary);
  font-size: 18px !important;
  line-height: 24px;
}

.portal-summary-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.portal-summary-list-server {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.portal-server-grid {
  display: grid;
  grid-template-columns: 132px 132px minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.portal-gauge {
  min-width: 0;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 8px;
  border: 1px solid #eef2f7;
  border-radius: var(--portal-radius);
  background: var(--portal-surface-low);
  padding: 12px;
  --portal-gauge-value: 0;
}

.portal-gauge-ring {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #fff 0 56%, transparent 57%),
    conic-gradient(var(--portal-primary) calc(var(--portal-gauge-value) * 1%), #d8dee8 0);
}

.portal-gauge strong {
  color: var(--portal-primary);
  font-family: var(--font-family-monospace);
  font-size: 18px;
  line-height: 24px;
}

.portal-gauge span {
  color: var(--portal-muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 16px;
  text-transform: uppercase;
}

.portal-summary-list div {
  min-width: 0;
  border: 1px solid #eef2f7;
  border-radius: var(--portal-radius);
  background: var(--portal-surface-low);
  padding: 12px;
}

.portal-summary-list span {
  display: block;
  overflow: hidden;
  color: var(--portal-muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 16px;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.portal-summary-list strong {
  display: block;
  overflow: hidden;
  margin-top: 6px;
  color: var(--portal-primary);
  font-size: 20px;
  font-weight: 800;
  line-height: 26px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-summary-list-server strong {
  font-family: var(--font-family-monospace);
  font-size: 15px;
  line-height: 22px;
}

.portal-dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: start;
}

.portal-app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 16px;
}

.portal-app-card {
  border: 1px solid var(--portal-outline);
  border-radius: var(--portal-radius-lg);
  background: #fff;
  box-shadow: var(--portal-shadow-sm);
  overflow: hidden;
}

.portal-app-card header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--portal-outline);
}

.portal-app-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 10px;
  background: var(--portal-surface-high);
  color: var(--portal-primary);
  font-size: 28px;
}

.portal-app-card h2 {
  margin: 0;
  font-size: 18px !important;
  line-height: 24px;
}

.portal-app-card h2 a {
  color: var(--portal-primary);
  text-decoration: none;
}

.portal-app-card p {
  margin: 2px 0 0;
  color: var(--portal-muted);
}

.portal-model-list {
  display: grid;
}

.portal-model-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 46px;
  padding: 7px 12px 7px 16px;
  border-bottom: 1px solid #eef2f7;
}

.portal-model-row:last-child {
  border-bottom: 0;
}

.portal-model-row:hover {
  background: #f8fafc;
}

.portal-model-main {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--portal-text);
  font-weight: 700;
  text-decoration: none;
}

.portal-model-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.portal-icon-action {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--portal-radius);
  color: var(--portal-primary);
  text-decoration: none;
}

.portal-icon-action:hover {
  background: var(--portal-surface-high);
}

.portal-icon-action .material-symbols-outlined {
  font-size: 18px;
}

.portal-alert-panel {
  position: sticky;
  top: calc(var(--portal-toolbar-height) + 24px);
}

.portal-status-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  border: 1px solid var(--portal-outline);
  border-radius: var(--portal-radius-lg);
  background: var(--portal-surface-low);
  padding: 18px 24px;
}

.portal-status-strip span {
  display: block;
  color: var(--portal-muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.portal-status-strip strong {
  display: block;
  margin-top: 8px;
  color: var(--portal-primary);
  font-family: var(--font-family-monospace);
  font-size: 16px;
}

.portal-danger {
  color: var(--portal-error) !important;
}

#content-related {
  margin: 0;
  padding: 0;
}

#content-related h2,
#content-related h3 {
  margin: 0;
}

#content-related h3 {
  padding: 12px 16px 0;
  color: var(--portal-muted);
  font-family: var(--font-family-monospace);
  font-size: 11px;
  text-transform: uppercase;
}

#recent-actions-module .actionlist {
  padding: 8px 16px 16px;
}

#recent-actions-module .actionlist li {
  margin: 0;
  padding: 9px 0;
  border-bottom: 1px solid #eef2f7;
}

#recent-actions-module .actionlist li:last-child {
  border-bottom: 0;
}

table {
  border-collapse: separate;
  border-spacing: 0;
}

thead th,
tfoot td {
  background: var(--portal-surface-low);
  color: var(--portal-muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

tbody tr:hover {
  background: #f8fafc;
}

td,
th {
  border-bottom: 1px solid #eef2f7;
  padding-top: 10px;
  padding-bottom: 10px;
}

.row1,
.row2 {
  background: var(--portal-surface-card);
}

#changelist {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: 100% !important;
  max-width: none !important;
  box-sizing: border-box;
}

#changelist.filtered {
  grid-template-columns: minmax(0, 1fr) 280px;
  width: 100% !important;
  max-width: none !important;
}

#changelist .changelist-form-container {
  width: 100% !important;
  max-width: none !important;
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-sizing: border-box;
}

#changelist-filter {
  position: static;
  width: 280px !important;
  min-height: 100%;
  border-left: 1px solid var(--portal-outline);
  border-radius: 0;
  background: var(--portal-surface-low);
  box-sizing: border-box;
}

#changelist-filter h2 {
  background: transparent;
  border-bottom: 1px solid var(--portal-outline);
  color: var(--portal-primary);
  font-size: 14px;
  font-weight: 800;
  padding: 12px 16px;
}

#changelist-filter h3 {
  color: var(--portal-muted);
  font-family: var(--font-family-monospace);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
}

#changelist-filter li.selected a {
  color: var(--portal-primary);
  font-weight: 800;
}

#toolbar {
  padding: 14px 16px;
  border-bottom: 1px solid var(--portal-outline);
  background: var(--portal-surface-card);
}

#toolbar form input[type="submit"] {
  border-radius: var(--portal-radius);
}

.actions {
  padding: 10px 16px;
  border-bottom: 1px solid var(--portal-outline);
  background: var(--portal-surface-card);
}

.paginator {
  border-top: 1px solid var(--portal-outline);
  background: var(--portal-surface-card);
  padding: 12px 16px;
}

.object-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -42px 0 18px;
  justify-content: flex-end;
}

.object-tools a,
.object-tools button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--portal-radius);
  background: var(--portal-primary);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  padding: 8px 12px;
}

.object-tools a:hover,
.object-tools button:hover {
  background: var(--portal-primary-strong);
}

.change-form .object-tools {
  align-items: center;
  margin: 8px 0 24px;
}

.change-form .object-tools a,
.change-form .object-tools button {
  line-height: 18px;
}

input,
textarea,
select,
.form-row p,
form .aligned p.help,
form .aligned div.help {
  font-family: var(--font-family-primary);
}

input,
textarea,
select,
.vTextField,
.vURLField,
.vIntegerField,
.vBigIntegerField,
.vForeignKeyRawIdAdminField {
  border: 1px solid var(--portal-outline);
  border-radius: var(--portal-radius);
  background: var(--portal-surface-card);
  color: var(--portal-text);
}

label {
  color: var(--portal-text);
  font-weight: 700;
}

.aligned label {
  color: var(--portal-muted);
  font-size: 13px;
}

.form-row {
  border-bottom: 1px solid #eef2f7;
  padding: 14px 16px;
}

.form-row:last-child {
  border-bottom: 0;
}

.help,
p.help,
div.help,
.quiet {
  color: var(--portal-muted);
}

.submit-row {
  position: sticky;
  bottom: 0;
  z-index: 10;
  border: 1px solid var(--portal-outline);
  border-radius: var(--portal-radius-lg);
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 -8px 24px rgba(15, 23, 42, .08);
  padding: 12px 16px;
}

.button,
input[type="submit"],
input[type="button"],
.submit-row input,
a.button {
  border-radius: var(--portal-radius);
  font-family: var(--font-family-primary);
  font-weight: 800;
}

.selector {
  max-width: 100%;
}

.selector .selector-available,
.selector .selector-chosen {
  border-radius: var(--portal-radius-lg);
}

.admin-portal .deletelink {
  border-radius: var(--portal-radius);
}

.login #container {
  width: min(440px, calc(100vw - 32px));
  margin: 8vh auto 0;
  min-height: 0;
  border: 1px solid var(--portal-outline);
  border-radius: var(--portal-radius-lg);
  background: var(--portal-surface-card);
  box-shadow: var(--portal-shadow-sm);
  overflow: hidden;
}

.login #header {
  position: static;
  height: auto;
  padding: 18px 20px;
  border-bottom: 1px solid var(--portal-outline);
  box-shadow: none;
}

.login .main {
  display: block;
  min-height: 0;
  padding: 0;
}

.login .content {
  padding: 20px;
}

.login #content {
  max-width: none;
}

.login .breadcrumbs,
.login #nav-sidebar {
  display: none;
}

@media (max-width: 1100px) {
  :root {
    --portal-sidebar-width: 76px;
  }

  body.admin-portal {
    --portal-sidebar-width: 76px !important;
  }

  #nav-sidebar {
    padding-left: 8px;
    padding-right: 8px;
  }

  #nav-filter,
  .admin-portal-sidebar-brand-copy,
  .admin-portal-sidebar-brand-toggle,
  .admin-portal-app-group summary span:not(.admin-portal-app-icon):not(.admin-portal-chevron),
  .admin-portal-model-link span:last-child,
  .admin-portal-model-actions {
    display: none;
  }

  .admin-portal-sidebar-brand {
    justify-content: center;
    margin-left: 0;
    margin-right: 0;
    padding: 10px;
  }

  .admin-portal-sidebar-logo {
    max-width: 42px;
    max-height: 42px;
  }

  .admin-portal-app-group summary {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .admin-portal-app-group[open] .admin-portal-chevron,
  .admin-portal-chevron {
    display: none;
  }

  .admin-portal-model {
    grid-template-columns: 1fr;
  }

  .admin-portal-model-link {
    justify-content: center;
    font-size: 0;
  }

  .admin-portal-nav-icon {
    font-size: 21px;
  }

  #header {
    padding: 0 16px;
  }

  .admin-portal-brand-text,
  #user-tools strong {
    display: none;
  }

  .portal-summary-grid,
  .portal-summary-list,
  .portal-summary-list-server,
  .portal-server-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portal-summary-list-server {
    grid-column: 1 / -1;
  }

  .portal-dashboard-layout {
    grid-template-columns: 1fr;
  }

  .portal-alert-panel {
    position: static;
  }
}

@media (max-width: 780px) {
  :root {
    --portal-sidebar-width: 0px;
  }

  #nav-sidebar {
    display: none;
  }

  .admin-portal-sidebar-resizer {
    display: none;
  }

  #header {
    left: 0;
  }

  .main {
    width: 100vw;
    margin-left: 0;
  }

  .breadcrumbs {
    margin-left: 0;
  }

  .content {
    padding: 16px;
  }

  .dashboard #content {
    grid-template-columns: 1fr;
  }

  .portal-dashboard-header {
    display: grid;
  }

  .portal-summary-grid,
  .portal-summary-list,
  .portal-summary-list-server,
  .portal-server-grid,
  .portal-status-strip {
    grid-template-columns: 1fr;
  }

  #changelist.filtered {
    grid-template-columns: 1fr;
  }

  #changelist-filter {
    border-left: 0;
    border-top: 1px solid var(--portal-outline);
  }

  .object-tools {
    margin: 0 0 12px;
    justify-content: flex-start;
  }
}
