/* OptionsGEX Institutional Decision Center V1 */

.ogex-idc-panel {
  position: relative;
  margin-bottom: 18px;
}

.ogex-idc-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}

.ogex-idc-kicker {
  color: #7896a9;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .14em;
}

.ogex-idc-head h2 {
  margin: 2px 0 2px;
}

.ogex-idc-sub {
  color: #7896a9;
  font-size: 11px;
}

.ogex-idc-head-right {
  position: relative;
  display: flex;
  gap: 7px;
  align-items: center;
}

.ogex-idc-mode,
.ogex-idc-status {
  border: 1px solid #34536a;
  border-radius: 999px;
  padding: 5px 9px;
  color: #d8e4ec;
  background: #071721;
  font-size: 9px;
  font-weight: 800;
}

.ogex-idc-status.ok {
  color: #54ed98;
  border-color: rgba(34, 197, 94, .5);
}

.ogex-idc-status.bad {
  color: #ff7d8a;
  border-color: rgba(239, 68, 68, .5);
}

.ogex-idc-menu-btn {
  width: 34px;
  min-width: 34px;
  margin: 0;
  font-size: 18px;
  line-height: 1;
}

.ogex-idc-menu {
  position: absolute;
  z-index: 10000;
  top: 38px;
  right: 0;
  width: 210px;
  padding: 5px;
  border: 1px solid #26475d;
  border-radius: 8px;
  background: #07151f;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .45);
}

.ogex-idc-menu.hidden {
  display: none;
}

.ogex-idc-menu button {
  display: block;
  width: 100%;
  margin: 0;
  padding: 8px 9px;
  border: 0;
  text-align: left;
  background: transparent;
}

.ogex-idc-menu button:hover {
  background: #0d2636;
}

.ogex-idc-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-end;
  margin-bottom: 12px;
}

.ogex-idc-toolbar label {
  min-width: 150px;
  margin: 0;
  font-size: 10px;
  color: #8aa6b8;
}

.ogex-idc-toolbar select {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 8px;
  border: 1px solid #274a61;
  border-radius: 6px;
  background: #020b11;
  color: #dceaf4;
}

.ogex-idc-toolbar button {
  margin: 0;
}

.ogex-idc-primary {
  border-color: #287cec !important;
  background: #1473e6 !important;
  color: white !important;
}

.ogex-idc-summary {
  margin: 10px 0;
  padding: 9px 10px;
  border: 1px solid #29475b;
  border-radius: 7px;
  background: #06141e;
  color: #c1d3df;
  font-size: 11px;
}

.ogex-idc-summary.blocked {
  color: #ff8893;
  border-color: rgba(239, 68, 68, .42);
}

.ogex-idc-summary.wait {
  color: #ffd15c;
  border-color: rgba(245, 158, 11, .42);
}

.ogex-idc-summary.ok {
  color: #56ef98;
  border-color: rgba(34, 197, 94, .42);
}

.ogex-idc-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 7px;
  margin: 11px 0;
}

.ogex-idc-metrics > div,
.ogex-idc-card {
  border: 1px solid #19384c;
  border-radius: 8px;
  background: #06141e;
}

.ogex-idc-metrics > div {
  padding: 8px 9px;
}

.ogex-idc-metrics span {
  display: block;
  margin-bottom: 3px;
  color: #718ea1;
  font-size: 8px;
  font-weight: 800;
}

.ogex-idc-metrics b {
  color: #dbe8f0;
  font-size: 11px;
}

.ogex-idc-decision.buy,
.ogex-idc-log-decision.buy {
  color: #58f29b;
}

.ogex-idc-decision.sell,
.ogex-idc-log-decision.sell {
  color: #ff6f7d;
}

.ogex-idc-decision.blocked,
.ogex-idc-log-decision.blocked {
  color: #ff8b95;
}

.ogex-idc-decision.wait,
.ogex-idc-log-decision.wait {
  color: #ffd15c;
}

.ogex-idc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.ogex-idc-card {
  padding: 11px;
  margin-top: 8px;
}

.ogex-idc-card h3 {
  margin: 0 0 9px;
  color: #dceaf4;
  font-size: 12px;
}

.ogex-idc-kv {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 12px;
  align-items: baseline;
}

.ogex-idc-kv span {
  color: #7d99ab;
  font-size: 10px;
}

.ogex-idc-kv b {
  color: #dbe8f0;
  font-size: 10px;
  text-align: right;
}

.ogex-idc-section-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.ogex-idc-section-head span {
  color: #7994a6;
  font-size: 9px;
}

.ogex-idc-section-head button {
  margin: 0;
}

.ogex-idc-gates {
  display: grid;
  gap: 5px;
}

.ogex-idc-gate-row {
  display: grid;
  grid-template-columns: 180px 70px 1fr;
  gap: 8px;
  align-items: center;
  padding: 5px 7px;
  border-bottom: 1px solid rgba(37, 68, 88, .45);
}

.ogex-idc-gate-row > span:first-child {
  color: #bed0db;
  font-size: 9px;
  font-weight: 700;
}

.ogex-idc-gate-row small {
  color: #7894a6;
  font-size: 9px;
}

.ogex-idc-gate {
  display: inline-block;
  padding: 3px 6px;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 900;
  text-align: center;
}

.ogex-idc-gate.pass {
  color: #56ef98;
  background: rgba(22, 163, 74, .13);
  border: 1px solid rgba(34, 197, 94, .4);
}

.ogex-idc-gate.fail {
  color: #ff828e;
  background: rgba(153, 27, 27, .15);
  border: 1px solid rgba(239, 68, 68, .4);
}

.ogex-idc-gate.unknown {
  color: #ffd15c;
  background: rgba(161, 98, 7, .13);
  border: 1px solid rgba(245, 158, 11, .4);
}

.ogex-idc-log-wrap {
  width: 100%;
  overflow-x: auto;
}

.ogex-idc-log {
  width: 100%;
  border-collapse: collapse;
  font-size: 9px;
}

.ogex-idc-log th,
.ogex-idc-log td {
  padding: 7px;
  border-bottom: 1px solid #183448;
  text-align: left;
  white-space: nowrap;
}

.ogex-idc-log th {
  color: #718da0;
  font-size: 8px;
}

.ogex-idc-log-more {
  width: 28px;
  min-width: 28px;
  margin: 0;
  padding: 3px;
}

.ogex-idc-details {
  margin-top: 10px;
}

.ogex-idc-details summary {
  cursor: pointer;
  color: #9ab2c2;
  font-size: 10px;
  font-weight: 700;
}

#ogexIdcRaw {
  max-height: 440px;
  overflow: auto;
  margin-top: 8px;
  padding: 10px;
  border: 1px solid #17384c;
  border-radius: 7px;
  background: #02090f;
  color: #69e6ac;
  font-size: 9px;
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 1100px) {
  .ogex-idc-metrics {
    grid-template-columns: repeat(3, 1fr);
  }

  .ogex-idc-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .ogex-idc-head {
    flex-direction: column;
  }

  .ogex-idc-metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  .ogex-idc-gate-row {
    grid-template-columns: 1fr 65px;
  }

  .ogex-idc-gate-row small {
    grid-column: 1 / -1;
  }

  .ogex-idc-toolbar {
    display: grid;
    grid-template-columns: 1fr;
  }

  .ogex-idc-toolbar label,
  .ogex-idc-toolbar button {
    width: 100%;
  }
}
