* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f6f7f9;
  color: #1f2933;
  font: 13px/1.35 "Segoe UI", Tahoma, Arial, sans-serif;
}

main {
  width: min(1120px, calc(100% - 32px));
  margin: 24px auto;
}

.navbar {
  background: #fff;
  border-bottom: 1px solid #d9dee5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding: 0 18px;
  position: sticky;
  top: 0;
  z-index: 10;
}

h1,
h2 {
  margin: 0;
}

h1 {
  font-size: 20px;
}

h2 {
  font-size: 16px;
}

h3 {
  font-size: 14px;
  margin: 18px 0 0;
}

a {
  color: #0f766e;
  overflow-wrap: anywhere;
}

.forms {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.upload,
.segment,
.dashboard-section {
  background: #fff;
  border: 1px solid #d9dee5;
  border-radius: 8px;
  padding: 18px;
  margin-bottom: 16px;
}

.upload {
  display: grid;
  gap: 14px;
}

.asset-form {
  border-top: 1px solid #e5e9ef;
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
}

.asset-form.compact {
  grid-template-columns: 1fr auto;
  align-items: end;
}

.asset-list > ul > li {
  align-items: end;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 360px) auto;
}

.site-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.site-row {
  align-items: center;
  border: 1px solid #e5e9ef;
  border-radius: 6px;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 12px;
}

.site-row.selected {
  border-color: #0f766e;
}

.site-row span,
.section-head div,
.tree-node summary > span {
  display: grid;
  gap: 3px;
}

.row-actions {
  align-items: center;
  display: flex;
  gap: 8px;
}

.section-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.asset-toolbar {
  align-items: center;
  border-top: 1px solid #e5e9ef;
  display: flex;
  gap: 8px;
  margin-top: 10px;
  padding: 10px 0;
}

.hidden-form {
  height: 1px;
  left: -10000px;
  overflow: hidden;
  position: absolute;
  top: auto;
  width: 1px;
}

.tree-view {
  border-top: 1px solid #e5e9ef;
  max-height: 440px;
  overflow: auto;
  padding: 4px 0;
}

.tree-view ul {
  list-style: none;
  margin: 0;
  padding-left: 18px;
}

.tree-view > ul {
  padding-left: 0;
}

.tree-node {
  border: 0;
  display: block;
  padding: 0;
}

.tree-node summary {
  cursor: pointer;
  display: block;
  list-style-position: outside;
  min-height: 28px;
  padding: 0;
}

.tree-node summary::marker {
  color: #667085;
}

.tree-select {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 3px;
  color: #1f2933;
  cursor: default;
  display: block;
  gap: 2px;
  line-height: 1.25;
  min-height: 26px;
  padding: 3px 6px;
  text-align: left;
  white-space: nowrap;
  width: calc(100% - 4px);
}

.tree-select:hover,
.tree-select.selected {
  background: #dbeafe;
  border-color: #93c5fd;
}

.tree-select strong {
  display: block;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tree-select small {
  display: block;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inline-form {
  display: flex;
  gap: 8px;
  min-width: 0;
}

.inline-form input {
  min-width: 0;
  width: 190px;
}

label {
  display: grid;
  gap: 6px;
  font-weight: 700;
}

input {
  border: 1px solid #c8d0da;
  border-radius: 6px;
  font: inherit;
  padding: 10px;
}

select {
  border: 1px solid #c8d0da;
  border-radius: 6px;
  font: inherit;
  padding: 8px 10px;
}

.language-selector label {
  align-items: center;
  display: flex;
  gap: 8px;
}

.user-menu {
  position: relative;
}

.user-menu summary {
  cursor: pointer;
  font-weight: 700;
}

.user-menu[open] {
  z-index: 20;
}

.user-menu form {
  margin-top: 10px;
}

.user-menu::details-content {
  display: block;
}

.user-menu[open] > form {
  background: #fff;
}

.user-menu[open] {
  background: #fff;
  border: 1px solid #d9dee5;
  border-radius: 8px;
  padding: 10px;
  position: absolute;
  right: 18px;
  top: 10px;
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: #0f766e;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 9px 14px;
  text-decoration: none;
  white-space: nowrap;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.secondary {
  background: #475467;
}

.danger {
  background: #b42318;
}

.login-page {
  display: grid;
  min-height: calc(100vh - 64px);
  place-items: center;
}

.login-form {
  background: #fff;
  border: 1px solid #d9dee5;
  border-radius: 8px;
  display: grid;
  gap: 14px;
  padding: 24px;
  width: min(380px, 100%);
}

.error {
  color: #b42318;
  margin: 0;
}

.segment-head,
body > main li:not(.tree-node) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

ul {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
}

body > main li:not(.tree-node) {
  border-top: 1px solid #e5e9ef;
  padding: 12px 0;
}

body > main li:not(.tree-node) span {
  display: grid;
  gap: 4px;
}

small,
.empty {
  color: #667085;
}

@media (max-width: 720px) {
  .navbar,
  .forms,
  .upload,
  .asset-form.compact,
  .asset-list > ul > li,
  .inline-form,
  .site-row,
  .tree-node summary,
  .section-head,
  .row-actions,
  .segment-head,
  body > main li:not(.tree-node) {
    display: grid;
    grid-template-columns: 1fr;
  }

  .inline-form input {
    width: 100%;
  }
}
