:root { color-scheme: dark; --bg: #050000; --card: #120d0e; --line: rgba(255, 43, 69, 0.18); --text: #fff; --muted: #cbb8bd; --blue: #ff2b45; --cyan: #ff5a68; --green: #ff4f64; --red: #ff7373; }
* { box-sizing: border-box; }
body { min-height: 100vh; margin: 0; color: var(--text); font-family: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: radial-gradient(circle at 50% 0, rgba(255, 23, 68, 0.2), transparent 28rem), var(--bg); }
.connectree-bg { position: fixed; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }
main { width: min(1180px, calc(100% - 36px)); margin: 0 auto; padding: 46px 0; }
.hidden { display: none !important; }
.card { border: 1px solid var(--line); border-radius: 30px; background: linear-gradient(180deg, rgba(255, 23, 68, 0.055), rgba(255, 255, 255, 0.01)), rgba(18, 13, 14, 0.5); box-shadow: 0 30px 100px rgba(0, 0, 0, 0.45); backdrop-filter: blur(12px); padding: clamp(24px, 5vw, 46px); }
.login-card { max-width: 780px; margin: 8vh auto 0; }
.eyebrow { margin: 20px 0 14px; color: var(--cyan); font-size: 12px; font-weight: 900; letter-spacing: 0.18em; text-transform: uppercase; }
h1 { margin: 0 0 12px; color: var(--blue); font-size: clamp(42px, 7vw, 88px); line-height: 0.9; letter-spacing: -0.07em; }
p { color: var(--muted); line-height: 1.65; }
button, input, select { font: inherit; }
button { border: 1px solid rgba(255, 43, 69, 0.45); border-radius: 999px; background: linear-gradient(135deg, var(--blue), #8f0018); color: #fff; font-weight: 900; padding: 12px 16px; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.45; }
input, select { width: 100%; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, 0.025); color: var(--text); padding: 13px 14px; }
label { display: grid; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; }
.status { display: inline-flex; align-items: center; gap: 9px; border: 1px solid rgba(255, 43, 69, 0.24); border-radius: 999px; color: var(--green); padding: 8px 12px; font-size: 13px; font-weight: 900; }
.dot { width: 8px; height: 8px; border-radius: 999px; background: var(--green); box-shadow: 0 0 22px rgba(255, 23, 68, 0.75); }
.login-row, .create-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; margin-top: 24px; }
.create-row { grid-template-columns: 1fr 280px auto; align-items: end; }
.panel-head, .key-top, .key-actions, .key-meta { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.admin-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0; }
.admin-tab { background: rgba(255, 23, 68, 0.06); color: var(--text); }
.admin-tab.active { background: var(--blue); color: #fff; }
.moderation-subtabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 12px; }
.moderation-subtab { background: rgba(255, 23, 68, 0.055); color: var(--text); padding: 9px 12px; }
.moderation-subtab.active { background: rgba(255, 43, 69, 0.92); color: #fff; }
.moderation-subpanel { display: none; }
.moderation-subpanel.active { display: grid; }
.admin-panel { display: none; }
.admin-panel.active { display: block; }
.moderation-layout { display: grid; grid-template-columns: 1fr; gap: 16px; }
.moderation-layout h2, #ips-panel h2 { margin: 16px 0 10px; color: var(--text); }
.moderation-list { width: 100%; display: grid; gap: 8px; }
.moderation-item, .ip-item { width: 100%; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, 0.035); color: var(--text); text-align: left; padding: 12px; }
.moderation-item { display: grid; gap: 4px; }
.moderation-card { width: 100%; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; align-items: start; border: 0; border-bottom: 1px solid rgba(255,255,255,.08); border-radius: 0; background: rgba(5, 2, 2, 0.56); color: var(--text); text-align: left; padding: 10px 12px; font-family: "JetBrains Mono", monospace; }
.moderation-card:hover { background: rgba(255, 23, 68, 0.075); }
.moderation-card.suspect { border-color: rgba(255, 115, 115, 0.58); background: rgba(255, 20, 40, 0.1); }
.moderation-flag { display: grid; place-items: center; gap: 3px; font-size: 24px; line-height: 1; padding-top: 2px; }
.moderation-flag small { color: var(--dim); font-size: 9px; font-weight: 900; white-space: nowrap; }
.message-flow { display: grid; gap: 7px; }
.flow-line { display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 10px; align-items: baseline; max-width: 100%; color: #d8b7bd; font-size: 13px; line-height: 1.4; margin: 0; }
.flow-line b { color: var(--cyan); font-weight: 900; white-space: nowrap; }
.flow-line span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flow-out { color: #a98e94; }
.flow-out b { color: #ff8a96; }
.moderation-item.suspect, .conversation-event.suspect { border-color: rgba(255, 115, 115, 0.55); background: rgba(255, 20, 40, 0.08); }
.moderation-item span, .moderation-item small, .ip-item span { display: block; color: var(--muted); font-size: 12px; }
.conversation-modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 22px; opacity: 0; pointer-events: none; transition: opacity 160ms ease; }
.conversation-modal.open { opacity: 1; pointer-events: auto; }
.conversation-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .72); backdrop-filter: blur(14px); }
.conversation-dialog { position: relative; width: min(980px, 100%); max-height: min(760px, calc(100vh - 44px)); overflow: auto; border: 1px solid var(--line); border-radius: 22px; background: linear-gradient(180deg, rgba(255, 23, 68, .05), rgba(255,255,255,.01)), rgba(18,8,10,.72); box-shadow: 0 34px 120px rgba(0,0,0,.68); backdrop-filter: blur(18px); padding: 22px; }
.conversation-close { position: absolute; top: 14px; right: 14px; display: grid; width: 38px; height: 38px; place-items: center; padding: 0; }
.conversation-detail { border: 0; border-radius: 0; background: transparent; padding: 0; min-height: 260px; }
.conversation-actions { margin-bottom: 12px; }
.conversation-event { border: 1px solid rgba(255,255,255,0.08); border-radius: 14px; background: rgba(0,0,0,0.12); padding: 12px; margin-bottom: 10px; }
.conversation-event header { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); }
.conversation-event h3 { margin: 12px 0 6px; font-size: 13px; color: var(--cyan); text-transform: uppercase; letter-spacing: .08em; }
.conversation-event pre { max-height: 280px; overflow: auto; white-space: pre-wrap; border: 1px solid rgba(255,255,255,0.08); border-radius: 10px; background: rgba(0,0,0,0.24); padding: 10px; }
.flagged { color: var(--red); font-weight: 800; }
.ip-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ip-item.blocked { opacity: .65; }
.message, .error { min-height: 22px; color: var(--cyan); }
.error, .message.error { color: var(--red); }
.notification-sidebar { position: fixed; top: 84px; right: 18px; z-index: 90; display: grid; width: min(360px, calc(100vw - 36px)); gap: 10px; pointer-events: none; }
.side-notification { pointer-events: auto; width: 100%; border: 1px solid rgba(255, 43, 69, 0.3); border-radius: 16px; background: linear-gradient(180deg, rgba(255, 23, 68, 0.12), rgba(10, 4, 5, 0.96)); color: var(--text); box-shadow: 0 18px 70px rgba(0,0,0,.55); padding: 13px 14px; text-align: left; animation: notify-in 180ms ease; }
.side-notification strong { display: block; margin-bottom: 4px; }
.side-notification span, .side-notification small { display: block; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.side-notification.suspect { border-color: rgba(255, 115, 115, 0.65); background: linear-gradient(180deg, rgba(255, 20, 40, 0.22), rgba(12, 3, 5, 0.97)); }
@keyframes notify-in { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: translateX(0); } }
.key-list { display: grid; gap: 10px; margin-top: 18px; }
.key-card, .empty { border: 1px solid var(--line); border-radius: 18px; background: rgba(255, 255, 255, 0.018); padding: 14px; }
.key-card { display: grid; gap: 10px; }
.key-top strong { display: block; font-size: 18px; }
.key-top span, .key-meta { color: var(--muted); font-size: 13px; }
.key-actions { justify-content: start; }
.key-actions button, .key-top button, #refresh { background: rgba(255, 23, 68, 0.08); color: var(--text); }
.key-market-line { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); overflow: hidden; border: 1px solid rgba(255,255,255,.08); border-radius: 12px; background: rgba(5, 2, 2, 0.5); font-family: "JetBrains Mono", monospace; }
.key-market-line span { display: grid; gap: 3px; min-height: 52px; border-right: 1px solid rgba(255,255,255,.07); padding: 9px 10px; color: var(--muted); font-size: 10px; font-weight: 900; text-transform: uppercase; }
.key-market-line span:last-child { border-right: 0; }
.key-market-line b { overflow: hidden; color: var(--cyan); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; text-transform: none; }
.key-ips { display: grid; gap: 6px; }
.key-ip { display: grid; grid-template-columns: minmax(140px, .7fr) minmax(0, 1fr); gap: 10px; align-items: center; border-bottom: 1px solid rgba(255,255,255,.06); background: rgba(5, 2, 2, 0.48); padding: 8px 10px; font-family: "JetBrains Mono", monospace; }
.key-ip b { color: var(--text); font-size: 12px; }
.key-ip em { color: var(--muted); font-size: 11px; font-style: normal; font-weight: 800; }
.key-ip.blocked { opacity: .6; }
.key-ip.muted { color: var(--muted); }
@media (max-width: 920px) { .moderation-layout { grid-template-columns: 1fr; } }
@media (max-width: 980px) { .key-market-line { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 820px) { .login-row, .create-row { grid-template-columns: 1fr; } .flow-line { grid-template-columns: 1fr; gap: 3px; } .key-market-line, .key-ip { grid-template-columns: 1fr; } .key-market-line span { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.07); } .panel-head, .key-top, .key-actions, .key-meta, .ip-item { align-items: start; flex-direction: column; } }
