/* UniVerse Hub Raffinerie Addon V1.4 */
:root{
  --uvh-bg:#020712;
  --uvh-panel:rgba(4,12,26,.78);
  --uvh-panel2:rgba(7,18,39,.72);
  --uvh-line:rgba(82,164,255,.22);
  --uvh-line-soft:rgba(148,163,184,.14);
  --uvh-cyan:#38d8ff;
  --uvh-blue:#1f8fff;
  --uvh-text:#e5f2ff;
  --uvh-muted:#8aa4c8;
  --uvh-green:#39d98a;
  --uvh-red:#ff6b7a;
  --uvh-yellow:#fcd34d;
}
body:has(.uvh-raffinerie-page){
  background:
    radial-gradient(circle at 82% 2%,rgba(0,124,255,.15),transparent 34%),
    radial-gradient(circle at 8% 18%,rgba(0,229,255,.08),transparent 32%),
    linear-gradient(180deg,#020712,#02050d 70%,#010307)!important;
}
.uvh-tool-page{
  max-width:1600px;
  margin:0 auto;
  padding:34px 24px 64px;
  color:var(--uvh-text);
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
.uvh-r-hero{margin-bottom:26px}
.uvh-back-btn{
  display:inline-flex;align-items:center;gap:8px;height:42px;padding:0 16px;
  border:1px solid var(--uvh-line);border-radius:9px;background:rgba(4,12,26,.55);
  color:#dbeafe;text-decoration:none;font-weight:750;margin-bottom:28px;
}
.uvh-back-btn:hover{border-color:rgba(56,216,255,.48);background:rgba(0,229,255,.08);color:#fff}
.uvh-r-hero h1{
  margin:0;font-size:clamp(48px,6vw,76px);line-height:.92;letter-spacing:-.055em;
  color:#fff;text-shadow:0 0 32px rgba(46,144,255,.25);
}
.uvh-r-hero h1:after{
  content:"";display:block;width:min(430px,42vw);height:2px;margin-top:22px;
  background:linear-gradient(90deg,var(--uvh-cyan),rgba(56,216,255,.14),transparent);
  box-shadow:0 0 18px rgba(56,216,255,.5);
}
.uvh-r-hero p{max-width:820px;margin:16px 0 0;color:#9fb3d4;font-size:16px}
.uvh-raffinerie-app{display:grid;gap:18px}
.uvh-r-card,.uvh-r-alert,.uvh-r-calc{
  border:1px solid var(--uvh-line);
  border-radius:16px;
  background:
    radial-gradient(circle at 100% 0,rgba(56,216,255,.06),transparent 32%),
    linear-gradient(180deg,rgba(4,12,26,.76),rgba(2,8,18,.82));
  padding:18px;
  box-shadow:0 18px 70px rgba(0,0,0,.18), inset 0 0 0 1px rgba(255,255,255,.015);
}
.uvh-r-alert.err{border-color:rgba(255,107,122,.38);background:rgba(255,107,122,.08);color:#fecaca}
.uvh-r-stats{
  display:grid;
  grid-template-columns:1.45fr repeat(4,minmax(150px,1fr));
  gap:14px;
}
.uvh-r-stat{
  min-height:116px;
  border:1px solid var(--uvh-line);
  border-radius:14px;
  background:
    radial-gradient(circle at 88% 12%,rgba(56,216,255,.08),transparent 35%),
    linear-gradient(180deg,rgba(8,22,48,.78),rgba(2,9,20,.70));
  padding:20px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
}
.uvh-r-stat.wide{border-color:rgba(56,216,255,.32)}
.uvh-r-stat span{display:block;color:#98afd2;font-size:12px;text-transform:uppercase;letter-spacing:.08em;font-weight:850}
.uvh-r-stat strong{display:block;color:#fff;font-size:26px;line-height:1.08;margin-top:8px;overflow-wrap:anywhere}
.uvh-r-stat small{display:block;color:#a7b8d5;margin-top:6px}
.uvh-r-calc{
  display:grid;
  gap:16px;
}
.uvh-r-calc-head{
  display:flex;
  justify-content:space-between;
  gap:16px;
  align-items:flex-end;
  border-bottom:1px solid rgba(82,164,255,.14);
  padding-bottom:14px;
}
.uvh-r-calc-head h2,.uvh-r-card h2{margin:0;color:#fff;font-size:24px}
.uvh-r-calc-head p,.uvh-r-card p{margin:6px 0 0;color:#91a8ca}
.uvh-r-form-row{
  display:grid;
  grid-template-columns:1.25fr .75fr 1.25fr 1.15fr auto;
  gap:14px;
  align-items:end;
}
.uvh-r-field{display:grid;gap:7px;min-width:0}
.uvh-r-field label{color:#cbd5e1;font-weight:850;font-size:13px}
.uvh-r-field select,.uvh-r-field input{
  width:100%;
  min-height:46px;
  border:1px solid rgba(82,164,255,.24);
  border-radius:10px;
  background:rgba(7,18,39,.78);
  color:#fff;
  padding:10px 13px;
  font-size:15px;
  outline:none;
  box-shadow:none;
}
.uvh-r-field select:focus,.uvh-r-field input:focus{
  border-color:rgba(56,216,255,.52);
  box-shadow:0 0 0 3px rgba(56,216,255,.08);
}
.uvh-r-field input::placeholder{color:#506584}
.uvh-r-btn,.uvh-r-actions button,.uvh-r-tabs button{
  display:inline-flex;align-items:center;justify-content:center;min-height:42px;padding:10px 15px;
  border:1px solid rgba(82,164,255,.24);border-radius:9px;background:rgba(7,18,39,.78);
  color:#d8e7ff;text-decoration:none;font-weight:850;font-size:14px;cursor:pointer;
}
.uvh-r-btn:hover,.uvh-r-actions button:hover,.uvh-r-tabs button:hover{border-color:rgba(56,216,255,.55);color:#fff}
.uvh-r-btn.primary,.uvh-r-actions .primary{
  color:#fff!important;
  background:linear-gradient(135deg,#0388ff,#12c6ff)!important;
  border-color:transparent!important;
  box-shadow:0 0 18px rgba(18,198,255,.25);
}
.uvh-r-btn.primary{min-height:46px;white-space:nowrap}
.uvh-r-results{display:grid;gap:18px}
.uvh-r-output{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
}
.uvh-r-output .box{
  min-height:122px;
  border:1px solid rgba(82,164,255,.18);
  border-radius:14px;
  background:linear-gradient(180deg,rgba(7,18,39,.70),rgba(4,12,26,.72));
  padding:16px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
}
.uvh-r-output span{display:block;color:#91a8ca;font-size:12px;text-transform:uppercase;letter-spacing:.08em;font-weight:850}
.uvh-r-output strong{display:block;color:#fff;font-size:24px;line-height:1.1;margin-top:8px;overflow-wrap:anywhere}
.uvh-r-output small{display:block;color:#9fb3d4;margin-top:6px}
.good{color:#7df2b1!important}.bad{color:#fecaca!important}.warn{color:#fcd34d!important}.muted{color:#91a8ca!important}.cyan{color:#4dbbff!important}
.uvh-r-badge{
  display:inline-flex;align-items:center;min-height:28px;padding:5px 11px;margin:2px 4px 2px 0;
  border-radius:999px;background:rgba(82,164,255,.10);border:1px solid rgba(82,164,255,.22);
  color:#d8e7ff;font-size:13px;font-weight:800;white-space:nowrap;
}
.uvh-r-badge.good{background:rgba(57,217,138,.1);border-color:rgba(57,217,138,.25)}
.uvh-r-badge.bad{background:rgba(255,107,122,.1);border-color:rgba(255,107,122,.25)}
.uvh-r-table-wrap{overflow:auto;border:1px solid rgba(82,164,255,.16);border-radius:12px;background:rgba(5,14,31,.64)}
.uvh-r-table{width:100%;border-collapse:collapse;min-width:760px}
.uvh-r-table th,.uvh-r-table td{padding:12px 13px;border-bottom:1px solid rgba(82,164,255,.13);text-align:left;vertical-align:top}
.uvh-r-table th{font-size:12px;text-transform:uppercase;letter-spacing:.08em;color:#91a8ca;background:rgba(2,8,18,.65)}
.uvh-r-table td{color:#dbeafe}.uvh-r-table td small{display:block;color:#91a8ca;margin-top:3px}.right{text-align:right}
.uvh-r-table tr:nth-child(even) td{background:rgba(9,35,54,.28)}
.uvh-r-table tr:hover td{background:rgba(56,216,255,.045)}
.uvh-r-note{
  border:1px solid rgba(252,211,77,.22);
  border-radius:13px;
  background:rgba(252,211,77,.06);
  padding:14px;
  color:#fde68a;
  font-size:14px;
}
.uvh-r-tabs{display:flex;gap:10px;flex-wrap:wrap;margin:0 0 14px}
.uvh-r-tabs button{
  min-height:38px;border-radius:999px;padding:8px 13px;
}
.uvh-r-tabs button.active{background:rgba(56,216,255,.12);border-color:rgba(56,216,255,.50);color:#fff}
.uvh-r-data-warning{
  border:1px solid rgba(255,107,122,.24);
  background:rgba(255,107,122,.06);
  color:#fecaca;
  border-radius:13px;
  padding:13px 14px;
  font-size:14px;
}
.uvh-r-data-note{
  border:1px solid rgba(56,216,255,.24);
  background:rgba(56,216,255,.06);
  color:#bfdbfe;
  border-radius:13px;
  padding:13px 14px;
  font-size:14px;
  margin:10px 0;
}
@media(max-width:1280px){
  .uvh-r-stats{grid-template-columns:repeat(3,1fr)}
  .uvh-r-form-row{grid-template-columns:repeat(2,minmax(0,1fr))}
  .uvh-r-form-row .uvh-r-submit{grid-column:1/-1}
  .uvh-r-btn.primary{width:100%}
}
@media(max-width:980px){
  .uvh-r-output{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:720px){
  .uvh-tool-page{padding:24px 14px 50px}
  .uvh-r-stats{grid-template-columns:1fr}
  .uvh-r-output{grid-template-columns:1fr}
  .uvh-r-form-row{grid-template-columns:1fr}
  .uvh-r-calc-head{display:block}
  .uvh-r-hero h1{font-size:46px}
}
