/* Station Flow MVP - Phantom Theme */

* {
  box-sizing: border-box;
}

/* Custom scrollbar styling for queue - thin and dark */
#queue::-webkit-scrollbar {
  width: 6px;
}

#queue::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

#queue::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

#queue::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

#queue {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) rgba(255, 255, 255, 0.05);
}

body {
  font-family: var(--font-sans);
  margin: 0;
  background: #000000;
  color: #ffffff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

header {
  padding: 20px 24px;
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  position: sticky;
  top: 0;
  z-index: 100;
}

h1 {
  font-size: 20px;
  margin: 0;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: #ffffff;
}

.wrap {
  padding: 20px;
}

/* Cards and Layout */
.card {
  background: linear-gradient(135deg, rgba(15, 15, 15, 0.9) 0%, rgba(10, 10, 10, 0.9) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.8);
  border-color: rgba(255, 255, 255, 0.12);
}

.card h2 {
  margin: 0 0 14px 0;
  font-size: 16px;
  color: #ffffff;
  font-weight: 600;
}

/* Form Elements */
input,
select,
button {
  padding: 12px 16px;
  background: rgba(15, 15, 15, 0.8);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  font-size: 14px;
  transition: border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

input:focus,
select:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(20, 20, 20, 0.9);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
}

input:hover,
select:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

/* Custom select arrow */
select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* Custom checkboxes */
input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-default);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  position: relative;
  transition: background 0.15s var(--ease-default), border-color 0.15s var(--ease-default);
  flex-shrink: 0;
}

input[type="checkbox"]:hover {
  border-color: var(--border-hover);
}

input[type="checkbox"]:checked {
  background: var(--status-ok);
  border-color: var(--status-ok);
}

input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 45%;
  width: 5px;
  height: 10px;
  border: solid #000;
  border-width: 0 2px 2px 0;
  transform: translate(-50%, -50%) rotate(45deg);
}

input[type="checkbox"]:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Buttons */
button {
  cursor: pointer;
  font-weight: 500;
  position: relative;
  overflow: hidden;
}

button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

button:active::before {
  width: 300px;
  height: 300px;
}

