:root {
    color-scheme: dark;
    --bg: #12141a;
    --bg-elevated: #1a1d26;
    --border: #2a2e3a;
    --text: #e6e8ee;
    --text-muted: #8b90a0;
    --accent: #5b8cff;
    --accent-hover: #7ba0ff;
    --owned: #3ecf8e;
    --traded-away: #e0a63e;
    --lost-trail: #e0524a;
    --bought-back: #5b8cff;
    --radius: 10px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
    line-height: 1.5;
}

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

header.site {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 24px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
}

header.site .brand { font-weight: 700; font-size: 1.1rem; }

header.site nav { display: flex; align-items: center; gap: 16px; }

header.site nav img.avatar {
    width: 28px; height: 28px; border-radius: 50%; vertical-align: middle;
}

main {
    max-width: 960px;
    margin: 0 auto;
    padding: 24px;
}

.flash {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
}

.item-list { display: grid; gap: 12px; }

.item-row {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 16px;
}

.item-row img { width: 48px; height: 36px; object-fit: contain; }

.item-row .name { flex: 1; font-weight: 600; }
.item-row .meta { color: var(--text-muted); font-size: 0.85rem; }

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #0b0c10;
}

.badge.owned { background: var(--owned); }
.badge.traded_away { background: var(--traded-away); }
.badge.lost_trail { background: var(--lost-trail); }
.badge.bought_back { background: var(--bought-back); color: #fff; }

.btn {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
}

.btn:hover { background: var(--accent-hover); color: #fff; }
.btn.secondary { background: transparent; border: 1px solid var(--border); color: var(--text); }

input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font-family: monospace;
}

.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li {
    border-left: 2px solid var(--border);
    padding: 6px 0 6px 16px;
    margin-left: 6px;
    position: relative;
}
.timeline li::before {
    content: "";
    position: absolute;
    left: -5px; top: 12px;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--accent);
}

.muted { color: var(--text-muted); }
.empty-state { text-align: center; color: var(--text-muted); padding: 40px 0; }
