@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

@keyframes slideUpFade {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

:root {
    --bg-deep: #050505;
    --bg-main: #0a0a0a;
    --bg-card: #121212;
    --bg-hover: #1a1a1a;
    --border-dim: #1f1f23;
    --text-primary: #ffffff;
    --text-muted: #71717a;
    --accent-blue: #3b82f6;
    --accent-green: #10b981;
    --accent-red: #ef4444;
    --accent-gray: #3f3f3f;
    --font-main: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--bg-deep);
    color: var(--text-primary);
    font-family: var(--font-main);
    height: 100vh;
    overflow: hidden;
    display: flex;
}

.app-container { display: flex; width: 100%; height: 100%; }

.sidebar { display: none; }

.main-viewport {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.top-bar {
    height: 64px;
    background: var(--bg-main);
    border-bottom: 1px solid var(--border-dim);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    justify-content: space-between;
}

.brand { display: flex; align-items: center; gap: 0.75rem; }
.brand h1 { font-size: 1.1rem; font-weight: 800; letter-spacing: -0.02em; }
.brand .sub-brand { color: var(--text-muted); font-size: 0.75rem; font-weight: 600; opacity: 0.7; }

.global-stats { display: flex; gap: 0.5rem; }

.status-chip {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-dim);
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
}

.status-chip b { color: #ff9d00; margin-left: 6px; font-family: var(--font-mono); }

.top-bar-right { display: flex; align-items: center; gap: 1.25rem; }

.search-box {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-dim);
    border-radius: 4px;
    padding: 4px 12px;
    gap: 8px;
    width: 240px;
}

.search-box input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 0.8rem;
    width: 100%;
}

.secondary-nav {
    background: var(--bg-main);
    padding: 0 1.5rem;
    display: flex;
    overflow-x: auto;
}

.nav-tab {
    padding: 1.25rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.nav-tab.active { color: var(--text-primary); border-bottom: 2px solid #ff9d00; }
.nav-tab b { font-size: 0.7rem; opacity: 0.6; font-weight: 400; }

.view-header {
    padding: 1.5rem 1.5rem 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.view-header h2 { font-size: 1.2rem; font-weight: 700; }

.view-filters {
    display: flex;
    background: var(--bg-card);
    padding: 4px;
    border-radius: 6px;
    border: 1px solid var(--border-dim);
}

.filter-opt {
    padding: 6px 14px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 4px;
}

.filter-opt.active { background: var(--accent-gray); color: white; }

.data-wrapper {
    flex: 1;
    overflow-y: auto;
    padding: 0 1.5rem 2rem 1.5rem;
}

.custom-table { width: 100%; border-collapse: collapse; }
.custom-table th {
    text-align: left;
    padding: 12px;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    border-bottom: 1px solid var(--border-dim);
    text-transform: uppercase;
}

.custom-table td { padding: 1rem 12px; border-bottom: 1px solid var(--border-dim); font-size: 0.85rem; }

.repo-cell { display: flex; flex-direction: column; }
.repo-owner { font-size: 0.75rem; color: var(--text-muted); }
.repo-name { font-weight: 700; font-size: 1rem; }

.pill { padding: 4px 12px; border-radius: 4px; font-size: 0.75rem; font-weight: 700; }
.pill-teal { background: rgba(20, 184, 166, 0.15); color: #2dd4bf; }
.pill-green { background: rgba(16, 185, 129, 0.15); color: #34d399; }

/* Mobile Responsive */
@media (max-width: 768px) {
    body { overflow: auto; }
    
    .top-bar { 
        flex-direction: column; 
        height: auto; 
        padding: 1rem; 
        gap: 1rem; 
        align-items: flex-start;
    }
    
    .top-bar-right { width: 100%; justify-content: space-between; }
    .search-box { width: 100% !important; }
    .global-stats { display: none; }
    
    #nav-wrapper {
        flex-direction: column !important;
        align-items: stretch !important;
        padding-right: 0 !important;
    }

    .secondary-nav {
        flex-direction: row;
        overflow-x: auto;
        border-bottom: 1px solid var(--border-dim);
    }
    
    .nav-tab { padding: 1rem 12px; font-size: 0.75rem; }
    
    .pagination-top {
        padding: 0.75rem 1rem !important;
        justify-content: center !important;
        background: var(--bg-hover);
        width: 100%;
    }

    .custom-table, .custom-table thead, .custom-table tbody, .custom-table th, .custom-table td, .custom-table tr {
        display: block;
    }
    .custom-table thead { display: none; }
    .custom-table tr {
        background: var(--bg-card);
        border: 1px solid var(--border-dim);
        border-radius: 12px;
        margin-bottom: 1.5rem;
        padding: 1.25rem;
    }
    .custom-table td {
        display: flex;
        flex-direction: column;
        align-items: flex-start !important;
        justify-content: flex-start !important;
        padding: 10px 0;
        border-bottom: 1px solid rgba(255,255,255,0.05);
        height: auto;
        min-height: auto;
        text-align: left;
    }
    .custom-table td:last-child { border-bottom: none; }
    
    .custom-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--text-muted);
        font-size: 0.65rem;
        margin-bottom: 4px;
        text-transform: uppercase;
    }
    
    .repo-cell { padding-top: 5px; }
    .repo-name { font-size: 1.1rem; color: #ff9d00 !important; line-height: 1.3; }
    .pill { display: inline-block; margin-top: 4px; }
    
    .view-header { flex-direction: column; align-items: flex-start; gap: 1rem; }
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-thumb { background: var(--border-dim); border-radius: 10px; }