:root {
  --crm-sidebar-width: 228px;
}

.sidebar .brand h1,
.sidebar .brand > strong {
  margin: 0;
  font-size: 22px !important;
  line-height: 1.15 !important;
  font-weight: 700;
}

.sidebar .brand > span {
  font-size: 12px !important;
  line-height: 1.4 !important;
}

.sidebar .nav a,
.sidebar .nav button {
  min-height: 42px;
  font-size: 14px !important;
  line-height: 1.25 !important;
  font-weight: 400;
}

.sidebar .nav a.active,
.sidebar .nav a[aria-current="page"],
.sidebar .nav button.active {
  font-weight: 700;
}

.sidebar .nav [hidden] {
  display: none !important;
}

.sidebar .side-summary span,
.sidebar .side-summary small {
  font-size: 12px !important;
  line-height: 1.35 !important;
}

.sidebar .side-summary strong {
  font-size: 21px !important;
  line-height: 1.1 !important;
}

.crm-user-context {
  min-width: 0;
  display: grid;
  gap: 5px;
  margin-top: 8px;
}

.crm-user-context label {
  color: #b9c4d0;
  font-size: 11px !important;
  line-height: 1.25;
  font-weight: 700;
}

.crm-user-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  gap: 6px;
}

.crm-user-fields {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.crm-user-row select {
  min-width: 0;
  width: 100%;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 6px;
  padding: 0 8px;
  color: #f6f8fb;
  background: #223247;
  font-size: 12px !important;
  text-overflow: ellipsis;
}

.crm-user-role {
  min-width: 0;
  padding: 0 3px;
  color: #b9c4d0;
  font-size: 11px !important;
  line-height: 1.3;
  white-space: normal;
  overflow-wrap: anywhere;
}

.crm-user-row button {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 6px;
  color: #f6f8fb;
  background: #223247;
  font-size: 16px !important;
}

@media (min-width: 901px) {
  .app-shell {
    display: block !important;
    min-height: 100vh !important;
  }

  .sidebar {
    position: fixed !important;
    inset: 0 auto 0 0 !important;
    z-index: 30 !important;
    width: var(--crm-sidebar-width) !important;
    height: 100vh !important;
    padding: 20px 16px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
    overflow-y: auto !important;
  }

  .sidebar .brand {
    min-height: 144px !important;
    align-content: start !important;
    flex: 0 0 144px !important;
  }

  .sidebar .nav {
    display: grid !important;
    grid-auto-flow: row !important;
    overflow: visible !important;
  }

  .sidebar .nav a,
  .sidebar .nav button {
    width: 100% !important;
  }

  .sidebar .side-summary {
    margin-top: auto !important;
    display: grid !important;
  }

  .main {
    min-width: 0 !important;
    width: auto !important;
    margin-left: var(--crm-sidebar-width) !important;
  }
}

@media (max-width: 900px) {
  .crm-user-context {
    min-width: 190px;
    margin-top: 0;
  }

  .crm-user-context label {
    display: none;
  }
}

@media (max-width: 520px) {
  .crm-user-context {
    min-width: 0;
    width: 100%;
  }
}
