﻿@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

/* ----------------------------
   Global
----------------------------- */
html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: #000;
    color: #fff;
    margin: 0;
    padding: 0;
}

a, .btn-link {
    color: #e10600;
    text-decoration: none;
    transition: color 0.2s ease;
}

    a:hover, .btn-link:hover {
        color: #fff;
    }







/* ----------------------------
   Buttons
----------------------------- */
.btn-primary {
    background-color: #e10600;
    border: none;
    color: #fff;
    font-weight: 600;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

    .btn-primary:hover {
        background-color: #ff1a1a;
        transform: translateY(-2px);
    }

.btn-secondary {
    background-color: #111;
    color: #fff;
    border: 1px solid #e10600;
}

    .btn-secondary:hover {
        background-color: #e10600;
        color: #fff;
    }



/* ========================
   Button Group Container
======================== */
.button-group-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap; /* ✅ allows stacking when small */
    gap: 0.75rem; /* ✅ space between buttons */
}

    .button-group-container .btn {
        min-width: 150px;
    }



/* ----------------------------
   Dashboard
----------------------------- */
.dashboard-card.updated {
    background: linear-gradient(135deg, #1e1e1e, #252525);
    border-left: 4px solid #6c757d;
}

.dashboard-card.updated {
    border-left: 4px solid #198754; /* Bootstrap success */
}


.dashboard-container {
    background-color: #000;
    min-height: 100vh;
    padding: 1rem;
}

.dashboard-heading {
    font-weight: 900;
    color: #fff;
    font-size: 1.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
    border-left: 5px solid #e10600;
    padding-left: 10px;
}

.dashboard-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.dashboard-card {
    background: #0d0d0d;
    border-radius: 0.75rem;
    padding: 1.25rem;
    border: 2px solid #e10600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .dashboard-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 4px 20px rgba(225, 6, 0, 0.3);
    }

    .dashboard-card .card-subtitle {
        text-transform: uppercase;
        font-size: 0.75rem;
        color: #fff;
        opacity: 0.7;
        letter-spacing: 1px;
    }

    .dashboard-card .card-title {
        font-weight: 600;
        color: #fff;
    }

    .dashboard-card .card-metric {
        font-weight: 800;
        font-size: 2.25rem;
        color: #e10600;
    }

    .dashboard-card .card-subinfo {
        font-size: 0.9rem;
        color: #fff;
        opacity: 0.7;
    }

.card {
    background-color: #0d0d0d !important;
    border: 1px solid #e10600 !important;
    color: #fff !important;
}

.card-body {
    color: #fff;
}

.text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
}

.clickable {
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.15s ease;
}

    .clickable:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 15px rgba(225, 6, 0, 0.35);
    }

.dashboard-card.clickable {
    cursor: pointer !important;
}

/* ✅ Force pointer on clickable audit rows */
.clickable-row td {
    cursor: pointer;
}




/* ----------------------------
   Inventory Table (Desktop)
----------------------------- */
.table-container {
    width: 100%;
    max-height: 80vh; /* ✅ keeps it below navbar */
    overflow-x: auto; /* ✅ horizontal scroll */
    overflow-y: auto; /* ✅ vertical scroll */
    background: #000;
    border-radius: 0.5rem;
    border: 1px solid #e10600;
    box-shadow: 0 4px 12px rgba(225, 6, 0, 0.2);
}


.clickable-row {
    cursor: pointer;
}



