/* Branch Portal v2 - Minimal Light Theme with Dark Mode */

/* Import design tokens - all colors, spacing, typography defined there */
@import url('tokens.css');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

a {
  color: inherit;
  text-decoration: none;
}

body {
  font-family: var(--font-family);
  background: var(--color-white);
  color: var(--color-black);
  min-height: 100vh;
  line-height: 1.5;
}

/* ============ Header ============ */

header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-color);
  background: var(--color-white);
  position: sticky;
  top: 0;
  z-index: 100;
  mix-blend-mode: difference;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-left .logo {
  font-family: 'Inter Display', 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #fff;
}

.theme-toggle {
  background: transparent;
  border: 1px solid var(--color-black);
  color: var(--color-black);
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font-family);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-wide);
  transition: all 0.2s;
  border-radius: 0;
}

.theme-toggle:hover {
  background: var(--color-black);
  color: var(--color-white);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-info {
  font-size: 13px;
  color: var(--color-gray-500);
}

/* ============ Badges ============ */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-wide);
}

.role-admin {
  background: var(--color-black);
  color: var(--color-white);
}

.role-client {
  background: var(--color-gray-100);
  color: var(--color-gray-500);
  border: 1px solid var(--border-color);
}

/* ============ Buttons ============ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  border-radius: 0;
}

.btn-primary {
  background: var(--color-black);
  color: var(--color-white);
}

.btn-primary:hover {
  background: var(--color-gray-600);
}

.btn-secondary {
  background: var(--color-white);
  color: var(--color-black);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--color-gray-50);
  border-color: var(--color-gray-300);
}

.btn-small {
  padding: 6px 12px;
  font-size: 11px;
}

/* ============ Main Content ============ */

main {
  padding: 24px;
  max-width: 1200px;
  margin: 0 auto;
  background: var(--color-white);
}

/* ============ Breadcrumbs ============ */

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-wide);
}

.breadcrumb-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb-item {
  color: var(--color-gray-400);
  transition: color 0.15s;
}

a.breadcrumb-item:hover {
  color: var(--color-gray-600);
}

.breadcrumb-item.active {
  color: var(--color-black);
}

.breadcrumb-separator {
  color: var(--color-gray-300);
}

/* ============ Flash Messages ============ */

.flash-messages {
  margin-bottom: 24px;
}

.flash {
  padding: 12px 16px;
  margin-bottom: 8px;
  font-size: 13px;
  border-radius: 0;
}

.flash-error {
  background: rgba(220, 38, 38, 0.08);
  color: var(--color-accent-red);
  border: 1px solid rgba(220, 38, 38, 0.2);
}

.flash-success {
  background: rgba(22, 163, 74, 0.08);
  color: var(--color-accent-green);
  border: 1px solid rgba(22, 163, 74, 0.2);
}

/* ============ Page Headers ============ */

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.page-title {
  font-size: 24px;
  font-weight: 500;
  letter-spacing: var(--letter-spacing-tight);
}

.page-subtitle {
  font-size: 13px;
  color: var(--color-gray-500);
  margin-top: 4px;
}

/* ============ List Layout ============ */

.list-container {
  border: 1px solid var(--border-color);
}

.list-header {
  display: flex;
  padding: 12px 16px;
  background: var(--color-gray-50);
  border-bottom: 1px solid var(--border-color);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-wide);
  color: var(--color-gray-400);
}

.list-row {
  display: flex;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  color: var(--color-black);
  text-decoration: none;
  transition: background 0.15s;
}

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

.list-row:hover {
  background: var(--color-gray-50);
}

.list-row-add {
  cursor: pointer;
  border-top: 1px solid var(--border-color);
}

.list-row-add .add-row-text {
  color: var(--color-gray-400);
  font-weight: 400;
}

.list-row-add:hover .add-row-text {
  color: var(--color-gray-600);
}

.list-row-input {
  border-top: 1px solid var(--border-color);
  background: var(--color-gray-50);
}

.list-col {
  display: flex;
  align-items: center;
}

.list-col-name {
  flex: 1;
  font-weight: 500;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.list-col-description {
  font-size: 12px;
  font-weight: 400;
  color: var(--color-gray-500);
}

.list-col-count,
.list-col-status {
  width: 80px;
  justify-content: flex-end;
  color: var(--color-gray-400);
  font-size: 13px;
}

/* ============ Inline Input ============ */

.inline-input {
  width: 100%;
  padding: 8px 12px;
  font-size: 14px;
  font-family: inherit;
  background: var(--color-white);
  border: 1px solid var(--border-color);
  color: var(--color-black);
  border-radius: 0;
}

.inline-input:focus {
  outline: none;
  border-color: var(--color-gray-400);
}

.inline-input::placeholder {
  color: var(--color-gray-400);
}

/* ============ Forms ============ */

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-wide);
  color: var(--color-gray-400);
  margin-bottom: 8px;
}

