.brand {
  gap: 12px;
  min-width: 0;
}

.brand-logo {
  display: block;
  width: auto;
  height: 34px;
  max-width: min(250px, 28vw);
  object-fit: contain;
}

.brand-divider {
  flex: 0 0 auto;
}

.brand-section {
  white-space: nowrap;
}

.workspace-switcher {
  position: relative;
  display: block;
  min-width: 250px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.workspace-switcher > summary {
  min-height: 44px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 7px 11px;
  list-style: none;
  cursor: pointer;
  border: 1px solid rgba(125, 177, 235, .28);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(23, 48, 78, .76), rgba(15, 34, 58, .72));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025), 0 8px 24px rgba(0,0,0,.08);
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.workspace-switcher > summary::-webkit-details-marker {
  display: none;
}

.workspace-switcher > summary:hover,
.workspace-switcher[open] > summary {
  border-color: rgba(102, 192, 255, .52);
  background: linear-gradient(180deg, rgba(27, 57, 92, .86), rgba(17, 39, 65, .82));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035), 0 10px 28px rgba(0,0,0,.14);
}

.workspace-switcher > summary:focus-visible {
  outline: 2px solid rgba(99, 198, 255, .7);
  outline-offset: 3px;
}

.workspace-icon {
  color: #9ed7ff;
  font-size: .96rem;
}

.workspace-summary-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.workspace-label {
  color: #8ea7c2;
  font-size: .66rem;
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 760;
}

.workspace-summary-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #f5f9ff;
  font-size: .79rem;
}

.workspace-chevron {
  color: #a7bed8;
  font-size: .78rem;
  transition: transform .16s ease;
}

.workspace-switcher[open] .workspace-chevron {
  transform: rotate(180deg);
}

.workspace-menu-panel {
  position: absolute;
  z-index: 120;
  top: calc(100% + 9px);
  right: 0;
  width: min(360px, calc(100vw - 28px));
  overflow: hidden;
  padding: 8px;
  border: 1px solid rgba(133, 180, 232, .25);
  border-radius: 15px;
  background: linear-gradient(180deg, rgba(15, 31, 53, .99), rgba(9, 22, 39, .99));
  box-shadow: 0 24px 60px rgba(0,0,0,.42), inset 0 1px 0 rgba(255,255,255,.025);
  backdrop-filter: blur(18px);
  animation: workspaceMenuIn .16s cubic-bezier(.2,.75,.25,1) both;
}

.workspace-menu-title {
  margin: 0;
  padding: 8px 10px 10px;
  color: #8298b3;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 780;
}

.workspace-options {
  display: grid;
  gap: 4px;
}

.workspace-option {
  width: 100%;
  min-height: 44px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #e8f1fb;
  text-align: left;
  cursor: pointer;
  transition: background .14s ease, border-color .14s ease, transform .14s ease;
}

.workspace-option:hover {
  background: rgba(82, 154, 235, .11);
  border-color: rgba(99, 180, 255, .13);
}

.workspace-option:focus-visible {
  outline: 2px solid rgba(99, 198, 255, .58);
  outline-offset: -2px;
}

.workspace-option.is-active {
  background: linear-gradient(90deg, rgba(55, 137, 228, .17), rgba(55, 137, 228, .06));
}

.workspace-option-check {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: transparent;
  background: rgba(255,255,255,.035);
  border: 1px solid rgba(153, 185, 222, .12);
  font-size: .72rem;
  font-weight: 900;
}

.workspace-option.is-active .workspace-option-check {
  color: #dff6ff;
  background: rgba(65, 176, 239, .18);
  border-color: rgba(93, 199, 255, .38);
  box-shadow: 0 0 14px rgba(65, 176, 239, .12);
}

.module-card:hover {
  transform: translateY(-4px);
}

.energy-line {
  inset: 11px;
  overflow: hidden;
  border-radius: 13px;
}

.module-card:hover .energy-line::before {
  content: "";
  position: absolute;
  top: 0;
  left: 6%;
  width: 29%;
  height: 1px;
  padding: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #52d5ff 18%, #edfaff 52%, #f2b35f 82%, transparent);
  filter: drop-shadow(0 0 5px rgba(83,214,255,.62));
  -webkit-mask: none;
  mask: none;
  -webkit-mask-composite: initial;
  mask-composite: initial;
  animation: energyGlide .48s cubic-bezier(.2,.72,.3,1) both;
}

.module-icon-eforms {
  width: 86px;
  height: 86px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 28% 22%, rgba(89, 215, 255, .18), transparent 32%),
    linear-gradient(145deg, rgba(39, 111, 202, .78), rgba(23, 47, 84, .78));
  box-shadow: inset 0 0 0 1px rgba(130, 209, 255, .24), 0 0 30px rgba(42, 160, 255, .18);
}

.module-icon-eforms svg {
  width: 56px;
  height: 56px;
  stroke-width: 2.25;
}

.module-icon-eforms .eforms-sheet {
  stroke: #dff8ff;
}

.module-icon-eforms .eforms-fold,
.module-icon-eforms .eforms-row,
.module-icon-eforms .eforms-code {
  stroke: #9ce8ff;
}

.module-icon-eforms .eforms-check {
  stroke: #ffd08a;
  stroke-width: 2.8;
}

.module-card-eforms .module-visual {
  height: 158px;
  background:
    radial-gradient(circle at 50% 48%, rgba(72, 167, 255, .16), transparent 34%),
    radial-gradient(circle at 66% 33%, rgba(244, 171, 88, .06), transparent 18%),
    linear-gradient(145deg, rgba(37, 65, 102, .34), rgba(11, 25, 44, .1));
}

.module-card:hover .module-icon-eforms {
  transform: scale(1.045);
}

.module-card:hover .module-icon-eforms .eforms-check {
  animation: eformsCheck .44s .12s ease-out both;
}

@keyframes workspaceMenuIn {
  from { opacity: 0; transform: translateY(-5px) scale(.992); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes energyGlide {
  0% { opacity: 0; transform: translateX(-35%); }
  18% { opacity: 1; }
  78% { opacity: .95; }
  100% { opacity: 0; transform: translateX(225%); }
}

@keyframes eformsCheck {
  from { opacity: .18; stroke-dasharray: 18; stroke-dashoffset: 18; }
  to { opacity: 1; stroke-dasharray: 18; stroke-dashoffset: 0; }
}

@media (max-width: 980px) {
  .workspace-switcher {
    min-width: 210px;
  }
}

@media (max-width: 900px) {
  .brand-logo {
    max-width: 225px;
  }
}

@media (max-width: 640px) {
  .brand-logo {
    height: 28px;
    max-width: 175px;
  }

  .workspace-switcher {
    min-width: 0;
    max-width: min(50vw, 220px);
  }

  .workspace-label {
    display: none;
  }

  .workspace-menu-panel {
    position: fixed;
    top: 72px;
    right: 12px;
    left: 12px;
    width: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .workspace-menu-panel,
  .module-card:hover .energy-line::before,
  .module-card:hover .module-icon-eforms .eforms-check {
    animation: none !important;
  }
}
