body.workflow-choice-pending {
  overflow: hidden;
}

body.workflow-choice-pending .app-shell {
  visibility: hidden;
  pointer-events: none;
}

[data-workflow-area].is-workflow-hidden {
  display: none !important;
}

.workflow-choice-screen {
  position: fixed;
  inset: 0;
  z-index: 8000;
  display: grid;
  grid-template-rows: minmax(0, 0.85fr) auto minmax(28px, 0.15fr);
  gap: 28px;
  min-width: 1280px;
  min-height: 720px;
  padding: 56px 72px;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.68) 42%, rgba(0, 0, 0, 0.32) 100%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.12) 48%, rgba(0, 0, 0, 0.72) 100%);
  color: #fff;
}

.workflow-choice-screen[hidden] {
  display: none;
}

.workflow-choice-copy {
  display: grid;
  align-content: end;
  gap: 14px;
  max-width: 880px;
}

.workflow-choice-kicker {
  color: var(--accent-3);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.workflow-choice-copy h1 {
  margin: 0;
  color: #fff;
  font-size: 96px;
  line-height: 0.9;
}

.workflow-choice-copy p {
  max-width: 760px;
  margin: 0;
  color: #d5dde5;
  font-size: 21px;
  font-weight: 600;
  line-height: 1.38;
}

.workflow-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  width: 1120px;
  max-width: calc(100vw - 144px);
}

.workflow-choice-card {
  position: relative;
  display: grid;
  grid-template-rows: auto auto minmax(74px, auto) auto auto;
  gap: 12px;
  min-height: 250px;
  padding: 22px;
  border: var(--border-width) solid rgba(255, 255, 255, 0.32);
  background: rgba(4, 7, 11, 0.76);
  color: #fff;
  text-align: left;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
}

.workflow-choice-card:hover,
.workflow-choice-card:focus-visible {
  border-color: var(--accent-3);
  background: rgba(0, 0, 0, 0.88);
  box-shadow: 0 0 0 2px rgba(255, 202, 82, 0.18), 0 24px 60px rgba(0, 0, 0, 0.52);
}

.workflow-choice-card-official:hover,
.workflow-choice-card-official:focus-visible {
  border-color: var(--accent);
}

.workflow-choice-label {
  justify-self: start;
  padding: 5px 8px;
  border: var(--border-width) solid rgba(255, 202, 82, 0.52);
  color: var(--accent-3);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.workflow-choice-card strong {
  color: var(--accent-3);
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
}

.workflow-choice-description {
  color: #dce4ec;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.38;
}

.workflow-choice-card:disabled {
  cursor: wait;
}

.workflow-choice-card.is-waiting {
  opacity: 0.46;
}

.workflow-choice-card.is-loading {
  border-color: var(--accent-3);
  background: rgba(0, 0, 0, 0.9);
  box-shadow: 0 0 0 2px rgba(255, 202, 82, 0.18), 0 24px 60px rgba(0, 0, 0, 0.52);
}

.workflow-choice-card-official.is-loading {
  border-color: var(--accent);
}

.workflow-choice-loading {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 22px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  pointer-events: none;
  text-transform: uppercase;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.workflow-choice-card.is-loading .workflow-choice-loading {
  display: inline-flex;
}

.workflow-choice-card small {
  align-self: end;
  color: #aeb9c4;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.workflow-choice-capability {
  justify-self: start;
  padding: 6px 9px;
  border: var(--border-width) solid currentColor;
  color: var(--accent-3);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.workflow-choice-card-official .workflow-choice-capability {
  color: var(--accent);
}

.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
}

.sidebar {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-height: 100vh;
  padding: 18px 14px;
  overflow: hidden;
  border-right: var(--border-width) solid var(--line);
  background: none;
  backdrop-filter: blur(30px);
  color: #f6f8fa;
}

.quit-button {
  width: 100%;
  height: 50px;
  border-color: rgba(var(--accent-2-rgb), 0.55);
  background: rgba(var(--accent-2-rgb), 0.12);
  color: #fff;
  font-weight: 700;

  &:hover {
    border-color: var(--accent-2-border);
    background: rgba(var(--accent-2-rgb), 0.28);
  }
}

.sidebar-footer {
  display: grid;
  gap: 8px;
  margin-top: auto;
  padding-top: 18px;
}

.debug-mode-badge {
  display: grid;
  place-items: center;
  min-height: 28px;
  border: var(--border-width) solid var(--accent-2);
  background: var(--accent-2-soft);
  color: #caffdd;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.debug-mode-badge[hidden] {
  display: none;
}

.app-version {
  color: var(--muted);
  font-size: 13px;
  line-height: 1;
  text-align: center;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 26px;
  flex-direction: column;
  flex: 0 0 auto;

  img {
    width: 100%;
    height: auto;
  }

  small {
    display: block;
    color: var(--muted);
    margin-top: 2px;
  }
}

.brand-logo {
  display: block;
  width: 100%;
}

.sidebar-workflow-badge {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 30px;
  margin: -12px 0 16px;
  border: var(--border-width) solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: #f6f8fa;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar-workflow-badge-label {
  display: none;
}

body[data-workflow-scope="advanced"] .sidebar-workflow-badge {
  border-color: rgba(var(--accent-rgb), 0.58);
  background: rgba(var(--accent-rgb), 0.14);
  color: #d7f4ff;
}

body[data-workflow-scope="official"] .sidebar-workflow-badge {
  border-color: rgba(var(--accent-2-rgb), 0.62);
  background: rgba(var(--accent-2-rgb), 0.14);
  color: #dfffe9;
}

body:not([data-workflow-scope="official"]) .sidebar-workflow-badge-advanced,
body[data-workflow-scope="official"] .sidebar-workflow-badge-official {
  display: inline;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 0px;
  background:
    linear-gradient(135deg, var(--accent-2) 0 48%, #111820 48% 54%, var(--accent) 54% 100%);
  font-weight: 800;
  color: #fff;
}

.nav {
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--accent-2-rgb), 0.72) rgba(0, 0, 0, 0.18);

  &::-webkit-scrollbar {
    width: 8px;
  }

  &::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.18);
  }

  &::-webkit-scrollbar-thumb {
    background: rgba(var(--accent-2-rgb), 0.72);
  }
}

