/* Luma Quant — Asset Allocation page (allocation.js) */
.al-layout { grid-template-columns: 320px minmax(0, 1fr); }
.al-side .fr-box { padding-bottom: 14px; }
input.al-amount { height: 42px !important; font-size: 19px !important; font-weight: 700; letter-spacing: .2px; }
input.al-amount.al-bad { border-color: var(--red) !important; box-shadow: 0 0 0 2px rgba(255,84,112,0.18); }
.al-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
button.al-chip {
  width: auto; height: auto; margin: 0; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 650;
  background: var(--panel-2); color: var(--muted); border: 1px solid var(--line); box-shadow: none;
}
button.al-chip:hover { color: var(--ink); border-color: #3a4560; }
.al-risks { display: flex; flex-direction: column; gap: 6px; margin-top: 2px; }
label.al-risk {
  display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; align-items: center; margin: 0; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--input-bg); cursor: pointer; font-weight: 500;
  transition: border-color .12s ease, background .12s ease;
}
label.al-risk:hover { border-color: #3a4560; }
label.al-risk.on { border-color: var(--accent); background: rgba(77,141,255,0.10); }
label.al-risk input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
label.al-risk:focus-within { outline: 2px solid rgba(77,141,255,0.55); outline-offset: 1px; }
.al-risk-level {
  display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 750;
}
label.al-risk.on .al-risk-level { background: var(--accent); border-color: var(--accent); color: #fff; }
.al-risk-body strong { display: block; font-size: 13px; color: var(--ink); }
.al-risk-body small { display: block; margin-top: 1px; font-size: 11px; color: var(--muted); }
.al-side .fr-check small { color: var(--muted); font-size: 11px; }
.al-live { margin-top: 12px; }
.al-tiles .strategy-stat small { display: block; margin-top: 3px; font-size: 11px; color: var(--muted); font-weight: 500; line-height: 1.35; }
.al-tiles .strategy-stat strong { font-size: 17px; overflow-wrap: anywhere; }
.al-neg { color: #ff8fa3 !important; }
.al-pos { color: #34d399 !important; }
.fr-status.al-busy { border-color: rgba(77,141,255,0.45); }
.al-bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: var(--panel-2); margin: 2px 0 8px; }
.al-bar span { display: block; height: 100%; min-width: 2px; }
.al-bar span + span { border-left: 2px solid #111726; }
.al-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--muted); margin: 0 0 10px; }
.al-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.al-legend i.dash { height: 0; width: 16px; border-top: 2px dashed #8a93a8; border-radius: 0; vertical-align: 3px; }
.al-legend strong { color: var(--ink); font-weight: 650; }
.al-table-wrap { overflow-x: auto; max-height: none; }
.al-table td { font-variant-numeric: tabular-nums; }
.al-table td:first-child { white-space: normal; min-width: 180px; }
.al-swatch { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 8px; vertical-align: 1px; }
.al-table tr.al-cash-row td { color: var(--muted); }
.al-table tr.al-total-row td { font-weight: 700; border-top: 1px solid var(--line); }
.al-riskbars { display: flex; flex-direction: column; gap: 9px; }
.al-riskbars { max-width: 980px; }
.al-rb-row { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 10px; align-items: center; }
.al-rb-name { font-size: 12.5px; font-weight: 700; color: var(--ink); min-width: 0; }
.al-rb-name small { display: block; font-size: 10.5px; font-weight: 500; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.al-rb-bars { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.al-rb-bar { display: grid; grid-template-columns: minmax(0, 1fr) 92px; align-items: center; gap: 8px; }
.al-rb-bar span { display: block; height: 9px; border-radius: 3px; min-width: 2px; max-width: 100%; }
.al-rb-bar.risk span { height: 7px; background: transparent; border: 1.5px solid; box-sizing: border-box; }
.al-rb-bar em { font-style: normal; font-size: 11px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.al-chart-wrap { position: relative; }
.al-svg { max-height: 300px; }
.al-svg .frr-t { font-size: 12px; }
.al-tip { background: rgba(10,14,23,0.94); border: 1px solid var(--line); min-width: 170px; }
.al-notes { margin-top: 8px; color: var(--muted); }
@media (max-width: 1000px) {
  .al-layout { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .al-rb-row { grid-template-columns: 1fr; gap: 4px; }
  .al-rb-bar { grid-template-columns: minmax(0, 1fr) 84px; }
  .al-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .al-svg .frr-t { font-size: 22px; }
}
@media print {
  #allocationView .fr-side { display: none !important; }
  #allocationView .fr-layout { grid-template-columns: 1fr; }
  #allocationView .strategy-stat { background: #fff !important; border-color: #bbb !important; }
  #allocationView .strategy-stat strong, #allocationView .strategy-stat span, #allocationView .frr-summary li, #allocationView .al-legend { color: #111 !important; }
}
.al-table tr.al-group-row td { font-weight: 650; }
