:root{
  --bg: #0b1220;
  --card: rgba(255,255,255,.06);
  --stroke: rgba(255,255,255,.12);
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.68);
  --shadow: 0 18px 50px rgba(0,0,0,.35);
  --radius: 18px;

  --pos: #004699;
  --neg: #b91212;
  --zero: #d3c491;
}
*{ box-sizing:border-box; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  color: var(--text);
  background: radial-gradient(1200px 700px at 20% 10%, rgba(90,115,255,.28), transparent 60%),
              radial-gradient(900px 600px at 80% 30%, rgba(0,220,140,.18), transparent 60%),
              radial-gradient(900px 600px at 50% 100%, rgba(255,160,50,.14), transparent 60%),
              var(--bg);
  min-height: 100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 26px;
}
.wrap{ width:min(980px, 100%); }
.card{
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
}
header{
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--stroke);
  display:flex;
  gap: 18px;
  align-items:flex-start;
  justify-content:space-between;
  flex-wrap:wrap;
}
.left{ display:flex; flex-direction:column; gap: 12px; }
.topline{ display:flex; flex-direction:column; gap: 6px; }
h1{
  margin:0;
  font-size: 18px;
  letter-spacing:.2px;
}
.sub{
  color: var(--muted);
  font-size: 13px;
}

.crests{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.16);
  border-radius: 14px;
  width: fit-content;
}
.crest{
  width: 136px;
  height: 136px;
  object-fit: contain;
  display:block;
  filter: drop-shadow(0 12px 28px rgba(0,0,0,.45));
}



.right{
  display:flex;
  flex-direction:column;
  gap:10px;
  align-items:flex-end;
  min-width: min(420px, 100%);
}
.badge{
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--stroke);
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,.18);
  text-align:right;
}
.controls{
  display:flex;
  gap: 10px;
  align-items:flex-end;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.control{
  display:flex;
  flex-direction:column;
  gap:6px;
  font-size: 11.5px;
  color: var(--muted);
}
.select{
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.06);
  color: var(--text);
  padding: 8px 34px 8px 10px;
  border-radius: 12px;
  font-weight: 650;
  outline: none;
  cursor: pointer;
  min-width: 200px;
}
.select:focus{ box-shadow: 0 0 0 3px rgba(90,115,255,.22); }

.legend{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
  font-size:12px;
  color: var(--muted);
}
.dot{ width:10px; height:10px; border-radius:999px; display:inline-block; margin-right:6px; }
.dot.pos{ background: var(--pos); }
.dot.zero{ background: var(--zero); }
.dot.neg{ background: var(--neg); }

.content{ padding: 14px; }

table{
  width:100%;
  border-collapse: collapse;
  table-layout: fixed;
  background: rgba(0,0,0,.10);
  border: 1px solid var(--stroke);
  border-radius: 14px;
  overflow:hidden;
}
td{
  border: 1px solid rgba(255,255,255,.10);
  padding: 10px 12px;
  font-size: 14px;
  vertical-align: top;
}
td.round{
  width: 55%;
  color: rgba(255,255,255,.85);
  background: rgba(255,255,255,.03);
  font-variant-numeric: tabular-nums;
}
td.val{
  width: 45%;
  text-align:center;
  font-weight: 800;
  letter-spacing:.3px;
  font-variant-numeric: tabular-nums;
}

/* Boje po znaku (+ / 0 / -) */
.zero{ background: var(--zero); color: #0b1220; }
.pos1,.pos2,.pos3,.pos4{ background: var(--pos); color: #ffffff; }
.neg1,.neg2,.neg3,.neg4{ background: var(--neg); color: #ffffff; }

.mutedRow{ opacity:.55; }

tr.details td{
  padding-top: 0;
  padding-bottom: 12px;
  border-top: none;
  background: rgba(255,255,255,.02);
}
.detailsBox{
  margin-top: 6px;
  display: grid;
  gap: 4px;
  color: rgba(255,255,255,.74);
  font-size: 12.5px;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}
.detailsBox .line{
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.footer{
  padding: 12px 16px 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}
.btn{
  cursor:pointer;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.06);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 12px;
  font-weight: 700;
}
.btn:active{ transform: translateY(1px); }

@media (max-width: 720px){
  .right{ align-items:flex-start; }
  .controls{ justify-content:flex-start; }
  .legend{ justify-content:flex-start; }
}


/* Da se opcije u dropdownu vide (browser često koristi bijelu pozadinu za listu) */
.select option{
  color:#0b1220;
  background:#ffffff;
}