.nav-section {
  display: grid;
  gap: 6px;
  margin-bottom: 0px;
  border: var(--border-width) solid var(--line-soft);

  // &:last-child {
  //   border-bottom: 0;
  //   padding-bottom: 0;
  // }
}

.nav-button {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  text-transform: uppercase;
  justify-content: flex-start;
  text-align: left;
  background: transparent;
  border-color: transparent;
  color: #c7d0d9;
  position: relative;
  min-height: 80px;

  &.icon-text {
    justify-content: flex-start;
  }

  &.active,
  &:hover {
    background: #000;
    border-color: var(--line);
    color: var(--accent-3);
  }

  &.active::before {
    content: "";
    position: absolute;
    left: 0px;
    top: 0px;
    bottom: 0px;
    width: 3px;
    border-radius: 0px;
    background: var(--accent-2);
  }

  &.is-setup-locked {
    opacity: 0.42;
    cursor: not-allowed;
  }

  &:disabled,
  &[aria-disabled="true"] {
    color: #69737d;
    pointer-events: none;
  }
}

.nav-label {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  min-height: 0;
  padding: 4px 12px;
  border-color: transparent;
  background: transparent;
  color: #8f9aa6;
  font-size: 15px;
  line-height: 1;
  cursor: default;
  pointer-events: none;
}

.nav-section.is-active .nav-label {
  background: transparent;
  border-color: transparent;
  color: #fff;
}

.nav-category {
  min-height: 32px;
  color: #fff;
  font-size: 18px;
  font-weight: 600;
}

.nav-sublist {
  display: grid;
  gap: 4px;
  padding: 0 10px;
  margin-bottom: 10px;
}

.nav-subbutton {
  min-height: 34px;
  padding: 0 10px;
  font-size: 17px;
  color: #aeb8c3;
  border-radius: 0px;

  &.active,
  &:hover {
    background: #120305;
  }

  &.active::before {
    top: 0px;
    bottom: 0px;
  }
}

.workspace {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  min-width: 0;
  height: 100vh;
  min-height: 0;
  max-height: 100vh;
  overflow: hidden;
  background: none;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px auto auto;
  gap: 8px;
  height: 85px;
  align-items: end;
  padding: 14px 18px;
  border-bottom: var(--border-width) solid var(--line);
  background: #000;
  box-shadow: 0 10px 28px var(--shadow);
}

.language-field {
  select {
    min-width: 140px;
  }
}

label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

input,
select {
  min-height: 34px;
  width: 100%;
  border: var(--border-width) solid var(--line);
  border-radius: 0px;
  padding: 6px 9px;
  color: var(--ink);
  background: #000;
  outline: none;

  &:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(23, 195, 178, 0.18);
  }
}

