/* ══ DEBUG CONSOLE ══════════════════════════════════════════════════════ */

#debug-console-page {
    position: fixed; inset: 0; z-index: 200;
    display: flex; flex-direction: column;
    background: #0d1117; color: #e6edf3;
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
}
#debug-console-page.hidden { display: none !important; }

/* ── Header ── */
.dc-header {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 14px; background: #161b22;
    border-bottom: 1px solid #30363d; flex-shrink: 0;
}
.dc-exit-btn {
    width: 34px; height: 34px; border-radius: 8px;
    background: #21262d; border: 1px solid #30363d;
    color: #8b949e; cursor: pointer; font-size: 16px;
    display: flex; align-items: center; justify-content: center;
    transition: all .15s; flex-shrink: 0;
}
.dc-exit-btn:hover { background: #30363d; color: #e6edf3; }
.dc-title {
    font-size: .8rem; font-weight: 700; color: #58a6ff;
    letter-spacing: .5px; flex: 1;
}
.dc-title span { color: #3fb950; font-size: .7rem; }
.dc-badge-wrap { position: relative; }
.dc-err-badge {
    display: none; position: absolute; top: -6px; right: -6px;
    background: #da3633; color: #fff;
    font-size: .6rem; font-weight: 800;
    padding: 1px 5px; border-radius: 10px;
    min-width: 16px; text-align: center;
    align-items: center; justify-content: center;
}

/* ── Toolbar ── */
.dc-toolbar {
    display: flex; align-items: center; gap: 6px;
    padding: 8px 14px; background: #161b22;
    border-bottom: 1px solid #30363d; flex-shrink: 0;
    flex-wrap: wrap;
}
.dc-toolbar-btn {
    padding: 4px 10px; border-radius: 6px;
    background: #21262d; border: 1px solid #30363d;
    color: #8b949e; font-size: .72rem; font-weight: 600;
    cursor: pointer; font-family: inherit; white-space: nowrap;
    transition: all .15s;
}
.dc-toolbar-btn:hover { background: #30363d; color: #e6edf3; }
.dc-toolbar-btn.active { background: #1f6feb; border-color: #388bfd; color: #fff; }
.dc-toolbar-btn.danger:hover { background: #da3633; border-color: #f85149; color: #fff; }
.dc-toolbar-btn.share { background: #1f6feb22; border-color: #388bfd; color: #58a6ff; }
.dc-count { margin-left: auto; font-size: .68rem; color: #484f58; }

/* ── Filtreler ── */
.dc-filters {
    display: flex; gap: 4px; padding: 7px 14px;
    background: #0d1117; border-bottom: 1px solid #21262d;
    flex-shrink: 0; overflow-x: auto; scrollbar-width: none;
}
.dc-filters::-webkit-scrollbar { display: none; }
.dc-filter-btn {
    padding: 3px 10px; border-radius: 20px;
    background: transparent; border: 1px solid #30363d;
    color: #484f58; font-size: .68rem; font-weight: 700;
    cursor: pointer; font-family: inherit; white-space: nowrap;
    transition: all .15s; letter-spacing: .3px; text-transform: uppercase;
}
.dc-filter-btn:hover { border-color: #8b949e; color: #8b949e; }
.dc-filter-btn.active { background: #1f6feb33; border-color: #388bfd; color: #58a6ff; }
.dc-filter-btn[data-filter="error"].active  { background: #da363322; border-color: #f85149; color: #f85149; }
.dc-filter-btn[data-filter="warn"].active   { background: #d2960322; border-color: #d29803; color: #d29803; }
.dc-filter-btn[data-filter="network"].active{ background: #3fb95022; border-color: #3fb950; color: #3fb950; }

/* ── Arama ── */
.dc-search-wrap {
    padding: 6px 14px; background: #0d1117;
    border-bottom: 1px solid #21262d; flex-shrink: 0;
}
.dc-search {
    width: 100%; padding: 7px 12px; border-radius: 8px;
    background: #161b22; border: 1px solid #30363d;
    color: #e6edf3; font-size: .78rem; font-family: inherit;
    box-sizing: border-box; outline: none; transition: border-color .15s;
}
.dc-search:focus { border-color: #388bfd; }
.dc-search::placeholder { color: #484f58; }

/* ── Log container ── */
.dc-log-container {
    flex: 1; overflow-y: auto; padding: 4px 0;
    scrollbar-width: thin; scrollbar-color: #30363d #0d1117;
}
.dc-log-container::-webkit-scrollbar { width: 4px; }
.dc-log-container::-webkit-scrollbar-track { background: #0d1117; }
.dc-log-container::-webkit-scrollbar-thumb { background: #30363d; border-radius: 4px; }

/* ── Log satırı ── */
.dc-log {
    display: flex; align-items: flex-start; gap: 6px;
    padding: 5px 14px; border-bottom: 1px solid #21262d22;
    font-size: .72rem; line-height: 1.5;
    transition: background .1s;
}
.dc-log:hover { background: #161b22; }
.dc-log-icon { flex-shrink: 0; width: 14px; font-size: .7rem; margin-top: 1px; }
.dc-log-time { flex-shrink: 0; color: #484f58; font-size: .67rem; min-width: 56px; }
.dc-log-msg  { flex: 1; word-break: break-all; white-space: pre-wrap; }
.dc-log-copy {
    flex-shrink: 0; background: none; border: none;
    color: #484f58; cursor: pointer; padding: 0 2px;
    font-size: .8rem; opacity: 0; transition: opacity .15s;
}
.dc-log:hover .dc-log-copy { opacity: 1; }
.dc-log-copy:hover { color: #58a6ff; }

/* Renk kodları */
.dc-log-log     { color: #8b949e; }
.dc-log-info    { color: #58a6ff; }
.dc-log-info .dc-log-icon { color: #388bfd; }
.dc-log-warn    { color: #d29803; background: #d2980308; }
.dc-log-warn .dc-log-icon { color: #d29803; }
.dc-log-error   { color: #f85149; background: #f8514908; }
.dc-log-error .dc-log-icon { color: #da3633; }
.dc-log-network { color: #3fb950; }
.dc-log-network .dc-log-icon { color: #2ea043; }

/* ── Boş durum ── */
.dc-empty {
    display: flex; flex-direction: column; align-items: center;
    gap: 8px; padding: 48px 20px; color: #484f58; font-size: .78rem;
}
.dc-empty-icon { font-size: 32px; }

/* ── Toast ── */
.dc-toast {
    position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%) translateY(10px);
    background: #238636; color: #fff; padding: 8px 16px; border-radius: 8px;
    font-size: .78rem; font-weight: 600; opacity: 0; transition: all .2s;
    pointer-events: none; z-index: 9999; white-space: nowrap;
}
.dc-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Debug butonu drawer'da ── */
.mob-drawer-btn-debug {
    color: #3fb950 !important;
    border-top: 1px dashed var(--border) !important;
    margin-top: 4px !important;
    padding-top: 10px !important;
    font-family: 'JetBrains Mono', monospace !important;
    font-size: .78rem !important;
}