.form-label .required {
  color: var(--color-accent-orange);
}

.form-input {
  width: 100%;
  padding: 12px 14px;
  font-size: 14px;
  font-family: inherit;
  background: var(--color-white);
  border: 1px solid var(--border-color);
  color: var(--color-black);
  transition: border-color 0.15s;
  border-radius: 0;
}

.form-input:focus {
  outline: none;
  border-color: var(--color-gray-400);
}

.form-input::placeholder {
  color: var(--color-gray-400);
}

/* Autofill styles */
.form-input:-webkit-autofill,
.form-input:-webkit-autofill:hover,
.form-input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px var(--color-white) inset !important;
  -webkit-text-fill-color: var(--color-black) !important;
  border: 1px solid var(--border-color) !important;
}

/* ============ Empty State ============ */

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--color-gray-400);
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.empty-state-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--color-gray-500);
  margin-bottom: 8px;
}

.empty-state-text {
  font-size: 13px;
  max-width: 400px;
  margin: 0 auto;
}

/* ============ Login Page ============ */

.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-gray-50);
}

.login-card {
  background: var(--color-white);
  padding: 36px;
  width: 100%;
  max-width: 360px;
  border: 1px solid var(--border-color);
}

.login-title {
  font-size: 24px;
  font-weight: 500;
  letter-spacing: var(--letter-spacing-tight);
  margin-bottom: 8px;
  color: var(--color-black);
}

.login-subtitle {
  font-size: 13px;
  color: var(--color-gray-500);
  line-height: 1.5;
  margin-bottom: 28px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.login-form .form-group {
  margin-bottom: 0;
}

.login-form .btn {
  width: 100%;
  margin-top: 12px;
  padding: 14px 20px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: var(--letter-spacing-wide);
  text-transform: uppercase;
}

/* ============ Project Placeholder ============ */

.project-placeholder {
  border: 1px solid var(--border-color);
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============ Minimal Button ============ */
/* No outlines, subtle hover/selection. Uses CSS variables for theme support. */

.btn-minimal {
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-wide);
  font-family: var(--font-family);
  background: transparent;
  border: none;
  border-radius: 0;
  outline: none;
  color: var(--btn-minimal-text);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.btn-minimal:hover {
  background: var(--btn-minimal-hover-bg);
  color: var(--btn-minimal-hover-text);
}

.btn-minimal.active {
  background: var(--btn-minimal-active-bg);
  color: var(--btn-minimal-active-text);
}

/* ============ View Mode Switch ============ */

.view-mode-switch {
  display: flex;
  gap: 0;
}

.view-mode-btn {
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-wide);
  font-family: var(--font-family);
  background: transparent;
  border: none;
  border-radius: 0;
  outline: none;
  color: var(--btn-minimal-text);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.view-mode-btn:hover {
  background: var(--btn-minimal-hover-bg);
  color: var(--btn-minimal-hover-text);
}

.view-mode-btn.active {
  background: var(--btn-minimal-active-bg);
  color: var(--btn-minimal-active-text);
}

/* ============ Utilities ============ */

.mb-4 { margin-bottom: 16px; }

/* ============ Spreadsheet-Minimal List ============ */

.spreadsheet-container {
  width: 100%;
}

.spreadsheet-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.spreadsheet-title {
  font-size: 24px;
  font-weight: 500;
  letter-spacing: var(--letter-spacing-tight);
}

/* Filter Group - Pill/Tab Style */
.filter-group {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
}

.filter-radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.filter-label {
  padding: 6px 14px;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-wide);
  color: var(--text-muted);
  cursor: pointer;
  border: 1px solid var(--border-color-light);
  border-right: none;
  background: var(--bg-primary);
  transition: all 0.15s;
}

.filter-label:first-of-type {
  border-radius: 0;
}

.filter-label:last-of-type {
  border-right: 1px solid var(--border-color-light);
  border-radius: 0;
}

.filter-label:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

/* Note: checked state styling moved to container-based selectors below for CSS-only filtering */

/* Spreadsheet List Container */
.spreadsheet-list {
  width: 100%;
}

/* Spreadsheet Row */
.spreadsheet-row {
  display: flex;
  align-items: center;
  padding: 14px 0;
  min-height: 56px;
  border-bottom: 1px solid var(--border-color-light);
  text-decoration: none;
  color: var(--text-primary);
  transition: background 0.1s;
}

.spreadsheet-row:hover {
  background: var(--bg-secondary);
}

.project-row {
  cursor: pointer;
}

/* Header Row */
.spreadsheet-row-header {
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-wide);
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color-light);
  padding: 8px 0;
}

