/* QO2 colors mirror css/theme.css and css/designer-polish.css. */
.demo {
  --demo-blue: #1677ff;
  --demo-heading: #0b3164;
  --demo-muted: #7b8ba6;
  --demo-line: #e2e8f2;
  --demo-input-line: #b6c8ed;
  --demo-page: #f6f8fc;
  border: 1px solid var(--demo-line);
  border-radius: 8px;
  overflow: hidden;
  background: white;
  box-shadow: 0 18px 44px rgba(35,47,92,.12);
  font-family: "Poppins", Arial, sans-serif;
  font-size: 12px;
}
.demo-app-header { min-height: 76px; padding: 14px 22px; display: flex; align-items: center; justify-content: space-between; gap: 20px; background: linear-gradient(100deg,#784aad,#526dd7); color: white; }
.demo-app-header img { width: 140px; height: auto; }
.demo-app-header > div { text-align: center; }
.demo-app-header strong { display: block; font-size: 17px; font-weight: 700; }
.demo-app-header small { display: block; font-size: 10px; opacity: .85; }
.demo-badge { padding: 7px 10px; background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.25); border-radius: 6px; white-space: nowrap; font-size: 10px; }
.demo-shell { display: grid; grid-template-columns: 88px minmax(0,1fr); }
.demo-tabs { display: flex; flex-direction: column; gap: 10px; padding: 16px 8px; background: linear-gradient(180deg,#7347a6,#526dd0); color: white; }
.demo-rail-brand { display: grid; place-items: center; height: 44px; margin-bottom: 12px; font-weight: 800; background: #ffffff16; border: 1px solid #ffffff50; border-radius: 6px; }
.demo-tabs button { display: grid; justify-items: center; align-content: center; gap: 7px; min-height: 58px; padding: 8px 3px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: white; }
.demo-tabs button i { font-size: 15px; }
.demo-tabs button span { font-size: 10px; font-weight: 500; }
.demo-tabs button:hover { background: #ffffff15; }
.demo-tabs button[aria-selected=true] { background: #b775d872; border-color: #e0abe6; }
.demo-tabs button:focus-visible { outline-color: white; outline-offset: 1px; }
.demo-workspace { min-width: 0; background: var(--demo-page); padding: 18px; }
.demo-project-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; margin-bottom: 15px; border: 1px solid var(--demo-line); border-radius: 7px; background: white; box-shadow: 0 8px 26px rgba(27,39,72,.06); }
.demo-project-bar > div { display: flex; align-items: center; gap: 10px; }
.demo-project-bar strong { font-size: 12px; color: var(--demo-heading); }
.demo-project-bar small { display: block; color: var(--demo-muted); font-size: 10px; }
.demo-project-bar .status-dot { width: 9px; height: 9px; box-shadow: 0 0 0 4px #d9f2e1; }
.demo label { font-size: 10px; font-weight: 500; }
.demo-project-bar label { display: flex; align-items: center; gap: 8px; }
.demo select, .demo input { height: 30px; min-width: 0; border: 1px solid var(--demo-input-line); border-radius: 7px; background: white; color: #17233c; font-family: inherit; font-size: 11px; padding: 4px 8px; }
.demo select { max-width: 100%; }
.demo input { width: 100%; text-align: center; }
.demo input[type=number] { appearance: textfield; -moz-appearance: textfield; }
.demo input::-webkit-inner-spin-button, .demo input::-webkit-outer-spin-button { appearance: none; margin: 0; }
.demo h4 { margin: 0; font-size: 12px; font-weight: 700; }
.demo p { font-size: 10px; color: var(--demo-muted); }
.demo-body { height: 590px; }
.demo-panel { height: 100%; overflow-y: auto; padding: 0 0 12px; scrollbar-width: thin; scrollbar-color: #9bb5df transparent; }
.demo-module-title { font-size: 12px; padding: 8px 0 12px; margin-bottom: 12px; border-bottom: 1px solid var(--demo-line); }
.demo-button { min-height: 32px; border: 0; padding: 8px 13px; display: inline-flex; justify-content: center; align-items: center; gap: 8px; background: var(--demo-blue); color: white; border-radius: 7px; font-size: 10px; font-weight: 500; }
.demo-button:hover { background: #0f63d8; }
.demo dl { margin: 0; }
.demo dl > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-block: 6px; }
.demo dt { color: var(--demo-muted); font-size: 10px; }
.demo dd { margin: 0; font-size: 11px; font-weight: 600; color: var(--demo-heading); }
.bom-overview { display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 12px; margin-bottom: 16px; }
.demo-info { border: 1px solid var(--demo-line); background: white; border-radius: 7px; overflow: hidden; padding: 12px; }
.demo-info h4 { padding-bottom: 8px; margin-bottom: 8px; border-bottom: 1px solid var(--demo-line); }
.demo-info label { display: grid; gap: 6px; margin-bottom: 10px; }
.demo-info dd { font-weight: 500; text-align: right; }
.demo-location { display: inline-block; padding: 8px 18px; background: var(--demo-blue); color: white; border-radius: 7px 7px 0 0; font-size: 11px; }
.demo-table { width: 100%; border-collapse: collapse; font-size: 10px; background: white; }
.demo-table th, .demo-table td { text-align: left; padding: 11px 9px; border-bottom: 1px solid var(--demo-line); overflow-wrap: anywhere; }
.demo-table th { font-size: 10px; font-weight: 700; background: #fcfdff; }
.demo-table .demo-family th { background: #eef5ff; color: var(--demo-heading); padding: 7px 9px; }
.demo-table td { color: var(--demo-heading); }
.demo-table strong { font-weight: 600; }
.demo-table small { display: block; font-size: 9px; color: var(--demo-muted); margin-top: 4px; }
.bom-table td:first-child { width: 135px; }
.bom-table td:nth-child(2) { color: #415c84; }
.bom-table td:nth-child(n+3) { text-align: center; }
.bom-table .demo-qty { width: 48px; }
.discount-layout { display: grid; grid-template-columns: minmax(0,2fr) minmax(210px,1fr); gap: 14px; background: white; border: 1px solid var(--demo-line); border-radius: 7px; padding: 18px; }
.demo-category-count { display: inline-block; color: var(--demo-heading); background: #eaf4ff; border: 1px solid #c4d7fc; border-radius: 15px; font-size: 9px; padding: 4px 9px; margin-block: 12px 18px; }
.demo-discount-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.demo-discount-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 12px; min-height: 94px; border: 1px solid var(--demo-line); border-radius: 7px; box-shadow: 0 8px 20px #273e5e08; }
.demo-discount-card strong { font-size: 11px; color: var(--demo-heading); }
.demo-discount-card small { display: block; font-size: 9px; color: var(--demo-muted); margin-top: 5px; overflow-wrap: anywhere; }
.demo-percent { display: inline-flex; align-items: center; width: 72px; min-width: 60px; height: 30px; border: 1px solid var(--demo-input-line); border-radius: 7px; padding: 0 6px; background: white; color: var(--demo-heading); }
.demo-percent input { border: 0; border-radius: 0; background: transparent; height: 26px; padding: 0 2px; text-align: center; width: 100%; }
.demo-percent:focus-within { outline: 2px solid var(--demo-blue); outline-offset: 1px; }
.demo-percent input:focus-visible { outline: none; }
.demo-percent > span { font-size: 10px; font-weight: 700; }
.demo-project-totals { padding-left: 16px; border-left: 1px solid var(--demo-line); }
.demo-project-totals h4 { margin-bottom: 12px; }
.demo-project-totals p { margin-top: 16px; }
.demo-pricing-intro { border: 1px solid var(--demo-line); background: white; border-radius: 7px; padding: 14px; margin-bottom: 12px; }
.demo-pricing-intro p { margin-top: 4px; }
.demo-pricing-toolbar { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; background: white; border: 1px solid var(--demo-line); border-radius: 7px; padding: 12px; }
.demo-pricing-toolbar label { display: grid; gap: 5px; flex: 1; min-width: 105px; }
.demo-pricing-toolbar .demo-percent { width: 100%; }
.demo-summary { display: grid; grid-template-columns: repeat(auto-fit,minmax(115px,1fr)); gap: 8px; margin-block: 13px; }
.demo-summary > div { min-width: 0; border: 1px solid var(--demo-line); border-radius: 7px; padding: 12px 10px; background: white; }
.demo-summary small { display: block; color: var(--demo-muted); font-size: 9px; font-weight: 600; margin-bottom: 9px; }
.demo-summary strong { font-size: 14px; font-weight: 700; overflow-wrap: anywhere; }
.demo-summary .summary-gross { background: #e9edfc; border-color: #b9caff; }
.demo-summary .summary-purchase { background: #eeedf4; border-color: #b9caff; }
.demo-summary .summary-margin { background: #e5f4ef; border-color: #7bdab0; }
.price-table { table-layout: fixed; }
.price-table th:first-child, .price-table td:first-child { width: 185px; }
.price-table th, .price-table td { padding: 10px 6px; }
.price-table tr:nth-child(even) { background: #eaf4ff; }
.price-table td:not(:first-child) { text-align: center; }
.price-table .demo-percent { width: 76px; max-width: 100%; min-width: 0; padding-inline: 3px; margin-inline: auto; }
.price-table th:nth-child(4), .price-table th:nth-child(5), .price-table th:nth-child(7), .price-table th:nth-child(8) { text-align: center; }
.price-table td:first-child small { line-height: 1.5; }
.is-warning { color: #c72828 !important; }
.demo-percent.is-warning { border-color: #e05a5a; background: #fff5f5; }
.demo-percent.is-warning input { color: #c72828; }
.demo-warning { margin-top: 12px; color: #c72828 !important; }
.demo-designer { height: 472px; display: grid; grid-template-columns: 190px minmax(0,1fr); border: 1px solid var(--demo-line); background: white; }
.demo-designer aside { padding: 14px; }
.demo-designer aside h4 { color: var(--demo-heading); margin-bottom: 12px; }
.demo-hardware { padding: 12px 9px; border: 1px solid #d5e2f9; border-left: 4px solid #9cc1ff; border-radius: 7px; margin-bottom: 10px; box-shadow: 0 5px 14px #203a6310; }
.demo-hardware strong { display: block; font-size: 10px; color: var(--demo-heading); }
.demo-hardware small { display: block; font-size: 9px; color: var(--demo-muted); }
.demo-link-key { display: block; padding: 7px 8px; margin-bottom: 8px; border: 1px solid var(--demo-line); border-left: 4px solid; border-radius: 5px; font-size: 10px; }
.demo-link-key.access { border-left-color: #22c55e; }
.demo-link-key.stacking { border-left-color: #f97316; }
.demo-link-key.uplink { border-left-color: #1677ff; }
.demo-canvas { position: relative; display: grid; align-items: center; padding: 24px 18px 65px; min-width: 0; overflow: hidden; background-color: #203a63; background-image: linear-gradient(#ffffff0d 1px,transparent 1px),linear-gradient(90deg,#ffffff0d 1px,transparent 1px); background-size: 22px 22px; }
.demo-topology { --demo-zoom: 1; position: relative; width: 100%; max-width: 550px; justify-self: center; transform: scale(var(--demo-zoom)); transition: transform .2s; }
.topology-aps, .topology-switches { display: flex; justify-content: space-between; gap: 40px; }
.topology-node { position: relative; width: 165px; border: 1px solid #cbdaf4; border-radius: 7px; padding: 12px 9px; background: #f9fbff; color: #0a326b; z-index: 1; }
.topology-node strong { font-size: 10px; }
.topology-node i { color: #1677ff; font-size: 11px; margin-right: 5px; }
.topology-node small { display: block; color: #7080a0; font-size: 9px; margin-top: 4px; }
.topology-node:before, .topology-node:after { content: ""; position: absolute; width: 10px; height: 10px; left: calc(50% - 5px); background: #1677ff; border: 2px solid white; border-radius: 50%; }
.topology-node:before { top: -6px; }
.topology-node:after { bottom: -6px; }
.topology-aps .topology-node { margin-bottom: 70px; }
.topology-aps .topology-node:after { height: 70px; width: 0; top: calc(100% + 6px); left: 50%; border: 0; border-left: 3px solid #22c55e; border-radius: 0; background: none; }
.topology-switches { position: relative; }
.topology-switches:before { content: ""; position: absolute; top: 28px; left: 80px; right: 80px; border-top: 4px dotted #f97316; }
.topology-link-label { display: block; position: absolute; top: 128px; left: 50%; transform: translateX(-50%); color: #ffb47f; font-size: 9px; }
.topology-switches:after { content: ""; position: absolute; top: 100%; left: 82px; right: 82px; height: 35px; border: 2px dashed #1677ff; border-top: 0; }
.topology-uplink { position: relative; margin: 62px auto 0; width: 145px; padding: 9px; background: #eef5ff; color: #0a326b; text-align: center; border-radius: 5px; font-size: 10px; }
.topology-uplink:before { content: ""; position: absolute; bottom: 100%; left: 50%; height: 28px; border-left: 2px dashed #1677ff; }
.demo-canvas-foot { position: absolute; bottom: 12px; left: 14px; right: 14px; display: flex; justify-content: space-between; align-items: center; gap: 12px; color: #d9e7fd; font-size: 10px; }
.demo-canvas-foot label { display: flex; align-items: center; gap: 7px; }
.demo-naas-heading { display: flex; justify-content: space-between; gap: 15px; align-items: center; padding: 12px 0 20px; }
.demo-naas-heading label { display: flex; align-items: center; gap: 10px; }
.demo-naas-heading h4, .demo-naas-layout h4 { color: var(--demo-heading); }
.demo-naas-layout { display: grid; grid-template-columns: minmax(0,1.7fr) minmax(220px,1fr); gap: 14px; }
.demo-naas-layout > div { padding: 16px; background: white; border: 1px solid var(--demo-line); border-radius: 7px; }
.demo-naas-totals { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; padding-block: 18px; }
.demo-naas-totals small { display: block; font-size: 9px; color: var(--demo-muted); }
.demo-naas-totals strong { color: var(--demo-heading); font-size: 18px; }
.demo-cashflow-chart { border-top: 1px solid var(--demo-line); padding-top: 10px; }
.chart-labels { display: flex; gap: 20px; font-size: 10px; color: #1677ff; }
.chart-labels span:last-child { color: #f97316; }
.demo-cashflow-chart svg { width: 100%; height: 160px; overflow: visible; }
.demo-cashflow-chart path { fill: none; vector-effect: non-scaling-stroke; }
.chart-grid { stroke: #d8e3f8; stroke-width: 1; }
.chart-capex { stroke: #5a97ff; stroke-width: 2; }
.chart-naas { stroke: #f97316; stroke-width: 2; }
.chart-axis { display: flex; justify-content: space-between; color: var(--demo-muted); font-size: 9px; }
.demo-note { margin-top: 16px; }
.demo-timeline h4 { margin-bottom: 18px; }
.demo-timeline > div { position: relative; margin-left: 12px; padding: 0 0 25px 22px; border-left: 1px solid #d2def4; }
.demo-timeline > div:last-child { padding-bottom: 0; }
.demo-timeline small { color: var(--demo-heading); font-size: 9px; font-weight: 700; }
.demo-timeline p { color: var(--demo-heading); margin-block: 4px; }
.demo-timeline strong { font-size: 18px; color: var(--demo-heading); }
.demo-timeline > div > span:last-child { font-size: 9px; }
.timeline-dot { display: grid; place-items: center; position: absolute; top: 0; left: -13px; width: 26px; height: 26px; border-radius: 50%; background: white; border: 1px solid var(--demo-line); color: var(--demo-heading); }
.timeline-dot.initial { background: #ffdb74; }
.timeline-dot.loyalty { background: #2dbf5a; color: white; }
.demo-export-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.demo-export-grid article { padding: 16px; border: 1px solid var(--demo-line); background: white; border-radius: 7px; }
.demo-export-grid i { color: #1677ff; background: #eaf4ff; padding: 12px; border-radius: 7px; font-size: 17px; margin-bottom: 12px; }
.demo-export-grid h4 { color: var(--demo-heading); font-size: 11px; }
.demo-export-grid p { margin-top: 8px; }
.demo-export-action { display: flex; justify-content: space-between; align-items: center; gap: 15px; border-top: 1px solid var(--demo-line); margin-top: 20px; padding-top: 18px; }
.demo-caption { height: 58px; padding: 10px 20px; display: flex; align-items: center; justify-content: space-between; gap: 25px; background: #eef5ff; border-top: 1px solid var(--demo-line); color: var(--demo-heading); font-size: 11px; }
#caption-index { white-space: nowrap; font-size: 10px; color: var(--demo-muted); }
.demo-disclaimer { margin: 0; padding: 9px 20px; color: var(--demo-muted); background: white; border-top: 1px solid var(--demo-line); font-size: 9px !important; }

@media (max-width: 1050px) {
  .demo-app-header strong { font-size: 13px; }
  .demo-badge { display: none; }
  .demo-shell { grid-template-columns: 70px minmax(0,1fr); }
  .demo-workspace { padding: 12px; }
  .demo-discount-grid { grid-template-columns: 1fr; }
  .price-table th:first-child, .price-table td:first-child { width: 140px; }
  .demo-export-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .demo-designer { grid-template-columns: 150px minmax(0,1fr); }
  .demo-designer aside { padding: 10px; }
  .topology-node { width: 135px; }
  .topology-node strong { font-size: 9px; }
  .topology-switches:after { left: 68px; right: 68px; }
}
@media (max-width: 760px) {
  .demo { width: calc(100% - 24px); }
  .demo-app-header { padding: 12px; min-height: 62px; gap: 12px; }
  .demo-app-header img { width: 105px; }
  .demo-app-header strong { font-size: 10px; }
  .demo-app-header small { font-size: 8px; }
  .demo-shell { display: block; }
  .demo-rail-brand { display: none; }
  .demo-tabs { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 4px; padding: 8px 6px; }
  .demo-tabs button { min-height: 48px; gap: 6px; }
  .demo-tabs button i { font-size: 12px; }
  .demo-tabs button span { font-size: 8px; }
  .demo-workspace { padding: 12px 10px; }
  .demo-project-bar { padding: 10px; flex-wrap: wrap; }
  .demo-project-bar strong { font-size: 11px; }
  .demo-project-bar small { font-size: 8px; }
  .demo-project-bar label { font-size: 9px; }
  .demo-project-bar select { height: 26px; font-size: 10px; }
  .demo-body { height: 610px; }
  .bom-overview { grid-template-columns: 1fr 1fr; gap: 8px; }
  .demo-info:first-child { display: none; }
  .demo-info { padding: 10px; }
  .demo-info h4 { font-size: 10px; }
  .demo-info dd { font-size: 9px; }
  .demo-info dt { font-size: 9px; }
  .demo-info .demo-button { width: 100%; font-size: 9px; }
  .demo-table { font-size: 9px; }
  .bom-table th:nth-child(2), .bom-table td:nth-child(2), .bom-table th:nth-child(4), .bom-table td:nth-child(4) { display: none; }
  .bom-table td:first-child { width: 100px; }
  .bom-table td, .bom-table th { padding: 10px 5px; font-size: 9px; }
  .bom-table .demo-qty { width: 36px; }
  .discount-layout { grid-template-columns: 1fr; padding: 12px; }
  .demo-project-totals { padding: 15px 0 0; border-left: 0; border-top: 1px solid var(--demo-line); }
  .demo-discount-card { min-height: 72px; padding: 12px; }
  .demo-category-count { margin-block: 8px 12px; }
  .demo-pricing-toolbar { gap: 10px; }
  .demo-pricing-toolbar label { min-width: 115px; }
  .demo-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .demo-summary strong { font-size: 13px; }
  .price-table, .price-table tbody { display: block; }
  .price-table thead { display: none; }
  .price-table tr { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); padding: 12px; gap: 10px; border: 1px solid var(--demo-line); margin-bottom: 10px; border-radius: 7px; }
  .price-table td, .price-table td:first-child { width: auto; display: block; padding: 0; border: 0; text-align: left; }
  .price-table td:first-child { grid-column: 1/-1; }
  .price-table td[data-label]:before { content: attr(data-label); display: block; color: var(--demo-muted); font-size: 9px; margin-bottom: 4px; }
  .price-table .demo-percent { width: 80px; }
  .demo-designer { grid-template-columns: 1fr; height: 500px; }
  .demo-designer aside { display: none; }
  .demo-canvas { padding: 25px 12px 60px; }
  .topology-aps, .topology-switches { gap: 25px; }
  .topology-node { width: 125px; padding: 10px 6px; }
  .topology-node strong { font-size: 8px; }
  .topology-node small { font-size: 8px; }
  .topology-node i { font-size: 9px; margin-right: 3px; }
  .topology-switches:after { left: 62px; right: 62px; }
  .topology-switches:before { left: 60px; right: 60px; }
  .topology-link-label { top: 121px; }
  .demo-canvas-foot { font-size: 8px; left: 10px; right: 10px; gap: 8px; }
  .demo-naas-heading { flex-wrap: wrap; padding-bottom: 14px; }
  .demo-naas-layout { grid-template-columns: 1fr; }
  .demo-naas-totals strong { font-size: 15px; }
  .demo-timeline > div { padding-bottom: 20px; }
  .demo-export-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .demo-export-grid article { padding: 12px; }
  .demo-export-grid h4 { font-size: 10px; }
  .demo-export-grid p { font-size: 9px; }
  .demo-export-action { align-items: start; flex-direction: column; }
  .demo-caption { height: 76px; padding: 12px; font-size: 10px; gap: 12px; }
  .demo-disclaimer { padding: 10px 12px; font-size: 8px !important; }
}
@media (max-width: 360px) {
  .demo-tabs { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .demo-app-header img { width: 86px; }
  .demo-app-header strong { font-size: 9px; }
  .demo-project-bar label { width: 100%; justify-content: space-between; }
  .demo-pricing-toolbar label { width: 100%; flex-basis: 100%; }
  .topology-node { width: 110px; }
  .topology-aps, .topology-switches { gap: 10px; }
  .topology-switches:after { left: 55px; right: 55px; }
}
@media (prefers-reduced-motion: no-preference) {
  .demo-panel { animation: demo-panel-in .2s ease; }
  @keyframes demo-panel-in { from { opacity: .65; } to { opacity: 1; } }
}
