﻿/* Master data screens (md-rates). Shared look: accounting.css gl-* classes. */

/* ------------------------------------------------------------------ promo codes (UI-RATE-04) */
.md-pc-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 0; white-space: normal; }
.md-pc-empty .gl-note { max-width: 420px; }
table.gl-table tbody tr.md-pc-dim td { color: #98A2B3; }
table.gl-table tbody tr.md-pc-dim td.code b { color: #667085; }
.md-pc-disc { display: inline-block; border-radius: 6px; padding: 2px 8px; font-size: .8rem; font-weight: 600; background: #EEF5FB; color: #1F5468; }
.md-pc-disc.amount { background: #E9F7EF; color: #127A4B; }
.md-pc-disc.rate_plan { background: #EFE7FF; color: #5B3DB5; }
.md-pc-use { display: flex; flex-direction: column; gap: 3px; min-width: 90px; }
.md-pc-bar { display: block; height: 6px; border-radius: 999px; background: #EEF1F5; overflow: hidden; }
.md-pc-bar > span { display: block; height: 100%; background: #2E9E62; border-radius: 999px; }
.md-pc-bar > span.hi { background: #E5A00D; }
.md-pc-bar > span.full { background: #C0392B; }
.md-pc-link { border: 0; background: #EEF5FB; color: #1F5468; font: inherit; font-weight: 700; border-radius: 8px; padding: 3px 10px; cursor: pointer;
    min-width: 34px; text-decoration: underline; text-underline-offset: 2px; }
.md-pc-link:hover { background: #DCEAF6; }
.md-pc-reslink { color: #1F5468; font-weight: 600; }
.md-pc-dateline { display: flex; align-items: center; gap: 4px; }
.md-pc-date { flex: 1 1 auto; min-width: 0; border: 1px solid #D0D5DD; border-radius: 8px; padding: 8px 10px; font: inherit; font-size: .86rem;
    background: #fff; color: #1D2939; }
.md-pc-totals { display: flex; flex-direction: column; gap: 2px; }
.md-pc-warn { display: flex; align-items: flex-start; gap: 6px; margin-top: 4px; padding: 6px 8px; border-radius: 8px; background: #FFF1D6;
    color: #9A5B00; font-size: .78rem; line-height: 1.35; }

/* ------------------------------------------------------------------ seasons (UI-RATE-06) */
.md-se-timeline { padding: 10px 16px 14px; border-bottom: 1px solid #EEF1F5; background: #FBFCFD; }
.md-se-months { display: flex; font-size: .72rem; font-weight: 600; color: #667085; text-transform: uppercase; letter-spacing: .04em; }
.md-se-months > span { flex-basis: 0; min-width: 0; overflow: hidden; text-align: center; border-left: 1px solid #E3E8EE; padding-bottom: 4px; }
.md-se-months > span:first-child { border-left: 0; }
.md-se-lanes { position: relative; border: 1px solid #E3E8EE; border-radius: 8px; background: #fff; padding: 4px 0; min-height: 34px; overflow: hidden; }
.md-se-grid { position: absolute; top: 0; bottom: 0; width: 1px; background: #EEF1F5; }
.md-se-today { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #E5872E; z-index: 2; }
.md-se-lane { position: relative; height: 26px; margin: 2px 0; }
.md-se-none { display: flex; align-items: center; justify-content: center; color: #98A2B3; font-size: .82rem; }
.md-se-bar { position: absolute; top: 0; height: 24px; border-radius: 6px; padding: 0 6px; font-size: .74rem; font-weight: 700; line-height: 24px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(16, 24, 40, .12); z-index: 1; min-width: 3px; }
.md-se-bar:hover { filter: brightness(1.08); z-index: 3; }
.md-se-bar.warn { box-shadow: inset 0 0 0 2px #E5A00D; }
.md-se-bar.sel { outline: 2px solid #1F5468; outline-offset: 1px; }
.md-se-prio { display: inline-block; min-width: 28px; border-radius: 6px; background: #EEF2F6; color: #344054; font-weight: 700; font-size: .8rem; padding: 1px 6px; }
.md-se-swatch { display: inline-block; width: 22px; height: 16px; border-radius: 4px; vertical-align: middle; box-shadow: inset 0 0 0 1px rgba(16, 24, 40, .15); }
td.md-se-ovl { white-space: normal !important; min-width: 140px; }
td.md-se-ovl .gl-chip { margin: 1px 4px 1px 0; }
.md-se-warnline { display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 4px; color: #9A5B00; font-size: .8rem; }
.md-se-colors { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.md-se-colors input[type=color] { width: 44px; height: 32px; padding: 0 2px; border: 1px solid #D0D5DD; border-radius: 8px; background: #fff; cursor: pointer; }
.md-se-dot { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #D0D5DD; cursor: pointer; padding: 0; }
.md-se-dot.on { box-shadow: 0 0 0 2px #1D2939; }
.md-se-nocolor { border: 1px dashed #98A2B3; background: #fff; border-radius: 8px; padding: 3px 8px; font: inherit; font-size: .76rem; color: #475467; cursor: pointer; }
.md-se-nocolor.on { border-style: solid; border-color: #1D2939; color: #1D2939; font-weight: 600; }

/* ------------------------------------------------------------------ packages (UI-RATE-07) */
td.md-pk-plans { white-space: normal !important; min-width: 120px; }
.md-pk-plan { display: inline-block; margin: 1px 4px 1px 0; border-radius: 999px; padding: 1px 9px; background: #E1EFFE; color: #1E56A0; font-size: .74rem;
    font-weight: 700; font-family: "Roboto Mono", ui-monospace, monospace; text-decoration: none; }
.md-pk-plan:hover { background: #CFE3FB; text-decoration: underline; }

/* ------------------------------------------------------------------ pricing simulation (UI-RATE-05) */
.md-sim { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.md-sim-note { display: flex; align-items: center; gap: 8px; padding: 8px 16px; background: #EEF5FB; color: #1F5468; font-size: .84rem; }
.md-sim-shell { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 14px; align-items: start; }
.md-sim-shell.cmp { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 1000px) { .md-sim-shell { grid-template-columns: minmax(0, 1fr); } }
.md-sim-form { padding: 12px 14px; position: sticky; top: 76px; }
.md-sim-shell.cmp .md-sim-form { position: static; }
@media (max-width: 1000px) { .md-sim-form { position: static; } }
.md-sim-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 10px; }
.md-sim-fields .md-sim-span2 { grid-column: span 2; }
.md-sim-shell.cmp .md-sim-fields { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.md-sim-shell.cmp .md-sim-fields .md-sim-span2 { grid-column: span 1; }
@media (max-width: 420px) { .md-sim-fields { grid-template-columns: minmax(0, 1fr); } .md-sim-fields .md-sim-span2 { grid-column: span 1; } }
.md-sim-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.md-sim-actions .gl-btn { flex: 1 1 130px; text-decoration: none; }
.md-sim-hint { margin-top: 8px; }
.md-sim-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.md-sim-tabs button { flex: 1 1 0; border: 1px solid #D0D5DD; background: #fff; border-radius: 8px; padding: 7px 10px; font: inherit; font-size: .86rem;
    font-weight: 600; color: #475467; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.md-sim-tabs button.on { background: #1F5468; border-color: #1F5468; color: #fff; }
.md-sim-tabs .dot { width: 8px; height: 8px; border-radius: 50%; background: #E5A00D; }
.md-sim-results { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.md-sim-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
.md-sim-cols.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 800px) { .md-sim-cols.two { grid-template-columns: minmax(0, 1fr); } }
.md-sim-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.md-sim-col > .gl-card + .gl-card { margin-top: 0; }
.md-sim-tag { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 6px; background: #1F5468;
    color: #fff; font-weight: 700; font-size: .82rem; }
.md-sim-sum { padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; }
.md-sim-sumhead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.md-sim-sumhead .grow { flex: 1 1 auto; }
.md-sim-avail { display: flex; align-items: flex-start; gap: 8px; border-radius: 10px; padding: 8px 12px; font-size: .9rem; }
.md-sim-avail.ok { background: #DDF5EA; color: #127A4B; }
.md-sim-avail.no { background: #FDE2E1; color: #B42318; }
.md-sim-avail .mud-icon-root { margin-top: 2px; }
.md-sim-reason { font-size: .82rem; color: #475467; margin-top: 2px; }
.md-sim-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.md-sim-kpis > div { border: 1px solid #E3E8EE; border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.md-sim-kpis span { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: #667085; }
.md-sim-kpis b { font-family: "Roboto Mono", ui-monospace, monospace; font-size: 1rem; color: #1D2939; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.md-sim-kpis > div.big { background: #1F5468; border-color: #1F5468; }
.md-sim-kpis > div.big span { color: #CFE0EF; }
.md-sim-kpis > div.big b { color: #fff; font-size: 1.1rem; }
.md-sim-lines { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; color: #344054; }
.md-sim-lines > div > span { display: inline-block; min-width: 96px; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: #667085; }
.md-sim-lines em { font-style: normal; font-weight: 600; }
.md-sim-lines em.ok { color: #127A4B; }
.md-sim-lines em.warn { color: #9A5B00; }
.md-sim-checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: .86rem; }
.md-sim-checks li { display: grid; grid-template-columns: 22px auto minmax(0, 1fr); gap: 4px 8px; align-items: baseline; }
.md-sim-checks .mk { font-weight: 800; text-align: center; }
.md-sim-checks li.ok .mk { color: #127A4B; }
.md-sim-checks li.no .mk { color: #B42318; }
.md-sim-checks li.no b { color: #B42318; }
.md-sim-checks .d { color: #475467; overflow-wrap: anywhere; }
@media (max-width: 520px) { .md-sim-checks li { grid-template-columns: 22px minmax(0, 1fr); } .md-sim-checks .d { grid-column: 2; } }
table.gl-table.md-sim-trace tr.night td { background: #F2F5F8; font-weight: 700; color: #1D2939; }
table.gl-table.md-sim-trace tr.night td.r { font-family: "Roboto Mono", ui-monospace, monospace; }
table.gl-table.md-sim-trace td.step { color: #475467; font-size: .82rem; padding-left: 20px; }
table.gl-table.md-sim-trace td.wrap { min-width: 160px; font-size: .82rem; color: #475467; }
.md-sim-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; align-items: start; }
.md-sim-pair > .gl-card + .gl-card { margin-top: 0; }
.md-sim-pknote { padding: 6px 16px 10px; }
.md-sim-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 36px 16px; text-align: center; color: #475467; }
/* differences between scenario A and B */
table.gl-table tbody tr.md-sim-diff td, table.gl-table.md-sim-trace tr.night.md-sim-diff td { background: #FFF6DB; }
.md-sim-kpis > div.md-sim-diff { background: #FFF6DB; border-color: #E5A00D; box-shadow: inset 0 0 0 1px #E5A00D; }
.md-sim-kpis > div.big.md-sim-diff { background: #8A5A00; border-color: #8A5A00; box-shadow: none; }
.md-sim-avail.md-sim-diff { box-shadow: inset 0 0 0 2px #E5A00D; }
.md-sim-cmp .gl-section { padding-bottom: 4px; }
/* long step names (promotion / date override / product steps) wrap instead of widening the table */
table.gl-table.md-sim-trace td.step { white-space: normal; overflow-wrap: anywhere; min-width: 110px; max-width: 220px; }
table.gl-table.md-sim-trace td.wrap { white-space: normal; overflow-wrap: anywhere; }
/* new inputs and summary chips */
.md-sim-chk { display: flex; align-items: center; min-height: 40px; }
.md-sim-gt { display: inline-flex; align-items: center; background: #EEF2F6; color: #344054; border-radius: 999px; padding: 1px 9px; font-size: .74rem;
    font-weight: 600; max-width: 100%; overflow-wrap: anywhere; }
.md-sim-gt.prod { background: #E1EFFE; color: #1E56A0; }
/* promotions applied */
.md-sim-promo { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.md-sim-promo h4 { margin-bottom: 0; }
.md-sim-offers, .md-sim-bundle { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.md-sim-offers li { border: 1px solid #E3E8EE; border-radius: 10px; padding: 7px 10px; min-width: 0; }
.md-sim-offers .h, .md-sim-bundle li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; font-size: .86rem; }
.md-sim-offers .grow, .md-sim-bundle .grow { flex: 1 1 auto; }
.md-sim-offers .code { font-weight: 700; color: #1D2939; }
.md-sim-offers .nm, .md-sim-bundle .nm { min-width: 0; overflow-wrap: anywhere; }
.md-sim-offers .ty { color: #667085; font-size: .78rem; }
.md-sim-offers .disc { font-weight: 700; color: #127A4B; }
.md-sim-offers .note { margin-top: 3px; font-size: .8rem; color: #475467; overflow-wrap: anywhere; }
.md-sim-offtot { display: flex; justify-content: space-between; gap: 8px; font-size: .86rem; padding: 0 10px; }
.md-sim-offtot b { color: #127A4B; }
.md-sim-upg { display: flex; align-items: flex-start; gap: 6px; background: #EEF5FB; border: 1px solid #CFE0EF; color: #1F5468; border-radius: 10px;
    padding: 7px 10px; font-size: .86rem; overflow-wrap: anywhere; }
.md-sim-upg .mud-icon-root { flex: 0 0 auto; }
.md-sim-sub { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #667085; margin-top: 4px; }
.md-sim-bundle li { border-bottom: 1px dashed #E3E8EE; padding: 4px 0; }
