/* 2ATracker Custom Styles */

body {
    min-height: 100vh;
}

.stat-card {
    transition: transform 0.15s ease-in-out;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.table th {
    white-space: nowrap;
}

.badge-active { background-color: #198754; }
.badge-sold { background-color: #6c757d; }
.badge-traded { background-color: #0d6efd; }
.badge-pending { background-color: #ffc107; color: #000; }
.badge-approved { background-color: #198754; }
.badge-in_hand { background-color: #0dcaf0; color: #000; }
.badge-stolen { background-color: #dc3545; }
.badge-other { background-color: #6c757d; }

.low-stock {
    color: #dc3545;
    font-weight: bold;
}

.entry-row {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.photo-thumbnail {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 0.5rem;
    cursor: pointer;
}

/* ── Builder ──────────────────────────────────────────── */
.builder-sidebar {
    position: sticky;
    top: 1rem;
    max-height: calc(100vh - 6rem);
    overflow-y: auto;
}

.builder-drop-zone {
    min-height: 50px;
    border: 2px dashed rgba(255, 255, 255, 0.08);
    border-radius: 0.5rem;
    padding: 0.375rem;
    transition: border-color 0.2s, background-color 0.2s;
}

.builder-drop-zone:empty::after {
    content: 'Drop parts here';
    display: block;
    text-align: center;
    color: rgba(255, 255, 255, 0.15);
    font-size: 0.8rem;
    padding: 0.75rem;
}

.builder-part-card {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.375rem;
    padding: 0.4rem 0.5rem;
    margin-bottom: 0.3rem;
    cursor: grab;
    transition: border-color 0.15s, box-shadow 0.15s;
    user-select: none;
}

.builder-part-card:hover {
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.06);
}

.builder-part-card:active {
    cursor: grabbing;
}

.builder-ghost {
    opacity: 0.35;
    border-color: #0d6efd;
    background: rgba(13, 110, 253, 0.1);
}

.builder-drag {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
    z-index: 9999;
}

.part-thumb {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: 0.25rem;
    flex-shrink: 0;
}

.part-thumb-placeholder {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 0.25rem;
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.9rem;
    flex-shrink: 0;
}

.builder-category-section {
    margin-bottom: 0.75rem;
}

.builder-category-header {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 0.25rem;
    margin-bottom: 0.375rem;
}

.builder-firearm-card .card-header {
    cursor: pointer;
    transition: background-color 0.15s;
}

.builder-firearm-card .card-header:hover {
    background: rgba(255, 255, 255, 0.03);
}

.builder-suppressor-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.375rem;
    padding: 0.4rem 0.5rem;
    margin-bottom: 0.3rem;
}

/* Mobile: stack sidebar on top */
@media (max-width: 991.98px) {
    .builder-sidebar {
        position: static;
        max-height: 300px;
    }
}
