
:root {
    --bg: #02040a;
    --sidebar-bg: #010205;
    --card-bg: rgba(10, 15, 30, 0.6);
    --border: rgba(255, 255, 255, 0.06);
    --accent: #007cff;
    --accent-alt: #e0f0ff;
    --text: #f0f5ff;
    --muted: #5a6a8a;
}

*, *::before, *::after {
    margin: 0; padding: 0; box-sizing: border-box;
    scrollbar-width: none;
}
*::-webkit-scrollbar { display: none; }

html {
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    font-size: 16px;
}

body {
    font-family: 'Outfit', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

#sidebar button,
#sidebar input {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
    appearance: none;
    -webkit-appearance: none;
}
#sidebar a,
#sidebar a:link,
#sidebar a:visited,
#sidebar a:hover,
#sidebar a:active,
#sidebar a:focus {
    text-decoration: none;
    -webkit-text-decoration: none;
}

.bg-wrap {
    position: fixed; inset: 0; z-index: -1;
    background: radial-gradient(circle at 50% 50%, #051025 0%, #02040a 100%);
    overflow: hidden;
}
.stars, .stars2 {
    position: absolute; width: 200%; height: 200%;
    background-repeat: repeat; background-size: 200px 200px;
    opacity: 0.12; pointer-events: none;
}
.stars {
    background-image:
        radial-gradient(2px 2px at 20px 30px, #eee, transparent),
        radial-gradient(2px 2px at 40px 70px, #fff, transparent),
        radial-gradient(2px 2px at 90px 160px, #ddd, transparent);
    animation: stars-move 120s linear infinite;
}
.stars2 {
    background-image:
        radial-gradient(1.5px 1.5px at 100px 100px, #fff, transparent),
        radial-gradient(1.5px 1.5px at 150px 50px, #fff, transparent);
    background-size: 300px 300px; opacity: 0.08;
    animation: stars-move 180s linear reverse infinite;
}
@keyframes stars-move {
    from { transform: translate(0, 0); }
    to   { transform: translate(-150px, -150px); }
}

#sidebar {
    position: fixed; top: 0; bottom: 0; left: 0; width: 260px;
    background: rgba(1, 1, 3, 0.95); backdrop-filter: blur(10px);
    border-right: 1px solid var(--border);
    display: flex; flex-direction: column; padding: 24px 16px; z-index: 50;
    transform: translateX(-100%);
    transition: transform .3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.5;
}
@media (min-width: 768px) { #sidebar { transform: none; } }

.sidebar-title {
    display: block;
    font-size: 1.4rem; font-weight: 900; letter-spacing: -0.02em;
    color: #fff !important; margin-bottom: 2px; padding: 16px 12px 0 12px;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.15);
    font-family: 'Outfit', sans-serif;
    text-transform: lowercase;
    text-decoration: none !important;
    -webkit-text-decoration: none !important;
    cursor: pointer;
    transition: opacity 0.15s ease;
}
.sidebar-title:hover,
.sidebar-title:visited,
.sidebar-title:active,
.sidebar-title:focus { opacity: 0.85; color: #fff !important; text-decoration: none !important; }
.online-wrap {
    display: flex; align-items: center; gap: 8px; padding: 0 12px; margin-bottom: 14px;
    font-family: 'JetBrains Mono', monospace; font-size: 0.7rem;
    color: #5a5a7a; font-weight: 600;
}
.online-dot {
    width: 6px; height: 6px; border-radius: 50%; background: #22c55e;
    box-shadow: 0 0 8px #22c55e; animation: online-pulse 2s infinite;
}
@keyframes online-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.5; }
}
#online-count { color: #8a8aa3; }

.nav-label {
    font-size: 0.6rem; font-weight: 800; letter-spacing: 0.15em;
    text-transform: uppercase; color: var(--muted);
    padding: 0 8px; margin-bottom: 8px;
}
.nav-label:first-of-type { margin-top: 4px; }
.sidebar-nav-label { margin-bottom: 6px; }
#nav-dashboard { margin-bottom: 4px; }

.nav-link {
    display: flex; align-items: center; gap: 12px; padding: 11px 14px;
    border-radius: 12px; font-size: 0.85rem; font-weight: 600;
    color: #6a6a8a; text-decoration: none; transition: 0.2s; margin-bottom: 4px;
}
.nav-link i, .nav-link svg { width: 16px; height: 16px; flex-shrink: 0; }
.nav-link:hover, .nav-link.active {
    background: rgba(0, 242, 255, 0.06); color: var(--accent);
    box-shadow: inset 0 0 10px rgba(0, 242, 255, 0.02);
}

.layer-button {
    gap: 10px; padding: 12px 14px; background: none; border: none;
    width: 100%; display: flex; align-items: center; justify-content: space-between;
    cursor: pointer; border-radius: 10px; transition: 0.2s;
}
.layer-button:hover { background: rgba(255, 255, 255, 0.03); }

.sidebar-nav-label {}

.servers-nav {
    flex: 1; overflow-y: auto; margin-bottom: 12px;
}

main {
    position: relative; z-index: 1; margin-left: 0; padding: 20px;
}
@media (min-width: 768px) {
    main { margin-left: 260px; padding: 30px 45px; }
}
.page-max {
    max-width: 1600px; margin: 0 auto; width: 100%;
}

.dstat-search {
    position: relative; margin-bottom: 25px;
}
.dstat-search input {
    width: 100%; padding: 11px 14px 11px 38px;
    font-family: 'JetBrains Mono', monospace; font-size: 0.82rem; font-weight: 500;
    border-radius: 12px; background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06); color: #fff; outline: none;
    transition: all 0.2s;
}
.dstat-search input:focus {
    border-color: rgba(0,124,255,0.4); background: rgba(255,255,255,0.04);
}
.dstat-search input::placeholder { color: #4a5568; }
.dstat-search i, .dstat-search svg {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    width: 14px; height: 14px; color: var(--muted); pointer-events: none;
}

.stats-bar {
    display: grid; grid-template-columns: repeat(4, 1fr);
    border: 1px solid var(--border); border-radius: 18px;
    overflow: hidden; margin: 25px 0;
    background: rgba(5, 5, 15, 0.4);
    backdrop-filter: blur(15px);
}
.stats-bar.cols-2 { grid-template-columns: repeat(2, 1fr); }
.stats-bar.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .stats-bar { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .stats-bar { grid-template-columns: 1fr; } }

.stat-cell {
    padding: 22px 28px; border-right: 1px solid var(--border);
    display: flex; flex-direction: column; gap: 8px; transition: 0.2s;
    min-width: 0;
}
.stat-cell:last-child { border-right: none; }
.stat-cell:hover { background: rgba(255, 255, 255, 0.01); }
.stat-label {
    font-size: 0.6rem; font-weight: 800; letter-spacing: 0.15em;
    text-transform: uppercase; color: var(--muted);
}
.stat-value {
    font-family: 'JetBrains Mono', monospace; font-size: 1.05rem;
    font-weight: 600; color: #fff; letter-spacing: -0.02em;
    word-break: break-all; line-height: 1.35;
}
.stat-value.sm { font-size: 0.82rem; }
.stat-value.accent { color: var(--accent-alt); }
.stat-value.green { color: #22c55e; }

.chart-card {
    border: 1px solid var(--border); border-radius: 18px;
    background: var(--card-bg); backdrop-filter: blur(25px);
    overflow: hidden; position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.tool-badge {
    position: absolute; top: 14px; right: 16px; z-index: 5;
    font-family: 'JetBrains Mono', monospace; font-size: 0.65rem;
    color: var(--muted); padding: 4px 10px; border-radius: 8px;
    background: rgba(0,0,0,0.4); border: 1px solid var(--border);
}
.tool-badge.ok { color: #22c55e; }

.bw-badge {
    font-family: 'JetBrains Mono', monospace; font-size: 0.65rem; font-weight: 800;
    padding: 2px 7px; border-radius: 6px; flex-shrink: 0;
    background: rgba(0, 242, 255, 0.05); color: var(--accent);
    border: 1px solid rgba(0, 242, 255, 0.1); transition: 0.2s;
}
.bw-badge.offline {
    background: rgba(255, 75, 75, 0.08) !important;
    color: #ff4b4b !important;
    border-color: rgba(255, 75, 75, 0.2) !important;
    box-shadow: 0 0 5px rgba(255, 75, 75, 0.1);
}

.server-label {
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.48rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 1px 5px;
    border-radius: 4px;
    align-self: flex-start;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    background: rgba(34, 197, 94, 0.12);
    color: #22c55e !important;
    border: 1px solid rgba(34, 197, 94, 0.28);
    line-height: 1.25;
}

.server-row-left {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    overflow: hidden;
    flex: 1 1 auto;
    min-width: 0;
}
.server-text-stack {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    overflow: hidden;
}
.server-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.25;
}
.server-row-right {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    margin-left: 8px;
}
.sub-server-button.has-label {
    align-items: flex-start;
    padding-top: 8px;
    padding-bottom: 8px;
}
.sub-server-button.has-label .server-row-left {
    align-items: flex-start;
}
.sub-server-button.has-label .server-row-left > img {
    margin-top: 2px;
}
.sub-server-button.has-label .bw-badge,
.sub-server-button.has-label .server-row-right {
    margin-top: 2px;
}
.sub-server-button.active .server-name {
    color: var(--accent);
}
.sub-server-button:hover .server-label {
    background: rgba(34, 197, 94, 0.18);
    border-color: rgba(34, 197, 94, 0.38);
}
.sub-server-button.active .server-label {
    color: #22c55e !important;
    background: rgba(34, 197, 94, 0.14);
    border-color: rgba(34, 197, 94, 0.32);
}
.group-head .server-label { font-size: 0.45rem; padding: 1px 4px; }

.category-content {
    max-height: 0; opacity: 0; overflow: hidden;
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.category-content.show {
    max-height: 2000px; opacity: 1; padding-bottom: 12px;
}
.rotate-icon { transition: transform 0.3s; }
.rotate-icon.open { transform: rotate(90deg); }

.category-button {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; padding: 10px 14px; border-radius: 10px;
    font-size: 0.85rem; font-weight: 700; color: #7a7a9a;
    background: none; border: none; cursor: pointer; transition: 0.2s;
}
.category-button:hover { color: #fff; background: rgba(255, 255, 255, 0.03); }

.group-count {
    font-size: 0.58rem; background: rgba(255, 255, 255, 0.04); color: var(--muted);
    padding: 1px 6px; border-radius: 20px; font-weight: 800; border: 1px solid var(--border);
    min-width: 18px; text-align: center;
}
.group-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 3px; border-radius: 6px; cursor: pointer; color: var(--muted);
    transition: background 0.2s, color 0.2s;
}
.group-toggle:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.group-toggle .rotate-icon { width: 13px; height: 13px; }
.group-toggle .rotate-icon.open { transform: rotate(90deg); }

.sidebar-search-wrap {
    position: relative; margin-bottom: 14px; margin-top: 0; padding: 0 4px;
}
.sidebar-search-wrap input {
    width: 100%; padding: 9px 12px 9px 34px; font-size: 0.78rem; font-weight: 500;
    border-radius: 10px; background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05); color: #fff; outline: none;
    transition: all 0.2s;
}
.sidebar-search-wrap input:focus {
    border-color: rgba(0,124,255,0.4); background: rgba(255,255,255,0.04);
}
.sidebar-search-wrap input::placeholder { color: #4a5568; }
.sidebar-search-wrap i, .sidebar-search-wrap svg {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    width: 13px; height: 13px; color: var(--muted); pointer-events: none;
}

.sidebar-footer,
.sidebar-socials {
    padding: 12px 4px 4px; border-top: 1px solid rgba(255,255,255,0.03);
    display: flex; gap: 8px; justify-content: center;
}
.social-btn,
.sidebar-social {
    flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px; border-radius: 10px; font-size: 0.76rem; font-weight: 700;
    text-decoration: none; transition: 0.2s;
}
.social-btn.tg, .sidebar-social.tg {
    background: rgba(0,136,204,0.08); border: 1px solid rgba(0,136,204,0.15); color: #0088cc;
}
.social-btn.tg:hover, .sidebar-social.tg:hover { background: rgba(0,136,204,0.15); }
.social-btn.ds, .sidebar-social.ds {
    background: rgba(88,101,242,0.08); border: 1px solid rgba(88,101,242,0.15); color: #5865f2;
}
.social-btn.ds:hover, .sidebar-social.ds:hover { background: rgba(88,101,242,0.15); }
.social-btn i, .sidebar-social i { font-size: 0.95rem; }

.tool-page { max-width: 920px; }
.tool-page-header {
    display: flex; align-items: flex-start; gap: 16px; margin-bottom: 28px;
}
.tool-page-header > i, .tool-page-header > svg {
    width: 32px; height: 32px; color: var(--accent); flex-shrink: 0; margin-top: 4px;
}
.tool-page-header h1 {
    font-size: 1.35rem; font-weight: 800; color: #fff; letter-spacing: -0.02em; margin-bottom: 6px;
}
.tool-page-header p { font-size: 0.88rem; color: var(--muted); line-height: 1.5; }

.tool-input-row {
    display: flex; gap: 12px; align-items: stretch; margin-bottom: 25px;
}
.tool-input-flex { flex: 1; margin-bottom: 0 !important; }
.tool-action-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 0 22px; border-radius: 12px; border: 1px solid rgba(0,124,255,0.35);
    background: rgba(0,124,255,0.12); color: #fff; font-family: 'Outfit', sans-serif;
    font-size: 0.85rem; font-weight: 700; cursor: pointer; transition: 0.2s; white-space: nowrap;
    position: relative; min-width: 130px;
}
.tool-action-btn:hover { background: rgba(0,124,255,0.22); }
.tool-action-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.tool-action-btn i, .tool-action-btn svg { width: 16px; height: 16px; }
.tool-action-btn .btn-loader { display: none; width: 20px; height: 20px; }
.tool-action-btn.loading .btn-text,
.tool-action-btn.loading i { visibility: hidden; }
.tool-action-btn.loading .btn-loader { display: block; position: absolute; }

.hidden { display: none !important; }

.dstat-tooltip {
    position: fixed;
    z-index: 99999;
    background: rgba(10, 10, 10, 0.95);
    color: #f5f5f5;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 5px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    opacity: 0;
    transform: translateY(2px);
    transition: opacity 0.15s ease, transform 0.15s ease;
    white-space: nowrap;
}
.dstat-tooltip.show {
    opacity: 1;
    transform: translateY(0);
}

.tool-toast {
    position: fixed; bottom: 2rem; left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(10, 15, 30, 0.95); backdrop-filter: blur(10px);
    border: 1px solid var(--border); padding: 0.75rem 1.5rem; border-radius: 12px;
    color: #fff; font-size: 0.9rem; font-weight: 500; z-index: 1000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5); transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}
.tool-toast.show { transform: translateX(-50%) translateY(0); }

.mc-special-header {
    display: flex; gap: 1.5rem; padding: 1.5rem;
    background: rgba(255,255,255,0.02); border-radius: 18px;
    margin-bottom: 16px; align-items: flex-start; border: 1px solid var(--border);
}
.mc-icon-frame {
    width: 64px; height: 64px; background: #000; border-radius: 12px;
    overflow: hidden; flex-shrink: 0; border: 1px solid var(--border);
}
.mc-icon-frame img { width: 100%; height: 100%; object-fit: contain; }
.mc-info-stack h3 { font-size: 1.15rem; margin-bottom: 0.5rem; color: #fff; font-weight: 700; }
.mc-motd-render { font-size: 0.88rem; color: var(--muted); line-height: 1.6; }

.graph-section-head {
    display: flex; align-items: center; gap: 0.75rem;
    margin: 1.5rem 0 0.75rem; font-size: 0.65rem; font-weight: 800;
    color: var(--accent); text-transform: uppercase; letter-spacing: 0.12em;
}
.players-graph-section .graph-section-head {
    margin: 0 0 0.35rem;
}

.players-graph-section {
    border: 1px solid var(--border); border-radius: 18px;
    padding: 16px 18px; margin: 16px 0; background: var(--card-bg);
}
#mc-graph-canvas {
    width: 100%; height: 320px; border-radius: 12px;
    background: linear-gradient(180deg, rgba(0,124,255,0.1), rgba(0,0,0,0.15));
    border: 1px solid rgba(255,255,255,0.08);
    display: block;
}
.mc-graph-live-dot {
    animation: mc-pulse 1.6s ease-in-out infinite;
}
@keyframes mc-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.55; transform: scale(1.35); }
}
.mc-graph-empty {
    display: flex; align-items: center; justify-content: center;
    height: 320px; color: var(--muted); font-size: 0.82rem;
}
.players-graph-wrap { position: relative; }
.players-graph-controls {
    display: flex; align-items: center; gap: 10px; margin-bottom: 0.75rem; flex-wrap: wrap;
}
.refresh-label {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--muted); font-size: 0.78rem; font-weight: 600;
}
.refresh-label i, .refresh-label svg { width: 13px; height: 13px; }
.refresh-picker {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px; border-radius: 10px;
    background: rgba(255,255,255,0.03); border: 1px solid var(--border);
}
.refresh-opt {
    padding: 6px 11px; border: none; border-radius: 7px;
    font-family: 'JetBrains Mono', monospace; font-size: 0.72rem; font-weight: 600;
    color: var(--muted); background: transparent; cursor: pointer; transition: 0.15s;
}
.refresh-opt:hover { color: #fff; background: rgba(255,255,255,0.05); }
.refresh-opt.active {
    color: #fff; background: rgba(0,124,255,0.2);
    box-shadow: inset 0 0 0 1px rgba(0,124,255,0.35);
}
#mc-players-live.mc-live-pulse { color: #22c55e !important; transition: color 0.4s; }
.players-graph-tooltip {
    position: absolute; pointer-events: none;
    background: rgba(9, 12, 18, 0.95); border: 1px solid rgba(0,124,255,0.4);
    border-radius: 8px; padding: 0.35rem 0.5rem; font-size: 0.72rem;
    color: #e2e8f0; transform: translate(-50%, -130%); white-space: nowrap; z-index: 3;
}
.players-graph-meta {
    margin-top: 0.45rem; color: var(--muted); font-size: 0.78rem;
    display: flex; justify-content: space-between; align-items: center; gap: 0.8rem; flex-wrap: wrap;
}
.players-trend-chip {
    font-size: 0.72rem; border: 1px solid var(--border); border-radius: 999px;
    padding: 0.25rem 0.55rem; color: var(--muted); background: rgba(255,255,255,0.03);
}
.players-trend-chip.up { color: #22c55e; border-color: rgba(34,197,94,0.45); background: rgba(34,197,94,0.12); }
.players-trend-chip.down { color: #f97316; border-color: rgba(249,115,22,0.45); background: rgba(249,115,22,0.08); }

.dns-scroller {
    background: rgba(0,0,0,0.2); border-radius: 14px;
    border: 1px solid var(--border); overflow: hidden; margin-bottom: 16px;
}
.pro-table { width: 100%; border-collapse: collapse; }
.pro-table th {
    background: rgba(255,255,255,0.03); text-align: left; padding: 1rem;
    font-size: 0.72rem; color: var(--muted); font-weight: 700; text-transform: uppercase;
}
.pro-table td {
    padding: 1rem; font-size: 0.82rem; color: #c8d0e0;
    border-top: 1px solid var(--border); font-family: 'JetBrains Mono', monospace;
}

.info-value .flag-inline {
    display: inline-flex; align-items: center; gap: 8px;
}
.info-value .flag-inline img {
    width: 18px; height: 13px; object-fit: cover; border-radius: 2px;
}

@media (max-width: 600px) {
    .tool-input-row { flex-direction: column; }
    .tool-action-btn { padding: 12px; }
}

#loader {
    position: fixed; inset: 0; z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg);
    transition: opacity 0.35s ease, visibility 0.35s ease;
}
#loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.spin {
    width: 42px; height: 42px; border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.08);
    border-top-color: var(--accent);
    animation: dstat-spin 0.9s linear infinite;
}
@keyframes dstat-spin { to { transform: rotate(360deg); } }

#openSidebar {
    position: fixed; bottom: 20px; left: 20px; z-index: 60;
    width: 44px; height: 44px; border-radius: 12px;
    background: rgba(10, 15, 30, 0.9); border: 1px solid var(--border);
    color: #fff; display: none; align-items: center; justify-content: center;
    cursor: pointer; backdrop-filter: blur(10px);
    transition: background 0.2s, transform 0.15s;
}
#openSidebar:hover { background: rgba(0, 124, 255, 0.18); }
#openSidebar:active { transform: scale(0.94); }
#openSidebar i, #openSidebar svg { width: 20px; height: 20px; }
@media (max-width: 767px) { #openSidebar { display: flex; } }

.chart-body { position: relative; width: 100%; height: 100%; }

.server-warning {
    display: flex; align-items: flex-start; gap: 10px;
    margin: 14px 16px 0; padding: 12px 14px; border-radius: 12px;
    font-size: 0.8rem; line-height: 1.5;
    background: rgba(234, 179, 8, 0.08);
    border: 1px solid rgba(234, 179, 8, 0.25); color: #fde68a;
}
.server-warning .sw-icon { flex-shrink: 0; margin-top: 1px; }
.server-warning .sw-icon i, .server-warning .sw-icon svg { width: 16px; height: 16px; color: #eab308; }
.server-warning .sw-text { flex: 1; min-width: 0; }
.server-warning .sw-close {
    background: none; border: none; color: var(--muted); cursor: pointer;
    padding: 2px; border-radius: 5px; flex-shrink: 0; transition: 0.15s;
}
.server-warning .sw-close:hover { color: #fff; }
.server-warning .sw-close i, .server-warning .sw-close svg { width: 14px; height: 14px; }

.sub-server-button {
    display: flex; align-items: center; justify-content: space-between;
    gap: 8px; width: 100%; padding: 7px 10px; border-radius: 9px;
    font-size: 0.8rem; font-weight: 600; color: #8a93b2;
    text-decoration: none; transition: 0.18s; cursor: pointer;
}
.sub-server-button:hover { background: rgba(255, 255, 255, 0.03); color: #fff; }
.sub-server-button.active { background: rgba(0, 124, 255, 0.1); color: #fff; }
.sub-server-button.active .bw-badge { border-color: rgba(0, 124, 255, 0.35); }
.server-group { margin-bottom: 2px; }

.server-item { opacity: 0; transform: translateX(-8px); transition: opacity 0.25s, transform 0.25s; }
.server-item.show { opacity: 1; transform: none; }

.nav-tools-wrap { position: relative; margin-bottom: 4px; }
.nav-tools-toggle {
    width: 100%; justify-content: space-between;
    background: none; border: none; cursor: pointer; text-align: left;
}
.nav-tools-label { display: flex; align-items: center; gap: 12px; }
.tools-chevron { width: 14px !important; height: 14px !important; transition: transform 0.25s; }
.nav-tools-toggle.open .tools-chevron { transform: rotate(180deg); }
.tools-dropdown {
    max-height: 0; overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex; flex-direction: column; gap: 2px;
}
.tools-dropdown.open { max-height: 240px; }
.tools-dropdown-link {
    display: flex; align-items: center; gap: 12px;
    padding: 9px 14px 9px 40px; border-radius: 10px;
    font-size: 0.82rem; font-weight: 600; color: #6a6a8a;
    text-decoration: none; transition: 0.2s;
}
.tools-dropdown-link i, .tools-dropdown-link svg { width: 15px; height: 15px; flex-shrink: 0; }
.tools-dropdown-link:hover { background: rgba(255, 255, 255, 0.03); color: #fff; }
.tools-dropdown-link.active {
    color: var(--accent); background: rgba(0, 242, 255, 0.06);
}

.tool-panel { position: relative; }

.tool-empty {
    display: flex; align-items: center; justify-content: center;
    min-height: 220px; padding: 40px 20px; color: var(--muted);
    font-size: 0.95rem; font-weight: 600; text-align: center;
}
.tool-empty.error { color: #ff5f5f; }

.info-card {
    position: relative;
    border: 1px solid var(--border); border-radius: 18px;
    background: var(--card-bg); backdrop-filter: blur(25px);
    padding: 20px 22px; margin-bottom: 16px;
}
.info-card-header {
    display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
}
.info-card-header i, .info-card-header svg { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; }
.info-card-header h3 { font-size: 0.95rem; font-weight: 700; color: #fff; }
.info-card-body { display: flex; flex-direction: column; }
.info-row {
    display: flex; justify-content: space-between; align-items: center; gap: 16px;
    padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.info-row:last-child { border-bottom: none; }
.info-label {
    font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.1em; color: var(--muted); flex-shrink: 0;
}
.info-value {
    font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; color: #fff;
    text-align: right; word-break: break-all;
    display: flex; align-items: center; gap: 6px; justify-content: flex-end;
}
.info-copy {
    background: none; border: none; color: var(--muted); cursor: pointer;
    padding: 3px; border-radius: 5px; transition: 0.15s; flex-shrink: 0;
    display: inline-flex; align-items: center;
}
.info-copy:hover { color: #fff; }
.info-copy i, .info-copy svg { width: 12px; height: 12px; }
.muted { color: var(--muted); }
