@font-face {
  font-family: Manrope;
  src: url("../assets/manrope.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  font-family: Manrope, system-ui, sans-serif;
  font-synthesis: none;
  color-scheme: dark;
  color: #eeedf8;
  background: #11121b;
  --sidebar: #151620;
  --panel: #191b27;
  --field: #13151f;
  --line: #303345;
  --muted: #acaec6;
  --accent: #bfb3ff;
  --mint: #89e7bd;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 0; }
h1, h2, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button, select { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: #bbb0f5; color: #19152d; }
.sr-only, .icon-library {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.skip-link {
  position: absolute;
  top: -100px;
  left: 12px;
  z-index: 10;
  padding: 12px 18px;
  border-radius: 8px;
  color: #19152d;
  background: var(--accent);
}
.skip-link:focus { top: 12px; }

.shell { min-height: 100vh; display: grid; grid-template-columns: 228px minmax(0, 1fr); }
.sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 28px 18px 18px;
  border-right: 1px solid #27293a;
  background: var(--sidebar);
}
.brand { display: flex; align-items: center; gap: 11px; padding-inline: 3px; }
.brand-icon {
  display: grid;
  place-items: center;
  width: 41px;
  height: 41px;
  flex: none;
  border-radius: 12px;
  color: #221842;
  background: #b5a5fa;
}
.brand-icon .icon { width: 24px; height: 24px; }
.brand strong { display: block; font-size: 17px; font-weight: 800; line-height: 1.3; }
.brand small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.server-switch > label { display: block; margin: 0 0 8px 2px; color: var(--muted); font-size: 12px; font-weight: 700; }
.server-control { position: relative; }
.server-control select {
  width: 100%;
  min-height: 50px;
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #202231;
  padding: 0 31px 0 44px;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
}
.server-avatar {
  position: absolute;
  top: 11px;
  left: 10px;
  pointer-events: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: #ded3ff;
  background: #423760;
  font-size: 13px;
  font-weight: 800;
}
.server-avatar[data-server="orbit"] { background: #274943; color: #c0f0dc; }
.select-arrow { position: absolute; top: 17px; right: 10px; width: 16px; height: 16px; pointer-events: none; color: var(--muted); }
.workspace-links { display: grid; gap: 5px; }
.workspace-link, .lab-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 45px;
  padding: 0 11px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}
.workspace-link.current { background: #2a2543; color: #dbd1ff; }
.workspace-link:hover, .lab-link:hover { background: #242638; color: #f2efff; }
.workspace-link .icon, .lab-link .icon { width: 17px; height: 17px; }
.lab-link { margin-top: auto; }

main { width: min(100%, 1360px); margin-inline: auto; padding: 24px clamp(20px, 3vw, 45px) 42px; }
.topbar, .breadcrumbs, .demo-badge { display: flex; align-items: center; }
.topbar { justify-content: space-between; gap: 12px; margin-bottom: 19px; }
.breadcrumbs { gap: 8px; font-size: 13px; font-weight: 750; }
.breadcrumbs a { color: var(--muted); padding-block: 6px; }
.breadcrumbs a:hover { color: var(--accent); text-decoration: underline; }
.breadcrumbs .icon { width: 14px; height: 14px; color: var(--muted); }
.demo-badge {
  gap: 7px;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid #494061;
  border-radius: 999px;
  color: #ddd1ff;
  background: #262138;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.demo-badge span { width: 6px; height: 6px; border-radius: 50%; background: #c8b5ff; }
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 205px;
  isolation: isolate;
  overflow: hidden;
  padding: 28px clamp(24px, 4vw, 44px);
  border: 1px solid #514674;
  border-radius: 19px;
  background: linear-gradient(109deg, #25213b 10%, #34294d 59%, #4b3867 100%);
}
.hero-copy { position: relative; z-index: 1; max-width: min(55%, 470px); }
.hero h1 { font-size: clamp(35px, 4.2vw, 62px); line-height: 1.04; letter-spacing: -.058em; font-weight: 800; }
.hero p { margin-top: 15px; color: #ddd5ed; font-size: clamp(13px, 1.2vw, 15px); line-height: 1.65; max-width: 35ch; }
.hero-art { position: absolute; inset: 0 0 0 57%; }
.hero-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, #ba9be57a 1px, transparent 1.5px);
  background-size: 15px 15px;
  mask-image: radial-gradient(ellipse at 63% 57%, #000 15%, transparent 74%);
}
.role-pass { position: absolute; width: 206px; height: 120px; left: 49%; top: 50%; border-radius: 14px; }
.role-pass-back {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 16px;
  border: 1px solid #aa91d1;
  background: linear-gradient(128deg, #674d89, #745497);
  color: #eee0ff;
  transform: translate(-33%, -52%) rotate(13deg);
}
.role-pass-front {
  padding: 17px 17px 15px;
  border: 1px solid #e4d8ff;
  background: linear-gradient(135deg, #e0d3ff, #aa90ec);
  color: #30204b;
  box-shadow: 0 13px 28px #1d123966;
  transform: translate(-58%, -47%) rotate(-9deg);
}
.pass-role, .pass-timer { display: flex; align-items: center; gap: 8px; }
.pass-role { font-size: 15px; font-weight: 800; letter-spacing: -.025em; }
.pass-role > span { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 8px; background: #c6b3f2; }
.pass-role .icon { width: 16px; height: 16px; }
.pass-timer { margin-top: 13px; font-size: 11px; font-weight: 800; }
.pass-timer .icon { width: 14px; height: 14px; }
.pass-track { height: 4px; margin-top: 11px; border-radius: 6px; background: #8d71c36b; }
.pass-track span { display: block; width: 62%; height: 100%; border-radius: inherit; background: #634598; }
.star { position: absolute; color: #d2b7ff; }
.star-one { top: 22%; left: 17%; width: 18px; height: 18px; }
.star-two { bottom: 19%; right: 11%; width: 12px; height: 12px; }
.demo-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 12px 2px 19px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.demo-note .icon { width: 15px; height: 15px; margin-top: 1px; color: var(--accent); }

.workbench { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: 18px; align-items: stretch; }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: 15px; background: var(--panel); }
.panel-heading {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 16px 19px;
  border-bottom: 1px solid var(--line);
}
.heading-icon {
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  flex: none;
  border-radius: 9px;
  color: var(--accent);
  background: #2a2541;
}
.heading-icon .icon { width: 18px; height: 18px; }
.panel-heading h2 { font-size: 17px; line-height: 1.25; font-weight: 800; letter-spacing: -.02em; }
.panel-heading p { margin-top: 3px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.role-count {
  margin-left: auto;
  padding: 4px 8px;
  border: 1px solid #3b3d51;
  border-radius: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}
.role-content, #assignment-form { padding: 15px 19px 18px; }
.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 43px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  color: var(--muted);
}
.search-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.search-box .icon { width: 16px; height: 16px; }
.search-box input { width: 100%; min-width: 0; min-height: 41px; outline: none; border: 0; background: transparent; font-size: 13px; }
input::placeholder { color: #a1a3bb; opacity: 1; }
.role-directory, .duration-field { min-width: 0; margin: 0; padding: 0; border: 0; }
#role-list { margin-top: 10px; display: grid; gap: 3px; }
.role-row {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 6px 9px;
  border: 1px solid transparent;
  border-radius: 8px;
}
.role-row:has(input:enabled) { cursor: pointer; }
.role-row:has(input:enabled):hover { background: #232538; }
.role-row:has(input:checked) { border-color: #645588; background: #2a2541; }
.role-row:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 1px; }
.role-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: #a4a8bb; }
.role-dot[data-color="plum"] { background: #c0a2fa; }
.role-dot[data-color="blue"] { background: #9ab6ff; }
.role-dot[data-color="mint"] { background: #77d6ae; }
.role-dot[data-color="gold"] { background: #f0bd78; }
.role-dot[data-color="rose"] { background: #f19bb3; }
.role-name { color: #e8e7f6; font-size: 13px; font-weight: 750; overflow-wrap: anywhere; }
.role-reason { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 11px; text-align: right; }
.role-reason .icon { width: 13px; height: 13px; }
.role-row input { width: 15px; height: 15px; margin: 0; accent-color: var(--accent); flex: none; }
.role-reason, .role-row input { margin-left: auto; }
.empty-roles, .log-empty { color: var(--muted); font-size: 13px; line-height: 1.6; }
.empty-roles { margin: 12px 0 4px; }
.assignment-jump { display: none; }

#assignment-form { display: grid; gap: 14px; }
.chosen-role {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 38px;
  padding: 7px 10px;
  border-radius: 7px;
  background: #242539;
  font-size: 12px;
  color: var(--muted);
}
.chosen-role strong { color: #dfd5ff; font-size: 12px; text-align: right; overflow-wrap: anywhere; }
.member-field { position: relative; }
.member-field > label, .custom-expiry > label, .duration-field legend {
  display: block;
  margin-bottom: 7px;
  font-size: 12px;
  font-weight: 800;
}
.member-check { color: var(--mint); }
.field-hint { margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.member-options {
  position: absolute;
  z-index: 2;
  top: 68px;
  inset-inline: 0;
  margin: 0;
  padding: 5px;
  max-height: 188px;
  overflow-y: auto;
  border: 1px solid #4a4464;
  border-radius: 9px;
  background: #222437;
  box-shadow: 0 10px 22px #0c0d17b0;
  list-style: none;
}
.member-options li { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; padding: 8px; min-height: 40px; border-radius: 5px; cursor: pointer; }
.member-options li:hover, .member-options [aria-selected="true"] { background: #373051; }
.member-options strong { font-size: 13px; }
.member-options span { color: var(--muted); font-size: 11px; }
.durations { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.durations label { position: relative; cursor: pointer; }
.durations input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.durations label span {
  display: grid;
  place-items: center;
  min-height: 40px;
  padding: 5px 2px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: #cdcde0;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
}
.durations label:hover span { border-color: #82769d; }
.durations input:checked + span { color: #e2d8ff; background: #322950; border-color: #8a74bf; }
.durations input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.custom-expiry { margin-top: 10px; }
.custom-expiry input { min-height: 41px; width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; background: var(--field); font-size: 13px; }
.expiry-summary { display: flex; align-items: center; gap: 8px; margin-top: 10px; min-height: 42px; }
.expiry-summary .icon { width: 17px; height: 17px; color: var(--accent); }
.expiry-summary strong { display: block; color: #e4def4; font-size: 12px; line-height: 1.45; }
.expiry-summary span { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.save {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #25193d;
  background: #bfaeff;
  font-size: 13px;
  font-weight: 800;
}
.save:hover { background: #d3c6ff; }
.save .icon { width: 16px; height: 16px; }
.form-feedback { color: var(--mint); font-size: 12px; line-height: 1.5; }
.form-feedback:empty { position: absolute; }
.form-feedback[data-error="true"] { color: #ffb0bd; }
[aria-invalid="true"] { color: #ffb0bd; }
.search-box:has([aria-invalid="true"]), .custom-expiry input[aria-invalid="true"] { border-color: #ff9daf; }

.preview-log { margin-top: 18px; scroll-margin-top: 14px; }
.log-empty { padding: 16px 19px; }
.log-list { list-style: none; margin: 0; padding: 0 19px; }
.log-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 8px 16px;
  align-items: center;
  min-height: 54px;
  padding: 10px 0;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.log-list li + li { border-top: 1px solid var(--line); }
.log-list strong { color: #e8e5fb; font-size: 13px; }
.log-role { display: flex; align-items: center; gap: 7px; }
.log-expiry { text-align: right; }

@media (max-width: 1060px) {
  .shell { grid-template-columns: 188px minmax(0, 1fr); }
  .sidebar { padding-inline: 13px; }
  main { padding-inline: 20px; }
  .hero { min-height: 175px; }
  .hero-art { left: 54%; }
  .role-pass-back { transform: translate(-35%, -52%) rotate(13deg) scale(.85); }
  .role-pass-front { transform: translate(-58%, -47%) rotate(-9deg) scale(.85); }
  .panel-heading, .role-content, #assignment-form { padding-inline: 14px; }
}
@media (max-width: 820px) {
  .shell { display: block; }
  .sidebar {
    position: static;
    height: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
    padding: 14px 20px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    align-items: center;
  }
  .brand { grid-column: 1; }
  .server-switch { grid-column: 2; width: min(100%, 245px); justify-self: end; }
  .workspace-links, .lab-link { display: none; }
  main { padding-top: 15px; }
}
@media (max-width: 630px) {
  .sidebar, main { padding-inline: 14px; }
  .hero { min-height: 158px; padding: 20px 17px; }
  .hero-copy { max-width: 64%; }
  .hero h1 { font-size: clamp(27px, 6.7vw, 38px); }
  .hero p { margin-top: 9px; font-size: 12px; }
  .hero-art { left: 59%; }
  .role-pass-back { transform: translate(-45%, -57%) rotate(13deg) scale(.42); }
  .role-pass-front { transform: translate(-51%, -47%) rotate(-9deg) scale(.42); }
  .star { display: none; }
  .workbench { grid-template-columns: 1fr; gap: 13px; }
  .assignment-jump {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 44px;
    margin-top: 9px;
    padding: 0 10px;
    border: 1px solid #645588;
    border-radius: 8px;
    color: #e2d8ff;
    background: #2a2541;
    font-size: 12px;
    font-weight: 800;
  }
  .assignment-jump .icon { width: 16px; height: 16px; }
  .preview-log { margin-top: 13px; }
  .log-list li { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .log-expiry { grid-column: 1 / -1; text-align: left; }
}
@media (max-width: 370px) {
  .brand-icon { width: 32px; height: 32px; }
  .brand-icon .icon { width: 20px; height: 20px; }
  .brand { gap: 7px; }
  .brand small { font-size: 10px; }
  .server-avatar { display: none; }
  .server-control select { padding-left: 10px; }
  .hero-copy { max-width: 73%; }
  .hero-art { left: 65%; }
  .role-pass-back { transform: translate(-47%, -55%) rotate(13deg) scale(.34); }
  .role-pass-front { transform: translate(-54%, -46%) rotate(-9deg) scale(.34); }
}
