/* Command center (data screen) style for the demo section. */
.console-section { padding: 120px 0; border-top: 1px solid var(--line); background: radial-gradient(ellipse 80% 60% at 50% 40%, var(--wis-dark-panel) 0%, var(--wis-dark-surface) 75%); }
.console-section .section-head { max-width: 1280px; margin: 0 auto 48px; padding: 0 16px; }

.console {
  --cy: var(--wis-cyan);
  --cy-2: var(--wis-cyan);
  --cy-dim: rgba(var(--wis-cyan-rgb), .35);
  --panel: rgba(var(--wis-navy-rgb), .72);
  position: relative; padding: 0 16px 16px; background: var(--wis-navy);
  border: 1px solid rgba(var(--wis-cyan-rgb), .18); box-shadow: 0 0 60px rgba(var(--wis-cyan-rgb), .15) inset;
}
.console:fullscreen { overflow: auto; padding-top: 8px; }

/* Header */
.cs-header { display: flex; align-items: center; justify-content: center; gap: 24px; height: 84px; position: relative; }
.cs-header::after { content: ""; position: absolute; left: 0; right: 0; bottom: 8px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--cy-dim) 20%, var(--cy) 50%, var(--cy-dim) 80%, transparent); }
.cs-title { font-size: clamp(20px, 2.4vw, 34px); font-weight: 500; letter-spacing: 6px; white-space: nowrap;
  background: linear-gradient(180deg, var(--wis-gray), var(--cy) 70%); -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 24px rgba(var(--wis-cyan-rgb), .25); }
.cs-title span { margin: 0 16px; }
.cs-deco { flex: 1; height: 26px; position: relative; max-width: 360px; }
.cs-deco::before { content: ""; position: absolute; top: 12px; left: 0; right: 60px; height: 1px; background: var(--cy-dim); }
.cs-deco::after { content: ""; position: absolute; top: 2px; right: 0; width: 56px; height: 20px;
  background: repeating-linear-gradient(115deg, var(--cy) 0 6px, transparent 6px 12px); opacity: .9; }
.cs-deco.right { transform: scaleX(-1); }

/* Toolbar */
.cs-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 6px 0 14px; flex-wrap: wrap; }
.cs-tabs, .cs-controls { display: flex; }
.cs-toolbar button { background: rgba(var(--wis-navy-rgb), .9); border: 1px solid var(--cy-dim); color: var(--wis-gray); padding: 7px 18px;
  font: 14px var(--sans); cursor: pointer; margin-left: -1px; transition: background .2s; }
.cs-toolbar button:hover { background: rgba(var(--wis-cyan-rgb), .12); }
.cs-toolbar button.active { background: linear-gradient(180deg, var(--wis-cyan), var(--wis-hover)); color: #fff; border-color: var(--cy); }

/* Grid */
.cs-scenes { display: flex; gap: 8px; margin: -4px 0 14px; flex-wrap: wrap; }
.cs-scenes button { background: transparent; border: 1px dashed var(--cy-dim); color: var(--wis-cyan); padding: 3px 14px; font: 13px var(--sans); cursor: pointer; transition: all .2s; }
.cs-scenes button:hover { color: #fff; border-color: var(--cy); }
.cs-scenes button.active { border-style: solid; border-color: var(--cy); color: var(--cy); background: rgba(var(--wis-cyan-rgb), .1); box-shadow: 0 0 10px rgba(var(--wis-cyan-rgb), .25) inset; }
.cs-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr) 300px; gap: 14px; height: 680px; }
.cs-col { display: flex; flex-direction: column; gap: 14px; min-height: 0; }
.panel { position: relative; background: var(--panel); border: 1px solid var(--cy-dim); padding: 12px 16px 14px; min-height: 0;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px)); }
.panel::before { content: ""; position: absolute; top: 6px; left: 8px; width: 28px; height: 3px;
  background: repeating-linear-gradient(90deg, var(--cy) 0 8px, transparent 8px 11px); }
