* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: Arial, sans-serif;
    color: white;
    background-image:
            linear-gradient(
                    rgba(15, 23, 42, 0.65),
                    rgba(15, 23, 42, 0.65)
            ),
            url("/images/bakgrunn/bakgrunn_handleliste_lyst_tema_blure.png");
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}
.mobile-shopping-list-panel {
    display:none;
}
.topbar-list-button {
    display:none;
}
.mobile-search-panel,
.topbar-search-button {
    display: none;
}

.container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 320px;
    background: rgba(0, 0, 0, 0.30);
    padding: 10px;
    box-sizing: border-box;
    border-right: 1px solid rgba(255,255,255,0.35);
}

.main {
    flex: 1;
    padding: 20px;
    overflow: hidden;
    min-width: 0;
}

.products {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.product-card {
    background: inherit;
    border: none;
    border-radius: 0;
    padding: 0;
    text-align: center;
    overflow: hidden;
}

.product-name {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255,255,255,0.35);
    color: white;
    font-size: 20px;
    padding: 10px 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-card img,
.product-card .product-image {
    background: rgba(255, 255, 255, 0.07);
    width: 100% !important;
    height: 130px !important;
    object-fit: contain !important;
    object-position: center center;
    display: block !important;
    margin-top: 4px;
    padding: 0 !important;
    box-sizing: border-box !important;
    cursor: pointer;
    border: none;

}
.quantity-controls {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    padding: 0;
    margin-top: 4px;
}

.qty-btn,
.quantity {
    height: 38px;
    border: 1px solid rgba(255,255,255,0.45);
    background: rgba(0, 0, 0, 0.35);
    color: white;
    font-size: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;

}

.qty-btn {
    cursor: pointer;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    margin-right: 32px;
}

.user-info {
    background: rgba(255, 255, 255, 0.15);
    padding: 9px 15px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.15);
    margin-right:0;
    width: 285px;
    min-width: 285px;
}



.datetime-panel {
    text-align: center;
    padding-bottom: 22px;
    margin-bottom: 22px;
    border-bottom: 1px solid rgba(255,255,255,0.18);
}

.time {
    margin-top: 10px;
    font-size: 92px;
    font-weight: bold;
    line-height: 1;
}

.weekday {
    font-size: 36px;
    margin-top: 12px;
}

.date {
    font-size: 24px;
    margin-top: 4px;
    opacity: 0.75;
}

.sidebar-section {

    border-bottom: 1px solid rgba(255,255,255,0.18);
}

.sidebar-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.sidebar-section h3 {
    margin-top: 0;
    margin-bottom: 12px;
}

.shopping-list {
    margin-top: 10px;
    margin-left: 16px;
    height: 460px;
    overflow-y: auto;
    opacity: 0.85;
    padding-right: 6px;
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li {
    padding: 6px 0;
    opacity: 0.9;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 22px;
    margin-top: 18px;
    margin-right: 26%;
}

.page-btn {
    min-width: 150px;
    padding: 12px 16px;
    text-align: center;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255,255,255,0.35);
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
}

.page-btn.disabled {
    opacity: 0.35;
    pointer-events: none;
}

.page-info {
    font-size: 18px;
    font-weight: bold;
    min-width: 110px;
    text-align: center;
}

.category-divider {
    height: 1px;
    background: rgba(255,255,255,0.35);
    margin: 10px 0;
    padding: 0 !important;
    list-style: none;
}

.category-list a {
    color: white;
    text-decoration: none;
    display: block;
}

.category-list a.active-category {
    font-weight: bold;
    color: #93c5fd;
}

.todo-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.todo-list li {
    padding: 5px 0;
    font-size: 17px;
    font-style: italic;

}

.toast-message {
    position: fixed;
    top: 20px;
    left: 57%;
    transform: translateX(-50%);
    background: rgba(34, 197, 94, 0.95);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 220px;
    padding: 10px 15px;
    border-radius: 4px;
    font-size: 15px;
    font-weight: bold;
    opacity: 0;
    pointer-events: none;
    transition: opacity 1.0s ease;
    z-index: 9999;
}

.toast-message.show {
    opacity: 1;
}

.todo-item {
    cursor: pointer;
}