/* Keep header fixed, scroll only tbody */
.inventory-table {
    width: 100%;
    border-collapse: collapse;
    color: #fff;
    background-color: #0d0d0d;
    font-size: 0.9rem;
    min-width: 1200px; /* ✅ ensures horizontal scroll appears */
}

    .inventory-table thead {
        background-color: #e10600;
        color: #fff;
        text-transform: uppercase;
        font-size: 0.8rem;
        letter-spacing: 1px;
        position: sticky;
        top: 0;
        z-index: 2;
    }

    /* scrollable tbody */
    .inventory-table tbody {
        display: table-row-group;
    }

        .inventory-table thead,
        .inventory-table tbody tr {
            display: table;
            table-layout: fixed;
            width: 100%;
        }


            /* Row and cell styles */
            .inventory-table th {
                padding: 0.75rem;
                text-align: left;
                white-space: normal;
            }

        .inventory-table tbody tr {
            border-bottom: 1px solid rgba(255, 255, 255, 0.3);
            transition: background-color 0.2s ease, transform 0.1s ease;
        }

            .inventory-table tbody tr:hover {
                background-color: #1a1a1a;
                transform: scale(1.005);
            }

        .inventory-table tbody td {
            padding: 0.9rem 0.75rem;
            vertical-align: middle;
            border-right: 1px solid rgba(255, 255, 255, 0.1);
            word-wrap: break-word;
        }

            .inventory-table tbody td:last-child {
                border-right: none;
            }

    /* Badge styling inside table */
    .inventory-table .badge {
        font-size: 0.75rem;
        font-weight: 600;
        border-radius: 0.35rem;
        padding: 0.35rem 0.6rem;
    }

    /* Scrollbar Styling (for table body) */
    .inventory-table tbody::-webkit-scrollbar {
        width: 8px;
    }

    .inventory-table tbody::-webkit-scrollbar-thumb {
        background: #e10600;
        border-radius: 10px;
    }

    .inventory-table tbody::-webkit-scrollbar-track {
        background: #111;
    }







/* ----------------------------
   Scrollbar Styling
----------------------------- */
.table-container::-webkit-scrollbar {
    height: 8px;
}

.table-container::-webkit-scrollbar-thumb {
    background: #e10600;
    border-radius: 10px;
}

.table-container::-webkit-scrollbar-track {
    background: #111;
}

