:root {
  font-family:
    Inter,
    Segoe UI,
    Arial,
    sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
  --accent: #bd490b;
  --ink: #302b27;
  --muted: #756d66;
  --line: #e5ddd6;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 8px;
  padding: 10px 15px;
  transition: 0.15s;
}
button:hover {
  background: var(--soft);
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
input,
select,
textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
  background: var(--surface);
  color: var(--ink);
  width: 100%;
}
textarea {
  resize: vertical;
  min-height: 120px;
}
label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 18px;
}
label input,
label select,
label textarea {
  margin-top: 7px;
}
a {
  color: var(--accent);
}
.primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.primary:hover {
  background: #a63d06;
}
.brand {
  font-size: 30px;
  font-weight: 750;
  text-decoration: none;
  letter-spacing: -1.5px;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 3px;
}
.brand > span:first-child {
  color: #e7a969;
}
.brand .hub {
  font-size: 10px;
  letter-spacing: 2px;
  background: var(--soft);
  padding: 5px 7px;
  margin-left: 8px;
}
.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}
.login-art {
  background: #54280f;
  color: #f1f5e9;
  padding: 60px 12%;
  position: relative;
  overflow: hidden;
}
.login-art .brand {
  color: #f1f5e9;
}
.login-art h1 {
  font-size: clamp(40px, 5vw, 70px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -3px;
  margin-top: 80px;
}
.login-art p {
  max-width: 350px;
  color: #e9c6ad;
  line-height: 1.7;
}
.orbit {
  border: 1px solid #a97550;
  border-radius: 50%;
  width: 240px;
  height: 240px;
  display: grid;
  place-content: center;
  font-size: 45px;
  margin-top: 55px;
  color: #f5ceae;
}
.orbit span {
  position: absolute;
  font-size: 130px;
  right: 30px;
  bottom: 80px;
  color: #dfad71;
}
.login form {
  width: min(420px, 80%);
  margin: auto;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--accent);
  font-weight: 700;
}
h2 {
  letter-spacing: -0.6px;
  font-size: 28px;
}
p {
  color: var(--muted);
  line-height: 1.6;
}
.login form button {
  width: 100%;
}
.login small {
  color: var(--muted);
  line-height: 1.8;
  display: block;
  margin-top: 35px;
}
.error {
  color: #a43836;
}
.login[hidden],
#shell[hidden] {
  display: none;
}
#shell {
  display: flex;
  min-height: 100vh;
}
aside {
  width: 252px;
  position: fixed;
  inset: 0 auto 0 0;
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 30px 22px;
  display: flex;
  flex-direction: column;
}
.workspace {
  font-size: 10px;
  letter-spacing: 1.3px;
  color: var(--muted);
  margin: 38px 0 26px;
}
.workspace strong {
  display: block;
  font-size: 12px;
  letter-spacing: 0;
  color: var(--ink);
  margin-top: 9px;
}
nav {
  display: grid;
  gap: 7px;
}
nav button {
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 13px 12px;
  font-size: 13px;
}
nav button.active {
  color: var(--accent);
  background: var(--soft);
  font-weight: 650;
}
.aside-bottom {
  margin-top: auto;
  font-size: 12px;
  padding-top: 30px;
}
.aside-bottom > span {
  background: #f2e9d5;
  color: #8b6a31;
  border-radius: 5px;
  padding: 6px 9px;
}
.aside-bottom button {
  padding: 0;
  border: 0;
  font-size: 12px;
  color: var(--muted);
  background: none;
}
.main {
  margin-left: 252px;
  width: calc(100% - 252px);
}
header {
  height: 80px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 0 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}