.category-menu-button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    height: 43px;
    width: 100%;
    background: rgba(0, 0, 0, 0.30);
    border: 1px solid rgba(255,255,255,0.30);
    color: white;
    text-decoration: none;
    font-size: 18px;
    font-weight: bold;
    letter-spacing: 1px;
    box-sizing: border-box;
    position: relative;
    bottom: -25px;

}
.category-grid {
    display: grid;
    grid-template-columns: repeat(5, 290px);
    gap: 20px;
}

.category-card {
    width: 290px;
    height: 190px;
    border: 1px solid rgba(255,255,255,0.30);
    background: rgba(255,255,255,0.07);
    text-decoration: none;
    color: white;
    overflow: hidden;
    box-sizing: border-box;

}

.category-card-title {
    height: 45px;
    background: rgba(0, 0, 0, 0.35);
    border-bottom: 1px solid rgba(255,255,255,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 6px;
    box-sizing: border-box;
    font-size: 20px;
    font-weight: normal;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.5);
}

.category-card-image {
    height: 200px;
    overflow: hidden;
}

.category-card-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    opacity: 0.70;
    display: block;
    margin-top: -20px;
}
.tip-banner {
    position: fixed;
    top: 7px;
    left: 57%;
    transform: translateX(-50%);
    z-index: 900;
    width: 880px;
    max-width: 80%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    background: rgba(0, 0, 0, 0.82);
    border: 1px solid rgba(255,255,255,0.30);
    border-radius: 6px;
    color: white;
    padding: 10px 14px;
    box-sizing: border-box;
}

.tip-banner-text {
    font-size: 14px;
    line-height: 1.35;
}

.tip-banner-text strong {
    font-size: 15px;
}

.tip-banner button {
    background: rgba(34,197,94,0.90);
    border: none;
    color: white;
    padding: 10px 16px;
    font-weight: bold;
    cursor: pointer;
    white-space: nowrap;
}

/* satt til skjult i systemet frem til en bedre løsning er utarbeidet */
/* -------------------------------------- */
.info-card {
    visibility: hidden;
}

.recent-products-card {
    visibility: hidden;
}
/* ------------------------------------- */

.info-card,
.recent-products-card {
    background: inherit;
    border: none;
    border-radius: 0;
    padding: 0;
    overflow: hidden;

}

.info-card-content,
.recent-products-list {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255,255,255,0.35);
    margin-top: 4px;
    height: 180px;
    padding: 10px;
    box-sizing: border-box;
}

.info-card-content {
    font-size: 17px;
    line-height: 1.45;
    text-align: left;
}

.info-card-content p {
    margin: 0 0 8px 0;
}

.info-card-content hr {
    border: none;
    border-top: 1px solid rgba(255,255,255,0.25);
    margin: 8px 0;
}

.recent-products-list {
    overflow: hidden;
}

.recent-products-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
    font-style: italic;
    table-layout: fixed;

}

.recent-products-table td {
    padding: 2px 0;
    vertical-align: top;
}

.recent-product-name {
    width: 55%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 10px;
    color: white;
    text-align: left;
    font-style: italic;
}

.recent-product-date {
    width: 45%;
    white-space: nowrap;
    opacity: 0.75;
    color: white;
    text-align: left;
}

.recent-products-empty {
    font-size: 14px;
    opacity: 0.75;
    text-align: center;
    padding-top: 60px;
}

.logged-user {
    margin-top: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.username {
    font-size: 20px;
    font-weight: bold;
    color: white;
    margin-right: 14px;
    position: relative;
    top: 3px;

}

.user-info select {
    width: 100%;
    height: 30px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255,255,255,0.35);
    color: white;
    font-size: 14px;
    font-weight: normal;
    padding: 0 8px;
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='white'%3E%3Cpath d='M2 4l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    margin-bottom: 8px;

}

.todo-selector:hover {
    border-color: rgba(255,255,255,0.55);
}

.todo-selector:focus {
    border-color: #93c5fd;
}


.logout-button:hover {
    background: rgba(220, 38, 38, 0.45);
    border-color: rgba(255,255,255,0.45);
}

.logout-button:active {
    background: rgba(220, 38, 38, 0.45);
    border-color: rgba(255,255,255,0.45);
}

.logout-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 24px;
    padding: 0 8px;
    background: rgba(220, 38, 38, 0.45);
    border: 1px solid rgba(255,255,255,0.25);
    color: white;
    text-decoration: none;
    font-size: 14px;
    font-weight: normal;
    font-style: italic;
    width: 100px;
    position: relative;
    left:29px;
}

