/* Tools & Admin Hub – nutzt die Tokens aus index.html (:root) */
.hub-page { max-width: 1400px; margin: 0 auto; padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.hub-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hub-head h1 { margin: 0; font-size: 22px; font-weight: 600; }
.hub-head .tabs { border: 0; padding: 0; gap: 20px; }
.hub-tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.hub-tabs button { border: 0; background: none; padding: 10px 0 9px; cursor: pointer; color: var(--muted); font-weight: 600; font-size: 15px; border-bottom: 2px solid transparent; }
.hub-tabs button.on { color: var(--text); border-color: var(--orange); }
.hub-tabs .count { margin-left: 4px; font-size: 11px; padding: 0 6px; border-radius: 8px; background: var(--orange); color: #fff; vertical-align: 1px; }
.hub-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hub-src { font-size: 11px; color: var(--dim); }
.hub-src a { color: var(--muted); }
.hub-grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 960px) { .hub-grid2 { grid-template-columns: 1fr; } }
.hub-card { background: var(--panel); border-radius: 12px; padding: 16px 18px; min-width: 0; }
.hub-card h3 { margin: 0 0 4px; font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.hub-card .sub { color: var(--muted); font-size: 12px; margin: 0 0 12px; }
.hub-card p { color: var(--muted); line-height: 1.55; margin: 0 0 8px; }
.hub-card p b { color: var(--text); font-weight: 600; }
.hub-stat b.sm { font-size: 15px; }
.hub-stat .delta { font-size: 12px; margin-left: 6px; font-family: var(--mono); }
.hub-stat .note { display: block; color: var(--dim); font-size: 11px; margin-top: 3px; }
.hub-empty { padding: 36px; text-align: center; color: var(--dim); }
.hub-err { padding: 28px; text-align: center; color: var(--red); }

/* Dominanz-Balken */
.hub-share { display: flex; height: 26px; border-radius: 6px; overflow: hidden; gap: 2px; background: var(--panel); }
.hub-share span { display: block; height: 100%; min-width: 2px; }
.hub-share span:first-child { border-radius: 6px 0 0 6px; } .hub-share span:last-child { border-radius: 0 6px 6px 0; }
.hub-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.hub-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.hub-legend b { color: var(--text); font-family: var(--mono); font-weight: 600; margin-left: 4px; }
.hub-tv { height: 520px; border-radius: 10px; overflow: hidden; background: var(--panel-2); }
.hub-seg { display: inline-flex; gap: 3px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 9px; padding: 3px; flex-wrap: wrap; }
.hub-seg button { border: 1px solid transparent; background: none; padding: 5px 12px; border-radius: 6px; cursor: pointer; color: var(--muted); font-weight: 600;
                  font-size: 12px; transition: background .12s, color .12s; }
.hub-seg button:hover:not(.on) { color: var(--text); background: var(--panel-3); }
.hub-seg button.on { background: var(--orange); color: #fff; box-shadow: 0 1px 6px rgba(255,107,0,.35); }
.hub-seg button:focus-visible, .hub-nav button:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.hub-ctl { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }

/* Heatmap (Treemap) */
.hub-tree { position: relative; height: min(560px, 70vh); border-radius: 10px; overflow: hidden; background: var(--bg); }
.hub-tile { position: absolute; box-sizing: border-box; border: 1px solid var(--bg); border-radius: 4px; overflow: hidden; cursor: pointer;
            display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: #fff;
            text-decoration: none; line-height: 1.2; transition: filter .1s; }
.hub-tile:hover { filter: brightness(1.25); z-index: 2; outline: 1px solid rgba(255,255,255,.6); }
.hub-tile b { font-weight: 700; } .hub-tile span { font-family: var(--mono); opacity: .92; }
.hub-tip { position: fixed; z-index: 60; pointer-events: none; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 8px;
           padding: 8px 10px; font-size: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.45); min-width: 170px; }
.hub-tip b { font-size: 13px; } .hub-tip .kv { display: flex; justify-content: space-between; gap: 14px; color: var(--muted); }
.hub-tip .kv span:last-child { color: var(--text); font-family: var(--mono); }
.hub-scale { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); }
.hub-scale .bar { width: 180px; height: 8px; border-radius: 4px; }
.hub-vbar { height: 8px; border-radius: 0 4px 4px 0; background: var(--muted); opacity: .55; min-width: 2px; }
td .hub-vbar-wrap { width: 180px; }

/* On-Chain */
.hub-oc-chart { height: 340px; position: relative; }
.hub-oc-chart.small { height: 220px; }
.hub-oc-legend { position: absolute; top: 6px; left: 10px; z-index: 3; font-size: 12px; color: var(--muted); pointer-events: none; display: flex; gap: 14px; flex-wrap: wrap; }
.hub-oc-legend b { color: var(--text); font-family: var(--mono); font-weight: 600; }
.hub-oc-legend i { display: inline-block; width: 12px; height: 2px; margin-right: 5px; vertical-align: 3px; }
.hub-zone { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px; }
.hub-zones { display: flex; gap: 4px; margin-top: 10px; flex-wrap: wrap; }
.hub-zones span { flex: 1; min-width: 110px; font-size: 11px; padding: 6px 8px; border-radius: 6px; background: var(--panel-2); color: var(--muted); border-left: 3px solid; }
.hub-zones span.on { color: var(--text); background: var(--panel-3); }

/* Bubbles */
.hub-bubbles { position: relative; height: calc(100vh - 230px); min-height: 460px; border-radius: 10px; overflow: hidden; background: #0d0f13; }
.hub-bubbles canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: none; }
.hub-bubbles canvas.drag { cursor: grabbing; }
.hub-bubbles iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.hub-bpop { position: absolute; z-index: 5; width: 270px; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 14px;
            box-shadow: 0 12px 32px rgba(0,0,0,.5); }
.hub-bpop .hd { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.hub-bpop .hd img { width: 26px; height: 26px; border-radius: 50%; }
.hub-bpop .hd b { font-size: 15px; } .hub-bpop .hd small { color: var(--muted); }
.hub-bpop .chg { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin: 10px 0; text-align: center; font-size: 11px; }
.hub-bpop .chg div { background: var(--panel); border-radius: 6px; padding: 5px 2px; }
.hub-bpop .chg small { display: block; color: var(--dim); }
.hub-bpop .kv { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); padding: 2px 0; }
.hub-bpop .kv span:last-child { color: var(--text); font-family: var(--mono); }
.hub-bpop .x { position: absolute; top: 8px; right: 10px; }

/* Topbar: Support + Posteingang */
.hub-ic { position: relative; width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--muted);
          cursor: pointer; display: inline-grid; place-items: center; padding: 0; }