.spreadsheet-row-header:hover {
  background: transparent;
}

/* Empty State Row */
.spreadsheet-row-empty {
  justify-content: center;
  padding: 48px 0;
  color: var(--text-muted);
}

.empty-message {
  font-size: 13px;
}

/* Add Row */
.spreadsheet-row-add {
  cursor: pointer;
  border-bottom: none;
  min-height: auto;
  padding: 6px 0;
}

.spreadsheet-row-add .add-row-text {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 12px;
}

.spreadsheet-row-add:hover .add-row-text {
  color: var(--text-primary);
}

/* Input Row */
.spreadsheet-row-input {
  background: var(--bg-secondary);
  border-bottom: none;
}

/* Spreadsheet Columns */
.spreadsheet-col {
  display: flex;
  align-items: center;
}

.spreadsheet-col-name {
  flex: 1;
  min-width: 200px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  text-decoration: none;
  color: inherit;
}

.spreadsheet-col-name-single {
  justify-content: center;
}

.project-name {
  font-weight: 500;
  font-size: 14px;
  line-height: 1.3;
}

.project-description {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.3;
}

.spreadsheet-col-created {
  width: 120px;
}

.project-row .spreadsheet-col-created {
  font-size: 13px;
  color: var(--text-secondary);
  text-align: right;
}

.spreadsheet-col-progress {
  width: 140px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.spreadsheet-col-status {
  width: 100px;
  justify-content: flex-end;
}

.spreadsheet-col-projects {
  width: 80px;
  font-size: 13px;
  color: var(--text-secondary);
}

.spreadsheet-col-entries {
  width: 80px;
  font-size: 13px;
  color: var(--text-secondary);
  text-align: right;
}

/* Right-align header text for numeric columns */
.spreadsheet-row-header .spreadsheet-col-created,
.spreadsheet-row-header .spreadsheet-col-entries {
  text-align: right;
}

/* Progress bar in client project list */
.progress-bar {
  flex: 1;
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: 3px;
  overflow: hidden;
  max-width: 80px;
}

.progress-fill {
  height: 100%;
  background: #4CAF50;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.progress-text {
  font-size: 12px;
  color: var(--text-secondary);
  min-width: 32px;
  text-align: right;
}

.spreadsheet-col-actions {
  width: 40px;
  justify-content: flex-end;
  position: relative;
}

/* Actions Button */
.actions-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.actions-btn:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

/* Actions Menu */
.actions-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--bg-primary);
  border: 1px solid var(--border-color-light);
  min-width: 140px;
  z-index: 100;
  display: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.actions-menu.show {
  display: block;
}

.actions-menu-item {
  display: block;
  width: 100%;
  padding: 10px 14px;
  font-size: 13px;
  text-align: left;
  background: transparent;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.1s;
}

.actions-menu-item:hover {
  background: var(--bg-secondary);
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  width: 100%;
  max-width: 400px;
  padding: 24px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-title {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: var(--letter-spacing-tight);
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 20px;
}

.modal-actions-split {
  justify-content: space-between;
}

.modal-actions-right {
  display: flex;
  gap: 8px;
}

.modal-content-small {
  max-width: 360px;
}

.modal-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 8px;
}

/* Danger Buttons */
.btn-danger {
  background: var(--color-accent-red);
  color: white;
  border: none;
}

.btn-danger:hover {
  background: #b91c1c;
}

.btn-danger-text {
  background: transparent;
  color: var(--color-accent-red);
  border: none;
  padding-left: 0;
}

.btn-danger-text:hover {
  color: #b91c1c;
}

/* Progress Bar */
.progress-bar {
  flex: 1;
  height: 4px;
  background: var(--border-color-light);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--color-accent-green);
  transition: width 0.3s ease;
}

.progress-text {
  font-size: 12px;
  color: var(--text-muted);
  min-width: 32px;
  text-align: right;
}

.progress-text-empty {
  flex: 1;
  text-align: center;
}

/* Status Badges */
.status-badge {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.status-complete {
  color: var(--color-accent-green);
}

.status-in-progress {
  color: var(--text-muted);
}

.status-blocked {
  color: var(--color-accent-red);
}

/* CSS-only Filter Logic */
/* Filters are inside .spreadsheet-container as siblings of .filter-group and .spreadsheet-list */
.spreadsheet-container #filter-in-progress:checked ~ .spreadsheet-list .project-row:not([data-status="in-progress"]) {
  display: none;
}

.spreadsheet-container #filter-complete:checked ~ .spreadsheet-list .project-row:not([data-status="complete"]) {
  display: none;
}

