/* ==========================================================================================
   AlphaStudio Console — dock layout (2026-10-17). Replaces the sidebar shell with a floating
   top dock, a bento Overview, Ctrl+K palette, activity chart and server tags.
   Loaded after console.css so it overrides the old shell rules.
   ========================================================================================== */

/* ---------- shell ---------- */
.app { display: block; min-height: 100vh; }
.sidebar, .mobilebar { display: none !important; }
.main { max-width: 1280px; margin: 0 auto; padding: 98px clamp(16px, 3vw, 32px) 64px; }

.dock {
    position: fixed; z-index: 60; top: 14px; left: 50%; transform: translateX(-50%);
    width: calc(min(1280px, 100%) - 28px);
    display: flex; align-items: center; gap: 14px; height: 60px; padding: 0 10px 0 16px; border-radius: 18px;
    background: rgba(12, 9, 28, .62); border: 1px solid rgba(196, 181, 253, .16);
    backdrop-filter: blur(18px) saturate(1.5); -webkit-backdrop-filter: blur(18px) saturate(1.5);
    box-shadow: 0 18px 50px -24px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 255, 255, .05);
    transition: background .3s, box-shadow .3s;
}
.dock.scrolled { background: rgba(10, 7, 24, .86); box-shadow: 0 22px 60px -22px rgba(0, 0, 0, .95), 0 0 0 1px rgba(157, 59, 255, .12); }
.dock::after { content: ''; position: absolute; left: 18%; right: 18%; bottom: -1px; height: 1px; pointer-events: none;
    background: linear-gradient(90deg, transparent, rgba(157, 59, 255, .7), rgba(209, 77, 255, .7), transparent); }

.dock-brand { display: flex; align-items: center; gap: 10px; flex: none; padding-right: 6px; }
.dock-brand img { height: 26px; width: auto; filter: hue-rotate(262deg) saturate(.75) brightness(2.3) drop-shadow(0 0 12px rgba(157, 59, 255, .5)); }
.dock-brand span { display: flex; flex-direction: column; line-height: 1.05; }
.dock-brand b { font-size: 14px; font-weight: 700; letter-spacing: -.01em; }
.dock-brand small { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-dim); }

.dock-nav { position: relative; display: flex; align-items: center; gap: 2px; margin: 0 auto; padding: 4px; border-radius: 13px;
    background: rgba(0, 0, 0, .25); border: 1px solid rgba(196, 181, 253, .08); }
.dock-nav a { position: relative; z-index: 1; display: flex; align-items: center; gap: 8px; padding: 8px 13px; border-radius: 10px;
    font-size: 13px; font-weight: 600; color: var(--text-2); transition: color .25s; }
