/* Shared shell components: badges, icon buttons, toast stack */

.badge-v2 {
  display: inline-flex;
  align-items: center;
  margin-left: 0.5rem;
  padding: 0.2rem 0.55rem;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  flex-shrink: 0;
  color: var(--accent-blue);
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  vertical-align: middle;
}

.badge-v2--success {
  color: var(--accent-green);
  border-color: color-mix(in srgb, var(--accent-green) 45%, var(--border-color));
  background: color-mix(in srgb, var(--accent-green) 12%, var(--bg-glass));
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-glass);
  color: var(--text-primary);
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
}

[data-theme="light"] .btn-icon:hover {
  background: rgba(0, 0, 0, 0.05);
}

.btn-icon:focus {
  outline: none;
}

.btn-icon:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

.theme-icon {
  font-size: 1.125rem;
  line-height: 1;
}

.toast-container {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: min(100vw - 2rem, 22rem);
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  padding: 0.875rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: var(--shadow-card);
  font-size: 0.875rem;
  animation: toast-enter var(--transition-normal) ease-out;
}

.toast--success {
  border-color: color-mix(in srgb, var(--accent-green) 45%, var(--border-color));
}

.toast--error {
  border-color: color-mix(in srgb, var(--accent-red) 45%, var(--border-color));
}

.toast--warning {
  border-color: color-mix(in srgb, var(--accent-amber) 45%, var(--border-color));
}

.toast--info {
  border-color: color-mix(in srgb, var(--accent-blue) 45%, var(--border-color));
}

@keyframes toast-enter {
  from {
    opacity: 0;
    transform: translateY(0.5rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stepper-list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  list-style: none;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0.5rem 1rem;
  min-height: 3rem;
}

.stepper-list > li,
.stepper-item {
  flex: 0 1 auto;
  min-width: 0;
  display: flex;
}

.stepper-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  width: auto;
  min-width: 0;
  padding: 0.42rem 0.75rem;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.35;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition:
    color var(--transition-fast),
    background var(--transition-fast),
    border-color var(--transition-fast);
}

.stepper-tab__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

[data-theme="light"] .stepper-tab__num {
  background: rgba(15, 23, 42, 0.05);
}

.stepper-tab__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.stepper-tab:hover:not(:disabled) {
  color: var(--text-primary);
  background: var(--bg-glass);
}

.stepper-tab--selected,
.stepper-tab[aria-selected='true'] {
  color: var(--text-primary);
  background: var(--bg-glass);
  border-color: var(--border-color);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent-blue) 35%, transparent);
}

.stepper-tab--selected .stepper-tab__num,
.stepper-tab[aria-selected='true'] .stepper-tab__num {
  background: var(--accent-blue);
  border-color: #60a5fa;
  color: #fff;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.45);
}

.stepper-tab--completed {
  color: var(--text-primary);
}

.stepper-tab--completed .stepper-tab__num {
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(34, 197, 94, 0.5);
  color: #4ade80;
}

[data-theme="light"] .stepper-tab--completed .stepper-tab__num {
  color: #16a34a;
}

.stepper-tab--disabled,
.stepper-tab:disabled {
  color: var(--text-secondary);
  opacity: 0.55;
  cursor: not-allowed;
}

.stepper-tab:focus {
  outline: none;
}

.stepper-tab:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

@media (max-width: 1100px) {
  .stepper-list {
    display: flex;
    overflow-x: auto;
  }

  .stepper-item {
    flex: 0 0 auto;
  }
}

