    /* Стили без изменений */
    body {
      background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)),
                  url('../ed-trailblazers-keyart_1920x1080.jpg') no-repeat center center fixed;
      background-size: cover;
      color: #FFA500;
      font-family: monospace;
      padding: 2rem;
    }
    .hidden { display: none; }
    .overlay-panel {
      background-color: rgba(20,10,0,0.8);
      border: 1px solid #ff8000;
      padding: 1rem;
      margin-bottom: 1rem;
      border-radius: 0.25rem;
    }
    table {
      width: 80%;
      margin: 1rem auto;
      border-collapse: collapse;
      background-color: rgba(20,10,0,0.8);
      border: 1px solid #ff8000;
      border-radius: 0.25rem;
    }
    th, td {
      border: 1px solid #ff8000;
      padding: 0.5rem;
    }
    th {
      background: #1a1a1a;
      color: #ff9900;
      font-weight: bold;
      text-align: left;
    }
    tbody tr:nth-child(even) { background-color: rgba(17,17,17,0.8); }
    tbody tr:nth-child(odd)  { background-color: rgba(0,0,0,0.8); }
    .btn {
      background: #1f1f1f;
      color: #ffcc66;
      border: 1px solid #ffaa33;
      padding: 0.4rem 0.8rem;
      margin-right: 0.5rem;
      border-radius: 0.25rem;
      cursor: pointer;
    }
    select, input[type="number"], input[type="text"] {
      background: #1a1a1a;
      color: #FFA500;
      border: 1px solid #ff8000;
      padding: 0.4rem;
      border-radius: 0.25rem;
      width: 100%;
    }
    .spec-block {
      border-top: 1px solid #ff8000;
      border-bottom: 1px solid #ff8000;
      padding: 0.5rem 0;
      font-size: 0.9rem;
      margin-bottom: 1rem;
      width: 50%;
      margin: 0 auto;
      background-color: rgba(20,10,0,0.8);
      border-radius: 0.25rem;
    }
    .spec-line {
      display: flex;
      justify-content: space-between;
      padding: 0.2rem 0;
    }
    .spec-label { color: #FFA500; }
    .spec-value { color: #ffffff; text-align: right; }
    .carrier-row {
      display: flex;
      align-items: stretch;
      justify-content: center;
      margin-bottom: 1rem;
      border: 1px solid #ff8000;
      border-radius: 0.25rem;
      background-color: rgba(20,10,0,0.8);
    }
    .cargo-item {
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 0.5rem 1rem;
      position: relative;	  
    }
    .cargo-item:nth-child(odd) { background-color: rgba(20,10,0,0.8); }
    .cargo-item:nth-child(even) { background-color: rgba(17,17,17,0.7); }
    .cargo-item:not(:last-child) { border-right: 1px solid #ff8000; }
    .resource-done { background-color: rgba(0,128,0,0.3) !important; }
	
    .tooltip {
      position: relative;
      cursor: pointer;
      color: #ffcc66;
    }
	.tooltip:hover::after {
	  content: attr(data-tip);
	  position: absolute;
	  top: 150%;
	  left: 50%;
	  transform: translateX(-50%);
	  background: rgba(0,0,0,0.9);
	  color: #FFA500;
	  padding: 0.3rem 0.6rem;
	  border: 1px solid #ff8000;
	  border-radius: 0.25rem;
	  pointer-events: none;
	  z-index: 999;

	  white-space: normal;
	  width: 220px;
	  text-align: center;
	  word-break: break-word;
	}

	.resource-clickable {
	  text-decoration: underline dotted;
	  cursor: pointer;
	  transition: all 0.15s ease-in-out;
	}

	.resource-clickable:hover {
	  font-weight: 600;
	  color: #ffaa33; /* или какой у тебя акцентный */
	}
	
	#building-stats .spec-line:nth-child(odd) {
	  background-color: rgba(255, 165, 0, 0.05);
	}
	#building-stats .spec-line:nth-child(even) {
	  background-color: rgba(255, 165, 0, 0.1);
	}
	
	.spec-columns {
	  display: flex;
	  justify-content: space-between;
	  gap: 2rem;
	  width: 100%;
	}

	.spec-col {
	  width: 50%;
	  display: flex;
	  flex-direction: column;
	  gap: 0.25rem;
	}

	.spec-line {
	  display: flex;
	  justify-content: space-between;
	  padding: 0.2rem 0.5rem;
	  width: 100%;
	}
	  .galnet-logo {
		height: 3rem;
		margin: 0 2rem;
	  }

	  @media (max-width: 1024px) {
		.galnet-logo {
		  height: 1.5rem;
		  margin: 0 1rem;
		}
	  }
	  
	 .button-wrapper {
	  display: flex;
	  flex-wrap: wrap;
	  justify-content: flex-end;
	  margin-left: auto; /* главное! */
	  gap: 0.5rem;
	}
	.system-option {
	  padding: 0.5rem;
	  cursor: pointer;
	}

	.system-option:hover {
	  background-color: #2a2a2a;
	}
	
	input[readonly] {
	  background-color: #222 !important;
	  cursor: default;
	}
	
	.bg-gray-800 {
    background-color: #2d3748;
	}
	.cursor-not-allowed {
		cursor: not-allowed;
	}
	
	.resource-running {
	  background-color: rgba(0, 200, 255, 0.2) !important;
	}

	.complete-system {
	  background-color: rgba(0, 255, 0, 0.15);
	  border-left: 4px solid limegreen;
	}

	.cell-updated {
	  animation: flash 0.5s;
	}

	@keyframes flash {
	  from { background-color: rgba(255, 200, 0, 0.5); }
	  to   { background-color: transparent; }
	}

	.loader {
	  width: 2rem; height: 2rem;
	  border: 2px solid #f97316;
	  border-top-color: transparent;
	  border-radius: 50%;
	  animation: spin 0.8s linear infinite;
	}
	@keyframes spin { to { transform: rotate(360deg); } }
	
	@keyframes borderShimmer {
	  0% {
		border-image-source: linear-gradient(45deg, #ffa500, #ffcc00);
	  }
	  50% {
		border-image-source: linear-gradient(225deg, #ffa500, #ffcc00);
	  }
	  100% {
		border-image-source: linear-gradient(45deg, #ffa500, #ffcc00);
	  }
	}

	/* шиммер только на кнопке Sync */
	#btn-sync.sync-active {
	  border: 2px solid transparent;
	  border-image-slice: 1;
	  border-image-source: linear-gradient(45deg, #ffa500, #ffcc00);
	  animation: borderShimmer 2s linear infinite;
	  box-shadow: 0 0 8px rgba(255, 165, 0, 0.6);
	  border-radius: 6px;
	}

/* когда синк включён — димим фон/бордюр, но не текст, и блокируем клики */
body.sync-active input[data-field="required"],
body.sync-active input[data-field="available"],
body.sync-active #max-cargo-load {
  background-color: rgba(26, 26, 26, 0.6);
  border-color: #555 !important;
  pointer-events: none;
  cursor: not-allowed;
}

/* кнопки тоже димим */
body.sync-active .transfer-btn,
body.sync-active .plus-btn,
body.sync-active .btn-add-cargo,
body.sync-active .btn-add-custom {
  background-color: rgba(30, 30, 30, 0.6) !important;
  border-color: #555 !important;
  pointer-events: none;
  cursor: not-allowed;
}

/* водяной знак в полях при активном синке */
body.sync-active input[data-field="required"],
body.sync-active input[data-field="available"],
body.sync-active #max-cargo-load {
  background-image: url("data:image/svg+xml;charset=UTF-8,<svg xmlns='http://www.w3.org/2000/svg'><text x='50%' y='50%' dominant-baseline='middle' text-anchor='middle' font-family='sans-serif' font-size='14' fill='rgba(255,165,0,0.05)' font-weight='bold'>SYNC ACTIVE</text></svg>");
  background-repeat: no-repeat;
  background-position: center;
}

@keyframes blink-fill {
  0%, 100% {
    border-color: red;
    background-color: rgba(255, 0, 0, 0.2);
  }
  50% {
    border-color: transparent;
    background-color: transparent;
  }
}

.blink {
  animation: blink-fill 0.5s ease-in-out infinite;
  /* Чтобы не сбрасывать другие стили, не указываем explicit background или border */
}
