#debug-toggle {
    position: fixed; bottom: 12px; right: 12px; z-index: 99990;
    width: 36px; height: 36px; border-radius: 50%;
    background: #333; color: #fff; font-size: 16px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; opacity: 0.5; transition: opacity 0.15s;
    user-select: none; box-shadow: 0 2px 6px rgba(0,0,0,.3);
}
#debug-toggle:hover { opacity: 1; }
#debug-panel {
    position: fixed; top: 0; right: 0; z-index: 99999;
    width: 480px; max-width: 100vw; height: 100vh;
    background: #1e1e1e; color: #d4d4d4; font-family: 'Consolas','Courier New',monospace;
    font-size: 12px; line-height: 1.5;
    transform: translateX(100%); transition: transform 0.25s ease;
    display: flex; flex-direction: column;
    box-shadow: -4px 0 20px rgba(0,0,0,.5);
}
#debug-panel.open { transform: translateX(0); }
#debug-panel-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 14px; background: #2d2d2d; border-bottom: 1px solid #444;
    flex-shrink: 0;
}
#debug-panel-header span { font-weight: bold; font-size: 14px; color: #ffd700; }
#debug-panel-header button {
    background: none; border: none; color: #aaa; font-size: 16px; cursor: pointer;
}
#debug-panel-header button:hover { color: #fff; }
#debug-panel-body {
    flex: 1; overflow-y: auto; padding: 14px;
}
.debug-summary {
    background: #2a2a2a; border-radius: 6px; padding: 12px; margin-bottom: 12px;
    display: flex; gap: 16px; flex-wrap: wrap;
}
.debug-stat { text-align: center; }
.debug-stat .val { font-size: 20px; font-weight: bold; color: #6fcf97; }
.debug-stat .lbl { font-size: 10px; color: #888; text-transform: uppercase; }
.debug-query {
    background: #2a2a2a; border-radius: 4px; padding: 8px 10px; margin-bottom: 6px;
    border-left: 3px solid #555;
}
.debug-query.slow { border-left-color: #e06c75; }
.debug-query .q-sql {
    color: #9cdcfe; word-break: break-all; margin-bottom: 4px;
}
.debug-query .q-meta {
    color: #888; font-size: 10px;
}
.debug-query .q-meta .q-time { color: #6fcf97; font-weight: bold; }
.debug-query .q-meta .q-time.slow { color: #e06c75; }
.debug-query .q-params {
    color: #ce9178; font-size: 10px; margin-top: 2px; word-break: break-all;
}
.debug-loading { color: #888; text-align: center; padding: 20px; }