﻿:root {
    --bg: #f7f8fa;
    --card: #ffffff;
    --ink: #0b1221;
    --muted: #6b7280;
    --line: #e5e7eb;
    --brand: #0ea5e9; /* sky-ish */
    --ok: #16a34a;
    --warn: #f59e0b;
    --danger: #ef4444;
}

.gallery-page {
    padding: 16px;
    background: var(--bg);
}

.page-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ink);
}

.sub {
    color: var(--muted);
    font-size: .9rem
}

.gallery-toolbar {
    position: sticky;
    top: 0;
    z-index: 5;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 4px;
    border-bottom: 1px solid var(--line);
}

.toolbar-left {
    display: flex;
    flex-direction: column;
    gap: 4px
}

.toolbar-right {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center
}

.input, .select {
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0 12px;
    background: #fff;
    min-width: 200px
}

.btn {
    height: 38px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: #fff;
    cursor: pointer
}

    .btn.primary {
        background: var(--brand);
        border-color: var(--brand);
        color: #fff
    }

    .btn.subtle {
        background: #fff
    }

.summary-strip {
    position: sticky;
    top: 66px;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    color: var(--muted)
}

    .summary-strip .spacer {
        flex: 1
    }

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(240px,1fr));
    gap: 16px;
    padding: 12px 0 24px
}

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow .2s, transform .05s
}

    .card:hover {
        box-shadow: 0 8px 24px rgba(2,6,23,.08);
        transform: translateY(-1px)
    }

.thumb {
    position: relative;
    background: #f4f6f8;
    display: grid;
    place-items: center;
    height: 170px
}

    .thumb img {
        max-width: 100%;
        max-height: 160px;
        object-fit: contain
    }

.badge {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: .75rem;
    padding: 4px 8px;
    border-radius: 999px;
    color: #fff
}

.badge-ok {
    background: var(--ok)
}

.badge-warn {
    background: var(--warn)
}

.badge-danger {
    background: var(--danger)
}

.meta {
    padding: 12px
}

.name {
    margin: 0 0 6px;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.price {
    font-weight: 700;
    color: var(--ink)
}

    .price .unit {
        font-weight: 400;
        color: var(--muted);
        margin-left: 6px
    }

.avail {
    font-size: .85rem;
    color: var(--muted);
    margin-top: 4px
}

.actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px;
    border-top: 1px solid var(--line)
}

.qty {
    display: flex;
    align-items: center;
    gap: 6px
}

    .qty input {
        width: 56px;
        height: 36px;
        border: 1px solid var(--line);
        border-radius: 10px;
        text-align: center
    }

.icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: #fff
}

.pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 6px 0 24px
}

/* Scrollable page body support on smaller screens */
html, body {
    height: 100%
}

#MainContent {
    overflow: auto
}

/*Inventory images page*/ 
.inv-img {
    width: 90px;
    height: 64px;
    background: #f4f6f8;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    display: grid;
    place-items: center;
    overflow: hidden
}

.inv-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain
}

.upload-panel {
    margin-top: 12px;
    padding: 12px;
    border: 1px dashed #e5e7eb;
    border-radius: 12px;
    background: #fafafa
}

.upload-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 6px 0
}