<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{% block title %}Packages{% endblock %} · depot</title>
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=IBM+Plex+Sans:wght@300;400;500&display=swap" rel="stylesheet">
    <style>
        :root {
            --bg:       #0d0d0d;
            --surface:  #161616;
            --surface2: #1f1f1f;
            --border:   #2a2a2a;
            --muted:    #555;
            --text:     #ddd;
            --text-dim: #888;
            --accent:   #4f8ef7;
            --green:    #3ecf6a;
            --yellow:   #f0b429;
            --red:      #f25c5c;
            --radius:   6px;
            --mono:     'IBM Plex Mono', monospace;
            --sans:     'IBM Plex Sans', sans-serif;
        }

        *, *::before, *::after { box-sizing: border-box; }

        body {
            margin: 0;
            font-family: var(--sans);
            font-size: 14px;
            background: var(--bg);
            color: var(--text);
            line-height: 1.5;
        }

        a { color: var(--accent); text-decoration: none; }
        a:hover { text-decoration: underline; }

        /* ── Top nav ─────────────────────────────── */
        .topbar {
            position: fixed;
            top: 0; left: 0;
            width: 100%;
            height: 52px;
            background: var(--surface);
            border-bottom: 1px solid var(--border);
            display: flex;
            align-items: center;
            gap: 16px;
            padding: 0 24px;
            z-index: 1000;
        }

        .topbar-logo {
            font-family: var(--mono);
            font-size: 15px;
            font-weight: 500;
            color: var(--text);
            letter-spacing: -0.5px;
            flex-shrink: 0;
        }
        .topbar-logo span { color: var(--accent); }

        .topbar-search {
            flex: 1;
            max-width: 420px;
            position: relative;
        }
        .topbar-search input {
            width: 100%;
            padding: 6px 12px 6px 32px;
            background: var(--surface2);
            border: 1px solid var(--border);
            border-radius: var(--radius);
            color: var(--text);
            font-family: var(--sans);
            font-size: 13px;
            outline: none;
            transition: border-color .15s;
        }
        .topbar-search input:focus { border-color: var(--accent); }
        .topbar-search input::placeholder { color: var(--muted); }
        .topbar-search-icon {
            position: absolute;
            left: 10px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--muted);
            pointer-events: none;
        }

        /* ── Page wrapper ───────────────────────── */
        .page {
            padding-top: 52px;
            min-height: 100vh;
        }

        .container {
            max-width: 1100px;
            margin: 0 auto;
            padding: 32px 24px;
            width: 100%;
        }

        /* ── Breadcrumb ─────────────────────────── */
        .breadcrumb {
            font-family: var(--mono);
            font-size: 12px;
            color: var(--text-dim);
            margin-bottom: 20px;
            display: flex;
            align-items: center;
            gap: 6px;
            flex-wrap: wrap;
        }
        .breadcrumb a { color: var(--text-dim); }
        .breadcrumb a:hover { color: var(--text); text-decoration: none; }
        .breadcrumb-sep { color: var(--border); }

        /* ── Status badges ──────────────────────── */
        .badge {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            padding: 2px 8px;
            border-radius: 20px;
            font-family: var(--mono);
            font-size: 11px;
            font-weight: 500;
            text-transform: uppercase;
            letter-spacing: .4px;
        }
        .badge-success { background: rgba(62,207,106,.12); color: var(--green); }
        .badge-failure { background: rgba(242,92,92,.12);  color: var(--red); }
        .badge-running { background: rgba(79,142,247,.12); color: var(--accent); }
        .badge-pending { background: rgba(240,180,41,.12); color: var(--yellow); }
        .badge-unknown { background: rgba(136,136,136,.12); color: var(--muted); }

        .dot {
            width: 6px; height: 6px;
            border-radius: 50%;
            background: currentColor;
            flex-shrink: 0;
        }
        .dot-pulse {
            animation: pulse 1.4s ease-in-out infinite;
        }
        @keyframes pulse {
            0%,100% { opacity: 1; }
            50%      { opacity: .3; }
        }

        /* ── Generic card ───────────────────────── */
        .card {
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: var(--radius);
        }

        /* ── Section heading ────────────────────── */
        .section-title {
            font-size: 11px;
            font-family: var(--mono);
            text-transform: uppercase;
            letter-spacing: .8px;
            color: var(--muted);
            margin: 0 0 12px;
        }

        /* ── Utility ────────────────────────────── */
        .mono  { font-family: var(--mono); }
        .dim   { color: var(--text-dim); }
        .small { font-size: 12px; }
    </style>
    {% block extra_head %}{% endblock %}
</head>
<body>
<div class="page">

    <nav class="topbar">
        <a class="topbar-logo" href="/packages/"><span>//</span>DSA Packages</a>
        <div class="topbar-search">
            <svg class="topbar-search-icon" width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>
            <form method="get" action="/packages/">
                <input type="text" name="q" placeholder="Search packages…" value="{{ query | default(value='') }}">
            </form>
        </div>
    </nav>

    <div class="page">
        {% block content %}{% endblock %}
    </div>

</div>
</body>
</html>
