:root {
    --bg-dark: #0b0e1a;
    --bg-card: #161a2b;
    --bg-card2: #1e2438;
    --accent: #ff6b1a;
    --accent2: #ffa534;
    --have: #2ecc71;
    --missing: #e74c3c;
    --dupe: #ffa534;
}

body {
    background: var(--bg-dark);
    color: #e8eaf1;
    min-height: 100vh;
    -webkit-tap-highlight-color: transparent;
}

/* Navbar */
.app-navbar {
    background: linear-gradient(90deg, #1a1030 0%, #2a1240 100%);
    border-bottom: 2px solid var(--accent);
}
.navbar-brand { letter-spacing: .3px; }
.app-navbar .nav-link.active { color: var(--accent2) !important; font-weight: 600; }
.app-navbar .badge.bg-danger {
    position: absolute; top: 2px; right: -4px; font-size: .6rem;
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid #262c44;
    color: #e8eaf1;
    border-radius: 14px;
}
.stat-card { border-radius: 14px; }
.stat-value { font-size: 1.9rem; font-weight: 800; line-height: 1; }
.stat-total { font-size: 1rem; color: #8891ad; font-weight: 600; }
.stat-label { font-size: .8rem; color: #8891ad; margin-top: .3rem; }

.team-card { transition: transform .12s ease, border-color .12s ease; }
.team-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.special-card { min-height: 64px; }

/* Legend */
.legend { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .85rem; color: #b9c0d6; }
.legend-item { display: inline-flex; align-items: center; gap: .35rem; }
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.dot-have { background: var(--have); }
.dot-missing { background: var(--missing); }
.dot-dupe { background: var(--dupe); }

/* Sticker cards */
.sticker-card {
    background: var(--bg-card2);
    border: 2px solid #2a3150;
    border-radius: 12px;
    padding: .5rem .4rem;
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: border-color .15s ease, transform .1s ease;
    position: relative;
    overflow: hidden;
}
.sticker-card::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
}
.sticker-card.state-have { border-color: var(--have); }
.sticker-card.state-have::before { background: var(--have); }
.sticker-card.state-missing { border-color: #3a4260; opacity: .82; }
.sticker-card.state-missing::before { background: var(--missing); }
.sticker-card.state-dupe { border-color: var(--dupe); }
.sticker-card.state-dupe::before { background: var(--dupe); }
.sticker-card.state-unassigned { border-color: #2a3150; opacity: .5; }

.sticker-code {
    font-weight: 800; color: var(--accent2); font-size: .8rem;
    background: rgba(255,165,52,.12); border-radius: 6px; padding: 1px 6px;
    display: inline-block; margin: 0 auto .25rem;
}
.sticker-name { font-weight: 600; font-size: .82rem; line-height: 1.1; word-break: break-word; }
.sticker-pos { font-size: .68rem; color: #8891ad; margin-top: 2px; }

.sticker-controls {
    display: flex; align-items: center; justify-content: center;
    gap: .35rem; margin-top: .5rem;
}
.btn-qty {
    border: none; background: #2a3150; color: #fff;
    width: 30px; height: 30px; border-radius: 8px; font-size: .8rem;
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer; transition: background .12s ease;
}
.btn-qty:active { transform: scale(.92); }
.btn-inc:hover { background: var(--have); }
.btn-dec:hover { background: var(--missing); }
.qty-badge {
    min-width: 26px; font-weight: 800; font-size: 1rem;
}
.state-dupe .qty-badge { color: var(--dupe); }
.state-have .qty-badge { color: var(--have); }

/* Tables */
.table-dark { --bs-table-bg: var(--bg-card); border-radius: 12px; overflow: hidden; }
.trade-card { background: var(--bg-card); }

/* Buttons */
.btn-warning { --bs-btn-bg: var(--accent2); --bs-btn-border-color: var(--accent2);
    --bs-btn-hover-bg: var(--accent); --bs-btn-hover-border-color: var(--accent);
    --bs-btn-color: #1a1030; --bs-btn-hover-color: #fff; font-weight: 600; }
.btn-outline-warning { --bs-btn-color: var(--accent2); --bs-btn-border-color: var(--accent2);
    --bs-btn-hover-bg: var(--accent2); --bs-btn-hover-color: #1a1030; }

a { color: var(--accent2); }
a:hover { color: var(--accent); }

.nav-tabs .nav-link { color: #b9c0d6; }
.nav-tabs .nav-link.active { background: var(--bg-card); color: var(--accent2);
    border-color: #262c44 #262c44 var(--bg-card); }
.form-control, .form-select, textarea {
    background: var(--bg-card2); border-color: #2a3150; color: #e8eaf1;
}
.form-control:focus, .form-select:focus {
    background: var(--bg-card2); color: #fff;
    border-color: var(--accent2); box-shadow: 0 0 0 .2rem rgba(255,165,52,.2);
}