.spreadsheet-container #filter-blocked:checked ~ .spreadsheet-list .project-row:not([data-status="blocked"]) {
  display: none;
}

/* Filter radio checked state - need to target via container */
.spreadsheet-container #filter-all:checked ~ .filter-group label[for="filter-all"],
.spreadsheet-container #filter-in-progress:checked ~ .filter-group label[for="filter-in-progress"],
.spreadsheet-container #filter-complete:checked ~ .filter-group label[for="filter-complete"],
.spreadsheet-container #filter-blocked:checked ~ .filter-group label[for="filter-blocked"] {
  background: var(--text-primary);
  color: var(--bg-primary);
  border-color: var(--text-primary);
}

/* ============================================
   CLIENT SPREADSHEET VIEW
   Compact spreadsheet-style layout for clients
   ============================================ */

/* Container - hidden by default, shown only in client mode */
.client-spreadsheet-view {
  display: none;
  padding: 0 24px 24px 24px;
  position: relative;
  min-height: 300px;
}

body.client-mode .client-spreadsheet-view {
  display: block;
}

body.client-mode .canvas-container {
  display: none;
}

/* Spreadsheet list container */
.client-spreadsheet-list {
  width: 100%;
}

/* Header row */
.client-spreadsheet-header {
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-bottom: 2px solid var(--border-color);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-wide);
  color: var(--text-muted);
}

/* Flow group - groups all rows for one flow */
.client-flow-group {
  border-bottom: 1px solid var(--border-color);
}

.client-flow-group:last-child {
  border-bottom: none;
}

/* Flow group status colors based on aggregate QA status */
.client-flow-group[data-status="rejected"] {
  background: #f8d6d6;
}

.client-flow-group[data-status="approved"] {
  background: #d6f8df;
}

.client-flow-group[data-status="ready"] {
  background: #d6edf8;
}

.client-flow-group[data-status="pending"] {
  background: transparent;
}

/* Foldable Flow Header */
.client-flow-header {
  display: flex;
  align-items: center;
  padding: 12px 0;
  cursor: pointer;
  user-select: none;
  border-bottom: 1px solid var(--border-color-light);
}

.client-flow-header:hover {
  background: var(--bg-secondary);
}

.client-flow-toggle {
  display: inline-block;
  font-size: 12px;
  color: var(--text-muted);
  transition: transform 0.2s ease;
  cursor: pointer;
}

/* Arrow points down (rotated 90deg) when expanded */
.client-flow-group.expanded .client-flow-toggle {
  transform: rotate(90deg);
}

/* Arrow points right (no rotation) when collapsed */
.client-flow-group.collapsed .client-flow-toggle {
  transform: rotate(0deg);
}

.client-flow-name {
  font-weight: 500;
  font-size: 14px;
}

.client-flow-content {
  overflow: hidden;
  max-height: 2000px;
  transition: max-height 0.3s ease;
}

.client-flow-group.collapsed .client-flow-content {
  max-height: 0;
}

/* Sub-rows show row letter (A, B, C) - indent to align with main row text */
/* Sub-row names - no special offset needed now that toggle is in its own column */

/* Individual row within a flow */
.client-spreadsheet-row {
  display: flex;
  align-items: center;
  padding: 8px 0;
  min-height: 56px;
  border-bottom: 1px solid var(--border-color-light);
}

/* Main row - lighter background, clickable */
.client-spreadsheet-row.main-row {
  background: var(--bg-secondary);
  cursor: pointer;
}

.client-spreadsheet-row.main-row:hover {
  background: var(--bg-tertiary);
}

/* Sub-row styling */
.client-spreadsheet-row.sub-row {
  background: var(--bg-primary);
}

.client-spreadsheet-row:last-child {
  border-bottom: none;
}

/* Column: Toggle (expand/collapse arrow) */
.client-col-toggle {
  flex: 0 0 32px;
  min-width: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.client-spreadsheet-header .client-col-toggle {
  cursor: pointer;
}

.client-spreadsheet-header .client-col-toggle:hover .client-flow-toggle {
  color: var(--text-primary);
}

/* Header toggle - default expanded state (rotated 90deg) */
.client-spreadsheet-header .client-flow-toggle {
  transform: rotate(90deg);
}

/* Toggle all arrow in header - collapsed state (pointing right) */
.client-col-toggle.collapsed .client-flow-toggle,
.client-spreadsheet-header .client-col-toggle.collapsed .client-flow-toggle {
  transform: rotate(0deg);
}

/* Column: Row number */
.client-col-num {
  flex: 0 0 40px;
  min-width: 40px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Column: Name (flow identifier from Input node) */
.client-col-name {
  flex: 1;
  min-width: 150px;
  font-weight: 400;
  font-size: 13px;
  color: var(--text-muted);
  padding-right: 24px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: flex;
  align-items: center;
}

/* Flow header name column shows toggle + name */
.client-flow-header .client-col-name {
  visibility: visible;
}

/* Column: Input */
.client-col-input {
  flex: 0 0 180px;
  min-width: 180px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 16px;
}

.client-input-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border: none;
  flex-shrink: 0;
}

/* Column: QA */
.client-col-qa {
  flex: 0 0 120px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
}

/* Column: Download */
.client-col-download {
  flex: 0 0 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
}

/* Download all button in flow header */
.client-download-all {
  background: #7ee4ad;
}

.client-download-all:hover:not(:disabled) {
  background: #388E3C;
}

/* QA thumbnail - small clickable preview */
.client-qa-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  cursor: pointer;
  border: none;
  transition: transform 0.15s;
}

