/* DarkOrbit refining/ + skylab/ look — scoped to hangar tabs */

#hangar-ores,
#hangar-skylab {
  --bg0: #02040a;
  --bg1: #050a13;
  --cyan: #00f6ff;
  --green: #00ff95;
  --red: #ff3b5c;
  --txt: #d7f1ff;
  --muted: #86a6b7;
  --stroke: rgba(0, 246, 255, 0.35);
  color: var(--txt);
  font-family: Arial, Helvetica, sans-serif;
  max-height: calc(100vh - 160px);
  overflow: auto;
  padding: 8px 4px 16px;
}

#hangar-ores .ref-shell,
#hangar-skylab .ref-shell {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
}

#hangar-ores .ref-panel,
#hangar-skylab .ref-panel {
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(10, 18, 34, 0.95), rgba(3, 6, 12, 0.98));
  box-shadow: 0 0 40px rgba(0, 246, 255, 0.16), inset 0 0 50px rgba(0, 0, 0, 0.7);
  overflow: hidden;
}

#hangar-ores .ref-topbar,
#hangar-skylab .ref-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: linear-gradient(180deg, rgba(6, 16, 28, 0.92), rgba(2, 4, 10, 0.92));
  border-bottom: 1px solid rgba(0, 246, 255, 0.22);
}

#hangar-ores .ref-title,
#hangar-skylab .ref-title {
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #baf7ff;
  text-shadow: 0 0 12px rgba(0, 246, 255, 0.35);
}

#hangar-ores .ref-subtitle,
#hangar-skylab .ref-subtitle {
  font-size: 12px;
  color: var(--muted);
}

#hangar-ores .ref-tabs {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(0, 246, 255, 0.18);
  background: rgba(1, 4, 10, 0.55);
}

#hangar-ores .ref-tab {
  flex: 1;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #8bc4d7;
  border: 1px solid rgba(0, 246, 255, 0.14);
  background: linear-gradient(180deg, rgba(4, 10, 18, 0.8), rgba(1, 3, 8, 0.9));
  transition: 0.18s;
  user-select: none;
}
#hangar-ores .ref-tab:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 246, 255, 0.35);
}
#hangar-ores .ref-tab.active {
  color: #001015;
  border-color: rgba(0, 255, 170, 0.55);
  background: linear-gradient(180deg, rgba(0, 255, 170, 0.95), rgba(0, 200, 255, 0.8));
}

#hangar-ores .ref-content,
#hangar-skylab .ref-content {
  padding: 16px;
}

#hangar-ores .section-title,
#hangar-skylab .section-title {
  margin: 10px 0;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #b9f1ff;
  text-shadow: 0 0 12px rgba(0, 246, 255, 0.2);
}

#hangar-ores .grid,
#hangar-skylab .grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
@media (max-width: 900px) {
  #hangar-ores .grid,
  #hangar-skylab .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

#hangar-ores .ore-card,
#hangar-skylab .ore-card {
  position: relative;
  border-radius: 16px;
  border: 1px solid rgba(0, 246, 255, 0.22);
  background: radial-gradient(circle at top, rgba(0, 246, 255, 0.1), rgba(0, 0, 0, 0.78));
  box-shadow: inset 0 0 35px rgba(0, 0, 0, 0.88), 0 0 18px rgba(0, 246, 255, 0.1);
  padding: 12px;
  overflow: hidden;
  transition: 0.18s;
}
#hangar-ores .ore-card:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 246, 255, 0.35);
}
#hangar-ores .ore-card.refined {
  border-color: rgba(0, 255, 150, 0.2);
  background: radial-gradient(circle at top, rgba(0, 255, 150, 0.12), rgba(0, 0, 0, 0.8));
}
#hangar-ores .ore-card.not-enough {
  border-color: rgba(255, 59, 92, 0.55);
  box-shadow: inset 0 0 35px rgba(0, 0, 0, 0.88), 0 0 22px rgba(255, 59, 92, 0.18);
}
#hangar-ores .ore-card.not-enough .ore-name { color: #ff6b82 !important; }
#hangar-ores .ore-card.not-enough .ore-amount { color: #ff3b5c !important; }

#hangar-ores .ore-head {
  display: flex;
  gap: 10px;
  align-items: center;
}
#hangar-ores .ore-img {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  border: 1px solid rgba(0, 246, 255, 0.25);
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
#hangar-ores .ore-img img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}
#hangar-ores .ore-name {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #c7f6ff;
}
#hangar-ores .ore-amount {
  margin-top: 4px;
  font-size: 20px;
  font-weight: 900;
  color: #fff;
}