.logout-arrow {
    font-size: 22px;
    font-weight: bold;
    line-height: 1;
    position: relative;
    top: 0;
}
/*søke funksjon*/
.search-box {
    position: relative;
    background: rgba(0, 0, 0, 0.38);
    border: 1px solid rgba(255,255,255,0.25);
    padding: 18px;
    margin: 100px auto 18px auto;
    box-sizing: border-box;
    width: 60%;
}

.search-form label {
    display: block;
    font-size: 20px;
    margin-bottom: 10px;
}

.search-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.search-row input {
    height: 38px;
    background: rgba(0,0,0,0.45);
    border: 1px solid rgba(255,255,255,0.35);
    color: white;
    font-size: 17px;
    padding: 0 12px;


}

.search-row button,
.cancel-search-button {
    height: 38px;
    border: 1px solid rgba(255,255,255,0.30);
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width:65%;
    margin: 0 auto 0 auto;
}

.search-row button {
    background: rgba(34, 197, 94, 0.85);
    margin-top: 20px;
}

.cancel-search-button {
    background: rgba(220, 38, 38, 0.45);
}

.search-message {
    margin: 14px 0 0 0;
    color: #86efac;
    font-size: 16px;
}

.search-error {
    margin: 14px 0 0 0;
    color: #fca5a5;
    font-size: 16px;
}

.search-divider {
    border: none;
    border-top: 1px solid rgba(255,255,255,0.25);
    margin: 18px 0;
}

.search-menu-button {
    margin-bottom: 10px;
}

/* barcodesøk "legg til denne varen"-knapp"*/

.search-add-product {
    margin-top: 14px;
}

.search-add-product a {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    height: 42px;
    padding: 0 18px;

    background: rgba(34, 197, 94, 0.85);
    border: 1px solid rgba(255,255,255,0.30);

    color: white;
    text-decoration: none;

    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.search-add-product a:hover {
    background: rgba(34, 197, 94, 0.95);
    border-color: rgba(255,255,255,0.45);
}
/*søkefunksjon stopp*/

/*BARCODE SCANNING*/


#barcode-reader video {
    transform: scaleX(-1) !important;
}
.scan-box {
    background: rgba(0, 0, 0, 0.38);
    border: 1px solid rgba(255,255,255,0.25);
    padding: 18px;
    box-sizing: border-box;
    max-width: 760px;
}

.scan-box h3 {
    margin-top: 0;
    font-size: 22px;
}

.scan-box p {
    font-size: 16px;
    opacity: 0.85;
}

#barcode-video {
    width: 100%;
    max-width: 720px;
    height: 360px;
    background: rgba(0,0,0,0.65);
    border: 1px solid rgba(255,255,255,0.30);
    object-fit: cover;
    display: block;
    margin-top: 14px;
}

.scan-actions {
    display: flex;
    gap: 12px;
    margin-top: 14px;
}

.scan-actions button {
    height: 42px;
    padding: 0 18px;
    background: rgba(34, 197, 94, 0.85);
    border: 1px solid rgba(255,255,255,0.30);
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.scan-actions button:last-child {
    background: rgba(220, 38, 38, 0.45);
}

.scan-result {
    margin-top: 16px;
    padding: 12px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.25);
    font-size: 17px;
}

.scan-not-found {
    margin-top: 14px;
    padding: 12px;
    background: rgba(220, 38, 38, 0.15);
    border: 1px solid rgba(255,255,255,0.25);
}

.scan-add-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    padding: 0 18px;
    background: rgba(34, 197, 94, 0.85);
    border: 1px solid rgba(255,255,255,0.30);
    color: white;
    text-decoration: none;
    font-weight: bold;
}

.topbar-actions {
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    gap: 10px;
}

.topbar-nav-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 82px;
    height: 82px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 6px;
    color: white;
    text-decoration: none;
    padding: 8px;
}

.topbar-nav-button svg {
    width: 46px;
    height: 46px;
    fill: currentColor;
}

.topbar-nav-button:hover {
    background: rgba(255, 255, 255, 0.22);
}

.topbar-scan-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 82px;
    height: 82px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 6px;
    color: white;
    text-decoration: none;
    font-size: 26px;
    font-weight: bold;
    line-height: 1;
    padding: 8px;
}