.connect-stage {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.connect-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 800px) {
  .connect-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.card-v2 {
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.card-v2__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.connect-account-status {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.connect-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.connect-status {
  font-size: 0.875rem;
  color: var(--text-secondary);
  min-height: 1.25rem;
}

.btn-v2 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.125rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25;
  cursor: pointer;
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast);
}

.btn-v2:focus {
  outline: none;
}

.btn-v2:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

.btn-v2:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-v2--primary {
  color: #fff;
  background: var(--accent-blue);
  border-color: color-mix(in srgb, var(--accent-blue) 80%, var(--border-color));
}

.btn-v2--lg {
  padding: 0.75rem 1.65rem;
  font-size: 1rem;
  font-weight: 600;
}

.btn-v2--primary:hover:not(:disabled) {
  background: var(--accent-blue-hover);
}

.btn-v2--secondary {
  color: var(--text-primary);
  background: var(--bg-glass);
}

.btn-v2--secondary:hover:not(:disabled) {
  background: color-mix(in srgb, var(--bg-glass) 70%, var(--text-primary) 8%);
}

.btn-v2--back,
.btn-v2--ghost {
  color: var(--text-secondary);
  background: transparent;
  border-color: var(--border-color);
  gap: 0.5rem;
}

.btn-v2--back:hover:not(:disabled),
.btn-v2--ghost:hover:not(:disabled) {
  color: var(--text-primary);
  background: var(--bg-glass);
  border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="light"] .btn-v2--back:hover:not(:disabled),
[data-theme="light"] .btn-v2--ghost:hover:not(:disabled) {
  border-color: rgba(0, 0, 0, 0.2);
}

.btn-v2--success {
  color: #fff;
  background: var(--accent-green);
  border-color: color-mix(in srgb, var(--accent-green) 80%, var(--border-color));
}

.btn-v2--success:hover:not(:disabled) {
  background: var(--accent-green-hover);
}

.spinner-v2 {
  width: 2.25rem;
  height: 2.25rem;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent-blue);
  border-radius: 50%;
  animation: spinner-spin 0.75s linear infinite;
  display: inline-block;
  vertical-align: middle;
}

[data-theme="light"] .spinner-v2 {
  border-color: rgba(0, 0, 0, 0.1);
  border-top-color: var(--accent-blue);
}

@keyframes spinner-spin {
  to { transform: rotate(360deg); }
}

.scoping-stage__loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 3.5rem 2rem;
  text-align: center;
  max-width: 32rem;
  margin: 2rem auto;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-card);
  animation: fade-in-up 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.scoping-stage__loading-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.scoping-stage__loading-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
  max-width: 24rem;
  line-height: 1.45;
}

.skeleton-pulse {
  width: 100%;
  height: 0.5rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 25%, rgba(255, 255, 255, 0.12) 50%, rgba(255, 255, 255, 0.05) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
}

[data-theme="light"] .skeleton-pulse {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.05) 25%, rgba(0, 0, 0, 0.1) 50%, rgba(0, 0, 0, 0.05) 75%);
  background-size: 200% 100%;
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(0.75rem); }
  to { opacity: 1; transform: translateY(0); }
}

.stage-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  gap: 1rem;
}

.stage-nav-header__title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.stage-nav-header__badge {
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  color: var(--accent-blue);
}

.tree-explorer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--bg-glass);
  border-bottom: 1px solid var(--border-color);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.tree-explorer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--bg-glass);
  border-top: 1px solid var(--border-color);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.tree-instruction {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.4;
}


.drive-picker-overlay {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 0;
  background: transparent;
}

.drive-picker-modal {
  width: 100%;
  max-width: 64rem;
  max-height: none;
  overflow: visible;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow-card);
}

/* --- Enterprise List-Centric Scope & Module Sections --- */
.drive-picker__section {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.015);
  padding: 0;
  margin: 0;
  min-width: 0;
  overflow: hidden;
}

[data-theme="light"] .drive-picker__section {
  background: var(--bg-secondary);
}

.drive-picker__section-header,
.drive-picker__module-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.75rem 1.1rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border-color);
}

[data-theme="light"] .drive-picker__section-header,
[data-theme="light"] .drive-picker__module-bar {
  background: rgba(15, 23, 42, 0.03);
}