.dock-nav a svg { width: 16px; height: 16px; opacity: .8; transition: transform .5s cubic-bezier(.34, 1.56, .64, 1), opacity .25s; }
.dock-nav a:hover { color: var(--text); }
.dock-nav a:hover svg { transform: rotate(-8deg) scale(1.12); opacity: 1; }
.dock-nav a.active { color: #fff; }
.dock-nav a.active svg { opacity: 1; color: #fff; }
.dock-ink { position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 0; width: 0; border-radius: 10px; opacity: 0; pointer-events: none;
    background: var(--grad); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 8px 22px -8px rgba(157, 59, 255, .9); }
.dock-ink.ready { transition: transform .45s cubic-bezier(.34, 1.56, .64, 1), width .45s cubic-bezier(.34, 1.56, .64, 1), opacity .3s; }
.dock-nav .count { margin-left: 2px; min-width: 20px; padding: 0 6px; border-radius: 999px; font-size: 10.5px; font-weight: 800; line-height: 18px; text-align: center;
    color: #1a1100; background: var(--warn); box-shadow: 0 0 12px rgba(var(--warn-rgb), .5); }
.dock-nav .count[data-zero='true'] { display: none; }

.dock-right { display: flex; align-items: center; gap: 10px; flex: none; }
.kbar-btn { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 8px 0 12px; border-radius: 11px; cursor: pointer;
    color: var(--text-dim); font: inherit; font-size: 13px; background: rgba(0, 0, 0, .3); border: 1px solid rgba(196, 181, 253, .14); transition: .2s; }
.kbar-btn svg { width: 15px; height: 15px; }
.kbar-btn kbd { font-family: var(--font-mono); font-size: 10.5px; padding: 2px 6px; border-radius: 6px; border: 1px solid var(--line-strong); color: var(--text-2); }
.kbar-btn:hover { color: var(--text); border-color: rgba(196, 181, 253, .35); }
.dock .me { display: flex; align-items: center; gap: 8px; padding: 0; }
.dock .me .avatar { width: 34px; height: 34px; border-radius: 11px; font-size: 13px; }
.dock .me .who { display: none; }
.dock-menu { display: none; }

/* ---------- page heads ---------- */
.page-head { margin-bottom: 22px; }
.page-head h1 { font-size: 46px; }

/* ---------- bento overview ---------- */
.bento { display: grid; gap: 16px; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-flow: dense; }
.tile { border-radius: 22px; }
.hero-tile { grid-column: span 8; grid-row: span 2; display: flex; align-items: stretch; min-height: 330px; overflow: hidden;
    background: radial-gradient(ellipse 70% 90% at 85% 50%, rgba(157, 59, 255, .22), transparent 60%),
                linear-gradient(160deg, rgba(79, 45, 255, .14), rgba(14, 11, 32, .7) 55%); border-color: rgba(196, 181, 253, .2); }
.hero-text { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 30px 34px; }
.hero-text .eyebrow { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 10px; border-radius: 999px;
    font-size: 12px; color: var(--text-2); border: 1px solid rgba(196, 181, 253, .26); background: rgba(79, 45, 255, .14); }
.hero-text .eyebrow i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(var(--ok-rgb), .2); }
.hero-text .eyebrow i.warn { background: var(--warn); box-shadow: 0 0 0 3px rgba(var(--warn-rgb), .22); animation: blink 1.6s ease-in-out infinite; }
.hero-count { margin: 10px 0 0; font-family: var(--font-display); font-weight: 400; font-size: clamp(90px, 10vw, 140px); line-height: .9; letter-spacing: .01em;
    background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-count .value { font: inherit; }
.hero-sub { margin: 8px 0 22px; color: var(--text-2); font-size: 15px; max-width: 360px; }
.hero-3d { position: relative; flex: 0 0 46%; min-height: 260px; }
.hero-3d canvas { position: absolute; inset: -10% -14% -10% -10%; width: 124%; height: 120%; opacity: 0; transition: opacity 1s var(--ease); }
.hero-3d canvas.on { opacity: 1; }

.tile.stat { grid-column: span 2; padding: 18px; display: flex; flex-direction: column; justify-content: space-between; min-height: 157px; }
.tile.stat .value { font-size: 52px; margin-top: 6px; }
.stat.total { --tint: 157, 59, 255; }

.chart-tile { grid-column: span 12; }
.chart { position: relative; height: 230px; margin: 4px 16px 0; }
.chart svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.chart .gl { stroke: rgba(255, 255, 255, .06); stroke-width: 1; shape-rendering: crispEdges; }
.chart .tk { fill: var(--text-dim); font: 500 10.5px var(--font-mono); }
.chart .cbar.reg { fill: #9d3bff; }
.chart .cbar.apr { fill: #34d399; }
.chart .cbar.blk { fill: #ff4d4d; }
.chart .cbar.zero { fill: rgba(255, 255, 255, .08); }
.chart .hl { fill: rgba(157, 59, 255, .08); rx: 6px; }
.chart-tip { position: absolute; left: 0; top: 0; z-index: 2; pointer-events: none; opacity: 0; display: flex; flex-direction: column; gap: 2px;
    padding: 9px 12px; border-radius: 11px; font-size: 12px; white-space: nowrap; background: rgba(14, 11, 32, .97);
    border: 1px solid var(--line-strong); box-shadow: 0 14px 30px -14px #000; transition: opacity .12s; }
.chart-tip.on { opacity: 1; }
.chart-tip b { font-size: 13px; margin-bottom: 2px; }
.legend { display: flex; gap: 16px; padding: 10px 20px 16px; font-size: 12px; color: var(--text-dim); }
.k { display: inline-flex; align-items: center; gap: 7px; }
.k::before { content: ''; width: 10px; height: 10px; border-radius: 3px; background: currentColor; }
.k.reg::before { background: #9d3bff; } .k.apr::before { background: #34d399; } .k.blk::before { background: #ff4d4d; }
.chart-tip .k { color: var(--text-2); }
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: rgba(0, 0, 0, .3); border: 1px solid var(--line); }
.seg button { border: 0; background: none; color: var(--text-dim); font: inherit; font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 7px; cursor: pointer; }
.seg button.active { color: #fff; background: var(--grad); }

.queue-tile { grid-column: span 7; }
.plugins-tile { grid-column: span 5; }
.feed-tile { grid-column: span 12; }
.feed-tile .timeline { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 30px; }

.plug-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 14px 16px 18px; }
.plug { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 13px; background: rgba(0, 0, 0, .22); border: 1px solid var(--line);
    transition: border-color .25s, transform .3s var(--ease); }
.plug:hover { border-color: rgba(196, 181, 253, .3); transform: translateY(-2px); }
.ring-meter { flex: none; position: relative; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
    background: conic-gradient(#9d3bff calc(var(--p, 0) * 1%), rgba(255, 255, 255, .08) 0); }
.ring-meter::before { content: ''; position: absolute; inset: 4px; border-radius: 50%; background: #0c0a1d; }
.ring-meter span { position: relative; font-size: 12px; font-weight: 800; }
.pt { min-width: 0; line-height: 1.25; }
.pt b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt span { font-size: 11.5px; color: var(--text-dim); }

/* ---------- tags ---------- */
.tagbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: -6px 0 16px; }
.tagbar .muted { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; margin-right: 4px; }
.tagbar .muted svg { width: 14px; height: 14px; }
.tagchip { --h: 265; display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 700;
    color: hsl(var(--h) 90% 82%); background: hsl(var(--h) 80% 55% / .14); border: 1px solid hsl(var(--h) 80% 65% / .32); transition: .2s; }
a.tagchip:hover { background: hsl(var(--h) 80% 55% / .24); }
.tagchip.active { color: #fff; background: var(--grad); border-color: transparent; }
.tagchip.sm { padding: 1px 8px; font-size: 10.5px; }
.tagchip button { border: 0; background: none; color: inherit; cursor: pointer; font-size: 15px; line-height: 1; padding: 0; opacity: .7; }
.tagchip button:hover { opacity: 1; }
.cell-server .tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.tags-edit { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-height: 46px; padding: 8px; border-radius: 12px; cursor: text;
    background: rgba(0, 0, 0, .35); border: 1px solid var(--line-strong); }
.tags-edit input { flex: 1; min-width: 140px; border: 0; background: none; padding: 4px; box-shadow: none !important; }

/* ---------- Ctrl+K palette ---------- */
.kbar-back { position: fixed; inset: 0; z-index: 120; display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 0;
    background: rgba(3, 2, 10, .55); backdrop-filter: blur(6px); animation: fade .2s; }
.kbar { width: min(640px, 100%); overflow: hidden; border-radius: 20px; animation: rise .3s var(--ease);
    background: rgba(14, 11, 32, .97) !important; border-color: rgba(196, 181, 253, .25) !important; box-shadow: 0 40px 100px -30px #000, 0 0 0 1px rgba(157, 59, 255, .15); }
.kbar-input { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.kbar-input input { flex: 1; border: 0; background: none; padding: 4px 0; font-size: 16px; box-shadow: none !important; }
.kbar-input kbd { font-family: var(--font-mono); font-size: 11px; padding: 2px 7px; border-radius: 6px; border: 1px solid var(--line-strong); color: var(--text-dim); }
.kbar-ico { font-size: 20px; color: var(--glow); }
.kbar-list { max-height: 52vh; overflow: auto; padding: 8px; }
.kbar-group { padding: 10px 10px 6px; font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim); }
.kbar-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; cursor: pointer; }
.kbar-item.sel { background: linear-gradient(90deg, rgba(157, 59, 255, .22), rgba(79, 45, 255, .06)); box-shadow: inset 0 0 0 1px rgba(196, 181, 253, .22); }
.kbar-item .kt { flex: 1; min-width: 0; line-height: 1.3; }
.kbar-item .kt b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kbar-item .kt span { font-size: 12px; color: var(--text-dim); font-family: var(--font-mono); }
.kacts { display: none; gap: 6px; }
.kbar-item.sel .kacts { display: flex; }
.kdot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--text-dim); }
.kdot.approved { background: var(--ok); } .kdot.pending { background: var(--warn); } .kdot.blocked { background: var(--danger); }
.kdot.page { background: var(--glow); border-radius: 3px; }
.kbar-empty { padding: 26px; text-align: center; color: var(--text-dim); }
.kbar-foot { padding: 10px 16px; font-size: 11.5px; color: var(--text-dim); border-top: 1px solid var(--line); }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
    .kbar-btn span, .kbar-btn kbd { display: none; }
    .kbar-btn { width: 38px; justify-content: center; padding: 0; }
    .hero-tile { grid-column: span 12; }
    .tile.stat { grid-column: span 3; }
    .queue-tile, .plugins-tile { grid-column: span 12; }
}
@media (max-width: 900px) {
    .dock { gap: 8px; }
    .dock-menu { display: inline-grid; }
    .dock-nav { position: fixed; top: 82px; left: 14px; right: 14px; margin: 0; flex-direction: column; align-items: stretch; padding: 8px;
        background: rgba(12, 9, 28, .97); border-radius: 16px; border: 1px solid rgba(196, 181, 253, .2); display: none; box-shadow: 0 30px 80px -20px #000; }
    body.nav-open .dock-nav { display: flex; }
    .dock-nav a { padding: 12px 14px; }
    .dock-nav a.active { background: var(--grad); }
    .dock-ink { display: none; }
    .dock-right { margin-left: auto; }
    .hero-tile { flex-direction: column-reverse; }
    .hero-3d { flex-basis: 220px; min-height: 220px; }
    .tile.stat { grid-column: span 6; }
    .feed-tile .timeline { grid-template-columns: 1fr; }
    .page-head h1 { font-size: 36px; }
}
@media (max-width: 520px) {
    .plug-grid { grid-template-columns: 1fr; }
    .hero-text { padding: 22px; }
    .tile.stat .value { font-size: 40px; }
    .tile.stat { min-height: 130px; }
}
.legend { align-items: center; }
.legend .lg { display: inline-flex; align-items: center; gap: 7px; height: auto; }
.legend .lg i { width: 10px; height: 10px; border-radius: 3px; }
.lg i.reg { background: #9d3bff; } .lg i.apr { background: #34d399; } .lg i.blk { background: #ff4d4d; }
.queue-tile, .plugins-tile { align-self: start; }
.plug-grid { max-height: 372px; overflow: auto; scrollbar-width: thin; scrollbar-color: rgba(157, 59, 255, .4) transparent; }

/* ---- plugin releases / outdated installs ---------------------------------------------- */
.pill.update { --c: var(--info-rgb); text-decoration: none; }
.chip .up { font-style: normal; font-size: 10.5px; color: var(--info); font-family: var(--font-mono); }
.codeblock {
    margin: 0; padding: 12px 14px; border-radius: 12px; overflow-x: auto; white-space: pre;
    font-family: var(--font-mono); font-size: 12.5px; color: var(--text-2);
    background: rgba(0, 0, 0, 0.45); border: 1px solid var(--line);
}