input[type="checkbox"] {
  width: 14px;
  min-width: 14px;
  height: 14px;
  min-height: 14px;
  padding: 0;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  display: inline-grid;
  place-content: center;
  border: var(--border-width) solid var(--accent-2);
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 11px 11px;
  cursor: pointer;

  &:checked {
    background-color: transparent;
    background-image: url("data:image/svg+xml,%3Csvg width='11' height='11' viewBox='0 0 11 11' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1.2 5.8 4.1 8.6 9.8 2.1' fill='none' stroke='%23f0473f' stroke-width='1.8' stroke-linecap='square' stroke-linejoin='miter'/%3E%3C/svg%3E");
  }

  &:focus {
    border-color: var(--accent-2);
    box-shadow: 0 0 0 2px rgba(240, 71, 63, 0.18);
  }
}

.tab {
  display: none;
  min-height: 0;

  &.active {
    display: block;
  }
}

.split {
  display: grid;
  grid-template-columns: minmax(420px, 1.25fr) minmax(320px, 0.75fr);
  gap: 14px;
  height: 100%;
}

.work-area {
  display: grid;
  grid-template-columns: minmax(320px, 36vw) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 14px;
  height: 100%;
  min-height: 0;
  padding: 14px;
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.022) 0 8px, transparent 8px 16px),
    transparent;
}

.work-area.uv-mode {
  grid-template-columns: minmax(0, 1fr);
}

.work-area.uv-mode.uv-browser-visible {
  grid-template-columns: minmax(320px, 32vw) minmax(0, 1fr);
}

.work-area.library-mode {
  grid-template-columns: minmax(0, 1fr);
}

.work-area.library-mode.library-browser-visible {
  grid-template-columns: minmax(320px, 32vw) minmax(0, 1fr);
}

.work-area.full-width-mode {
  grid-template-columns: minmax(0, 1fr);
}

.tool-pane {
  display: grid;
  grid-row: 1;
  grid-template-rows: minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: none !important;
}

.tool-content {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  background: none !important;
}

.file-panel {
  grid-row: 1;
  display: grid;
  grid-template-rows: auto auto minmax(180px, 1fr) auto auto;
  gap: 8px;
  min-height: 0;
  overflow: hidden;

  &.is-hidden {
    display: none;
  }
}

.file-panel h1::after,
.tool-pane h1::after {
  // content: "";
  // display: inline-block;
  // width: 38px;
  // height: 3px;
  // margin-left: 10px;
  // vertical-align: middle;
  // background: var(--accent-2);
  // transform: skewX(-24deg);
}

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

  &.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  &.tight {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }
}

.panel {
  background: var(--panel);
  border: var(--border-width) solid var(--line);
  border-radius: 0px;
  padding: 14px;
  min-width: 0;
  min-height: 0;
  box-shadow: 0 12px 30px var(--shadow);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 15px;
  //backdrop-filter: blur(24px);
  &::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 2px;
    border-radius: 0;
    background: linear-gradient(90deg, var(--accent-2), var(--accent), var(--accent-3));
    opacity: 0.85;
  }
}

.evo-update-dialog {
  width: min(940px, calc(100vw - 80px));
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.evo-update-body,
.evo-update-content {
  display: grid;
  gap: 16px;
}

.evo-update-body {
  grid-template-rows: auto auto minmax(0, 1fr);
  overflow: hidden;
}

.evo-update-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.evo-update-step {
  border: var(--border-width) solid var(--line);
  padding: 10px 12px;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;

  &.is-active {
    border-color: var(--accent);
    color: var(--ink);
  }

  &.is-complete {
    border-color: var(--accent);
    color: var(--accent);
  }
}

.evo-update-content {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
  scrollbar-gutter: stable;
  line-height: 1.5;

  h3,
  p {
    margin: 0;
  }
}

.evo-update-checklist {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;

  li {
    border: var(--border-width) solid var(--line);
    padding: 10px 12px;
    overflow-wrap: anywhere;
  }

  li.is-ready {
    border-color: var(--accent);
    color: var(--accent);
  }
}

.evo-update-folder-root {
  overflow-wrap: anywhere;
}

.evo-update-cleanup-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));

  .evo-update-cleanup-package {
    grid-column: 1 / -1;
  }
}

.evo-update-warning {
  border-left: 3px solid var(--accent-3);
  padding: 10px 12px;
  background: rgba(var(--accent-rgb), 0.08);
}

.evo-update-actions {
  flex-wrap: wrap;
}