.drive-picker__module-title-group {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.drive-picker__section-title {
  margin: 0;
  padding: 0;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.drive-picker__section-meta {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
}

.drive-picker__scope-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.drive-picker__counter-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 9999px;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  white-space: nowrap;
}

[data-theme="light"] .drive-picker__counter-pill {
  color: #0284c7;
  background: rgba(2, 132, 199, 0.1);
  border-color: rgba(2, 132, 199, 0.25);
}

.drive-picker__row-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.22rem 0.6rem;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: var(--radius-sm);
  color: var(--accent-blue);
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.28);
  white-space: nowrap;
  flex-shrink: 0;
}

.drive-picker__row-pill--muted {
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-color);
}

[data-theme="light"] .drive-picker__row-pill--muted {
  background: rgba(15, 23, 42, 0.05);
}

/* --- Section 2: Structured Drive Table-List --- */
.drive-picker__list-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 12.5rem 8.75rem;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 1.1rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: rgba(15, 23, 42, 0.35);
  border-bottom: 1px solid var(--border-color);
}

[data-theme="light"] .drive-picker__list-header {
  background: rgba(15, 23, 42, 0.04);
}

.drive-picker__list-col--type {
  text-align: left;
}

.drive-picker__list-col--actions {
  text-align: right;
}

.drive-picker__drives {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: 22rem;
  overflow-y: auto;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.35) transparent;
}

.drive-picker__drive {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) 12.5rem 8.75rem;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1.1rem;
  border-bottom: 1px solid var(--border-color);
  background: transparent;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.drive-picker__drive:last-child {
  border-bottom: none;
}

.drive-picker__drive:hover {
  background: rgba(56, 189, 248, 0.05);
}

.drive-picker__drive--selected,
.drive-picker__drive:has(input[type="checkbox"]:checked) {
  background: rgba(59, 130, 246, 0.06);
}

.drive-picker__drive--selected:hover,
.drive-picker__drive:has(input[type="checkbox"]:checked):hover {
  background: rgba(59, 130, 246, 0.1);
}

.drive-picker__drive input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
  accent-color: var(--accent-blue);
  cursor: pointer;
  flex-shrink: 0;
}

.drive-picker__drive-icon,
.drive-picker__row-icon,
.drive-picker__workload-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-sm);
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.22);
  font-size: 0.95rem;
  flex-shrink: 0;
}

.drive-picker__drive-info,
.drive-picker__row-info,
.drive-picker__workload-info,
.drive-picker__mode-info {
  display: flex;
  flex-direction: column;
  gap: 0.16rem;
  min-width: 0;
}

.drive-picker__drive-name,
.drive-picker__row-title,
.drive-picker__workload-title,
.drive-picker__mode-title {
  font-size: 0.885rem;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drive-picker__drive-sub,
.drive-picker__row-sub,
.drive-picker__workload-desc,
.drive-picker__mode-desc {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.35;
}

.drive-picker__workload-badge {
  margin-left: 0;
}

.drive-picker__workload-badge--muted {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-color);
}

.drive-picker__drive .badge-v2 {
  margin-left: 0;
  justify-self: start;
}

.drive-picker__drive .drive-picker__drive-folders {
  justify-self: end;
}

/* --- Section 3: Google Workspace Workloads List --- */
.drive-picker__workspace-list {
  display: flex;
  flex-direction: column;
}

.drive-picker__workload-row {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.85rem;
  padding: 0.7rem 1.1rem;
  border-bottom: 1px solid var(--border-color);
  background: transparent;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.drive-picker__workload-row:last-child {
  border-bottom: none;
}

.drive-picker__workload-row:hover {
  background: rgba(56, 189, 248, 0.05);
}

.drive-picker__workload-row--active,
.drive-picker__workload-row:has(input[type="checkbox"]:checked) {
  background: rgba(59, 130, 246, 0.05);
}

.drive-picker__workload-row input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
  accent-color: var(--accent-blue);
  cursor: pointer;
  flex-shrink: 0;
}

.drive-picker__workload-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  font-size: 0.95rem;
  flex-shrink: 0;
}

.drive-picker__workload-info {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}

.drive-picker__workload-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.drive-picker__workload-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

/* --- Section 4: Transfer Mode & Destination Policy List --- */
.drive-picker__mode-list {
  display: flex;
  flex-direction: column;
}