.panel.grow { flex: 1; display: flex; flex-direction: column; }
.panel-title { text-align: center; font-size: 15px; letter-spacing: 2px; color: var(--wis-gray); margin-bottom: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.panel-title::before, .panel-title::after { content: ">>>>>"; color: var(--cy-2); font-family: var(--mono); font-size: 11px; letter-spacing: -1px; margin: 0 10px; opacity: .8; }
.panel-title::after { content: "<<<<<"; }
.panel-note { text-align: center; font-size: 11px; color: var(--ink-3); margin-top: 8px; letter-spacing: 1px; }

/* Gauges */
.gauges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.gauge { position: relative; text-align: center; }
.gauge svg { width: 100%; max-width: 78px; transform: rotate(-90deg); }
.gauge circle { fill: none; stroke-width: 6; }
.gauge .track { stroke: rgba(var(--wis-cyan-rgb), .12); }
.gauge .bar { stroke: var(--cy); stroke-linecap: round; stroke-dasharray: 201; stroke-dashoffset: 201; transition: stroke-dashoffset 1s ease; filter: drop-shadow(0 0 4px var(--cy)); }
.gauge.amber .bar { stroke: #f5b544; filter: drop-shadow(0 0 4px #f5b544); }
.gauge b { position: absolute; top: 0; left: 0; right: 0; height: 78px; max-width: 78px; margin: 0 auto; display: grid; place-items: center; font: 400 20px var(--num); color: #fff; }
.gauge span { display: block; font-size: 12px; color: var(--cy); margin-top: 2px; }
.gauge.amber span { color: #f5b544; }

/* Profile */
.profile { flex: 1; display: flex; flex-direction: column; gap: 12px; font-size: 13px; overflow: hidden; }
.pf-name { font-size: 16px; color: #fff; }
.pf-ind { color: var(--ink-2); font-size: 12px; }
.pf-label { font-family: var(--mono); font-size: 10px; letter-spacing: 2px; color: var(--cy-2); margin-bottom: 6px; }
.pf-file { display: flex; align-items: center; gap: 8px; color: var(--wis-gray); padding: 4px 0; border-bottom: 1px dashed rgba(var(--wis-cyan-rgb), .15); }
.pf-file::before { content: ""; width: 10px; height: 12px; border: 1px solid var(--cy); flex: none; }
.pf-skills { display: flex; flex-wrap: wrap; gap: 6px; }
.pf-skills span { border: 1px solid var(--cy-dim); color: var(--cy); padding: 1px 8px; font-size: 12px; transition: all .3s; }
.pf-skills span.hot { background: var(--cy); color: var(--wis-navy); box-shadow: 0 0 10px var(--cy); }

/* Chat panel */
.chat-panel { display: flex; flex-direction: column; }
.chat-meta { text-align: center; font-size: 11px; color: var(--ink-3); letter-spacing: 1px; margin-top: -6px; margin-bottom: 8px; }
.chat-body { flex: 1; overflow-y: auto; padding: 8px 6px; scroll-behavior: smooth; scrollbar-width: thin; scrollbar-color: var(--cy-dim) transparent; }
.chat-input { margin-top: 10px; padding: 10px 14px; border: 1px solid rgba(var(--wis-cyan-rgb), .2); color: var(--ink-3); font-size: 13px; }

.msg { display: flex; gap: 10px; margin-bottom: 16px; animation: msgIn .35s ease-out; }
.msg-av { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 11px;
  background: var(--wis-dark-panel); color: var(--wis-gray); border: 1px solid rgba(255, 255, 255, .1); }
.msg.staff .msg-av { background: var(--wis-navy); }
.msg.bot .msg-av { background: radial-gradient(circle at 30% 30%, var(--wis-cyan), var(--wis-hover)); color: var(--wis-navy); font-weight: 700; box-shadow: 0 0 12px rgba(var(--wis-cyan-rgb), .5); }
.msg-c { min-width: 0; max-width: 82%; }
.msg-n { font-size: 12px; color: var(--ink-3); margin-bottom: 4px; display: flex; gap: 6px; align-items: center; }
.msg-n i { font-style: normal; font-size: 10px; padding: 0 5px; border: 1px solid var(--cy-dim); color: var(--cy); }
.msg-b { background: rgba(255, 255, 255, .06); padding: 10px 14px; font-size: 14px; color: var(--wis-gray); white-space: pre-wrap; border: 1px solid rgba(255, 255, 255, .06); }
.msg.bot .msg-b { background: rgba(var(--wis-cyan-rgb), .07); border-color: rgba(var(--wis-cyan-rgb), .3); border-left: 2px solid var(--cy); }

.m-card { margin-top: 10px; border: 1px solid var(--cy-dim); background: rgba(var(--wis-navy-rgb), .7); }
.m-card-t { padding: 6px 12px; font-size: 12px; color: var(--wis-navy); background: linear-gradient(90deg, var(--cy), var(--wis-cyan)); font-weight: 600; letter-spacing: 1px; }
.m-row { display: flex; gap: 12px; padding: 7px 12px; font-size: 13px; border-top: 1px solid rgba(var(--wis-cyan-rgb), .12); }
.m-row:first-of-type { border-top: none; }
.m-row .k { flex: none; width: 60px; color: var(--cy-2); }
.m-doc { margin-top: 10px; display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--cy-dim); background: rgba(var(--wis-navy-rgb), .7); }
.m-doc-i { flex: none; width: 34px; height: 34px; display: grid; place-items: center; font-size: 10px; border: 1px solid var(--cy); color: var(--cy); }
.m-doc b { display: block; font-size: 13px; font-weight: 500; }
.m-doc span { font-size: 12px; color: var(--ink-3); }

.typing .msg-b { display: flex; gap: 5px; padding: 14px; }
.typing .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--cy); animation: blink 1s infinite; }
.typing .dot:nth-child(2) { animation-delay: .2s; }
.typing .dot:nth-child(3) { animation-delay: .4s; }

/* Model bars */
.model-bars { display: flex; flex-direction: column; gap: 9px; padding: 4px 0; }
.mb { display: grid; grid-template-columns: 64px 1fr 44px; align-items: center; gap: 8px; font-size: 13px; transition: color .3s; }
.mb-track { height: 10px; background: rgba(var(--wis-cyan-rgb), .08); }
.mb-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--wis-hover), var(--cy)); transition: width .8s ease; }
.mb-val { font: 14px var(--num); text-align: right; color: #fff; }
.mb.hot { color: var(--cy); }
.mb.hot .mb-fill { box-shadow: 0 0 10px var(--cy); }

/* Route */
.route { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.route-idle { text-align: center; color: var(--ink-3); font-size: 13px; }
.rt-row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed rgba(var(--wis-cyan-rgb), .15); font-size: 13px; }
.rt-row span { color: var(--ink-3); flex: none; }
.rt-row b { font-weight: 400; color: var(--wis-gray); text-align: right; }
.rt-row b.big { font: 20px var(--num); color: var(--cy); text-shadow: 0 0 10px rgba(var(--wis-cyan-rgb), .5); }
.route.flash { animation: flash .6s ease-out; }

/* Ticker */
.cs-ticker { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 10px 16px; background: rgba(var(--wis-cyan-rgb), .35); border: 1px solid rgba(var(--wis-cyan-rgb), .15); font-size: 14px; overflow: hidden; }
.cs-ticker i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #3dfc9b; box-shadow: 0 0 8px #3dfc9b; animation: blink 1.6s infinite; }
.ticker-track { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--wis-gray); }
.ticker-track.in { animation: tickIn .5s ease-out; }