/* ----------------------------
   Mobile Inventory Cards
----------------------------- */
.inventory-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.unit-card {
    background-color: #0d0d0d;
    border: 1px solid #e10600;
    border-radius: 0.75rem;
    padding: 1rem;
    box-shadow: 0 3px 8px rgba(225, 6, 0, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .unit-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 14px rgba(225, 6, 0, 0.3);
    }

.unit-field {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.3rem 0;
}

    .unit-field:last-child {
        border-bottom: none;
    }

    .unit-field .label {
        color: #e10600;
        text-transform: uppercase;
        font-size: 0.75rem;
        font-weight: 700;
        letter-spacing: 0.4px;
    }

    .unit-field .value {
        color: #fff;
        font-weight: 600;
        text-align: right;
        margin-left: 1rem;
        flex: 1;
    }

.badge {
    font-size: 0.75rem;
    padding: 0.3rem 0.5rem;
    border-radius: 0.4rem;
}




/*-----------------------------
    AUDIT PAGE

/* Mobile card styling */
.audit-card {
    border: 1px solid #e10600;
    background-color: #111;
    font-size: 0.9rem;
    line-height: 1.3;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

    .audit-card:hover {
        transform: scale(1.02);
        box-shadow: 0 0 10px rgba(225, 6, 0, 0.4);
    }

    .audit-card strong {
        color: #e10600;
    }

@media (max-width: 767px) {
    .table-container {
        display: none;
    }
}



.audit-section {
    background-color: #111;
    border-radius: 10px;
    padding: 2rem;
    margin: 1.5rem auto;
    max-width: 1000px;
}

    .audit-section h5 {
        font-size: 1.4rem;
        letter-spacing: 0.5px;
        text-shadow: 0 0 6px rgba(225, 6, 0, 0.3);
    }

.audit-search {
    background-color: #111 !important;
    color: #fff !important;
    border: 1px solid #e10600 !important;
    text-align: center;
    border-radius: 6px;
    padding: 10px;
    max-width: 400px;
}

    .audit-search::placeholder {
        color: #aaa;
        opacity: 0.8;
    }

    .audit-search:focus {
        outline: none;
        box-shadow: 0 0 8px #e10600;
        border-color: #e10600;
    }


.audit-card {
    border-left: 4px solid #e10600;
    transition: all 0.2s ease;
}

    .audit-card:hover {
        background-color: #181818;
        transform: translateY(-2px);
        box-shadow: 0 0 10px rgba(225, 6, 0, 0.25);
    }

.table.inventory-table th,
.table.inventory-table td {
    vertical-align: middle;
}

@media (max-width: 768px) {
    .audit-section {
        padding: 1.2rem;
    }

    .audit-search {
        width: 100%;
    }
}




/*-------------------------------
    Locations
---------------------------------*/
@media (max-width: 576px) {
    .modal-content {
        border-radius: 0 !important;
        height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .modal-header {
        padding: 1rem 1.25rem;
    }

    .modal-body {
        flex-grow: 1;
        padding: 1.25rem;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .modal-footer {
        padding: 1rem 1.25rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

        .modal-footer .btn {
            width: 100%;
            font-size: 1.1rem;
            padding: 0.75rem;
        }

    .modal-title {
        font-size: 1.25rem;
    }

    .form-control {
        font-size: 1rem;
    }
}



/*------------------------------
    Help Page
--------------------------------*/
.help-card {
    cursor: pointer;
    transition: all 0.25s ease-in-out;
    border-radius: 1rem;
}

    .help-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 0 15px rgba(225, 6, 0, 0.4);
        border-color: #ff2b2b;
    }

    .help-card .oi {
        display: inline-block;
        transition: transform 0.3s;
    }

    .help-card:hover .oi {
        transform: scale(1.1);
    }

@media (max-width: 576px) {
    .help-card {
        border-radius: 0.75rem;
        padding: 0.5rem;
    }
}
.modal-content iframe {
    border-radius: 0 0 1rem 1rem;
}
/* place in site.css */
.help-modal-frame {
    background-color: #111; /* your app's dark background */
    filter: brightness(0.85); /* slightly dims light pages */
}


@media (max-width: 576px) {
    .modal-content {
        border-radius: 0;
    }

        .modal-content iframe {
            height: 85vh;
        }
}


-------------------------------*/
/* ----------------------------
   Filter Container
----------------------------- */
/* ----------------------------
   Filter Container
----------------------------- */
.filter-container {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #0d0d0d;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid #e10600;
    box-shadow: 0 4px 12px rgba(225, 6, 0, 0.2);
    width: fit-content; /* ✅ shrink container to input width */
    margin: 0 auto; /* ✅ center horizontally */
    position: relative; /* ✅ remove sticky that caused layout stretch */
    top: auto;
    z-index: 1;
}

.filter-input {
    width: 350px; /* ✅ fixed, centered input width */
    max-width: 90vw;
    background-color: #1a1a1a;
    border: 1px solid #333;
    color: #fff;
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
    text-align: center; /* ✅ visually center text too */
}

    .filter-input::placeholder {
        color: #aaa;
        text-align: center;
    }

@media (max-width: 768px) {
    .filter-container {
        width: 100%;
        margin: 0 auto;
    }

    .filter-input {
        width: 100%;
        max-width: 100%;
        text-align: left;
    }
}





/* ============================
   Label Size Dropdown Styling
============================ */
.label-size-select {
    background-color: #0d0d0d;
    color: #fff;
    border: 1px solid #e10600;
    padding: 0.55rem 1rem;
    font-size: 1rem;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
    min-width: 200px;
    box-shadow: 0 0 10px rgba(225, 6, 0, 0.15);
}

    .label-size-select:hover {
        border-color: #ff1a1a;
        box-shadow: 0 0 15px rgba(225, 6, 0, 0.35);
    }

    .label-size-select:focus {
        outline: none;
        box-shadow: 0 0 10px #e10600;
        border-color: #e10600;
    }

    .label-size-select option {
        background: #111;
        color: #fff;
        font-weight: 600;
    }

/* Mobile tweak */
@media (max-width: 576px) {
    .label-size-select {
        width: 90%;
        min-width: unset;
    }
}



/* ============================
   Store Selector (Sidebar)
============================ */
.store-select-container {
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    padding: 0.75rem;
    background: #0d0d0d;
    border: 1px solid #e10600;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(225, 6, 0, 0.25);
}

.store-select-label {
    color: #e10600;
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    display: block;
}

/* Dropdown styling */
.store-select {
    width: 100%;
    background-color: #111;
    color: #fff;
    border: 1px solid #333;
    padding: 0.6rem 0.75rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

    .store-select:hover {
        border-color: #e10600;
        box-shadow: 0 0 8px rgba(225, 6, 0, 0.4);
    }

    .store-select:focus {
        outline: none;
        border-color: #e10600;
        box-shadow: 0 0 10px #e10600;
    }

    /* Option styling */
    .store-select option {
        background: #111;
        color: #fff;
        font-weight: 600;
    }

/* Read-only badge */
.store-select-readonly {
    display: inline-block;
    margin-top: 6px;
    background: #e10600;
    color: #000;
    font-weight: 700;
    padding: 3px 8px;
    font-size: 0.8rem;
    border-radius: 4px;
}


/* Mobile tweaks */
@media (max-width: 768px) {
    .store-select-container {
        padding: 0.5rem;
        margin-top: 0.5rem;
    }

    .mobile-hide {
        display: none !important;
    }
}






/* ----------------------------
   Desktop vs Mobile Visibility
----------------------------- */
.desktop-view {
    display: block;
}

.mobile-view {
    display: none;
}

@media (max-width: 768px) {
    .desktop-view {
        display: none;
    }

    .mobile-view {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
}






/* ----------------------------
   Splash Screen
----------------------------- */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeOut 0.5s ease-out forwards;
    animation-delay: 2.3s;
}

.splash-logo {
    width: 140px;
    height: auto;
    filter: brightness(0) invert(1);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.85;
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}









/* ----------------------------
   Loading / Error
----------------------------- */
.loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 70vh;
}

.spinner-border {
    color: #e10600 !important;
}

.blazor-error-boundary {
    background: #e10600;
    color: white;
    border-radius: 0.5rem;
    padding: 1rem;
}

/* Hide Blazor default error overlay */
#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #e10600;
    color: #fff;
    padding: 0.75rem 1rem;
    text-align: center;
    font-weight: 600;
    z-index: 1000;
    box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.5);
}

    #blazor-error-ui .dismiss {
        display: none;
    }

#permission-overlay h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

#permission-overlay p {
    max-width: 400px;
    line-height: 1.4;
}