#hangar-ores .badge-red {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(255, 59, 92, 0.16);
  border: 1px solid rgba(255, 59, 92, 0.55);
  color: #ff3b5c;
  display: none;
}
#hangar-ores .ore-card.not-enough .badge-red { display: inline-flex; }

#hangar-ores .btn,
#hangar-skylab .btn,
.ref-modal .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 12px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 900;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  font-size: 11px;
  border: 1px solid rgba(0, 246, 255, 0.22);
  background: linear-gradient(180deg, rgba(4, 14, 24, 0.95), rgba(2, 6, 12, 0.96));
  color: #b9f1ff;
  transition: 0.18s;
  user-select: none;
}
#hangar-ores .btn:hover,
#hangar-skylab .btn:hover,
.ref-modal .btn:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 246, 255, 0.4);
}
#hangar-ores .btn.success,
#hangar-skylab .btn.success,
.ref-modal .btn.success {
  border-color: rgba(0, 255, 170, 0.3);
  background: linear-gradient(180deg, rgba(0, 255, 170, 0.28), rgba(0, 0, 0, 0.9));
}
#hangar-ores .btn.danger,
.ref-modal .btn.danger {
  border-color: rgba(255, 59, 92, 0.4);
  background: linear-gradient(180deg, rgba(255, 59, 92, 0.22), rgba(0, 0, 0, 0.9));
}
#hangar-ores .btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

#hangar-ores .upgrade-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 10px;
}
@media (max-width: 900px) {
  #hangar-ores .upgrade-row { grid-template-columns: repeat(2, 1fr); }
}

#hangar-ores .upgrade-target {
  position: relative;
  border-radius: 16px;
  border: 1px solid rgba(120, 120, 255, 0.25);
  background: radial-gradient(circle at top, rgba(120, 90, 255, 0.15), rgba(0, 0, 0, 0.85));
  box-shadow: inset 0 0 35px rgba(0, 0, 0, 0.9), 0 0 20px rgba(120, 90, 255, 0.12);
  padding: 14px;
  text-align: center;
  transition: 0.18s;
}
#hangar-ores .upgrade-target:hover {
  border-color: rgba(0, 246, 255, 0.35);
  transform: translateY(-2px);
}
#hangar-ores .target-icon {
  width: 66px;
  height: 66px;
  margin: 6px auto 8px;
  border-radius: 14px;
  border: 1px solid rgba(0, 246, 255, 0.18);
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}
#hangar-ores .target-name {
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-size: 12px;
  color: #ffe6a6;
  margin-bottom: 6px;
}
#hangar-ores .buff-pill {
  margin: 0 auto;
  width: 140px;
  height: 28px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 12px;
  color: #eafcff;
  border: 1px solid rgba(0, 246, 255, 0.2);
  background: rgba(0, 0, 0, 0.65);
}
#hangar-ores .upgrade-ore-row {
  display: flex;
  gap: 14px;
  margin-bottom: 14px;
}
#hangar-ores .upgrade-ore-row .ore-card { flex: 1; }

#hangar-ores .statusbar,
#hangar-skylab .statusbar {
  margin-top: 14px;
  border-radius: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(0, 246, 255, 0.18);
  background: rgba(0, 0, 0, 0.55);
  color: #b9f1ff;
  font-weight: 700;
  font-size: 12px;
}
#hangar-ores .statusbar.ok,
#hangar-skylab .statusbar.ok {
  border-color: rgba(0, 255, 150, 0.25);
  color: #a7ffd7;
}
#hangar-ores .statusbar.err,
#hangar-skylab .statusbar.err {
  border-color: rgba(255, 59, 92, 0.35);
  color: #ffd1d9;
}