.topbar-scan-button:hover {
    background: rgba(255, 255, 255, 0.22);
}
/*scanning stopp*/

.mobile-back-button {
    display: none;
}

/* -------------------------------------------------
   FAVORITTER
------------------------------------------------- */

.product-name-with-favorite {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5px;
}

.product-title-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.favorite-button {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 26px;
    height: 26px;

    margin: 0;
    padding: 0;

    border: none;
    background: transparent;

    color: rgba(255,255,255,0.35);

    font-size: 24px;
    line-height: 1;

    cursor: pointer;

    transition:
            color .15s ease,
            transform .15s ease;
}

.favorite-button:hover {
    color: #facc15;
}

.favorite-button.active {
    color: #facc15;
}

.favorite-button:active {
    transform: scale(1.15);
}

/*css nettbrett*/
@media (min-width: 769px) and (max-width: 1300px) {


    #barcode-reader {
        width: 100%;
        max-height: 345px;
        overflow: hidden;
    }

    #barcode-reader video {
        max-height: 330px !important;
        object-fit: cover !important;
    }

    .user-info {
        background: rgba(255, 255, 255, 0.15);
        padding: 4px 10px;
        border-radius: 6px;
        border: 1px solid rgba(255,255,255,0.15);
        margin-right: 16px;
    }

    .logged-user {
        margin-top: 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding-bottom: 0;

    }

    .username {
        font-size: 16px;
        font-weight: bold;
        color: white;
        margin-right: 15px;
        position: relative;
        top: 3px;
    }

    .logout-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        height: 24px;
        padding: 0 8px;
        background: rgba(220, 38, 38, 0.45);
        border: 1px solid rgba(255,255,255,0.25);
        color: white;
        text-decoration: none;
        font-size: 14px;
        font-weight: normal;
        font-style: italic;
        width: 100px;
        position: relative;
        left:64px;
    }

    .logout-arrow {
        font-size: 22px;
        font-weight: bold;
        line-height: 1;
        position: relative;
        top: -1px;
    }

    .sidebar {
        width: 380px;
        background: rgba(0, 0, 0, 0.30);
        padding: 10px;
        box-sizing: border-box;
        border-right: 1px solid rgba(255,255,255,0.35);
    }

    .shopping-list {
        margin-top: 10px;
        margin-left: 4px;
        height: 396px;
        overflow-y: auto;
        opacity: 0.85;
        padding-right: 6px;
    }

    .product-card {
        background: inherit;
        border: none;
        border-radius: 0;
        padding: 0;
        text-align: center;
        overflow: hidden;
        height: 200px;
    }

    .product-name {
        background: rgba(0, 0, 0, 0.30);
        border: 1px solid rgba(255,255,255,0.35);
        color: white;
        font-size: 20px;
        padding: 10px 5px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .products {
        grid-template-columns: repeat(4, 1fr);
        gap: 18px;
    }

    .quantity-controls {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        gap: 0;
        padding: 0;
        margin-top: -40px;
        z-index: 999;
    }

    .qty-btn,
    .quantity {
        height: 46px;
        border: 1px solid rgba(255,255,255,0.45);
        background: rgba(0, 0, 0, 0.75);
        color: white;
        font-size: 24px;
        font-weight: bold;
        display: flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
    }

    .category-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 18px;
    }

    .category-card {
        width: 92%;
    }

    .category-card-title {
        height: 45px;
        background: rgba(0, 0, 0, 0.30);
        border-bottom: 1px solid rgba(255,255,255,0.35);
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        padding: 0 6px;
        box-sizing: border-box;
        font-size: 20px;
        font-weight: normal;
        text-shadow: 1px 1px 1px rgba(0,0,0,0.5);
    }

    .main {
        padding: 10px 14px 20px 14px;
    }

    .topbar {
        margin-bottom: 14px;

    }

    .topbar-nav-button,
    .topbar-scan-button {
        width: 74px;
        height: 72px;
    }

    .topbar-nav-button svg {
        width: 42px;
        height: 42px;
    }

    .topbar-scan-button {
        font-size: 44px;
    }

    .category-menu-button {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 8px;
        height: 46px;
        width: 100%;
        background: rgba(0, 0, 0, 0.30);
        border: 2px solid rgba(255,255,255,0.30);
        color: white;
        text-decoration: none;
        font-size: 20px;
        font-weight: bold;
        letter-spacing: 1px;
        box-sizing: border-box;
        position: relative;
        bottom: -18px;
    }

    .category-card-image img {
        width: 100% !important;
        height: 144px !important;
        object-fit: cover;
        opacity: 0.70;
        display: block;
        margin-top: 0;
    }

    .pagination {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 22px;
        margin-top: 18px;
        margin-left: 24%;
    }

    .todo-list li {
        padding: 0;
        font-size: 19px;
        line-height: 1.4;
        font-style: italic;
        font-weight: normal;
    }

    .tip-banner {
        display: none;
    }
}