.client-qa-thumb:hover {
  transform: scale(1.05);
}

/* QA status badge */
.client-qa-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  font-size: 14px;
  border-radius: 50%;
}

.client-qa-status.pending {
  background: var(--bg-tertiary);
  color: var(--text-muted);
}

.client-qa-status.approved {
  background: rgba(22, 163, 74, 0.15);
  color: var(--color-accent-green);
}

.client-qa-status.rejected {
  background: rgba(220, 38, 38, 0.15);
  color: var(--color-accent-red);
}

/* Download button */
.client-download-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid var(--color-gray-300);
  border-radius: 3px;
  cursor: pointer;
  color: var(--color-gray-400);
  font-size: 14px;
  transition: background 0.15s, border-color 0.15s;
}

.client-download-btn:hover:not(:disabled) {
  background: transparent;
  border-color: var(--color-gray-400);
}

.client-download-btn:disabled {
  background: transparent;
  border: 1px solid var(--color-gray-300);
  color: var(--color-gray-400);
  cursor: default;
}

.client-download-btn.can-download {
  background: #34d399;
  border-color: #34d399;
  color: white;
}

.client-download-btn.can-download:hover {
  background: #6ee7b7;
  border-color: #6ee7b7;
}

.client-download-btn.downloaded {
  background: #34d399;
  border-color: #34d399;
  color: white;
}

.client-download-btn.downloaded:hover {
  background: #6ee7b7;
  border-color: #6ee7b7;
}

.client-download-btn .client-output-spinner {
  width: 14px;
  height: 14px;
}

/* Empty state when no flows exist */
.client-spreadsheet-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  font-size: 14px;
}

/* No visible items message */
.client-no-visible {
  color: var(--text-muted);
  font-size: 13px;
  font-style: italic;
}

/* Row status styling based on QA status */
.client-spreadsheet-row[data-status="approved"] {
  background: rgba(22, 163, 74, 0.05);
}

.client-spreadsheet-row[data-status="rejected"] {
  background: rgba(220, 38, 38, 0.05);
}

.client-spreadsheet-row[data-status="pending"] {
  background: transparent;
}

/* Progress Overview */
.client-progress-overview {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px 0;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--border-color);
}

.client-progress-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.client-progress-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.client-progress-counts {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.client-progress-counts .count-approved {
  color: var(--color-accent-green);
}

.client-progress-counts .count-rejected {
  color: var(--color-accent-red);
}

.client-progress-counts .count-ready {
  color: #1E88E5;
}

.client-progress-counts .count-pending {
  color: var(--text-muted);
}

.client-progress-counts .count-separator {
  color: var(--text-muted);
}

.client-progress-bar-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.client-progress-bar {
  flex: 1;
  height: 8px;
  background: var(--border-color-light);
  border-radius: 4px;
  overflow: hidden;
}

.client-progress-fill {
  height: 100%;
  background: var(--color-accent-green);
  transition: width 0.3s ease;
}

.client-progress-percent {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  min-width: 40px;
  text-align: right;
}

/* Date Column */
.client-col-date {
  flex: 0 0 100px;
  font-size: 13px;
  color: var(--text-muted);
  padding: 0 8px;
}

/* Status Column */
.client-col-status {
  flex: 0 0 100px;
  padding: 0 8px;
}

.client-status-text {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.client-status-text.status-approved {
  color: var(--color-accent-green);
}

.client-status-text.status-rejected {
  color: var(--color-accent-red);
}

.client-status-text.status-pending {
  color: var(--text-muted);
}

/* Row status for ready (blue) */
.client-spreadsheet-row[data-status="ready"] {
  background: rgba(30, 136, 229, 0.05);
}

/* Review Column */
.client-col-review {
  flex: 1;
  padding: 0 24px;
}

/* Clickable Review Box */
.client-review-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 28px;
  border: none;
  border-radius: 0;
  background: var(--color-status-waiting);
  cursor: pointer;
  transition: background 0.15s;
  color: #ffffff;
}

.client-review-box:hover {
  background: var(--color-status-waiting-hover);
}

/* Review box status variants - filled style */
.client-review-box.status-approved {
  background: #34d399;
  border: none;
  border-radius: 3px;
  cursor: default;
}

.client-review-box.status-approved:hover {
  background: #34d399;
}

.client-review-box.status-rejected {
  background: #f87171;
  border: none;
  border-radius: 3px;
}

.client-review-box.status-rejected:hover {
  background: #fca5a5;
}

.client-review-box.status-ready {
  background: #60a5fa;
  border: none;
  border-radius: 3px;
}

.client-review-box.status-ready:hover {
  background: #93c5fd;
}

.client-review-box.status-pending {
  background: transparent;
  border: 1px solid var(--color-gray-300);
  border-radius: 3px;
  cursor: default;
  pointer-events: none;
}

/* Thumbnail inside review box */
.client-review-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
}