/* ----------------------------
   Responsive Tweaks
----------------------------- */
@media (max-width: 576px) {
    .dashboard-container {
        padding: 0.75rem;
    }

    .dashboard-card {
        padding: 1rem;
    }

        .dashboard-card .card-metric {
            font-size: 1.8rem;
        }

    .dashboard-heading {
        font-size: 1.3rem;
    }

    .unit-field {
        font-size: 0.85rem;
    }
}



.qr-overlay {
    position: fixed;
    inset: 0; /* shorthand for top:0, right:0, bottom:0, left:0 */
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    z-index: 5000; /* ensure it covers everything */
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    animation: fadeIn 0.3s ease-in-out;
}

.qr-overlay-content {
    text-align: center;
    color: #fff;
    max-width: 80%;
}

.qr-overlay .spinner-border {
    width: 4rem;
    height: 4rem;
    border-width: 6px;
    color: #e10600 !important;
}

.progress {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    font-weight: bold;
    transition: width 0.3s ease-in-out;
}


@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .button-group-container {
        flex-direction: column; /* ✅ stack buttons vertically */
        align-items: center; /* ✅ center them horizontally */
        width: 100%;
    }

        .button-group-container .btn {
            width: 90%; /* ✅ make buttons take most of the width */
            max-width: 350px; /* ✅ limit button width for aesthetics */
        }
}