/*css mobil*/
@media (max-width: 768px) {

    body {
        margin: 0;
        background-attachment: scroll;

        background-image:
                linear-gradient(
                        rgba(15,23,42,.40),
                        rgba(15,23,42,.40)
                ),
                url("/images/bakgrunn/bakgrunn_handleliste_lyst_tema_blure.png");

    }

    .container {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
    }

    .sidebar {
        display: none !important;
    }

    .main {
        padding: 10px;
        overflow: visible;
        width: 100%;
    }

    .topbar {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .topbar h2 {
        margin: 0;
        text-align: left;
        font-size: 28px;
        line-height: 1.1;
    }

    .topbar-actions {
        display: flex;
        gap: 5px;
        width: 100%;
    }

    .topbar-nav-button {
        display: none !important;
    }

    .mobile-back-button,
    .topbar-scan-button,
    .topbar-list-button {
        flex: 0 0 38px;
    }

    .user-info {
        flex: 1;
        min-width: 0;
        margin-right:-32px;!important
    }

    .topbar-scan-button {
        width: 38px;
        height: 38px;
        font-size: 24px;
    }

    .topbar-list-button {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        background: rgba(255,255,255,0.15);
        border: 1px solid rgba(255,255,255,0.15);
        border-radius: 6px;
        color: white;
        font-size: 24px;
        font-weight: bold;
    }

    .user-info > div {
        display: flex;
        align-items: center;
        width: 100%;


    }

    .logout-button {
        margin-left: auto;
    }

    .user-info select {
        height: 36px;
        font-size: 15px;
        margin-bottom: 6px;
    }

    .logged-user {
        margin-top: 4px;
    }

    .username {
        font-size: 14px;
        font-style: italic;
        top: 1px;
        margin-left:1px;
    }

    .logout-button {
        height: 24px;
        font-size: 12px;
        position: relative;
        left:0;
    }
    .logout-arrow {
        font-size: 22px;
        font-weight: bold;
        line-height: 1;
        position: relative;
        top: -2px;
    }
    .mobile-shopping-list-panel {
        display: none;
        margin: 0 0 10px 0;
        padding: 10px;
        background: rgba(0,0,0,0.30);
        border: 1px solid rgba(255,255,255,0.25);
    }

    .mobile-shopping-list-panel.open {
        display: block !important;
    }

    .mobile-shopping-list-panel h3 {
        margin: 0 0 8px 0;
        font-size: 18px;
    }

    #mobile-shopping-list {
        height: 170px;
        margin: 0;
        padding: 8px;
        overflow-y: auto;
        background: rgba(0,0,0,0.28);
        border: 1px solid rgba(255,255,255,0.20);
    }

    .category-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .category-card {
        width: 100%;
        height: 150px;
    }

    .category-card-title {
        height: 40px;
        font-size: 16px;
        background: rgba(0,0,0,0.30);
    }

    .category-card-image {
        height: 110px;
    }

    .category-card-image img {
        width: 100% !important;
        height: 110px !important;
        object-fit: cover;
        margin-top: 0;
    }

    .products {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .product-card {
        height: auto;
    }

    .product-name {
        font-size: 15px;
        padding: 8px 4px;
        background: rgba(0,0,0,0.30);
    }

    .product-card img,
    .product-card .product-image {
        height: 105px !important;
        margin-top: 3px;
    }

    .quantity-controls {
        margin-top: 3px;
        gap: 0;
    }

    .qty-btn,
    .quantity {
        height: 38px;
        font-size: 20px;
        background: rgba(0,0,0,0.30);
    }

    .pagination {
        margin: 14px 0 0 0;
        gap: 5px;
    }

    .page-btn {
        min-width: 95px;
        padding: 10px 8px;
        font-size: 14px;
    }

    .page-info {
        min-width: 70px;
        font-size: 14px;
    }


    .search-box {
        padding: 12px;
        width: 90%;
    }

    .search-row {
        display: grid;
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .search-row input,
    .search-row button,
    .cancel-search-button {
        width: 100%;
        height: 42px;
    }

    .scan-box {
        max-width: 100%;
        padding: 8px;
        margin: 0;
    }

    .scan-box h3 {
        font-size: 18px;
        margin: 0 0 6px 0;
    }

    .scan-box p {
        font-size: 14px;
        margin: 0 0 8px 0;
        line-height: 1.3;
    }

    #barcode-reader {
        width: 100%;
        max-height: 245px;
        overflow: hidden;
    }

    #barcode-reader video {
        max-height: 230px !important;
        object-fit: cover !important;
    }

    .scan-actions {
        flex-direction: column;
        margin-top: 8px;
    }

    .scan-actions button {
        width: 100%;
        height: 38px;
        font-size: 15px;
    }

    .scan-result {
        margin-top: 8px;
        padding: 8px;
        font-size: 14px;
    }

    .scan-not-found {
        margin-top: 8px;
        padding: 8px;
    }

    .toast-message {
        top: 10px;
        left: 50%;
        width: 200px;
    }

    .tip-banner {
        display: none;
    }

    #barcode-reader video {
        transform: scaleX(1) !important;
    }

    .topbar-actions {
        display: flex;
        align-items: stretch;
        gap: 5px;
        width: 100%;
    }

    .topbar-scan-button,
    .topbar-list-button,
    .topbar-search-button,
    .mobile-back-button {
        flex: 0 0 38px;
        width: 38px;
        height: 38px;
    }

    .topbar-search-button {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        background: rgba(255,255,255,0.15);
        border: 1px solid rgba(255,255,255,0.15);
        border-radius: 6px;
        color: white;
        cursor: pointer;

    }

    .topbar-search-button svg {
        fill: currentColor;
        transform: scale(1.1);
        padding: 0;
    }

    .topbar-search-button-style {
        background: rgba(34, 197, 94, 0.9);
        border: none;
        color: white;
        font-weight: bold;
        cursor: pointer;
    }

    .mobile-search-panel {
        display: none;
        margin: 0 0 10px 0;
        padding: 10px;
        background: rgba(0,0,0,0.30);
        border: 1px solid rgba(255,255,255,0.25);
    }

    .mobile-search-panel.open {
        display: block;
    }

    .mobile-search-form {
        display: grid;
        grid-template-columns: 1fr 70px;
        gap: 5px;
    }

    .mobile-search-form input,
    .mobile-search-form button {
        height: 42px;
        font-size: 15px;
    }
    .mobile-back-button {
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(255,255,255,0.15);
        border: 1px solid rgba(255,255,255,0.15);
        border-radius: 6px;
        color: white;
        text-decoration: none;
    }
    .mobile-back-button svg {
        width: 24px;
        height: 24px;
        transform: scale(1.3);
        fill: currentColor;
    }
    .mobile-back-hidden {
        visibility: hidden;
        pointer-events: none;
    }
    .user-info {
        flex: 0 0 0;
        width: 185px;
        min-width: 185px;
        height: 80px;
    }
    .user-info {
        background: rgba(255, 255, 255, 0.15);
        padding: 4px 4px;
        border-radius: 6px;
        border: 1px solid rgba(255,255,255,0.15);
        margin-left:0;!important

    }


}

@media (min-width: 1200px) and (max-width: 1900px) {

    .user-info {
        background: rgba(255, 255, 255, 0.15);
        padding: 4px 4px;
        border-radius: 6px;
        border: 1px solid rgba(255,255,255,0.15);
        margin-right:-30px;!important

    }

    .sidebar {
        width: 260px;
    }

    .category-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 14px;
    }

    .category-card {
        width: 100%;
        height: 170px;
    }

    .category-card-image img {
        height: 125px;
    }

    .topbar-nav-button,
    .topbar-scan-button {
        width: 70px;
        height: 70px;
    }

    .search-box {
        background: rgba(0, 0, 0, 0.38);
        border: 1px solid rgba(255,255,255,0.25);
        padding: 18px;
        margin-bottom: 18px;
        box-sizing: border-box;
        width: 100%;
    }
}