.drive-picker__mode-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1.1rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.drive-picker__mode-option:last-child {
  border-bottom: none;
}

.drive-picker__mode-option:hover {
  background: rgba(56, 189, 248, 0.05);
}

.drive-picker__mode-option--active,
.drive-picker__mode-option:has(input[type="radio"]:checked) {
  background: rgba(59, 130, 246, 0.07);
}

.drive-picker__mode-option input[type="radio"] {
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  accent-color: var(--accent-blue);
  cursor: pointer;
  flex-shrink: 0;
}

.drive-picker__mode-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.drive-picker__mode-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.drive-picker__mode-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

.drive-picker__move-note {
  margin: 0;
  padding: 0.6rem 1.1rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid var(--border-color);
  line-height: 1.4;
}

.drive-picker__dest {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.85rem 1.1rem;
  border-top: 1px solid var(--border-color);
  background: rgba(15, 23, 42, 0.25);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
}

[data-theme="light"] .drive-picker__dest {
  background: rgba(15, 23, 42, 0.03);
}

.drive-picker__dest-select {
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 0.85rem;
  outline: none;
}

.drive-picker__dest-select:focus {
  border-color: var(--border-focus);
}

/* --- Action Footer Bar --- */
.drive-picker__actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.85rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--border-color);
}

.drive-picker__actions-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-left: auto;
}

.drive-picker__skip {
  padding: 0.7rem 1.35rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.drive-picker__empty {
  padding: 1.75rem 1.25rem;
  text-align: center;
  color: var(--text-muted);
  background: transparent;
  font-size: 0.85rem;
}

.scoping-stage {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.scoping-stage__notice,
.scoping-stage__error {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.scoping-stage__error {
  color: color-mix(in srgb, var(--accent-red) 85%, var(--text-primary));
}

.scoping-stage__done {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-primary);
}

.scoping-tree {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 18rem;
}

.scoping-tree__filter {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.scoping-tree__filter-input {
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-glass);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.875rem;
}

.scoping-tree__filter-input:focus {
  outline: none;
}

.scoping-tree__filter-input:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

.scoping-tree__host {
  flex: 1;
  min-height: 14rem;
}

.virtual-tree {
  height: 100%;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  overflow: hidden;
}

.virtual-tree__viewport {
  height: 100%;
  max-height: 22rem;
  overflow: auto;
  position: relative;
}

.virtual-tree__spacer {
  width: 1px;
  pointer-events: none;
}

.virtual-tree__list {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  will-change: transform;
}

.virtual-tree__row {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0 0.75rem;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.875rem;
  text-align: left;
  cursor: pointer;
  gap: 0.35rem;
}

.virtual-tree__row:hover {
  background: var(--bg-glass);
}

.virtual-tree__row:focus {
  outline: none;
}

.virtual-tree__row:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: -2px;
}

.virtual-tree__indent {
  flex-shrink: 0;
  display: inline-block;
}

.virtual-tree__box {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-glass);
}

.virtual-tree__box--checked {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
}

.virtual-tree__box--indeterminate {
  background: color-mix(in srgb, var(--accent-blue) 45%, var(--bg-glass));
}

.virtual-tree__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-stage {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.report-card__status {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.report-card__error {
  color: color-mix(in srgb, var(--accent-red) 85%, var(--text-primary));
}

.report-card__summary {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 1.25rem;
  margin: 0;
  font-size: 0.875rem;
}

.report-card__summary dt {
  font-weight: 600;
  color: var(--text-secondary);
}

.report-card__summary dd {
  margin: 0;
  color: var(--text-primary);
}

.report-card__permissions {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.report-card__sha {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  word-break: break-all;
}

.report-card__sha-value {
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
  color: var(--text-primary);
}

.report-card__hierarchy-title {
  margin: 1rem 0 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}

.report-card__hierarchy {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  max-height: 22rem;
  overflow: auto;
}

.report-hierarchy-list {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
}

.report-hierarchy-list__item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.25rem 0.75rem;
  font-size: 0.8125rem;
}

.report-hierarchy-list__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-primary);
}