/* Status text inside review box */
.client-review-status {
  font-size: 10px;
  font-weight: 600;
  text-transform: lowercase;
  letter-spacing: 0.03em;
  color: #ffffff;
}

.client-review-box.status-approved .client-review-status,
.client-review-box.status-rejected .client-review-status,
.client-review-box.status-ready .client-review-status {
  color: #ffffff;
}

.client-review-box.status-pending .client-review-status {
  color: var(--color-gray-400);
}

/* ============================================
   PROJECT PAGE WIDTH MODES
   Full width for developer/operator, constrained for client
   ============================================ */

/* All modes: consistent max-width */
body.developer-mode main,
body.operator-mode main,
body.client-mode main {
  max-width: 1500px;
}

/* ============================================
   CLIENT MODE BREADCRUMB HIDING
   Hide the "Clients" link and its separator in client mode
   ============================================ */

body.client-mode .breadcrumb-dashboard {
  display: none;
}

body.client-mode .breadcrumb-dashboard + .breadcrumb-separator {
  display: none;
}

/* ============================================
   TEMPLATE COLUMN HEADERS
   Editable column names above template slots
   ============================================ */

.template-column-headers {
  display: flex;
  gap: 8px; /* Match swim-lane-slots gap */
  padding: 8px 0;
  margin-left: 180px; /* Align with slots (matching swim-lane-header width) */
}

.template-col-header {
  flex: 0 0 80px; /* Match slot width */
  text-align: center;
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.15s;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.template-col-header:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.template-col-header-input {
  width: 100%;
  padding: 2px 4px;
  font-size: 10px;
  font-weight: 500;
  font-family: inherit;
  text-align: center;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 2px;
  color: var(--text-primary);
  outline: none;
}

.template-col-header-input:focus {
  border-color: var(--color-accent-blue);
}

/* INPUT LANE - Special upstream lane */
.input-lane {
  background: var(--bg-secondary);
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 8px;
}

.input-lane .swim-lane-header {
  background: var(--bg-tertiary);
}

/* CLIENT DYNAMIC COLUMNS */
.client-col-dynamic {
  flex: 0 0 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
}

.client-col-dynamic {
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.02em;
}

.client-spreadsheet-header .client-col-dynamic {
  color: var(--text-muted);
}

.client-dynamic-thumb {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border: none;
  border-radius: 3px;
}

.client-clickable-thumb {
  cursor: pointer;
  transition: transform 0.15s;
}

.client-clickable-thumb:hover {
  transform: scale(1.05);
}

/* Pending placeholder for empty output nodes - matches thumbnail size */
.client-output-pending {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--color-gray-300);
  border-radius: 3px;
}

.client-output-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid var(--color-gray-300);
  border-top-color: var(--color-gray-400);
  border-radius: 50%;
  animation: client-spin 0.8s linear infinite;
}

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

/* Hover Preview Popup */
.hover-preview {
  position: fixed;
  z-index: 10000;
  pointer-events: none;
  opacity: 0;
  background: var(--bg-primary);
  border: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 0;
  border-radius: 6px;
}

.hover-preview.active {
  opacity: 1;
}

.hover-preview-img {
  display: block;
  max-width: 45vw;
  max-height: 50vh;
  object-fit: contain;
  border-radius: 6px;
}

.hover-preview-video {
  display: none;
  max-width: 45vw;
  max-height: 50vh;
  object-fit: contain;
  border-radius: 6px;
}

.hover-preview-text {
  display: none;
  padding: 12px 16px;
  color: var(--color-black);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
  max-width: 45vw;
  max-height: 50vh;
  overflow-y: auto;
  background: var(--bg-primary);
  border-radius: 6px;
}