/* Rich message parts */
.msg-n i.push { border-color: #f5b544; color: #f5b544; }
.rt-row b.push { color: #f5b544; }
.m-voice-bar { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.m-voice-play { color: var(--cy); font-size: 11px; }
.m-wave { display: flex; align-items: center; gap: 3px; flex: 1; }
.m-wave i { width: 3px; background: var(--cy); opacity: .8; border-radius: 2px; }
.m-voice-sec { font: 13px var(--num); color: var(--ink-2); }
.m-voice-text { margin-top: 8px; padding-top: 8px; border-top: 1px dashed rgba(255, 255, 255, .12); font-size: 13px; color: var(--ink-2); }
.zoom { cursor: zoom-in; }
.m-photo { display: block; margin-top: 10px; width: 180px; border: 1px solid rgba(255, 255, 255, .12); }
.m-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; max-width: 420px; }
.m-grid img, .m-slides img { width: 100%; display: block; border: 1px solid var(--cy-dim); transition: transform .2s; }
.m-grid img:hover, .m-slides img:hover { transform: scale(1.03); }
.m-slides { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 10px; max-width: 460px; }
.m-video { position: relative; margin-top: 10px; width: 170px; border: 1px solid var(--cy-dim); }
.m-video img { width: 100%; display: block; }
.m-video-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(var(--wis-navy-rgb), .6); border: 1px solid #fff; color: #fff; font-size: 14px; pointer-events: none; }
.m-video-dur { position: absolute; right: 6px; bottom: 6px; font: 12px var(--num); background: rgba(0, 0, 0, .6); padding: 0 6px; pointer-events: none; }
.m-chart { margin-top: 10px; border: 1px solid var(--cy-dim); background: rgba(var(--wis-navy-rgb), .7); padding: 10px 12px; }
.m-chart-t { font-size: 12px; color: var(--cy-2); margin-bottom: 8px; }
.m-bars { display: flex; align-items: flex-end; gap: 8px; height: 130px; }
.m-bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-width: 0; }
.m-bar-fill { width: 70%; background: linear-gradient(180deg, rgba(var(--wis-cyan-rgb), .7), rgba(var(--wis-cyan-rgb), .5)); animation: grow .8s ease-out; transform-origin: bottom; }
.m-bar.top .m-bar-fill { background: linear-gradient(180deg, #f5b544, rgba(245, 181, 68, .4)); box-shadow: 0 0 10px rgba(245, 181, 68, .4); }
.m-bar-v { font: 11px var(--num); color: var(--ink-2); margin-bottom: 3px; }
.m-bar.top .m-bar-v { color: #f5b544; }
.m-bar-l { font-size: 11px; color: var(--ink-3); margin-top: 4px; white-space: nowrap; }
.m-alert { margin-top: 10px; border: 1px solid; background: rgba(var(--wis-navy-rgb), .7); }
.m-alert-t { padding: 6px 12px; font-size: 13px; font-weight: 600; color: #fff; display: flex; align-items: center; gap: 8px; }
.m-alert-t::before { content: "!"; width: 16px; height: 16px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 900; }
.m-alert.red { border-color: rgba(255, 92, 92, .6); }
.m-alert.red .m-alert-t { background: linear-gradient(90deg, #d9363e, #a3242b); animation: alarm 1.2s ease-in-out 3; }
.m-alert.red .m-alert-t::before { color: #d9363e; }
.m-alert.amber { border-color: rgba(245, 181, 68, .6); }
.m-alert.amber .m-alert-t { background: linear-gradient(90deg, #d98a14, #a8660c); }
.m-alert.amber .m-alert-t::before { color: #d98a14; }
.m-alert.blue { border-color: var(--cy-dim); }
.m-alert.blue .m-alert-t { background: linear-gradient(90deg, var(--wis-cyan), var(--wis-hover)); }
.m-alert.blue .m-alert-t::before { color: var(--wis-cyan); }
.m-alert .k { width: 76px; }

.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(var(--wis-navy-rgb), .9); display: grid; place-items: center; cursor: zoom-out; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 90vw; max-height: 88vh; border: 1px solid var(--cy-dim); box-shadow: 0 0 60px rgba(var(--wis-cyan-rgb), .2); }

@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes alarm { 50% { filter: brightness(1.5); } }
@keyframes msgIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes blink { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@keyframes flash { from { background: rgba(var(--wis-cyan-rgb), .18); } to { background: transparent; } }
@keyframes tickIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }

@media (max-width: 1180px) {
  .cs-grid { grid-template-columns: minmax(0, 1fr); height: auto; }
  .chat-panel { order: -1; height: 560px; }
  .cs-col { display: grid; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .console-section { padding: 72px 0; }
  .cs-deco { display: none; }
  .cs-title { letter-spacing: 2px; }
  .cs-toolbar { justify-content: center; }
  .cs-tabs { width: 100%; }
  .cs-tabs button { flex: 1; padding: 7px 4px; }
  .cs-col { grid-template-columns: 1fr; }
  .console { padding: 0 8px 8px; }
  .chat-panel .panel-title::before, .chat-panel .panel-title::after { display: none; }
}