.report-hierarchy-list__meta {
  flex-shrink: 0;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

.report-card__pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.report-card__pager-info {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

/* --- UI/UX Pro Max Stage 2: Drive Selector Tabs --- */
.report-drive-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.25rem 0 0.75rem;
}

.report-drive-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: var(--radius-full, 9999px);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.report-drive-tab:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
}

.report-drive-tab--active {
  background: rgba(56, 189, 248, 0.1);
  border-color: #38bdf8;
  color: var(--text-primary);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.2);
}

.report-drive-tab__icon {
  font-size: 1rem;
  line-height: 1;
}

.report-drive-tab__name {
  font-weight: 600;
}

.report-drive-tab__badge {
  padding: 0.15rem 0.45rem;
  font-size: 0.7rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.report-drive-tab--active .report-drive-tab__badge {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
}

/* --- Tree Toolbar --- */
.report-tree-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0.75rem 0;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.input-v2,
.report-tree-search {
  flex: 1 1 14rem;
  min-width: 12rem;
  max-width: 24rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.8125rem;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.input-v2:focus,
.report-tree-search:focus {
  outline: 2px solid var(--border-focus);
  outline-offset: 1px;
}

.report-tree-toolbar__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.report-tree-btn {
  padding: 0.3rem 0.65rem;
  font-size: 0.75rem;
}

.report-tree-counter {
  font-size: 0.78125rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* --- Tree View Container & Rows --- */
.report-tree-container {
  max-height: 30rem;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  padding: 0.5rem;
}

.report-tree-list {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.report-tree-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  color: var(--text-primary);
  user-select: none;
  transition: background var(--transition-fast);
}

.report-tree-row--folder {
  cursor: pointer;
  font-weight: 500;
}

.report-tree-row--folder:hover {
  background: rgba(255, 255, 255, 0.06);
}

.report-tree-row--file {
  font-weight: 400;
  color: var(--text-secondary);
}

.report-tree-row--file:hover {
  background: rgba(255, 255, 255, 0.03);
}

.report-tree-chevron {
  display: inline-block;
  font-size: 0.65rem;
  width: 0.875rem;
  color: var(--text-muted);
  transition: transform 0.15s ease;
}

.report-tree-chevron--open {
  transform: rotate(90deg);
}

.report-tree-icon {
  font-size: 0.95rem;
  line-height: 1;
}

.report-tree-name,
.report-tree-file-name {
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-tree-file-size {
  flex-shrink: 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: ui-monospace, monospace;
}

.report-tree-branch {
  margin-left: 0.85rem;
  padding-left: 0.65rem;
  border-left: 1px dashed rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.report-tree-branch[hidden],
[hidden] {
  display: none !important;
}

.report-tree-root-header {
  padding: 0.5rem 0.5rem 0.25rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 0.5rem;
}

.report-tree-empty {
  padding: 2.5rem 1rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* --- Report Badges --- */
.report-badge {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  flex-shrink: 0;
}

.report-badge--folder {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.report-badge--zip {
  background: rgba(234, 179, 8, 0.15);
  color: #facc15;
}

.report-badge--pdf {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

.report-badge--mp4 {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
}

.report-badge--docx,
.report-badge--doc {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}

.report-badge--xls,
.report-badge--xlsx {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}

.report-badge--ppt {
  background: rgba(249, 115, 22, 0.15);
  color: #fb923c;
}

.report-badge--img {
  background: rgba(20, 184, 166, 0.15);
  color: #2dd4bf;
}

.report-badge--shortcut {
  background: rgba(147, 51, 234, 0.15);
  color: #a855f7;
}

.report-badge--file {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

.report-card__pager-btn:focus {
  outline: none;
}

.report-card__pager-btn:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

.report-card__actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.report-card__actions .btn-v2:focus {
  outline: none;
}

.report-card__actions .btn-v2:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

.acceptance-stage {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.acceptance-terms__title {
  margin: 0.5rem 0 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}

.acceptance-terms__status {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.acceptance-terms__status--error {
  color: color-mix(in srgb, var(--accent-red) 85%, var(--text-primary));
}

.acceptance-terms__scroll {
  max-height: 16rem;
  overflow: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  padding: 0.75rem 1rem;
}

.acceptance-terms__scroll:focus {
  outline: none;
}

.acceptance-terms__scroll:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

.acceptance-terms__body {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-word;
}

.acceptance-checks {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.015);
  overflow: hidden;
}

.acceptance-check {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.875rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.acceptance-check:last-child {
  border-bottom: none;
}

.acceptance-check:hover {
  background: rgba(56, 189, 248, 0.05);
}

.acceptance-check:has(.acceptance-check__input:checked) {
  background: rgba(59, 130, 246, 0.07);
}

.acceptance-check__input {
  margin: 0;
  flex-shrink: 0;
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--accent-blue);
  cursor: pointer;
}

.acceptance-check__input:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.acceptance-check__input:focus {
  outline: none;
}

.acceptance-check__input:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

.acceptance-check__text {
  line-height: 1.4;
}

.acceptance-message {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: color-mix(in srgb, var(--accent-green) 75%, var(--text-primary));
}

.acceptance-error {
  margin: 0;
  font-size: 0.875rem;
  color: color-mix(in srgb, var(--accent-red) 85%, var(--text-primary));
}

.acceptance-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.acceptance-actions .btn-v2:focus {
  outline: none;
}

.acceptance-actions .btn-v2:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

/* Stage 4: live execution dashboard */

.execution-stage {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.execution-notice {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.execution-card {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.execution-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.execution-header .card-v2__title {
  margin: 0;
  flex: 1 1 auto;
}

.execution-mode {
  margin-left: 0;
}

.execution-layout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
}

.execution-ring {
  flex: 0 0 auto;
}

.execution-ring__svg {
  width: 8.5rem;
  height: 8.5rem;
}

.execution-ring__track {
  stroke: var(--border-color);
  stroke-width: 8;
}

.execution-ring__arc {
  stroke: var(--accent-blue);
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.35s ease;
}

.execution-ring__label {
  fill: var(--text-primary);
  font-size: 1.125rem;
  font-weight: 600;
  font-family: inherit;
}

.execution-metrics {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 1rem;
  margin: 0;
  flex: 1 1 12rem;
  min-width: 12rem;
}

.execution-metrics dt {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

.execution-metrics dd {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.execution-events__title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}

.execution-events__list {
  list-style: none;
  margin: 0;
  padding: 0.75rem;
  max-height: 16rem;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--bg-glass) 80%, transparent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.75rem;
  line-height: 1.45;
}

.execution-events__item {
  padding: 0.2rem 0;
  color: var(--text-primary);
  word-break: break-word;
}

.execution-events__item--warn {
  color: color-mix(in srgb, var(--accent-amber, #e8a317) 80%, var(--text-primary));
}

.execution-events__item--error {
  color: color-mix(in srgb, var(--accent-red) 85%, var(--text-primary));
}

.execution-error {
  margin: 0;
  font-size: 0.875rem;
  color: color-mix(in srgb, var(--accent-red) 85%, var(--text-primary));
}

.execution-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.execution-controls .btn-v2:focus {
  outline: none;
}

.execution-controls .btn-v2:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

.destination-stage {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.destination-notice {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.destination-card__status {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.destination-card__error {
  color: color-mix(in srgb, var(--accent-red) 85%, var(--text-primary));
}

.destination-compare {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1rem;
}

.destination-compare__pane {
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--bg-glass) 70%, transparent);
}

.destination-compare__title {
  margin: 0 0 0.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}

.destination-compare__stats {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 1rem;
  margin: 0;
}

.destination-compare__stats dt {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

.destination-compare__stats dd {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.destination-figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  gap: 1rem;
}

.destination-figure {
  margin: 0;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  text-align: center;
  background: color-mix(in srgb, var(--bg-glass) 60%, transparent);
}

.destination-figure--attention {
  border-color: color-mix(in srgb, var(--accent-amber, #e8a317) 45%, var(--border-color));
}

.destination-figure__value {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.destination-figure__label {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

.destination-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.destination-filter__label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.destination-filter__select {
  min-width: 12rem;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 0.875rem;
}

.destination-filter__select:focus {
  outline: none;
}

.destination-filter__select:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

.destination-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.destination-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.destination-table th,
.destination-table td {
  padding: 0.5rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  vertical-align: top;
}

.destination-table th {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  background: color-mix(in srgb, var(--bg-glass) 80%, transparent);
}

.destination-table tbody tr:last-child td {
  border-bottom: none;
}

.destination-blocks__title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}

.destination-blocks__list {
  list-style: none;
  margin: 0;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--bg-glass) 70%, transparent);
  font-size: 0.8125rem;
  line-height: 1.45;
}

.destination-blocks__item {
  padding: 0.2rem 0;
  color: var(--text-primary);
  word-break: break-word;
}

.destination-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.destination-actions .btn-v2:focus {
  outline: none;
}

.destination-actions .btn-v2:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

.signoff-stage {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.signoff-notice {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.signoff-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.signoff-section__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.signoff-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.signoff-field__input {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-family: inherit;
  line-height: 1.45;
}

.signoff-field__input:focus {
  outline: none;
}

.signoff-field__input:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

.signoff-field__input:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.signoff-field__textarea {
  resize: vertical;
  min-height: 5rem;
}

.signoff-error {
  margin: 0;
  font-size: 0.875rem;
  color: color-mix(in srgb, var(--accent-red) 85%, var(--text-primary));
}

.signoff-hint {
  margin: 0;
  font-size: 0.875rem;
  color: color-mix(in srgb, var(--accent-amber, #e8a317) 75%, var(--text-primary));
}

.signoff-success {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--bg-glass) 70%, transparent);
}

.signoff-success__sha,
.signoff-success__purge,
.signoff-success__ticket {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--text-primary);
  word-break: break-word;
}

.signoff-support-panel {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 0.25rem;
}

.signoff-section .btn-v2:focus {
  outline: none;
}

.signoff-section .btn-v2:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

.virtual-tree__viewport {
  position: relative;
  min-height: 24rem;
  max-height: 32rem;
  overflow: auto;
}

.virtual-tree__row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
  padding: 0 0.75rem;
  color: var(--text-primary);
}

.virtual-tree__chevron,
.virtual-tree__check,
.virtual-tree__name {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
}

.virtual-tree__chevron,
.virtual-tree__check {
  flex: 0 0 auto;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  cursor: pointer;
}

.virtual-tree__name {
  flex: 1;
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.virtual-tree__name--static {
  cursor: default;
  opacity: 0.7;
}

.virtual-tree__box {
  display: inline-block;
  width: 0.7rem;
  height: 0.7rem;
  border: 2px solid #7eb6ff;
  border-radius: 50%;
  vertical-align: middle;
}

.virtual-tree__box--checked {
  background: #7eb6ff;
}

.virtual-tree__box--unchecked {
  background: transparent;
}

.virtual-tree__box--indeterminate {
  background: color-mix(in srgb, #7eb6ff 45%, transparent);
}

.scoping-tree__status {
  min-height: 1.25rem;
  margin: 0.35rem 0 0.5rem;
  color: var(--text-primary);
}

.scoping-tree__filter-input,
.drive-picker__dest-select {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
}

/* --- Module Priority & Selective Folder Controls (List Architecture) --- */
.drive-picker__priority-options {
  display: flex;
  flex-direction: column;
}

.drive-picker__priority-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1.1rem;
  border-bottom: 1px solid var(--border-color);
  background: transparent;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.drive-picker__priority-card:last-child {
  border-bottom: none;
}

.drive-picker__priority-card:hover {
  background: rgba(56, 189, 248, 0.05);
}

.drive-picker__priority-card--active,
.drive-picker__priority-card:has(input[type="radio"]:checked) {
  background: rgba(56, 189, 248, 0.08);
  box-shadow: inset 3px 0 0 #38bdf8;
}

.drive-picker__priority-card input[type="radio"] {
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  accent-color: var(--accent-blue);
  cursor: pointer;
  flex-shrink: 0;
}

.drive-picker__priority-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.drive-picker__priority-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.drive-picker__priority-sub {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

.drive-picker__module-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.drive-picker__preset-btn,
.drive-picker__drive-folders {
  padding: 0.32rem 0.7rem;
  font-size: 0.75rem;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .drive-picker-modal {
    padding: 1.25rem;
  }

  .drive-picker__list-header {
    display: none;
  }

  .drive-picker__drive {
    grid-template-columns: auto auto minmax(0, 1fr);
    gap: 0.65rem;
  }

  .drive-picker__drive .badge-v2 {
    grid-column: 3;
    justify-self: start;
  }

  .drive-picker__drive .drive-picker__drive-folders {
    grid-column: 3;
    justify-self: start;
  }

  .drive-picker__priority-card,
  .drive-picker__mode-option {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .drive-picker__priority-card .drive-picker__row-pill,
  .drive-picker__mode-option .drive-picker__row-pill {
    grid-column: 2;
    justify-self: start;
  }
}

.scoping-tree__module-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.65rem;
  padding: 0.65rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.02);
}

.scoping-tree__module-tabs,
.scoping-tree__quick-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.scoping-tree__module-tab,
.scoping-tree__priority-btn,
.scoping-tree__select-all,
.scoping-tree__deselect-all {
  padding: 0.32rem 0.7rem;
  font-size: 0.75rem;
}

.scoping-tree__module-tab--active {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.14);
  color: var(--text-primary);
}

/* --- Workspace Login Gate & Header User Badge --- */
.v2-login-gate[hidden],
.v2-tool-workspace[hidden],
.header-user-badge[hidden],
#v2-login-error[hidden] {
  display: none !important;
}

.v2-tool-workspace {
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
}

.header-user-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.68rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 9999px;
  white-space: nowrap;
}

html[data-theme="light"] .header-user-badge {
  color: #0284c7;
  background: rgba(2, 132, 199, 0.1);
  border-color: rgba(2, 132, 199, 0.28);
}

#header-auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.8rem;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

#header-auth-btn:hover {
  background: var(--bg-hover);
  border-color: var(--border-hover);
}

html[data-theme="light"] #header-auth-btn {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
}

html[data-theme="light"] #header-auth-btn:hover {
  background: #f1f5f9;
}

.v2-login-gate {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3.5rem 1.25rem;
  min-height: calc(100vh - 12rem);
}

.v2-login-card {
  width: 100%;
  max-width: 28rem;
  padding: 2.25rem 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

html[data-theme="light"] .v2-login-card {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.v2-login-card__header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: center;
  align-items: center;
}

.v2-login-card__header .site-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 9999px;
}

html[data-theme="light"] .v2-login-card__header .site-hero__eyebrow {
  color: #0284c7;
  background: rgba(2, 132, 199, 0.1);
  border-color: rgba(2, 132, 199, 0.25);
}

.v2-login-card__title {
  margin: 0.25rem 0 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.v2-login-card__subtitle {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

#v2-login-error,
.v2-login-card .alert-danger {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
  font-size: 0.84rem;
  font-weight: 500;
  text-align: center;
}

html[data-theme="light"] #v2-login-error,
html[data-theme="light"] .v2-login-card .alert-danger {
  color: #b91c1c;
  background: #fef2f2;
  border-color: #fecaca;
}

.v2-login-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.v2-login-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.v2-login-field label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
}

.v2-login-field input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

html[data-theme="light"] .v2-login-field input {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}

.v2-login-field input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.v2-login-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.72rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--accent-blue) 80%, var(--border-color));
  background: var(--accent-blue);
  color: #ffffff;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.v2-login-submit:hover:not(:disabled) {
  background: var(--accent-blue-hover);
}

.v2-login-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

