/* Rates & Bond Lab node — styles. Loaded globally by Dash from /assets, so every rule is scoped under
   .rbl-app. The page kit of the main app (assets/app_pages/pages_style.css: .pk-scope, .pk-card,
   .pk-kpis, .pk-pills, .pk-chip) does most of the work; these rules lay out the node, in the same
   way as Seasonality (season_style.css) and the Systematic Investment Plan (sip_style.css).
   Tokens: panels rgba(0,0,0,0.6), chips rgba(255,255,255,0.06), radius 10px, text #e8e8e8,
   muted #9fb3c8, headings #cfefff, accent #f0a030. */

.rbl-app { color: #e8e8e8; font-size: 13px; }
.rbl-app * { box-sizing: border-box; }

/* ---------- header (leave ~200px on the right for the app toolbar) ------------------ */
.rbl-top { display: flex; align-items: flex-end; gap: 18px; padding: 0 200px 10px 0; }
.rbl-brand h3 { margin: 0; font-size: 1.3rem; color: #cfefff; font-weight: 600; letter-spacing: .2px; }
.rbl-brand h3 span { color: #9fb3c8; font-weight: 400; font-size: .95rem; }
.rbl-brand > div { color: #9fb3c8; font-size: .78rem; max-width: 980px; line-height: 1.45; }

/* ---------- main grid: rail + screens ------------------------------------------------- */
.rbl-main { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 14px; align-items: start; }
.rbl-rail { display: flex; flex-direction: column; min-width: 0; }
.rbl-rail .pk-card { padding: 9px 11px; margin-bottom: 8px; }
.rbl-field { margin-bottom: 8px; min-width: 0; }
.rbl-k { color: #9fb3c8; font-size: .64rem; text-transform: uppercase; letter-spacing: .6px; margin-bottom: 3px; }
.rbl-app .Select-control { height: 30px; }
.rbl-app .Select--single > .Select-control .Select-value, .rbl-app .Select-placeholder { line-height: 28px !important; }
.rbl-app .Select-value-label { color: #e8e8e8 !important; }
.rbl-app .Select-menu-outer { z-index: 30; }
.rbl-ok { color: #bfe8c4; font-size: .74rem; margin-bottom: 2px; }
.rbl-ok i { color: #3fbf7f; }
.rbl-err { color: #ffd0cb; font-size: .74rem; margin-bottom: 2px; }
.rbl-err i { color: #e66767; }

/* screen tabs (the same look as the Seasonality / SIP title tabs) */
.rbl-tabs { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 0 0 10px; border-bottom: 1px solid rgba(255,255,255,0.07); }
.rbl-tabs label { display: inline-flex !important; margin: 0 !important; cursor: pointer; padding: 2px 0 7px;
                  color: #7f93a8; font-size: 1rem; font-weight: 600; border-bottom: 2px solid transparent;
                  transition: color .15s, border-color .15s; }
.rbl-tabs label:hover { color: #cfefff; }
.rbl-tabs label:has(input:checked) { color: #cfefff; border-bottom-color: #f0a030; }
.rbl-tabs input { display: none; }
.rbl-center { min-width: 0; }
.rbl-wait { color: #9fb3c8; padding: 40px 10px; text-align: center; }

/* ---------- cards, grids, kpis ---------------------------------------------------------- */
.rbl-card-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.rbl-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; margin-bottom: 12px; }
.rbl-grid2 > .pk-card { margin-bottom: 0; }
.rbl-graph { width: 100%; }
.rbl-kpis { margin: 0 0 10px; }
.rbl-kpis .pk-kpi { flex: 1 1 120px; background: rgba(0,0,0,0.6); border: 1px solid rgba(255,255,255,0.07); }
.rbl-kpis .pk-kpi.rbl-hero { flex: 1.3 1 150px; border-color: rgba(240,160,48,0.45); background: rgba(240,160,48,0.07); }
.rbl-kpis .pk-kpi.rbl-hero .pk-kv { font-size: 1.35rem; }
.rbl-kpi-s { color: #7f93a6; font-size: .64rem; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.rbl-summary { background: rgba(0,0,0,0.6); border: 1px solid rgba(255,255,255,0.07); border-left: 3px solid #f0a030;
               border-radius: 10px; padding: 10px 14px; font-size: .88rem; color: #e8f4ff; line-height: 1.55; margin-bottom: 10px; }
.rbl-say { display: flex; gap: 8px; align-items: flex-start; margin-top: 6px; padding: 7px 10px; border-radius: 10px;
           background: rgba(255,255,255,0.04); color: #dfe7ee; font-size: .78rem; line-height: 1.5; }
.rbl-say i { color: #f0a030; margin-top: 3px; }
.rbl-note { color: #7f93a6; font-size: .7rem; line-height: 1.45; margin-top: 6px; }
.rbl-note.warn { color: #f5d6a3; background: rgba(240,160,48,0.06); border-radius: 10px; padding: 6px 10px; margin-bottom: 8px; }
.rbl-today { margin: 8px 0 6px; color: #9fb3c8; font-size: .8rem; }

/* controls row above a screen */
.rbl-ctrls { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: flex-end; margin-bottom: 8px; }
.rbl-ctrls > div { min-width: 0; }
.rbl-dd { min-width: 320px; max-width: 560px; flex: 1 1 320px; }
.rbl-dd-l { min-width: 360px; max-width: 640px; flex: 1 1 360px; }
.rbl-dd-s { flex: 0 0 200px; min-width: 170px; max-width: 240px; }
.rbl-app input.rbl-num { width: 120px; height: 30px; background: rgba(255,255,255,0.06); color: #e8e8e8;
                         border: 1px solid rgba(255,255,255,0.12); border-radius: 10px; padding: 2px 8px; }
.rbl-app input.rbl-date { width: 150px; }
.rbl-terms { padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,0.03); }

/* tables */
.rbl-scroll { overflow-x: auto; }
.rbl-table { width: 100%; border-collapse: collapse; font-size: .76rem; }
.rbl-table th { color: #9fb3c8; font-weight: 500; font-size: .64rem; text-transform: uppercase; letter-spacing: .4px;
                text-align: right; padding: 4px 6px; border-bottom: 1px solid rgba(255,255,255,0.1); vertical-align: bottom;
                white-space: nowrap; }
.rbl-table td { padding: 4px 6px; border-bottom: 1px solid rgba(255,255,255,0.05); text-align: right;
                font-variant-numeric: tabular-nums; color: #e8e8e8; white-space: nowrap; }
.rbl-table th:first-child, .rbl-table td:first-child { text-align: left; }
.rbl-table tbody tr:hover td { background: rgba(255,255,255,0.03); }

/* formulas box */
.rbl-formulas { margin: 4px 0 12px; background: rgba(0,0,0,0.6); border: 1px solid rgba(255,255,255,0.07); border-radius: 10px; }
.rbl-formulas summary { cursor: pointer; padding: 8px 12px; color: #cfefff; font-weight: 600; font-size: .82rem; }
.rbl-formulas summary i { color: #f0a030; }
.rbl-fbox { padding: 2px 12px 10px; }
.rbl-frow { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 10px; padding: 5px 0;
            border-top: 1px solid rgba(255,255,255,0.05); }
.rbl-fk { color: #9fb3c8; font-size: .74rem; }
.rbl-fv { color: #e8e8e8; font-size: .76rem; line-height: 1.5; font-family: "Cambria Math", Georgia, serif; }

.rbl-foot { color: #6f8295; font-size: .68rem; line-height: 1.45; margin-top: 12px; padding-top: 8px;
            border-top: 1px solid rgba(255,255,255,0.06); }
.rbl-foot i { color: #9fb3c8; }

/* ---------- narrow screens ---------------------------------------------------------------- */
@media (max-width: 1250px) { .rbl-grid2 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 1000px) {
  .rbl-main { grid-template-columns: minmax(0, 1fr); }
  .rbl-top { padding-right: 120px; }
}
@media (max-width: 640px) {
  .rbl-top { padding-right: 0; padding-top: 34px; }
  .rbl-brand > div { display: none; }
  .rbl-tabs { gap: 4px 14px; }
  .rbl-tabs label { font-size: .88rem; }
  .rbl-dd, .rbl-dd-l, .rbl-dd-s { min-width: 0; width: 100%; max-width: none; flex: 1 1 100%; }
  .rbl-ctrls > div { flex: 1 1 100%; }
  .rbl-app input.rbl-num, .rbl-app input.rbl-date { width: 100%; }
  .rbl-kpis .pk-kpi { flex: 1 1 45%; }
  .rbl-frow { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}
