.pb-debug-root {
    --pb-debug-bg: #0d1210;
    --pb-debug-surface: #151b18;
    --pb-debug-line: rgba(91, 255, 151, .16);
    --pb-debug-green: #5bff97;
    --pb-debug-muted: #8ba499;
    position: relative;
    z-index: 2000;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.pb-debug-launcher {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 2000;
    width: 62px;
    height: 62px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(91, 255, 151, .28);
    border-radius: 18px;
    background: var(--pb-debug-bg);
    color: var(--pb-debug-green);
    cursor: pointer;
    box-shadow: 0 20px 55px rgba(3, 15, 10, .38);
}

.pb-debug-launcher span { font-size: 15px; font-weight: 900; letter-spacing: -.12em; }
.pb-debug-launcher b { margin-top: -12px; color: #c8d8d1; font-size: 8px; letter-spacing: .16em; }
.pb-debug-launcher:hover { transform: translateY(-2px); border-color: var(--pb-debug-green); }

.pb-debug-panel {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 2001;
    width: min(510px, calc(100vw - 32px));
    max-height: min(680px, calc(100vh - 32px));
    overflow: hidden;
    border: 1px solid rgba(91, 255, 151, .22);
    border-radius: 18px;
    background: var(--pb-debug-bg);
    color: #d9e6e0;
    box-shadow: 0 30px 90px rgba(3, 15, 10, .46);
    font-size: 12px;
}

.pb-debug-header {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 9px 12px 9px 16px;
    border-bottom: 1px solid var(--pb-debug-line);
    background: linear-gradient(110deg, rgba(91, 255, 151, .08), transparent 58%);
    cursor: grab;
    user-select: none;
    touch-action: none;
}

.pb-debug-header.is-dragging { cursor: grabbing; }
.pb-debug-title { display: flex; align-items: center; gap: 11px; min-width: 0; }
.pb-debug-title div { min-width: 0; }
.pb-debug-title strong, .pb-debug-title small { display: block; }
.pb-debug-title strong { color: var(--pb-debug-green); font-size: 12px; letter-spacing: .08em; }
.pb-debug-title small { margin-top: 3px; color: var(--pb-debug-muted); font-size: 9px; }
.pb-debug-terminal { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 34px; border-radius: 9px; background: rgba(91, 255, 151, .12); color: var(--pb-debug-green); font-weight: 900; }
.pb-debug-header > button { width: 34px; height: 34px; border: 0; border-radius: 9px; background: rgba(255,255,255,.07); color: #d9e6e0; cursor: pointer; font: inherit; font-size: 21px; }
.pb-debug-header > button:hover { background: rgba(91, 255, 151, .13); color: var(--pb-debug-green); }

.pb-debug-statusbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 9px 16px; border-bottom: 1px solid rgba(255,255,255,.06); background: #101613; }
.pb-debug-statusbar span { display: flex; align-items: center; gap: 7px; color: var(--pb-debug-green); font-size: 9px; font-weight: 900; letter-spacing: .09em; }
.pb-debug-statusbar i { width: 7px; height: 7px; border-radius: 50%; background: var(--pb-debug-green); box-shadow: 0 0 0 4px rgba(91, 255, 151, .1); }
.pb-debug-statusbar code { max-width: 58%; overflow: hidden; color: var(--pb-debug-muted); font: inherit; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }

.pb-debug-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; padding: 12px 14px 0; }
.pb-debug-tabs button { min-height: 37px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--pb-debug-muted); cursor: pointer; font: inherit; font-size: 10px; font-weight: 850; }
.pb-debug-tabs button:hover { color: #d9e6e0; }
.pb-debug-tabs button.is-active { border-color: rgba(91, 255, 151, .16); background: rgba(91, 255, 151, .1); color: var(--pb-debug-green); }

.pb-debug-content { max-height: min(515px, calc(100vh - 197px)); overflow-y: auto; padding: 14px; scrollbar-width: thin; scrollbar-color: rgba(91,255,151,.3) transparent; }
.pb-debug-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pb-debug-grid article { min-width: 0; padding: 13px; border: 1px solid rgba(255,255,255,.06); border-radius: 11px; background: var(--pb-debug-surface); }
.pb-debug-grid span, .pb-debug-grid strong { display: block; }
.pb-debug-grid span { margin-bottom: 5px; color: var(--pb-debug-muted); font-size: 9px; text-transform: uppercase; letter-spacing: .06em; }
.pb-debug-grid strong { overflow: hidden; color: #eef7f3; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.pb-debug-good { color: var(--pb-debug-green) !important; }
.pb-debug-warn { color: #ffc866 !important; }

.pb-debug-list { margin: 12px 0 0; border-top: 1px solid rgba(255,255,255,.07); }
.pb-debug-list > div { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 14px; padding: 10px 3px; border-bottom: 1px solid rgba(255,255,255,.07); }
.pb-debug-list dt { color: var(--pb-debug-muted); }
.pb-debug-list dd { min-width: 0; margin: 0; overflow-wrap: anywhere; color: #d9e6e0; text-align: right; }

.pb-debug-identity { display: flex; align-items: center; gap: 13px; padding: 15px; border: 1px solid rgba(91,255,151,.13); border-radius: 12px; background: rgba(91,255,151,.055); }
.pb-debug-identity > span { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 42px; border-radius: 11px; background: var(--pb-debug-green); color: #082016; font-weight: 950; }
.pb-debug-identity strong, .pb-debug-identity small { display: block; }
.pb-debug-identity small { margin-top: 3px; color: var(--pb-debug-muted); overflow-wrap: anywhere; }
.pb-debug-empty { display: grid; gap: 5px; padding: 24px; border: 1px dashed rgba(91,255,151,.2); border-radius: 12px; color: var(--pb-debug-muted); text-align: center; }
.pb-debug-empty strong { color: #d9e6e0; }

.pb-debug-section-title { margin: 5px 0 9px; color: var(--pb-debug-muted); font-size: 9px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.pb-debug-section-title:not(:first-child) { margin-top: 20px; }
.pb-debug-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pb-debug-actions form { display: contents; }
.pb-debug-actions a, .pb-debug-actions button { min-width: 0; min-height: 42px; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,.08); border-radius: 10px; background: var(--pb-debug-surface); padding: 9px 11px; color: #d9e6e0; cursor: pointer; font: inherit; font-size: 10px; font-weight: 800; text-align: center; }
.pb-debug-actions a:hover, .pb-debug-actions button:hover { border-color: rgba(91,255,151,.35); background: rgba(91,255,151,.09); color: var(--pb-debug-green); }
.pb-debug-security { margin: 16px 2px 0; color: #688177; font-size: 9px; line-height: 1.55; }
.pb-debug-dev-account-active { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 12px; border: 1px solid rgba(91,255,151,.18); border-radius: 10px; background: rgba(91,255,151,.08); }
.pb-debug-dev-account-active i { width: 8px; height: 8px; border-radius: 50%; background: var(--pb-debug-green); box-shadow: 0 0 0 4px rgba(91,255,151,.09); }
.pb-debug-dev-account-active span { color: #d9e6e0; font-weight: 850; }
.pb-debug-dev-account-active strong { color: var(--pb-debug-green); font-size: 9px; text-align: right; }

.pb-debug-enter { transition: opacity .16s ease, transform .16s ease; }
.pb-debug-enter-start { opacity: 0; transform: translateY(10px) scale(.98); }
.pb-debug-enter-end { opacity: 1; transform: translateY(0) scale(1); }
.pb-debug-outlines body *:not(.pb-debug-root):not(.pb-debug-root *) { outline: 1px solid rgba(255, 79, 129, .32) !important; }

@media (max-width: 760px) {
    .pb-debug-panel { left: 12px !important; right: 12px !important; top: auto !important; bottom: 12px !important; width: auto; max-height: calc(100vh - 24px); }
    .pb-debug-header { cursor: default; }
    .pb-debug-content { max-height: calc(100vh - 194px); }
    .pb-debug-launcher { right: 14px; bottom: 14px; }
}

@media (max-width: 420px) {
    .pb-debug-grid, .pb-debug-actions { grid-template-columns: 1fr; }
    .pb-debug-list > div { grid-template-columns: 90px minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
    .pb-debug-enter, .pb-debug-launcher { transition: none; }
}
