/* The console home only (ADR 0024): the globe stage, tiles, inbox and apps. Shell, buttons and tables live in app.css. */

/* stage */
.stage { position: relative; height: 580px; border-radius: 28px; overflow: hidden; background: var(--stage); box-shadow: var(--glow); isolation: isolate; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; }
.stage canvas:active { cursor: grabbing; }
.stage::before { content: ""; position: absolute; inset: 0; background: radial-gradient(600px 300px at 15% 0%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%); pointer-events: none; z-index: 1; }
.ov { position: absolute; z-index: 2; }
.intro { left: 32px; top: 30px; max-width: 440px; }
.intro h2 { font-size: clamp(1.6rem, 2.6vw, 2.3rem); line-height: 1.12; margin: 0 0 8px; letter-spacing: -.02em; font-weight: 650; }
.intro p { margin: 0; color: var(--muted); } .intro b { color: var(--fg); font-weight: 600; }
.seg { display: inline-flex; padding: 4px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); margin-top: 18px; gap: 2px; backdrop-filter: blur(10px); }
.seg button { border: 0; background: none; padding: 7px 14px; border-radius: 10px; color: var(--muted); font-size: .85rem; font-weight: 500; white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--panel2); color: var(--fg); box-shadow: 0 1px 6px rgba(0,0,0,.25); }
.glass { background: color-mix(in srgb, var(--solid) 62%, transparent); border: 1px solid var(--line); border-radius: 18px; backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.hot { left: 32px; bottom: 28px; width: 300px; padding: 14px 16px; }
.hot h3, .feed h3, .mfeed h3 { margin: 0 0 10px; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.place { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 7px 8px; margin: 0 -8px; border-radius: 10px; font-size: .88rem; cursor: pointer; width: calc(100% + 16px); text-align: left; background: none; border: 0; }
.place:hover { background: var(--panel2); } .place b { font-variant-numeric: tabular-nums; }
.bar { grid-column: 1 / -1; width: 100%; height: 3px; display: block; border-radius: 3px; background: var(--line); } .bar rect { fill: var(--accent); } .bar.bad rect { fill: var(--bad); }
.feed { right: 24px; top: 24px; bottom: 24px; width: 340px; padding: 16px; display: flex; flex-direction: column; overflow: hidden; }
.chips { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.feedchip { border: 1px solid var(--line); background: none; border-radius: 99px; padding: 3px 11px; font-size: .78rem; color: var(--muted); }
.feedchip[aria-pressed="true"] { background: var(--panel2); color: var(--fg); border-color: var(--line2); }
.events { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; min-height: 0; scrollbar-width: thin; scrollbar-color: var(--line2) transparent; overscroll-behavior: contain; }
.ev { display: grid; grid-template-columns: 10px 1fr auto; gap: 2px 12px; padding: 10px 6px; border-bottom: 1px solid var(--line); }
.ev { position: relative; border-radius: 8px; } .ev:hover { background: var(--hover, rgba(127,127,127,.1)); } .ev a.rowhit::after { content: ""; position: absolute; inset: 0; }
.ev.new { animation: in .5s cubic-bezier(.2,.8,.2,1); }
.ev .t { font-size: .9rem; font-weight: 500; } .ev .m { grid-column: 2; color: var(--muted); font-size: .8rem; } .ev time { color: var(--faint); font-size: .75rem; font-variant-numeric: tabular-nums; }
.ev .d { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; background: var(--good); }
.ev.k-bad .d { background: var(--bad); } .ev.k-chg .d { background: var(--warn); }
@keyframes in { from { opacity: 0; transform: translateY(-14px) scale(.98); } to { opacity: 1; transform: none; } }
.mfeed { display: none; padding: 16px; margin-top: 16px; } .mfeed .events { max-height: 380px; }

/* tiles */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 20px 0; }
.kpi { padding: 18px 20px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); position: relative; overflow: hidden; transition: transform .2s, border-color .2s; display: block; }
.kpi:hover { transform: translateY(-2px); border-color: var(--line2); }
.kpi > span:first-child { color: var(--muted); font-size: .82rem; display: flex; gap: 8px; align-items: center; }
.kpi b { display: block; font-size: 2.1rem; line-height: 1.1; margin: 6px 0 2px; letter-spacing: -.03em; font-variant-numeric: tabular-nums; font-weight: 650; }
.kpi small { color: var(--muted); font-size: .8rem; } .kpi .up { color: var(--good); } .kpi .down { color: var(--bad); }
.kpi [data-spark] { position: absolute; right: 0; bottom: 0; width: 46%; height: 50px; display: block; pointer-events: none; }
.kpi small { display: block; max-width: 56%; }
.kpi.alert b { color: var(--bad); }
.spark { --tone: var(--accent); display: block; width: 100%; height: 100%; } .spark.bad { --tone: var(--bad); }
.spark .s1 { stop-color: var(--tone); stop-opacity: .35; } .spark .s2 { stop-color: var(--tone); stop-opacity: 0; }
.spark .line { stroke: var(--tone); stroke-width: 2; vector-effect: non-scaling-stroke; }

/* inbox and apps */
.cols { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; }
.hcard { border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); padding: 20px; }
.hcard > header { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; } .hcard h2 { font-size: 1.05rem; margin: 0; font-weight: 600; }
.segtabs { display: flex; gap: 4px; margin-left: auto; padding: 3px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.segtabs button { border: 0; background: none; padding: 5px 12px; border-radius: 9px; font-size: .82rem; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.segtabs button[aria-selected="true"] { background: var(--panel2); color: var(--fg); }
.n { font-size: .7rem; border-radius: 99px; padding: 0 6px; line-height: 16px; color: #fff; } .n.bad { background: var(--bad); } .n.warn { background: var(--warn); color: #1a1200; }
.q { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.qi { display: grid; grid-template-columns: auto 1fr; gap: 14px; padding: 14px 14px 14px 16px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); position: relative; --c: var(--accent2); transition: opacity .3s, transform .3s; }
.qi::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 3px; background: var(--c); }
.qi.sev-bad { --c: var(--bad); } .qi.sev-warn { --c: var(--warn); } .qi.sev-info { --c: var(--accent2); }
.qi.gone { opacity: 0; transform: translateX(30px); }
.qi .ico-wrap, .qi > .ico { width: 36px; height: 36px; padding: 8px; border-radius: 12px; background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--c); }
.qi .tt { font-weight: 550; } .qi .mm { color: var(--muted); font-size: .85rem; } .qi .mm b { color: var(--fg); font-weight: 600; } .qi .mm .sub { display: none; }
.acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.btn { border: 1px solid var(--line2); background: var(--panel); border-radius: 10px; padding: 6px 14px; font-size: .85rem; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; color: var(--fg); }
.btn:hover { background: var(--panel2); } .btn.p { background: var(--accent); color: var(--accent-ink); border-color: transparent; font-weight: 600; } .btn.p:hover { filter: brightness(1.08); }
.btn.g { border-color: transparent; background: none; color: var(--muted); } .btn.g:hover { color: var(--fg); } .btn.ghost { border-color: transparent; background: none; color: var(--muted); }
.btn .ico { width: 16px; height: 16px; }
.empty { text-align: center; color: var(--muted); padding: 26px 10px; } .empty b { display: block; color: var(--fg); margin-bottom: 2px; }
.apps { display: grid; gap: 4px; }
.app { display: grid; grid-template-columns: auto 1fr 84px; gap: 12px; align-items: center; padding: 10px 8px; border-radius: 12px; }
.app:hover { background: var(--panel2); }
.app .ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; font-weight: 700; font-size: .85rem; color: #04101c; background: linear-gradient(135deg, #7dd3fc, #5eead4); }
.app .ic.t1 { background: linear-gradient(135deg, #c4b5fd, #8b9bff); } .app .ic.t2 { background: linear-gradient(135deg, #fcd34d, #fb923c); } .app .ic.t3 { background: linear-gradient(135deg, #86efac, #4ade80); }
.app .ic.t4 { background: linear-gradient(135deg, #f9a8d4, #fb7185); } .app .ic.t5 { background: linear-gradient(135deg, #a5f3fc, #818cf8); }
.app .nm { font-weight: 550; font-size: .92rem; display: flex; align-items: center; gap: 8px; } .app small { color: var(--muted); display: block; font-size: .78rem; }
.app .st { width: 7px; height: 7px; border-radius: 50%; background: var(--good); } .app .st.idle { background: var(--warn); }
.app .spark { height: 28px; }

.keycard { margin-top: 20px; } .keycard p { margin: 0; color: var(--muted); } .keycard code { font-family: var(--mono); color: var(--fg); } .n.good { background: color-mix(in srgb, var(--good) 25%, transparent); color: var(--good); } .bad-text { color: var(--bad) !important; }


.hcard > header .btn.ghost { margin-left: auto; }
.acts .btn .ico, .hcard .btn .ico { width: 16px; height: 16px; }

@media (max-width: 1100px) {
  .feed { display: none; } .mfeed { display: block; }
  .kpis { grid-template-columns: repeat(2, 1fr); } .cols { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .stage { height: 520px; border-radius: 24px; }
  .intro { left: 20px; right: 20px; top: 20px; } .intro h2 { font-size: 1.5rem; } .hot { display: none; }
  .seg { margin-top: 14px; max-width: 100%; overflow-x: auto; } .seg button { padding: 7px 11px; font-size: .8rem; }
  .kpis { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-left: 16px; gap: 12px; margin: 14px -16px; padding: 0 16px 4px; scrollbar-width: none; }
  .kpi { flex: 0 0 72%; scroll-snap-align: start; }
  .hcard { padding: 16px; }
}

.globe-toggle { left: calc(50% - 22px); bottom: 18px; transform: none; width: 44px; height: 44px; border-radius: 50%; padding: 0; display: grid; place-items: center; background: color-mix(in srgb, var(--solid) 70%, transparent); border: 1px solid var(--line2); color: var(--fg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: none; }
.globe-toggle:hover { background: var(--panel2); }
.globe-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.globe-toggle .i-play { display: none; fill: currentColor; stroke-width: 1.6; }
.globe-toggle[aria-pressed="true"] .i-pause { display: none; } .globe-toggle[aria-pressed="true"] .i-play { display: block; }
.mfeed .events { max-height: 380px; }

/* the places page */
.stage.compact { height: 520px; }
.seg.seglinks { margin-top: 0; width: fit-content; max-width: 100%; overflow-x: auto; }
.seg.seglinks a { padding: 7px 14px; border-radius: 10px; color: var(--muted); font-size: .85rem; font-weight: 500; white-space: nowrap; }
.seg.seglinks a[aria-pressed="true"] { background: var(--panel2); color: var(--fg); box-shadow: 0 1px 6px rgba(0,0,0,.25); }
.placedetail { display: grid; gap: 14px; } .placedetail h3 { margin: 6px 0 0; font-size: 1rem; }
.tbl tr.current td { background: var(--accent-soft); }
@media (max-width: 760px) { .stage.compact { height: 420px; } }
@media (max-width: 760px) { .globe-toggle { left: auto; right: 16px; bottom: 16px; } }

.globe-toggle:active { transform: none; }
.globe-pop { position: absolute; z-index: 4; min-width: 190px; max-width: 260px; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--solid) 88%, transparent); border: 1px solid var(--line2); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 12px 40px rgba(0,0,0,.4); pointer-events: none; font-size: .86rem; }
.globe-pop.pinned { pointer-events: auto; }
.globe-pop b { display: block; font-size: .95rem; margin-bottom: 6px; }
.globe-pop dl { margin: 0 0 8px; display: grid; grid-template-columns: 1fr auto; gap: 3px 14px; }
.globe-pop dt { color: var(--muted); } .globe-pop dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.globe-pop small { color: var(--faint); }
.globe-pop .btn { display: inline-flex; padding: 6px 12px; font-size: .82rem; }
.seg { flex-wrap: wrap; max-width: 100%; }
.seg-n { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px; background: var(--bad); color: #fff; font-size: .72rem; line-height: 18px; text-align: center; }
.seg-n[hidden] { display: none; }