/* Refine modal (global overlay) */
.ref-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.86);
  display: none !important;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  pointer-events: none;
}
.ref-overlay.show {
  display: flex !important;
  pointer-events: auto;
}
.ref-modal {
  width: 420px;
  max-width: calc(100% - 24px);
  border-radius: 16px;
  border: 1px solid rgba(0, 246, 255, 0.25);
  background: linear-gradient(180deg, rgba(10, 18, 34, 0.98), rgba(2, 4, 10, 0.98));
  box-shadow: 0 0 40px rgba(0, 246, 255, 0.18);
  color: #d7f1ff;
  font-family: Arial, Helvetica, sans-serif;
}
.ref-modal .modal-head {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(0, 246, 255, 0.18);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ref-modal .modal-title {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #baf7ff;
}
.ref-modal .modal-close {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid rgba(0, 246, 255, 0.18);
  background: rgba(0, 0, 0, 0.55);
  color: #baf7ff;
  cursor: pointer;
}
.ref-modal .modal-body { padding: 14px; }
.ref-modal .modal-desc { color: #86a6b7; font-size: 12px; margin-bottom: 10px; }
.ref-modal .costlist {
  border-radius: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(0, 246, 255, 0.14);
  background: rgba(0, 0, 0, 0.55);
  font-size: 12px;
}
.ref-modal .costline {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.ref-modal .costline:last-child { border-bottom: 0; }
.ref-modal .costline.not-enough { color: #ffd1d9; }
.ref-modal .costline.not-enough .need { color: #ff3b5c; font-weight: 900; }
.ref-modal .quick-row {
  display: flex;
  gap: 8px;
  margin: 12px 0;
}
.ref-modal .quick-row .btn { flex: 1; }
.ref-modal .amount-input {
  width: 100%;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(0, 246, 255, 0.22);
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  padding: 0 12px;
  font-size: 16px;
  font-weight: 800;
}
.ref-modal .modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}
.ref-modal .modal-actions .btn { flex: 1; height: 36px; }

/* ===== SKYLAB (classic DO panel) ===== */
#hangar-skylab .wu-skylab-stage {
  position: relative;
  width: 100%;
  max-width: 980px;
  margin: 0 auto 14px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(242, 176, 90, 0.35);
  background: #0a1525 url("/assets/do_ui/skylab/background.jpg") center top / cover no-repeat;
  min-height: 420px;
  box-shadow: 0 0 30px rgba(0, 80, 160, 0.25);
}

#hangar-skylab .sky-resbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.55);
  border-bottom: 1px solid rgba(242, 176, 90, 0.25);
  font-size: 11px;
  font-weight: 700;
  color: #e2e2e2;
}
#hangar-skylab .sky-resbar .sky-res {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 110px;
}
#hangar-skylab .sky-resbar img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}
#hangar-skylab .sky-resbar b { color: #f2b05a; }

#hangar-skylab .sky-columns {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  padding: 14px;
}
@media (max-width: 900px) {
  #hangar-skylab .sky-columns { grid-template-columns: 1fr; }
}

#hangar-skylab .sky-col-title {
  font-family: Orbitron, sans-serif;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #f2b05a;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(242, 176, 90, 0.3);
  text-shadow: 0 0 8px rgba(242, 176, 90, 0.35);
}

#hangar-skylab .module_box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  margin-bottom: 8px;
  background: linear-gradient(135deg, rgba(20, 30, 50, 0.92), rgba(8, 14, 28, 0.95));
  border: 1px solid rgba(80, 120, 180, 0.35);
  border-radius: 8px;
  cursor: pointer;
  transition: 0.2s;
}
#hangar-skylab .module_box:hover {
  border-color: #00aaff;
  box-shadow: 0 0 15px rgba(0, 150, 255, 0.3);
}
#hangar-skylab .module_box.active-mod {
  border-color: #00ff88;
  box-shadow: 0 0 12px rgba(0, 255, 136, 0.2);
}
#hangar-skylab .module_icon {
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 0 6px rgba(0, 200, 255, 0.25));
}
#hangar-skylab .module_info { flex: 1; min-width: 0; }
#hangar-skylab .module_name {
  font-size: 12px;
  font-weight: 800;
  color: #f2b05a;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
#hangar-skylab .module_level {
  font-size: 11px;
  color: #a0b8d0;
  margin-top: 2px;
}
#hangar-skylab .module_box .btn {
  height: 28px;
  padding: 0 10px;
  font-size: 10px;
  border-radius: 8px;
  flex-shrink: 0;
}

#hangar-skylab .sky-transfer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 12px 14px 16px;
  background: rgba(0, 0, 0, 0.45);
  border-top: 1px solid rgba(242, 176, 90, 0.2);
}
#hangar-skylab .sky-transfer label {
  font-size: 11px;
  color: #c8d8e8;
  display: flex;
  align-items: center;
  gap: 6px;
}
#hangar-skylab .sky-transfer select,
#hangar-skylab .sky-transfer input {
  height: 30px;
  border-radius: 8px;
  border: 1px solid rgba(0, 246, 255, 0.25);
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  padding: 0 8px;
}
#hangar-skylab .sky-lab-recipes {
  padding: 0 14px 14px;
}
#hangar-skylab .sky-recipe-row {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  margin-bottom: 6px;
  border-radius: 10px;
  border: 1px solid rgba(0, 246, 255, 0.15);
  background: rgba(0, 0, 0, 0.4);
  font-size: 12px;
}
#hangar-skylab .sky-recipe-row .meta { color: #86a6b7; font-size: 11px; }