.hub-ic:hover { color: var(--text); border-color: var(--dim); }
.hub-ic svg { width: 17px; height: 17px; }
.hub-ic .badge { position: absolute; top: -5px; right: -5px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--orange);
                 color: #fff; font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; }
.hub-banner { flex: none; display: flex; align-items: center; gap: 10px; padding: 8px 18px; font-size: 13px; border-bottom: 1px solid var(--line);
              background: var(--orange-bg); }
.hub-banner.maintenance, .hub-banner.warning { background: rgba(250,178,25,.12); }
.hub-banner b { font-weight: 700; }
.hub-banner .msg { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }

/* Drawer (Posteingang / Meine Tickets) */
.hub-drawer-bg { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.45); }
.hub-drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 71; width: min(460px, 100vw); background: var(--panel); border-left: 1px solid var(--line-2);
              display: flex; flex-direction: column; box-shadow: -12px 0 32px rgba(0,0,0,.4); }
.hub-drawer .dh { display: flex; align-items: center; gap: 10px; padding: 14px 18px 0; }
.hub-drawer .dh h3 { margin: 0; font-size: 16px; flex: 1; }
.hub-drawer .hub-tabs { padding: 0 18px; }
.hub-drawer .body { flex: 1; overflow: auto; padding: 12px 18px 18px; display: flex; flex-direction: column; gap: 10px; }
.hub-msg { background: var(--panel-2); border-radius: 10px; padding: 12px 14px; border-left: 3px solid var(--line-2); }
.hub-msg.unread { border-left-color: var(--orange); }
.hub-msg .top { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.hub-msg .top b { flex: 1; font-size: 13px; }
.hub-msg .top small, .hub-msg .meta { color: var(--dim); font-size: 11px; }
.hub-msg .text { color: var(--muted); white-space: pre-wrap; word-break: break-word; line-height: 1.5; }
.hub-thread { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.hub-bubble { padding: 8px 11px; border-radius: 10px; background: var(--panel); white-space: pre-wrap; word-break: break-word; line-height: 1.5; color: var(--muted); max-width: 92%; }
.hub-bubble.admin { background: var(--orange-bg); color: var(--text); align-self: flex-end; }
.hub-bubble small { display: block; color: var(--dim); font-size: 10px; margin-bottom: 2px; }
.hub-lvl { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 10px; text-transform: uppercase; letter-spacing: .3px; color: var(--muted); background: var(--line); }
.hub-lvl.warning, .hub-lvl.maintenance { color: #fab219; background: rgba(250,178,25,.14); }
.hub-lvl.critical { color: #fff; background: var(--red); }
.hub-lvl.reply { color: var(--orange); background: var(--orange-bg); }
.hub-lvl.open { color: var(--orange); background: var(--orange-bg); }
.hub-lvl.progress { color: #3987e5; background: rgba(57,135,229,.14); }
.hub-lvl.done { color: var(--green); background: var(--green-bg); }
.hub-lvl.bug { color: var(--red); background: var(--red-bg); }
.hub-lvl.idea { color: #9085e9; background: rgba(144,133,233,.14); }
textarea.hub-ta, .field textarea { width: 100%; min-height: 110px; resize: vertical; background: var(--panel); border: 1px solid var(--line-2); border-radius: 8px;
                                   padding: 9px 10px; outline: none; font: inherit; color: inherit; line-height: 1.5; }
textarea.hub-ta:focus, .field textarea:focus { border-color: var(--orange); }
textarea.hub-ta.sm { min-height: 64px; }
.hub-check { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; cursor: pointer; }

/* Admin */
.hub-inbox { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 16px; min-height: 520px; }
@media (max-width: 960px) { .hub-inbox { grid-template-columns: 1fr; } }
.hub-tlist { display: flex; flex-direction: column; gap: 2px; max-height: 70vh; overflow: auto; }
.hub-titem { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 10px 12px; border-radius: 8px; cursor: pointer; color: inherit; }
.hub-titem:hover { background: var(--panel-2); } .hub-titem.on { background: var(--panel-3); }
.hub-titem .l1 { display: flex; align-items: center; gap: 6px; } .hub-titem .l1 b { flex: 1; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-titem .l2 { color: var(--dim); font-size: 11px; margin-top: 3px; display: flex; gap: 8px; }
.hub-ctx { font-size: 11px; color: var(--dim); font-family: var(--mono); background: var(--panel-2); border-radius: 6px; padding: 6px 8px; margin: 8px 0; word-break: break-all; }
.hub-set { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.hub-set:first-of-type { border-top: 0; }
.hub-set > div { flex: 1; min-width: 0; } .hub-set b { display: block; font-weight: 600; } .hub-set small { color: var(--muted); font-size: 12px; }
.hub-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; align-items: end; }
.hub-form .field { margin: 0; }
.hub-code { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; background: var(--green-bg); margin-top: 10px; }
.hub-code code { font-family: var(--mono); font-size: 15px; font-weight: 700; color: var(--text); flex: 1; word-break: break-all; }
.hub-lock { display: block; line-height: 1.6; padding: 10px 12px; border-radius: 8px; background: var(--panel-2); color: var(--muted); font-size: 12px; margin-top: 8px; }
.hub-lock code { font-family: var(--mono); color: var(--text); }

/* Liquidations-Heatmap */
.hub-liq { position: relative; height: min(640px, 72vh); min-height: 380px; border-radius: 10px; overflow: hidden; background: #0d0f13; }
.hub-liq canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; }
.hub-liq-msg { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); }
.hub-select { background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 8px; padding: 5px 8px; color: var(--text); font-weight: 600; outline: none; }
.hub-select:focus { border-color: var(--orange); }

/* Fear & Greed (Topbar) */
.fgi { display: flex; align-items: center; gap: 7px; text-decoration: none; color: var(--text); padding: 4px 8px; border-radius: 8px; flex-shrink: 0; }
.fgi:hover { background: var(--panel-2); }
.fgi svg { width: 30px; height: 18px; flex: none; }
.fgi-txt { display: flex; flex-direction: column; line-height: 1.15; }
.fgi-txt small { color: var(--muted); font-size: 10.5px; white-space: nowrap; }
.fgi-txt b { font-family: var(--mono); font-size: 13px; display: inline; }
.fgi-label { font-size: 11px; font-weight: 600; white-space: nowrap; }
.fgi-val { display: flex; align-items: baseline; gap: 6px; }

/* Tools-Menü: deutliche, klickbare Buttons mit Icon */
.hub-nav { display: flex; gap: 10px; flex-wrap: wrap; }
.hub-nav button { display: inline-flex; align-items: center; gap: 9px; padding: 10px 16px; border-radius: 10px; cursor: pointer;
                  border: 1px solid var(--line-2); background: var(--panel); color: var(--muted); font-weight: 600; font-size: 14px;
                  transition: border-color .12s, background .12s, color .12s, transform .12s; }
.hub-nav button svg { width: 18px; height: 18px; flex: none; }
.hub-nav button:hover:not(.on) { border-color: var(--dim); background: var(--panel-2); color: var(--text); transform: translateY(-1px); }
.hub-nav button.on { border-color: var(--orange); background: var(--orange-bg); color: var(--text); box-shadow: inset 0 -2px 0 var(--orange); }
.hub-nav button.on svg { color: var(--orange); }
@media (max-width: 720px) { .hub-nav button { flex: 1 1 calc(50% - 10px); justify-content: center; padding: 9px 10px; font-size: 13px; } }