button:hover {
  background: rgba(25, 25, 25, 0.9);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

button.primary {
  background: linear-gradient(135deg, #ffffff 0%, #e5e5e5 100%);
  border-color: #ffffff;
  color: #000000;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

button.primary:hover {
  background: linear-gradient(135deg, #f5f5f5 0%, #d5d5d5 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.3);
}

button.primary:disabled {
  background: #666666;
  border-color: #666666;
  box-shadow: none;
}

/* Specialized Buttons */
.stationBtn {
  background: rgba(15, 15, 15, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  cursor: pointer;
  border-radius: 10px;
  transition: background 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stationBtn:hover {
  background: rgba(25, 25, 25, 0.9);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.stationBtn.primary {
  background: linear-gradient(135deg, #ffffff 0%, #e5e5e5 100%);
  border-color: #ffffff;
  color: #000000;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

.actuatorBtn {
  background: linear-gradient(135deg, rgba(26, 31, 46, 0.6) 0%, rgba(15, 20, 35, 0.6) 100%);
  border: 1px solid rgba(154, 171, 187, 0.15);
  color: #ffffff;
  cursor: pointer;
  border-radius: 10px;
  padding: var(--space-md) !important;
  height: 76px !important;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  position: relative;
  overflow: hidden;
}

.actuatorBtn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(154, 171, 187, 0.08) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.25s;
}

.actuatorBtn>div:first-child {
  font-weight: 700 !important;
  font-size: 16px !important;
  letter-spacing: 0.5px !important;
  color: #ffffff !important;
}

.actuatorBtn>div:last-child {
  font-size: 11px !important;
  color: #8b949e !important;
  font-weight: 500 !important;
  margin-top: 6px !important;
}

.actuatorBtn:hover {
  background: linear-gradient(135deg, rgba(154, 171, 187, 0.12) 0%, rgba(154, 171, 187, 0.06) 100%);
  border-color: rgba(154, 171, 187, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(154, 171, 187, 0.1);
}

.actuatorBtn:hover::before {
  opacity: 1;
}

.actuatorBtn.selected {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(59, 130, 246, 0.08) 100%);
  border-color: #3b82f6;
  border-width: 2px;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.25), inset 0 0 0 1px rgba(59, 130, 246, 0.3);
  transform: translateY(-2px);
}

/* Subassembly Buttons */
.subassemblyBtn {
  background: rgba(15, 15, 15, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 0;
  height: 90px;
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  cursor: pointer;
  transition: background 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.subassemblyBtn:hover {
  background: rgba(25, 25, 25, 0.9);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.subassemblyBtn:active {
  background: linear-gradient(135deg, #ffffff 0%, #e5e5e5 100%);
  border-color: #ffffff;
  color: #000000;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

/* Robot Diagram Interactions */
.robot-part {
  cursor: pointer;
  transition: fill 0.25s cubic-bezier(0.4, 0, 0.2, 1), stroke 0.25s cubic-bezier(0.4, 0, 0.2, 1), filter 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.robot-part:hover rect,
.robot-part:hover circle {
  fill: rgba(154, 171, 187, 0.6);
  stroke: #c5d5e5;
  stroke-width: 3;
  filter: drop-shadow(0 0 8px rgba(154, 171, 187, 0.6));
}

.robot-part:hover text {
  fill: #ffffff;
  font-weight: 700;
}

.robot-part:active rect,
.robot-part:active circle {
  fill: rgba(255, 255, 255, 0.9);
  stroke: #ffffff;
}

.robot-part:active text {
  fill: #000000;
}

#robotDiagram {
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

/* Robot Callout Styles */
.robot-callout {
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.robot-callout circle {
  transition: fill 0.3s cubic-bezier(0.4, 0, 0.2, 1), stroke 0.3s cubic-bezier(0.4, 0, 0.2, 1), filter 0.3s cubic-bezier(0.4, 0, 0.2, 1), r 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.robot-callout line {
  transition: stroke 0.3s cubic-bezier(0.4, 0, 0.2, 1), filter 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.robot-callout .callout-box {
  transition: fill 0.3s cubic-bezier(0.4, 0, 0.2, 1), stroke 0.3s cubic-bezier(0.4, 0, 0.2, 1), filter 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}

.robot-callout .callout-text {
  transition: fill 0.3s cubic-bezier(0.4, 0, 0.2, 1), filter 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.5px;
  fill: rgba(255, 255, 255, 0.95);
}

/* Hover Effects */
.robot-callout:hover circle {
  r: 7;
  fill: rgba(255, 140, 0, 1);
  stroke: #FF8C00;
  stroke-width: 2.5;
  filter: drop-shadow(0 0 12px rgba(255, 140, 0, 1));
}

.robot-callout:hover line {
  stroke: rgba(255, 140, 0, 0.9);
  stroke-width: 2;
  stroke-dasharray: none;
  filter: drop-shadow(0 0 6px rgba(255, 140, 0, 0.8));
}

.robot-callout:hover .callout-box {
  fill: rgba(255, 140, 0, 0.15);
  stroke: rgba(255, 140, 0, 0.9);
  stroke-width: 2;
  filter: drop-shadow(0 4px 16px rgba(255, 140, 0, 0.6));
}

.robot-callout:hover .callout-text {
  fill: rgba(255, 140, 0, 1);
  filter: drop-shadow(0 0 8px rgba(255, 140, 0, 0.7));
}

/* Active/Click Effects */
.robot-callout:active circle {
  fill: white;
  r: 6;
  filter: drop-shadow(0 0 16px white);
}

.robot-callout:active line {
  stroke: white;
  stroke-width: 2.5;
  filter: drop-shadow(0 0 10px white);
}

.robot-callout:active .callout-box {
  fill: rgba(255, 255, 255, 0.95);
  stroke: white;
  stroke-width: 2.5;
  filter: drop-shadow(0 6px 20px rgba(255, 255, 255, 0.6));
}

.robot-callout:active .callout-text {
  fill: rgba(10, 10, 15, 1);
  font-weight: 700;
}

#robotImage {
  transition: filter 0.3s;
}

/* Status and UI Elements */
.statusBadge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  border: 1px solid transparent;
  transition: background 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.statusBadge.inProgress {
  background: linear-gradient(135deg, rgba(26, 26, 58, 0.8) 0%, rgba(20, 20, 50, 0.8) 100%);
  color: #7aa3ff;
  border-color: rgba(122, 163, 255, 0.2);
}

.statusBadge.completed {
  background: linear-gradient(135deg, rgba(0, 40, 50, 0.8) 0%, rgba(0, 30, 40, 0.8) 100%);
  color: var(--status-ok);
  border-color: rgba(0, 229, 255, 0.2);
}

.statusBadge.failed {
  background: linear-gradient(135deg, rgba(58, 26, 26, 0.8) 0%, rgba(50, 20, 20, 0.8) 100%);
  color: #ff6666;
  border-color: rgba(255, 102, 102, 0.2);
}

.pill {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(15, 15, 15, 0.8);
  transition: border-color 0.3s, transform 0.3s;
}

.pill:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.statusDot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: var(--space-sm);
  box-shadow: 0 0 8px currentColor;
  animation: pulse 2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.6;
  }
}

/* Tabs */
.tab-container {
  margin-bottom: var(--space-lg);
}

.tab-nav {
  display: flex;
  background: rgba(10, 10, 10, 0.6);
  border-radius: 12px;
  padding: 6px;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.tab-button {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 12px 24px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.tab-button::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: #ffffff;
  transform: translateX(-50%);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab-button:hover {
  background: rgba(25, 25, 25, 0.6);
  color: #ffffff;
}

.tab-button.active {
  background: linear-gradient(135deg, #ffffff 0%, #e5e5e5 100%);
  color: #000000;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15);
}

.tab-content {
  display: none;
  animation: fadeIn 0.4s ease-in-out;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Queues and Grids */
.queue {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-md);
}

.unitCard {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(135deg, rgba(15, 15, 15, 0.9) 0%, rgba(10, 10, 10, 0.9) 100%);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
  height: fit-content;
  align-self: start;
}

.unitCard::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.unitCard:hover {
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

.unitCard:hover::before {
  opacity: 1;
}

/* Sections and Lists */
.section {
  margin-top: var(--space-lg);
}

.section h3 {
  margin: 10px 0;
  font-size: 15px;
  color: #ffffff;
  font-weight: 600;
  letter-spacing: 0.3px;
}

ul.checklist {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

ul.checklist li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 14px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.2s, padding-left 0.2s, margin-left 0.2s;
}

ul.checklist li:hover {
  background: rgba(255, 255, 255, 0.02);
  padding-left: var(--space-sm);
  margin-left: -8px;
  border-radius: 8px;
}

/* Checklist Items (for subassembly station) */
.checklistItems {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: var(--space-md);
}

.checkItem {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  font-size: 14px;
  color: #ffffff;
  min-height: 44px;
}

.checkItem:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}

.checkItem input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  flex-shrink: 0;
}

.checkItem span {
  flex: 1;
  user-select: none;
}

.legend {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 14px;
  padding: 10px 0;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: var(--space-sm);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Footer and Actions */
.stickyfooter {
  margin-top: var(--space-md);
  display: flex;
  gap: 12px;
  align-items: center;
}

/* Form Elements */
.formRow {
  margin-bottom: 14px;
}

.formRow label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Modals */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.9);
  z-index: 50;
  backdrop-filter: blur(8px);
  animation: modalFadeIn 0.3s ease-out;
  overflow-y: auto;
  padding: 20px;
}

.modal.active {
  display: flex;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modalCard,
.modal-content {
  background: linear-gradient(135deg, rgba(15, 15, 15, 0.95) 0%, rgba(10, 10, 10, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 28px;
  width: min(460px, 92vw);
  max-width: 600px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(20px);
  animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  margin: auto;
}

.modalCard::-webkit-scrollbar {
  width: 8px;
}

.modalCard::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

.modalCard::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
}

.modalCard::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.modalCard::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

@keyframes modalSlideIn {
  from {
    transform: translateY(-20px) scale(0.95);
    opacity: 0;
  }

  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.modalCard h3 {
  margin: 0 0 var(--space-md) 0;
  font-size: 19px;
  color: #ffffff;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.modalRow {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
}

.modalRow input {
  flex: 1;
}

.modalActions {
  margin-top: var(--space-lg);
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* Work Instructions Modal */
.work-instruction-modal {
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
}

.work-instruction-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: var(--space-md);
  margin-bottom: var(--space-lg);
}

.work-instruction-header h2 {
  margin: 0 0 12px 0;
  color: #ffffff;
  font-size: 24px;
}

.instruction-meta {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.instruction-meta .pill {
  background: rgba(154, 171, 187, 0.2);
  color: var(--text-accent);
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
}

.step-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
  padding: 12px;
  background: rgba(15, 15, 15, 0.6);
  border-radius: 8px;
}

.nav-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: var(--space-sm) var(--space-md);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.nav-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

.nav-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.step-indicator {
  font-weight: 600;
  color: var(--text-accent);
}

.step-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

@media (max-width: 768px) {
  .step-content {
    grid-template-columns: 1fr;
  }
}

.step-image {
  background: rgba(15, 15, 15, 0.6);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 250px;
}

.step-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.step-details h3 {
  margin: 0 0 12px 0;
  color: #ffffff;
  font-size: 18px;
}

.step-description {
  color: #cccccc;
  margin-bottom: 20px;
  line-height: 1.5;
}

.step-checklist h4,
.critical-notes h4 {
  margin: 0 0 var(--space-sm) 0;
  color: var(--text-accent);
  font-size: 14px;
  font-weight: 600;
}

.step-checklist ul,
.critical-notes ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.step-checklist li {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.step-checklist li:last-child {
  border-bottom: none;
}

.step-checklist input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

.step-checklist label {
  color: #cccccc;
  font-size: 14px;
  cursor: pointer;
  flex: 1;
}

.critical-notes {
  margin-top: var(--space-md);
  padding: 12px;
  background: rgba(255, 193, 7, 0.1);
  border: 1px solid rgba(255, 193, 7, 0.3);
  border-radius: 6px;
}

.critical-notes li {
  color: #ffc107;
  margin-bottom: var(--space-xs);
  font-size: 13px;
}

.time-estimate {
  margin-top: var(--space-md);
  color: var(--text-muted);
}

.instruction-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding-top: var(--space-md);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Utility Classes */
.small {
  font-size: 13px;
  color: var(--text-muted);
}