header b {
  padding: 0 12px;
  color: var(--line);
}
header strong {
  font-weight: 500;
  color: var(--ink);
}
header > div {
  display: flex;
  align-items: center;
  gap: 18px;
}
header select {
  font-size: 12px;
  width: 170px;
  padding: 8px;
}
.avatar {
  background: var(--soft);
  color: var(--accent);
  display: grid;
  place-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-weight: 700;
}
main {
  padding: 36px 38px;
  max-width: 1550px;
  margin: auto;
}
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 26px;
}
.page-head h1 {
  font-size: 29px;
  font-weight: 600;
  letter-spacing: -1px;
  margin: 7px 0;
}
.page-head p {
  font-size: 13px;
  margin: 0;
}
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
}
.stat .icon {
  display: grid;
  place-content: center;
  width: 34px;
  height: 34px;
  background: var(--soft);
  border-radius: 8px;
  color: var(--accent);
  margin-bottom: 18px;
}
.stat strong {
  font-size: 32px;
  font-weight: 550;
  display: block;
  letter-spacing: -1px;
}
.stat p {
  margin: 6px 0 0;
  font-size: 12px;
}
.hero {
  background: var(--soft);
  border: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 12px;
  margin: 26px 0;
  padding: 30px 34px;
}
.hero h2 {
  font-size: 23px;
  margin: 0 0 7px;
}
.hero p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
  max-width: 520px;
}
.hero .symbol {
  font-size: 90px;
  line-height: 1;
  color: var(--accent);
}
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 26px 0 15px;
}
.section-title h2 {
  font-size: 17px;
  margin: 0;
}
.section-title span {
  font-size: 12px;
  color: var(--muted);
}
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
}
th {
  text-align: left;
  font-size: 10px;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--canvas);
  font-weight: 500;
  padding: 15px 20px;
}
td {
  padding: 16px 20px;
  border-top: 1px solid var(--line);
}
td .title {
  font-weight: 600;
  color: var(--ink);
}
td small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 5px;
}
.pill {
  padding: 5px 9px;
  border-radius: 5px;
  display: inline-block;
  background: var(--soft);
  color: var(--accent);
  font-size: 10px;
  white-space: nowrap;
}
.pill.draft {
  background: #f5eddf;
  color: #ad8752;
}
.type-icon {
  width: 32px;
  height: 32px;
  background: var(--soft);
  color: var(--accent);
  display: inline-grid;
  place-content: center;
  border-radius: 7px;
  margin-right: 12px;
}
.table-name {
  display: flex;
  align-items: center;
}
.toolbar {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
}
.toolbar input {
  flex: 1;
}
.toolbar select {
  width: 180px;
}
.empty {
  padding: 55px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.note {
  border: 1px solid var(--line);
  padding: 18px;
  border-radius: 10px;
  background: var(--surface);
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 20px;
}
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 20px;
}
.media-card {
  padding: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.media-preview {
  height: 160px;
  background: var(--soft);
  display: grid;
  place-content: center;
  font-size: 42px;
  color: var(--muted);
}
.media-preview img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}
.media-info {
  padding: 16px;
}
.media-info strong {
  display: block;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.media-info p {
  font-size: 11px;
  margin: 6px 0 12px;
}
.media-info button {
  font-size: 11px;
  padding: 6px 9px;
}
.tree-row {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 17px;
  margin-bottom: 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.tree-row strong {
  font-size: 14px;
}
.tree-row small {
  color: var(--muted);
  font-size: 11px;
}
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  font-size: 12px;
  color: var(--muted);
}
dialog {
  border: 1px solid var(--line);
  border-radius: 15px;
  width: min(850px, 95vw);
  padding: 0;
  max-height: 90vh;
  color: var(--ink);
}
dialog::backdrop {
  background: #182d2bcc;
  backdrop-filter: blur(3px);
}
.dialog-head {
  padding: 18px 26px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.dialog-head h2 {
  font-size: 21px;
  margin: 0;
}
.dialog-head button {
  border: 0;
}
.editor-body {
  padding: 26px;
}
.editor-body h3 {
  font-size: 14px;
  margin-top: 30px;
}
.editor-body .actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.code {
  font-family: Consolas, monospace;
  font-size: 12px;
  white-space: pre;
  overflow: auto;
  background: var(--soft);
  border-radius: 8px;
  padding: 20px;
  line-height: 1.8;
}
.relation {
  font:
    12px Consolas,
    monospace;
  min-height: 200px;
}
#toast {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background: #54280f;
  color: white;
  border-radius: 8px;
  padding: 15px 25px;
  font-size: 13px;
  z-index: 5;
  box-shadow: 0 5px 30px #54280f33;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.admin-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.admin-form input,
.admin-form select {
  width: 180px;
}
.muted {
  color: var(--muted);
}
@media (max-width: 1000px) {
  aside {
    width: 205px;
    padding: 25px 15px;
  }
  .main {
    margin-left: 205px;
    width: calc(100% - 205px);
  }
  main {
    padding: 25px;
  }
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
  header {
    padding: 0 25px;
  }
}
@media (max-width: 700px) {
  .login {
    grid-template-columns: 1fr;
  }
  .login-art {
    display: none;
  }
  .login form {
    padding: 50px 0;
  }
  aside {
    position: static;
    width: 100%;
    padding: 18px;
  }
  .workspace,
  .aside-bottom {
    display: none;
  }
  nav {
    display: flex;
    overflow: auto;
    margin-top: 15px;
  }
  nav button {
    white-space: nowrap;
    font-size: 11px;
  }
  #shell {
    display: block;
  }
  .main {
    margin-left: 0;
    width: 100%;
  }
  header {
    height: 65px;
    padding: 0 18px;
  }
  header > span {
    display: none;
  }
  main {
    padding: 22px 18px;
  }
  .cards {
    gap: 10px;
  }
  .card {
    padding: 18px;
  }
  .hero {
    padding: 25px;
  }
  .hero .symbol {
    display: none;
  }
  .page-head {
    align-items: flex-start;
    gap: 12px;
  }
  .page-head h1 {
    font-size: 25px;
  }
  .page-head p {
    font-size: 12px;
  }
  .split {
    grid-template-columns: 1fr;
  }
  .toolbar {
    flex-wrap: wrap;
  }
  .toolbar select {
    flex: 1;
  }
  td,
  th {
    padding: 13px;
  }
  .admin-form input,
  .admin-form select {
    width: 100%;
  }
}
.relation-row {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin: 15px 0;
  background: var(--canvas);
}
.relation-row h3 {
  margin: 0;
}
.relation-row .section-title {
  margin: 0 0 15px;
}
.relation-row textarea {
  min-height: 110px;
}
.editor-body > details {
  margin: 18px 0;
}
.split {
  margin-top: 0;
}
.dashboard-footer {
  margin-top: 22px;
}
.child-group {
  margin-left: 24px;
}
.spaced {
  margin-top: 20px;
}
/* EMS database containers and entity navigation */
.ems-navigation {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 0 38px;
}
.db-containers,
.entity-type-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
}
.db-containers {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.nav-caption {
  font-size: 10px;
  letter-spacing: 1.2px;
  color: var(--muted);
  margin-right: 15px;
  white-space: nowrap;
}
.db-containers button {
  font-size: 12px;
  padding: 8px 16px;
  white-space: nowrap;
}
.db-containers button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
.entity-type-menu {
  padding: 8px 0;
  gap: 4px;
}
.entity-type-menu button {
  border: 0;
  background: transparent;
  white-space: nowrap;
  font-size: 13px;
  padding: 12px 16px;
  color: var(--muted);
}
.entity-type-menu button.active {
  background: var(--soft);
  color: var(--accent);
  font-weight: 650;
}
/* Large legacy-style entity editor */
dialog.entity-editor-modal {
  width: min(1500px, 96vw);
  max-width: 96vw;
  height: 92vh;
  max-height: 92vh;
  overflow: hidden;
}
.entity-editor-modal .dialog-head {
  height: 66px;
}
.entity-editor-modal #editor-content {
  height: calc(100% - 66px);
}
.entity-editor-modal .editor-body {
  padding: 0;
  height: 100%;
}
#entity-form {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.entity-summary {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px 25px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.editor-source {
  font-size: 12px;
  color: var(--muted);
  margin-right: auto;
}
.entity-layout {
  display: grid;
  grid-template-columns: minmax(290px, 35%) minmax(0, 1fr);
  flex: 1;
  min-height: 0;
}
aside.entity-essential {
  position: static;
  inset: auto;
  width: auto;
  display: block;
  overflow-y: auto;
  background: var(--canvas);
  padding: 24px;
  border-right: 1px solid var(--line);
}
.entity-essential > h3 {
  margin: 8px 0 24px;
  font-size: 19px;
}
.required-mark {
  color: #ae5b3d;
}
.required-note {
  font-size: 11px;
  color: var(--muted);
}
.entity-detail {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
.entity-tabs {
  display: flex;
  gap: 3px;
  padding: 10px 18px 0;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  flex-shrink: 0;
  background: var(--surface);
}
.entity-tabs button {
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  white-space: nowrap;
  font-size: 12px;
  padding: 13px 11px;
  color: var(--muted);
}
.entity-tabs button[aria-selected="true"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 700;
  background: var(--soft);
}
.entity-tab-panel {
  padding: 22px 25px;
  overflow-y: auto;
  flex: 1;
}
.entity-tab-panel[hidden] {
  display: none;
}
.entity-tab-panel > h3 {
  margin-top: 0;
}
.entity-editor-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 25px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  flex-shrink: 0;
}
.entity-editor-footer > span {
  font-size: 12px;
  color: var(--muted);
}
.entity-editor-footer .actions {
  margin: 0;
}
.entity-relation {
  margin: 22px 0;
}
.relation-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.relation-heading h3 {
  margin: 0;
  font-size: 14px;
}
.entity-relation .relation-row {
  padding: 13px;
  margin: 12px 0;
  background: var(--surface);
}
.relation-row-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 10px;
}
.relation-row-title button {
  font-size: 10px;
  padding: 4px 8px;
}
.relation-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 16px;
}
.relation-field-grid label:has(textarea) {
  grid-column: 1/-1;
}
.entity-essential .relation-field-grid {
  grid-template-columns: 1fr;
}
.entity-relation label {
  font-size: 12px;
  margin-bottom: 12px;
}
.relation-empty {
  font-size: 12px;
  color: var(--muted);
}
.add-relation {
  font-size: 11px;
  padding: 7px 10px;
}
.relation-advanced {
  margin-top: 13px;
  font-size: 11px;
  color: var(--muted);
}
.relation-advanced textarea {
  width: 100%;
}
@media (max-width: 850px) {
  .ems-navigation {
    padding: 0 20px;
  }
  .entity-layout {
    grid-template-columns: minmax(250px, 38%) minmax(0, 1fr);
  }
  .entity-essential {
    padding: 18px !important;
  }
  .entity-tab-panel {
    padding: 18px;
  }
  .relation-field-grid {
    grid-template-columns: 1fr;
  }
  .nav-caption {
    display: none;
  }
}
@media (max-width: 600px) {
  dialog.entity-editor-modal {
    width: 98vw;
    max-width: 98vw;
    height: 96dvh;
    max-height: 96dvh;
  }
  .entity-layout {
    display: block;
    overflow-y: auto;
  }
  aside.entity-essential {
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .entity-detail {
    overflow: visible;
  }
  .entity-tab-panel {
    overflow: visible;
  }
  .entity-tabs {
    position: sticky;
    top: 0;
    z-index: 1;
  }
  .entity-editor-footer {
    padding: 12px;
    flex-wrap: wrap;
  }
  .entity-editor-footer > span {
    width: 100%;
  }
  .entity-editor-footer .actions {
    width: 100%;
    justify-content: flex-end;
  }
  .entity-summary {
    padding: 12px;
    gap: 7px;
  }
  .db-containers button {
    padding: 8px 12px;
  }
  .entity-type-menu button {
    padding: 10px 12px;
  }
}

/* Compact workspace and shared light/dark palette. */
:root {
  --canvas: #f7f5f2;
  --surface: #fff;
  --soft: #fff0e5;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --canvas: #17191d;
  --surface: #22252b;
  --soft: #382b23;
  --ink: #f0ece8;
  --muted: #b0a79e;
  --line: #3b3e45;
  --accent: #ff9a50;
  color-scheme: dark;
}
:root[data-theme="dark"] .primary,
:root[data-theme="dark"] .db-containers button.active {
  background: #c95112;
  border-color: #c95112;
  color: #fff;
}
:root[data-theme="dark"] .pill.draft,
:root[data-theme="dark"] .aside-bottom > span {
  background: #3b3023;
  color: #efc88c;
}
:root[data-theme="dark"] .error {
  color: #ff9891;
}
:root[data-theme="dark"] .required-mark {
  color: #ffad87;
}
body {
  font-size: 13px;
}
button {
  padding: 7px 11px;
  border-radius: 6px;
}
input,
select,
textarea {
  padding: 8px 10px;
  border-radius: 6px;
}
label {
  margin-bottom: 12px;
}
label input,
label select,
label textarea {
  margin-top: 5px;
}
#sidebar {
  width: 210px;
  padding: 18px 12px;
  overflow-y: auto;
}
#sidebar .brand {
  font-size: 25px;
}
.workspace {
  margin: 22px 0 16px;
}
.workspace strong {
  margin-top: 6px;
}
nav {
  gap: 3px;
}
nav button {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
}
.nav-icon {
  width: 20px;
  flex-shrink: 0;
  text-align: center;
  font-size: 17px;
}
.aside-bottom {
  padding-top: 18px;
}
.main {
  margin-left: 210px;
  width: calc(100% - 210px);
  min-width: 0;
}
header {
  height: 42px;
  padding: 0 18px;
  justify-content: flex-start;
  gap: 12px;
}
header > div {
  margin-left: auto;
  gap: 9px;
}
header b {
  padding: 0 6px;
}
header .breadcrumb-line {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.icon-button {
  width: 29px;
  height: 29px;
  padding: 0;
  display: grid;
  place-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.avatar {
  width: 27px;
  height: 27px;
}
.ems-navigation {
  padding: 0 18px;
}
.db-containers {
  padding: 6px 0;
  gap: 5px;
}
.db-containers button {
  padding: 5px 11px;
}
.nav-caption {
  margin-right: 6px;
}
.entity-type-menu {
  padding: 3px 0;
}
.entity-type-menu button {
  padding: 7px 10px;
  font-size: 12px;
}
main {
  padding: 18px;
  max-width: none;
}
.page-head {
  margin-bottom: 14px;
  gap: 12px;
}
.page-head h1 {
  font-size: 24px;
  margin: 3px 0;
}
.page-head .eyebrow {
  display: none;
}
.cards {
  gap: 10px;
}
.card {
  padding: 16px;
  border-radius: 8px;
}
.stat .icon {
  margin-bottom: 10px;
  width: 29px;
  height: 29px;
}
.stat strong {
  font-size: 27px;
}
.hero {
  margin: 14px 0;
  padding: 18px 20px;
  border-radius: 8px;
}
.hero .symbol {
  font-size: 60px;
}
.section-title {
  margin: 16px 0 10px;
}
th {
  padding: 10px 12px;
}
td {
  padding: 9px 12px;
}
.type-icon {
  width: 27px;
  height: 27px;
  margin-right: 8px;
}
.toolbar {
  gap: 8px;
  margin-bottom: 12px;
}
.split,
.media-grid {
  gap: 12px;
}
.note {
  padding: 12px;
  margin-bottom: 12px;
}
.tree-row {
  padding: 11px 12px;
  margin-bottom: 6px;
}
.dialog-head {
  padding: 12px 18px;
}
.editor-body {
  padding: 18px;
}
.entity-editor-modal .dialog-head {
  height: 48px;
}
.entity-editor-modal #editor-content {
  height: calc(100% - 48px);
}
.entity-summary {
  padding: 9px 16px;
}
aside.entity-essential {
  padding: 16px;
}
.entity-essential > h3 {
  margin: 4px 0 14px;
  font-size: 17px;
}
.entity-tabs {
  padding: 4px 10px 0;
}
.entity-tabs button {
  padding: 9px;
}
.entity-tab-panel {
  padding: 16px;
}
.entity-editor-footer {
  padding: 10px 16px;
}
.entity-relation {
  margin: 14px 0;
}
.sidebar-collapsed #sidebar {
  width: 60px;
  padding: 14px 7px;
}
.sidebar-collapsed .main {
  margin-left: 60px;
  width: calc(100% - 60px);
}
.sidebar-collapsed #sidebar .brand,
.sidebar-collapsed .workspace,
.sidebar-collapsed .nav-label,
.sidebar-collapsed .aside-bottom {
  display: none;
}
.sidebar-collapsed #sidebar nav button {
  justify-content: center;
  padding: 10px 0;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
@media (max-width: 700px) {
  #sidebar {
    position: static;
    width: 100%;
    padding: 10px 12px;
  }
  #sidebar .brand {
    font-size: 22px;
  }
  #sidebar nav {
    margin-top: 8px;
  }
  .main,
  .sidebar-collapsed .main {
    margin-left: 0;
    width: 100%;
  }
  .sidebar-collapsed #sidebar {
    display: none;
  }
  header {
    height: 40px;
    padding: 0 12px;
    gap: 8px;
  }
  header .breadcrumb-line {
    display: block;
    font-size: 11px;
  }
  main {
    padding: 12px;
  }
  .ems-navigation {
    padding: 0 12px;
  }
  .page-head h1 {
    font-size: 21px;
  }
  .card {
    padding: 12px;
  }
  .hero {
    padding: 14px;
  }
  .entity-editor-footer {
    padding: 10px;
  }
}
