/* ── Global ── */
body {
    background: #f4f6f9;
    font-size: .93rem;
}

/* ── Navbar ── */
.navbar-brand { font-size: 1.1rem; }

/* ── Cards ── */
.card { border-radius: .75rem; }
.card-header { border-radius: .75rem .75rem 0 0 !important; }

/* ── Tables ── */
.table > :not(caption) > * > * { padding: .6rem .75rem; }
.table thead th { font-size: .72rem; font-weight: 700; }

/* ── Badges ── */
.font-monospace { font-family: 'Courier New', monospace; }

/* ── Sidebar & layout ── */
.container-fluid { max-width: 1400px; }

/* ── Login page ── */
body.bg-light .card { border-radius: 1rem; }

/* ── Print page ── */
@media print {
    * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
}

/* ── Scanner video ── */
#scannerVideo, #scanItemVideo {
    border-radius: .5rem;
    border: 2px solid #0d6efd;
}

/* ── Pallet photo thumb ── */
.pallet-thumb {
    width: 38px; height: 38px;
    object-fit: cover;
    border-radius: .375rem;
    cursor: pointer;
    transition: transform .15s;
}
.pallet-thumb:hover { transform: scale(1.1); }

/* ── Responsive tweaks ── */
@media (max-width: 576px) {
    .card-body { padding: .75rem; }
    .btn-group .btn { padding: .25rem .45rem; }
    .pallet-code { font-size: 1.3rem !important; }
}

/* ── Animation ── */
.fade-in { animation: fadeIn .3s ease-in; }
@keyframes fadeIn { from { opacity:0; transform:translateY(4px); } to { opacity:1; transform:none; } }

/* ── Toast container ── */
#toastContainer {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
}

/* ── Search dropdown ── */
.search-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 1050;
    max-height: 420px;
    overflow-y: auto;
    font-size: .88rem;
}
.search-group-label {
    padding: .35rem .75rem;
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #6c757d;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    position: sticky;
    top: 0;
}
.search-item {
    display: flex;
    align-items: center;
    gap: .25rem;
    padding: .45rem .75rem;
    text-decoration: none;
    color: #212529;
    border-bottom: 1px solid #f0f0f0;
    transition: background .1s;
    white-space: nowrap;
    overflow: hidden;
}
.search-item:last-child { border-bottom: none; }
.search-item:hover,
.search-item:focus {
    background: #e8f0fe;
    color: #0d47a1;
    outline: none;
}
.search-item mark {
    background: #fff3cd;
    border-radius: 2px;
}