.client-review-compact {
  width: 64px;
  height: 36px;
  padding: 0;
  gap: 4px;
  font-size: 9px;
  border-radius: 6px;
  text-transform: lowercase;
}

.client-output-spinner.qa-spinner {
  width: 14px;
  height: 14px;
}

.client-text-content {
  font-size: 11px;
  color: var(--text-secondary);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==========================================
   CROP NODE STYLES
   ========================================== */

.crop-ratio-selector {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.crop-ratio-option {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  background: var(--bg-secondary);
}

.crop-ratio-option:hover {
  border-color: var(--text-secondary);
}

.crop-ratio-option.selected,
.crop-ratio-option:has(input:checked) {
  border-color: var(--color-accent-blue);
  background: rgba(71, 176, 220, 0.1);
}

.crop-ratio-option input[type="radio"] {
  display: none;
}

.crop-ratio-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.crop-editor {
  position: relative;
  width: 100%;
  background: var(--bg-tertiary);
  border-radius: 8px;
  overflow: hidden;
  user-select: none;
}

.crop-source-image {
  display: block;
  width: 100%;
  max-height: 400px;
  object-fit: contain;
  pointer-events: none;
}

.crop-overlay {
  position: absolute;
  /* Dimensions set dynamically by JS to match actual image bounds */
  background: transparent;
  pointer-events: none;
  overflow: hidden;
}

.crop-box {
  position: absolute;
  background: transparent;
  border: 2px solid var(--color-accent-blue);
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
  cursor: move;
  pointer-events: auto;
}

.crop-handle {
  position: absolute;
  width: 12px;
  height: 12px;
  background: var(--color-accent-blue);
  border: 2px solid white;
  border-radius: 50%;
  pointer-events: auto;
}

.crop-handle-nw {
  top: -6px;
  left: -6px;
  cursor: nw-resize;
}

.crop-handle-ne {
  top: -6px;
  right: -6px;
  cursor: ne-resize;
}

.crop-handle-sw {
  bottom: -6px;
  left: -6px;
  cursor: sw-resize;
}

.crop-handle-se {
  bottom: -6px;
  right: -6px;
  cursor: se-resize;
}

.crop-placeholder {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* Unified layout for Crop popup (matching Touch-up pattern) */
.crop-layout {
  display: flex;
  gap: 24px;
  height: 100%;
  min-height: 400px;
}

/* Left panel - settings */
.crop-settings {
  width: 280px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
}

/* Right panel - output/editor area */
.crop-output {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-tertiary);
  border-radius: 8px;
  overflow: hidden;
  min-width: 0;
}

/* Section styling */
.crop-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.crop-section-label {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

/* Placeholder state for template view */
.crop-output.crop-output-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
}

.crop-output-placeholder-content {
  text-align: center;
  color: var(--text-muted);
}

.crop-output-placeholder-icon {
  font-size: 48px;
  opacity: 0.5;
  margin-bottom: 12px;
}

.crop-output-placeholder-text {
  font-size: 13px;
}

/* Status display in flow view */
.crop-status {
  padding: 8px 12px;
  font-size: 13px;
  border-radius: 4px;
  margin-bottom: 12px;
}

.crop-status-running {
  color: #FFA000;
  background: rgba(255, 160, 0, 0.1);
}

.crop-status-complete {
  color: #4CAF50;
  background: rgba(76, 175, 80, 0.1);
}

.crop-status-error {
  color: #E53935;
  background: rgba(229, 57, 53, 0.1);
}

/* Crop result preview */
.crop-result-container {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.crop-result-image {
  max-width: 100%;
  max-height: 200px;
  object-fit: contain;
  border-radius: 4px;
  cursor: pointer;
}

/* ============================================
   COMPOSE EDITOR
   Full-screen layer compositor editor
   ============================================ */

.compose-editor-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 2000;
}

.compose-editor-overlay.active {
  display: flex;
}

.compose-editor-layout {
  display: flex;
  width: 100%;
  height: 100%;
}

.compose-layer-panel {
  width: 220px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.compose-layer-header {
  padding: 16px;
  font-weight: 600;
  font-size: 14px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-primary);
}

.compose-layer-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.compose-layer-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  margin-bottom: 4px;
  background: var(--bg-primary);
  border-radius: 6px;
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: background 0.15s;
}

.compose-layer-item:hover {
  background: var(--bg-tertiary);
}

.compose-layer-item.active {
  border-color: var(--color-accent-blue);
  background: rgba(71, 176, 220, 0.1);
}

.compose-layer-thumb {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
  background: var(--bg-tertiary);
}

.compose-layer-info {
  flex: 1;
  min-width: 0;
}

.compose-layer-name {
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.compose-layer-type {
  font-size: 10px;
  color: var(--text-muted);
}

.compose-layer-visibility {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.15s;
}

.compose-layer-visibility:hover {
  opacity: 1;
}

.compose-layer-visibility.hidden {
  opacity: 0.3;
}

.compose-canvas-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0; /* Allow shrinking */
}

.compose-canvas-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  background: #1a1a1a;
}

#composeCanvas {
  max-width: 100%;
  max-height: 100%;
  cursor: crosshair;
  image-rendering: auto;
}

/* Old brush controls at bottom - now moved to right panel, keep for backward compat */
.compose-brush-controls {
  display: none; /* Hidden - replaced by compose-brush-panel */
}

.compose-editor-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 20px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  z-index: 10;
}

.compose-editor-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.compose-editor-hint {
  display: none; /* Hints now in brush panel */
}

/* ==========================================
   CONNECTION LINES
   ========================================== */

/* Base connection lines SVG */
.connection-lines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* When hovering a node, dim non-connected lines */
.connection-lines.node-hovered path {
  opacity: 0.1 !important;
  transition: opacity 0.15s ease, stroke 0.15s ease;
}

/* Highlight lines connected to the hovered node */
.connection-lines.node-hovered path.connected-to-hovered {
  opacity: 0.8 !important;
  stroke-width: 2.5px;
}

/* ==========================================
   GENERATOR INPUTS PREVIEW & SPLIT VIEW
   ========================================== */

/* Split view layout - inputs left, output right */
.generator-split-view {
  display: flex;
  gap: 16px;
  height: 100%;
  min-height: 300px;
}

.generator-inputs-column {
  width: 200px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.generator-output-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.generator-inputs-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.generator-inputs-images {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.generator-input-preview {
  width: 56px;
  height: 56px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
}

.generator-input-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.generator-input-preview.generator-input-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
}

.generator-input-icon {
  font-size: 20px;
  opacity: 0.5;
}

.generator-input-prompt {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  padding: 10px 12px;
  background: var(--bg-secondary);
  border-radius: 6px;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 150px;
  overflow-y: auto;
}

/* Output area */
.generator-output-textarea {
  flex: 1;
  width: 100%;
  min-height: 200px;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 13px;
  line-height: 1.6;
  resize: none;
  font-family: inherit;
}

.generator-output-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border: 2px dashed var(--border-color);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 14px;
  min-height: 200px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.generator-output-empty:hover {
  background: var(--bg-tertiary);
}

/* Generating state - purple */
.generator-output-empty.generating {
  background: #4A1A5E;
  border-color: #7B1FA2;
  color: #CE93D8;
  cursor: default;
}

.generator-output-empty.generating:hover {
  background: #4A1A5E;
}

/* Make output column clickable to close */
.generator-output-column {
  cursor: pointer;
}

/* Empty content with generate button */
.generator-empty-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.generator-run-btn {
  padding: 10px 24px;
  background: #9C27B0;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.generator-run-btn:hover {
  background: #7B1FA2;
  transform: scale(1.02);
}

.generator-run-btn:active {
  transform: scale(0.98);
}

.generator-output-status {
  padding: 16px;
  border-radius: 6px;
  text-align: center;
  font-size: 14px;
}

.generator-output-status.running {
  background: rgba(156, 39, 176, 0.1);
  color: #9C27B0;
}

.generator-output-status.error {
  background: rgba(229, 57, 53, 0.1);
  color: #E53935;
}

/* Image output split view */
.generator-split-view.generator-split-image .generator-output-column {
  position: relative;
}

.generator-split-view.generator-split-image .nb-image-container {
  flex: 1;
  min-height: 250px;
}

.generator-split-view.generator-split-image .nb-image-info {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 8px;
  text-align: center;
}

/* NanoBanana loading overlay - shown when generating with existing image */
.nb-image-container.nb-generating {
  position: relative;
}

.nb-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  border-radius: 8px;
}

.nb-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: nb-spin 0.8s linear infinite;
}

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

/* Most recently changed node highlight */
.node.last-changed {
  box-shadow: 0 0 0 2px var(--color-primary);
  z-index: 2;
  animation: lastChangedPulse 2s ease-out;
}

@keyframes lastChangedPulse {
  0% { box-shadow: 0 0 0 3px var(--color-primary); }
  100% { box-shadow: 0 0 0 2px var(--color-primary); }
}

/* Legacy single-column inputs section (if still used elsewhere) */
.generator-inputs-section {
  padding: 16px;
  background: var(--bg-secondary);
  border-radius: 8px;
  margin-bottom: 12px;
}

