/* PokeHouse Dashboard */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 24px 16px;
    background-color: #17151D;
    color: #FFFFFF;
    font-family: Arial, sans-serif;
}

.dashboard {
    max-width: 680px;
    margin: 0 auto;
}

/* Header */

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.brand {
    margin: 0 0 6px;
    color: #C99BBE;
    font-size: 15px;
    font-weight: bold;
    letter-spacing: 2px;
}

h1 {
    margin: 0;
    font-size: 26px;
}

.status {
    color: #A6E4BE;
    background-color: #26382F;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    white-space: nowrap;
}

/* Summary cards */

.summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.summary-card {
    background-color: #292431;
    padding: 18px;
    border-radius: 16px;
    min-width: 0;
}

.summary-card p {
    margin: 0 0 10px;
    color: #CFC4D5;
    font-size: 13px;
}

.summary-card h2 {
    margin: 0;
    font-size: 22px;
    overflow-wrap: anywhere;
}

#totalProfitDisplay {
    color: #E9B4DC;
}

/* Record sale card */

.sale-card,
.history-card {
    background-color: #24202B;
    padding: 20px;
    border-radius: 18px;
    margin-bottom: 18px;
}

.sale-card h2,
.history-card h2 {
    margin: 0 0 20px;
    font-size: 18px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.field label {
    color: #D4C7D8;
    font-size: 13px;
}

input,
select {
    width: 100%;
    min-width: 0;
    padding: 14px;
    background-color: #342C3C;
    color: #FFFFFF;
    border: 1px solid #4A4053;
    border-radius: 10px;
    font-family: inherit;
    font-size: 16px;
}

input::placeholder {
    color: #A99CAE;
}

input:focus,
select:focus {
    outline: 2px solid #C783B0;
    outline-offset: 1px;
}

.price-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

/* Profit preview */

.profit-preview {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 16px;
    margin-bottom: 16px;
    background-color: #30283A;
    border-radius: 12px;
}

.profit-preview span {
    color: #D4C7D8;
    font-size: 13px;
}

#profitDisplay {
    margin: 0;
    color: #E9B4DC;
    font-size: 15px;
    text-align: right;
}

/* Record Sale button */

#recordSale {
    width: 100%;
    padding: 16px;
    background-color: #A65B8E;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

#recordSale:hover {
    background-color: #BD70A5;
}

/* Sales history */

#salesList {
    list-style: none;
    padding: 0;
    margin: 0;
}

#salesList li {
    padding: 14px 0;
    color: #E6DCE9;
    border-bottom: 1px solid #45404E;
    font-size: 14px;
}

#salesList li:last-child {
    border-bottom: none;
}

/* Small phones */

@media (max-width: 380px) {
    .summary-card {
        padding: 12px;
    }

    .summary-card h2 {
        font-size: 17px;
    }

    .sale-card,
    .history-card {
        padding: 16px;
    }

    h1 {
        font-size: 22px;
    }
}

/* Category dropdown */
#category {
    appearance: none;
    -webkit-appearance: none;

    width: 100%;
    height: 44px;
    padding: 0 14px;

    background: #352C3E;
    background-image: none;

    color: #F5F0FF;
    border: 1px solid #493B55;
    border-radius: 12px;

    font-size: 16px;
    box-shadow: none;
    color-scheme: dark;
}

#category:focus {
    outline: none;
    border-color: #8855E9;
}


/* Custom dropdown arrow */
#category {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23B9A5D4' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    padding-right: 40px;
}


/* ========================================
   POKEHOUSE — OBSIDIAN VIOLET THEME
   ======================================== */

/* Main background */
body {
    background: #101014;
    color: #F5F0FF;
}

/* Dashboard cards */
.summary-card,
.sale-card,
.history-card {
    background: #292333;
}

/* Input boxes */
.field input,
.field select {
    background-color: #3B3249;
    color: #F5F0FF;
    border: 1px solid #5A4A69;
    border-radius: 12px;
}

/* Category dropdown */
#category {
    appearance: none;
    -webkit-appearance: none;

    width: 100%;
    height: 44px;
    padding: 0 40px 0 14px;

    background-color: #3B3249;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23D1B5FF' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;

    color: #F5F0FF;
    border: 1px solid #5A4A69;
    border-radius: 12px;

    font-size: 16px;
    box-shadow: none;
    color-scheme: dark;
}

#category:focus {
    outline: none;
    border-color: #9565ED;
    box-shadow: 0 0 0 2px rgba(149, 101, 237, 0.15);
}

/* Input focus */
.field input:focus {
    outline: none;
    border-color: #9565ED;
}

/* Main Record Sale button */
#recordSale {
    background: #9565ED;
    color: #FFFFFF;
}

#recordSale:hover {
    background: #8353DC;
}

#recordSale:disabled {
    opacity: 0.6;
    cursor: wait;
}

/* Profit text */
#totalProfitDisplay,
#profitDisplay {
    color: #D1B5FF;
}

/* PokeHouse brand */
.brand {
    color: #D1B5FF;
}

/* Last Sale Profit section */
.profit-preview {
    background: #332A40;
}

/* Login card */
.login-card {
    background: transparent;
    border: none;
    box-shadow: none;
}

.login-card input {
    background: #3B3249;
    color: #F5F0FF;
    border: 1px solid #5A4A69;
}

.login-card input:focus {
    outline: none;
    border-color: #9565ED;
}

/* Login button */
#loginButton {
    background: #9565ED;
    color: white;
    margin-top: 20px;
    width: 80%;
    margin-left: auto;
    margin-right: auto;
    min-height: 44px;
    padding: 10px 16px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: block;

}

#loginButton:hover {
    background: #8353DC;
}

/* Logout button */
#logoutButton {
    background: transparent;
    color: #D1B5FF;
    border: 1px solid #5A4A69;
    border-radius: 9px;
    padding: 8px 14px;
    font-size: 13px;
    cursor: pointer;
}

#logoutButton:hover {
    background: #3B3249;
}

/* Keep hidden sections hidden */
[hidden] {
    display: none !important;
}


/* Sales History Table */

.sales-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.sales-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 460px;
    font-size: 14px;
}

.sales-table th {
    text-align: left;
    padding: 14px 12px;
    color: #D1B5FF;
    font-weight: 600;
    border-bottom: 1px solid #5A4A69;
}

.sales-table td {
    padding: 14px 12px;
    border-bottom: 1px solid #3B3249;
    white-space: nowrap;
}

.sales-table tbody tr:hover {
    background-color: #3B3249;
}

.sales-table tbody tr:last-child td {
    border-bottom: none;
}


/* Edit Sale Form */

#editSaleSection {
    margin-top: 20px;
}

#editSaleSection label {
    display: block;
    margin-top: 14px;
    margin-bottom: 6px;
    font-size: 13px;
    color: #C5B8D3;
}

#editSaleSection input,
#editSaleSection select {
    width: 100%;
    box-sizing: border-box;
    height: 44px;
    padding: 10px 14px;
    background: #3B3249;
    color: #F5F0FF;
    border: 1px solid #5A4A69;
    border-radius: 12px;
    font-size: 14px;
}

#editSaleSection input:focus,
#editSaleSection select:focus {
    outline: none;
    border-color: #9565ED;
}

#saveEditButton,
#cancelEditButton {
    padding: 12px 18px;
    margin-top: 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

#saveEditButton {
    background: #9565ED;
    color: white;
    border: none;
}

#cancelEditButton {
    background: transparent;
    color: #D1B5FF;
    border: 1px solid #5A4A69;
}

#editCategory {
    appearance: none;
    -webkit-appearance: none;
    background-color: #3B3249;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23D1B5FF' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    padding-right: 40px;
    color-scheme: dark;
}

/* Remove number input arrows */

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    appearance: textfield;
    -moz-appearance: textfield;
}


/* Mobile Sales Cards */

.mobile-sale-card {
    background: #332A40;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
}

.mobile-sale-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.mobile-sale-header strong {
    color: #F5F0FF;
    font-size: 15px;
}

.mobile-sale-header small {
    display: block;
    color: #AFA3BE;
    font-size: 12px;
    margin-top: 5px;
}

.mobile-sale-prices {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.mobile-sale-prices div {
    min-width: 0;
}

.mobile-sale-prices small {
    display: block;
    color: #AFA3BE;
    font-size: 11px;
    margin-bottom: 6px;
}

.mobile-sale-prices span {
    display: block;
    color: #F5F0FF;
    font-size: 12px;
    overflow-wrap: anywhere;
}

.mobile-sale-prices .mobile-profit {
    color: #D1B5FF;
    font-weight: 600;
}

/* Show table on laptop */
.mobile-sales-list {
    display: none;
}

/* Show cards on phone */
@media (max-width: 600px) {
    .sales-table-wrapper {
        display: none;
    }

    .mobile-sales-list {
        display: block;
    }
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}

.pagination button {
    background-color: #9565ED;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    cursor: pointer;
}

.pagination button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.sales-view-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.sales-view-selector button {
    background-color: #3B3249;
    color: #D1B5FF;
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    cursor: pointer;
}

.sales-view-selector button.active {
    background-color: #9565ED;
    color: white;
}

#emptySalesMessage {
    text-align: center;
    color: #D1B5FF;
    padding: 25px 10px;
    font-size: 14px;
}

/* Match PokeHouse Category dropdown */
#salesChannel,
#eventSelect,
#endEventSelect,
#analyticsEventSelect {
    appearance: none;
    -webkit-appearance: none;

    width: 100%;
    min-width: 0;
    height: 44px;
    padding: 0 40px 0 14px;

    background-color: #3B3249;

    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23D1B5FF' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");

    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;

    color: #F5F0FF;
    border: 1px solid #5A4A69;
    border-radius: 12px;

    font-family: inherit;
    font-size: 16px;

    box-shadow: none;
    color-scheme: dark;
    cursor: pointer;
}

/* Matching purple focus */
#salesChannel:focus,
#eventSelect:focus,
#endEventSelect:focus,
#analyticsEventSelect:focus {
    outline: none;
    border-color: #9565ED;
    box-shadow: 0 0 0 2px rgba(149, 101, 237, 0.15);
}

/* Event Management spacing */
#eventManagementSection label {
    display: block;
    margin-bottom: 8px;
    margin-top: 16px;
    font-size: 13px;
    color: #D4C7D8;
}

/* Start and End Event buttons */
#startEventButton,
#endEventButton {
    display: block;
    width: 100%;
    margin-top: 16px;
    padding: 14px 16px;

    background-color: #9565ED;
    color: #FFFFFF;

    border: none;
    border-radius: 12px;

    font-family: inherit;
    font-size: 15px;
    font-weight: 600;

    cursor: pointer;
}

/* Disabled End Event button */
#endEventButton:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* Event Analytics Cards */
.event-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
}

.event-stat-card {
    background-color: #3B3249;
    padding: 16px 12px;
    border-radius: 12px;
    min-width: 0;
    text-align: center;
}

.event-stat-card p {
    margin: 0 0 10px;
    color: #CFC4D5;
    font-size: 12px;
    text-align: center;
}

.event-stat-card h3 {
    margin: 0;
    color: #F5F0FF;
    font-size: 18px;
    overflow-wrap: anywhere;
    text-align: center;
}

.sidebar {
    background-color: #292333;
    padding: 20px;
    border-radius: 12px;
    display: none;
    position: absolute;
    width: 220px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);

}

.sidebar.open {
    display: block;
    animation: sidebarFadeIn 0.2s ease;

}

@keyframes sidebarFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

#menuButton {
    background-color: #292333;
    color: #D1B5FF;
    border: 1px solid #5A4A69;
    border-radius: 12px;
    padding: 10px 15px;
    font-size: 22px;
    cursor: pointer;
    margin-bottom: 20px;
}

.sidebar a {
    display: block;
    color: #F5F0FF;
    text-decoration: none;
    padding: 12px;
    font-size: 16px;
    font-family: inherit;
    transition: background-color 0.2s ease;
}

.sidebar a:hover {
    background-color: #3B3249;
    border-radius: 12px;
}

.inventory-card {
    background-color: #292333;
    border: 1px solid #5A4A69;
    border-radius: 12px;
    padding: 20px;
}

.inventory-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 12px;
    row-gap: 0;
}

.inventory-card select {
    width: 100%;
    height: 46px;
    background-color: #3B3249;
    color: #F5F0FF;
    border: 1px solid #5A4A69;
    border-radius: 12px;
    padding: 0 12px;
    font-size: 16px;
    font-family: inherit;
    appearance: none;
}

#cardDetails {
    display: contents;
}

#addProductModal {
    position: fixed;
    inset: 0;
    z-index: 1000;

    background-color: rgba(0, 0, 0, 0.75);

    overflow-y: auto;
    padding: 80px 16px 30px;
}

#addProductModal .inventory-card {
    max-width: 600px;
    margin: 0 auto;
    max-height: 85vh;
    overflow-y: auto;
    padding-bottom: 24px;

}

/* Inventory buttons */

#openProductModal,
#saveProductButton {
    background-color: #9565ED;
    color: #FFFFFF;
    border: none;
    border-radius: 12px;

    padding: 12px 20px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;

    cursor: pointer;
    transition: background-color 0.2s;
}

#openProductModal:hover,
#saveProductButton:hover {
    background-color: #8353DC;
}

/* Full-width save button */

#saveProductButton {
    width: 100%;
    margin-top: 16px;
}

/* Close button */

#closeProductModal {
    float: right;

    width: 36px;
    height: 36px;

    background-color: #3B3249;
    color: #D1B5FF;

    border: 1px solid #5A4A69;
    border-radius: 10px;

    font-size: 20px;
    cursor: pointer;
}

#closeProductModal:hover {
    background-color: #4A3D5B;
}

.inventory-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;

    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.inventory-header h1 {
    margin: 0;
}

/* Inventory table */

.inventory-list {
    max-width: 1200px;
    margin: 24px auto;
    padding: 20px;

    background-color: #292333;
    border: 1px solid #5A4A69;
    border-radius: 12px;
}

.inventory-list h2 {
    margin-top: 0;
    margin-bottom: 20px;
}

#inventoryTable {
    width: 100%;
    border-collapse: collapse;
}

#inventoryTable th,
#inventoryTable td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #5A4A69;
}

#inventoryTable th {
    color: #D1B5FF;
    font-size: 14px;
    font-weight: 600;
}

#inventoryTable .product-date {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    font-weight: 400;
    color: #B8AAC9;
    line-height: 1.4;
}

#inventorySearch {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 20px;
    background-color: #3B3249;
    border: 1px solid #5A4A69;
    border-radius: 12px;
    padding: 12px 16px;
    color: #F5F0FF;
    font-size: 16px;
}

.inventory-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.inventory-filters button {
    background-color: #3B3249;
    color: #D1B5FF;
    border: 1px solid #5A4A69;
    border-radius: 8px;
    padding: 9px 16px;
    font-size: 14px;
    cursor: pointer;
}

.inventory-filters button.active {
    background-color: #9565ED;
    color: white;
    border-color: #9565ED;
}

.inventory-sort {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-bottom: 16px;
}

.inventory-sort label {
    color: #D1B5FF;
    font-size: 14px;
    white-space: nowrap;
}

#inventorySort {
    width: 210px;
    height: 44px;
    padding: 0 14px;
    background-color: #3B3249;
    color: #F5F0FF;
    border: 1px solid #5A4A69;
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    cursor: pointer;
}

#productCategory,
#cardRarity,
#inventorySort {
    appearance: none;
    -webkit-appearance: none;

    background-color: #3B3249;
    color: #F5F0FF;

    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23D1B5FF' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;

    padding-right: 40px;
}

#inventoryTable td:first-child {
    font-weight: 500;
    color: #EAF4F2;
}

#inventoryTable .category-cell {
    color: #D1B5FF;
    font-size: 13px;
    font-weight: 500;
}

.inventory-summary {
    max-width: 1200px;
    margin: 24px auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

#inventoryTable .edit-product-btn {
    background-color: #3B3249;
    color: #D1B5FF;
    border: 1px solid #5A4A69;
    border-radius: 8px;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

#inventoryTable .edit-product-btn:hover {
    background-color: #9565ED;
    color: #FFFFFF;
    border-color: #9565ED;
}

#editProductModal {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.75);
    z-index: 1001;
    padding: 40px 20px;
    overflow-y: auto;
}

#editProductModal .inventory-card {
    max-width: 550px;
    margin: 40px auto;
}

#editCardDetails {
    grid-column: 1 / -1;
}

#editProductCategory,
#editCardRarity {
    appearance: none;
    -webkit-appearance: none;

    background-color: #3B3249;
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23D1B5FF' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"),
        linear-gradient(135deg, #463653, #3B3249);

    background-repeat: no-repeat, no-repeat;
    background-position: right 14px center, center;
    background-size: 16px, cover;

    color: #F5F0FF;
    border: 1px solid #5A4A69;
    border-radius: 12px;
    padding-right: 40px;
    color-scheme: dark;
}

#saveEditProductButton {
    width: 100%;
    margin-top: 16px;
    padding: 14px;
    background: linear-gradient(135deg, #9565ED, #7545C7);
    color: #FFFFFF;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

#saveEditProductButton:hover {
    background: linear-gradient(135deg, #A77AF5, #8656D8);
}

#editProductModal .field {
    margin-bottom: 5px;
}

/* Compact Adjust Stock Popup */
#stockAdjustmentModal .inventory-card {
    width: 400px;
    max-width: calc(100vw - 32px);
    padding: 20px;
    box-sizing: border-box;
}

#stockAdjustmentModal h2 {
    font-size: 21px;
    margin-bottom: 14px;
}

#stockAdjustmentModal .field {
    margin-bottom: 12px;
}

@media (max-width: 480px) {
    #stockAdjustmentModal .inventory-card {
        width: calc(100vw - 28px);
        padding: 16px;
    }

    #stockAdjustmentModal .field {
        margin-bottom: 10px;
    }
}

/* Adjust Stock Modal Overlay */
#stockAdjustmentModal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.75);
}

/* Centre the popup */
#stockAdjustmentModal .inventory-card {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    width: 400px;
    max-width: calc(100vw - 32px);
    max-height: 90vh;
    overflow-y: auto;
    box-sizing: border-box;
    padding: 20px;
}

/* Adjust Stock Buttons */
.adjust-stock-btn,
#confirmStockAdjustmentButton {
    background: linear-gradient(135deg, #9565ED, #7546C8);
    color: #FFFFFF;
    border: 1px solid #A985F5;
    border-radius: 8px;
    padding: 9px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s ease;
}

.adjust-stock-btn:hover,
#confirmStockAdjustmentButton:hover {
    background: linear-gradient(135deg, #A77CF5, #8757D8);
    transform: translateY(-1px);
}

#closeStockAdjustmentModal {
    background: transparent;
    color: #F5F0FF;
    border: 1px solid #5A4A69;
    border-radius: 8px;
    cursor: pointer;
    padding: 5px 9px;
}

/* Compact Adjust Stock Layout */
#stockAdjustmentModal .inventory-card {
    width: 360px;
    padding: 18px;
}

#stockAdjustmentModal .field {
    margin-bottom: 7px;
}

#stockAdjustmentModal .field p {
    margin-top: 4px;
    margin-bottom: 4px;
    line-height: 1.3;
}

#stockAdjustmentModal input,
#stockAdjustmentModal select {
    height: 38px;
    padding: 8px 12px;
    font-size: 14px;
}

.adjust-stock-btn {
    padding: 7px 10px;
    font-size: 12px;
    height: 32px;
    min-width: 0;
    margin-left: 8px;
    white-space: nowrap;
}

/* Adjust Stock Product Information */
#stockAdjustmentModal #adjustStockProductName,
#stockAdjustmentModal #adjustStockCurrentQuantity {
    font-size: 14px;
    font-weight: 500;
    color: #F5F0FF;
    margin: 4px 0;
    line-height: 1.4;
}

/* Adjust Stock Dropdown */
#stockAdjustmentModal select {
    appearance: none;
    -webkit-appearance: none;

    background-color: #3B3249;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23B895FF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");

    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;

    border: 1px solid #5A4A69;
    border-radius: 12px;

    color: #F5F0FF;
    font-size: 14px;

    height: 44px;
    padding: 8px 40px 8px 12px;

    cursor: pointer;
}


/* Checkout Product Search */

.checkout-product {
    background: #292333;
    border: 1px solid #5A4A69;
    border-radius: 10px;
    padding: 12px 15px;
    margin-top: 8px;
    color: #F5F0FF;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.checkout-product:hover {
    background: #3B3249;
}

/* Checkout Quantity Buttons */

.checkout-cart button {
    background: #3B3249;
    color: #F5F0FF;
    border: 1px solid #5A4A69;
    border-radius: 8px;
    padding: 8px 14px;
    margin: 5px;
    cursor: pointer;
}

.checkout-cart button:hover {
    background: #9565ED;
}

/* Checkout Selling Price */

.checkout-cart input[type="number"] {
    background: #3B3249;
    color: #F5F0FF;
    border: 1px solid #5A4A69;
    border-radius: 8px;
    padding: 10px;
    margin: 5px;
    width: 160px;
    font-size: 14px;
}

/* Checkout Cart Layout */

.checkout-cart-name {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #F5F0FF;
}

.checkout-cart .checkout-product {
    padding: 16px;
    margin-top: 12px;
}

.checkout-cart button {
    min-width: 38px;
    min-height: 38px;
    font-size: 15px;
}

.checkout-cart input[type="number"] {
    display: block;
    width: 180px;
    max-width: 100%;
    box-sizing: border-box;
}

/* Checkout Quantity Number */

.checkout-quantity {
    display: inline-block;
    min-width: 25px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #F5F0FF;
}

/* Checkout Cart Controls */

.checkout-cart-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.checkout-cart-controls button {
    margin: 0;
}

.checkout-cart-controls input[type="number"] {
    margin: 0 0 0 auto;
}


/* Checkout Page Typography */

.checkout-page {
    padding: 20px;
}

.checkout-page>h1 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 20px;
    letter-spacing: -0.5px;
}

.checkout-page .inventory-card>h2 {
    font-size: 19px;
    font-weight: 600;
    margin: 0 0 8px;
}

.checkout-page .inventory-card>p {
    font-size: 13px;
    color: #B8AAC9;
    margin: 0 0 24px;
    line-height: 1.6;
}

/* Checkout Section Headings */

.checkout-page .checkout-cart h2 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 14px;
}

.checkout-page .inventory-card>h2 {
    font-size: 18px;
}

/* Checkout Text Consistency */

.checkout-page .checkout-cart p {
    font-size: 14px;
    font-weight: 400;
    color: #B8AAC9;
}

.checkout-page .checkout-cart h3 {
    font-size: 18px;
    font-weight: 700;
    margin-top: 20px;
}

.checkout-page .field label {
    font-size: 13px;
    font-weight: 500;
}

.checkout-page .checkout-product {
    font-size: 14px;
}

@media (max-width: 600px) {
    #openProductModal {
        font-size: 14px;
        padding: 10px 14px;
        width: auto;
    }

    #inventoryTable {
        display: block;
        width: 100%;
        overflow-x: visible;
    }

    #inventoryTable thead {
        display: none;
    }

    #inventoryTable tbody {
        display: block;
    }

    #inventoryTable tbody tr {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 4px 10px;
        background: #211B2B;
        border: 1px solid #5A4A69;
        border-radius: 12px;
        padding: 10px 12px;
        margin-bottom: 8px;
    }

    #inventoryTable tbody td {
        display: block;
        width: 100%;
        padding: 2px 0;
        border-bottom: none;
        font-size: 13px;
        overflow-wrap: anywhere;
    }

    #inventoryTable tbody td::before {
        content: attr(data-label) ": ";
        color: #B8AAC9;
        font-size: 12px;
        font-weight: 400;
    }

    #inventoryTable tbody td:first-child {
        font-size: 16px;
        font-weight: 600;
    }

    #inventoryTable tbody td:first-child::before,
    #inventoryTable tbody td:last-child::before {
        display: none;
    }

    #inventoryTable tbody td:first-child {
        grid-column: 1 / -1;
    }

    #inventoryTable tbody td:nth-child(3) {
        text-align: right;
    }

    #inventoryTable tbody td:last-child {
        grid-column: 1 / -1;
        display: flex;
        gap: 8px;
        align-items: center;
    }

    #inventoryTable tbody td:last-child button {
        margin: 0;
    }

    #inventoryTable tbody tr.inventory-product-row {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-rows: auto auto;
        column-gap: 8px;
        row-gap: 2px;
        align-items: center;
    }

    #inventoryTable tbody tr.inventory-product-row td {
        display: none;
    }

    #inventoryTable tbody tr.inventory-product-row td:first-child,
    #inventoryTable tbody tr.inventory-product-row td:nth-child(3),
    #inventoryTable tbody tr.inventory-product-row td:nth-child(4) {
        display: block;
    }

    #inventoryTable tbody tr.inventory-product-row.expanded td {
        display: block;
    }

    .inventory-header {
        gap: 8px;
        margin-bottom: 14px;
    }

    .inventory-header h1 {
        font-size: 20px;
        line-height: 1.2;
    }

    #openProductModal {
        font-size: 12px;
        padding: 9px 12px;
        white-space: nowrap;
    }

    .inventory-summary {
        gap: 8px;
        margin: 12px auto;
    }

    .inventory-summary .summary-card {
        padding: 12px 10px;
        border-radius: 12px;
    }

    .inventory-summary .summary-card p {
        font-size: 11px;
        margin-bottom: 6px;
    }

    .inventory-summary .summary-card h2 {
        font-size: 16px;
        line-height: 1.3;
    }

    .inventory-list {
        padding: 14px;
        margin: 14px auto;
    }

    .inventory-list h2 {
        font-size: 19px;
        margin-bottom: 14px;
    }

    #inventorySearch {
        padding: 9px 12px;
        margin-bottom: 10px;
        font-size: 13px;
        border-radius: 9px;
    }

    .inventory-filters {
        gap: 5px;
        margin-bottom: 8px;
    }

    .inventory-filters button {
        padding: 6px 10px;
        font-size: 12px;
        border-radius: 7px;
    }

    .inventory-sort {
        gap: 8px;
        margin-bottom: 10px;
    }

    .inventory-sort label {
        font-size: 12px;
    }

    #inventorySort {
        width: 155px;
        height: 34px;
        font-size: 12px;
        border-radius: 9px;
        padding-left: 10px;
    }

    #inventoryTable tbody tr.inventory-product-row td:first-child {
        grid-column: 1;
        grid-row: 1 / 3;
    }

    #inventoryTable tbody tr.inventory-product-row td:nth-child(3) {
        grid-column: 2;
        grid-row: 1;
        text-align: right;
        align-self: end;
        padding: 0;
    }

    #inventoryTable tbody tr.inventory-product-row td:nth-child(4) {
        grid-column: 2;
        grid-row: 2;
        text-align: right;
        align-self: start;
        padding: 0;
    }

    #inventoryTable tbody tr.inventory-product-row {
        cursor: pointer;
    }

    #inventoryTable tbody tr.inventory-product-row:active {
        border-color: #9565ED;
    }

    #inventoryTable tbody tr.inventory-product-row.expanded {
        border-color: #9565ED;
    }

    #inventoryTable tbody tr.inventory-product-row td:first-child {
        font-size: 15px;
        font-weight: 600;
        line-height: 1.3;
    }

    #inventoryTable .product-date {
        font-size: 11px;
        color: #B8AAC9;
        margin-top: 3px;
    }

    #inventoryTable tbody tr.inventory-product-row td:nth-child(3) {
        font-size: 13px;
        font-weight: 500;
        color: #D1B5FF;
    }

    #inventoryTable tbody tr.inventory-product-row td:nth-child(4) {
        font-size: 12px;
        color: #F5F0FF;
    }

    #inventoryTable tbody tr.inventory-product-row.expanded td:nth-child(2),
    #inventoryTable tbody tr.inventory-product-row.expanded td:nth-child(5),
    #inventoryTable tbody tr.inventory-product-row.expanded td:nth-child(6) {
        grid-column: 1 / -1;
        grid-row: auto;
        text-align: left;
    }

    #inventoryTable tbody tr.inventory-product-row.expanded td:nth-child(2),
    #inventoryTable tbody tr.inventory-product-row.expanded td:nth-child(5) {
        font-size: 12px;
        padding: 4px 0;
    }

    #inventoryTable tbody tr.inventory-product-row.expanded td:last-child {
        display: flex;
        gap: 8px;
        padding-top: 8px;
        border-top: 1px solid #5A4A69;
        margin-top: 4px;
    }

    #inventoryTable tbody tr.inventory-product-row.expanded td:nth-child(2),
    #inventoryTable tbody tr.inventory-product-row.expanded td:nth-child(5) {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 5px 0;
        font-size: 12px;
    }

    #inventoryTable tbody tr.inventory-product-row.expanded td:last-child {
        display: flex;
        width: 100%;
        gap: 8px;
    }

    #inventoryTable tbody tr.inventory-product-row.expanded td:last-child button {
        flex: 1;
        padding: 9px 12px;
        font-size: 12px;
        border-radius: 8px;
    }

    #editProductModal .modal-content {
        width: calc(100% - 32px);
        max-width: 360px;
        box-sizing: border-box;
    }

    #editProductModal .field {
        width: 100%;
        min-width: 0;
    }

    #editProductModal .field {
        width: 100%;
    }

    #editProductModal .field input,
    #editProductModal .field select {
        display: block;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    #editProductModal input,
    #editProductModal select {
        width: 100%;
        box-sizing: border-box;
    }

    #editProductModal .inventory-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.camera-button {
    display: block;
    background: #9565ED;
    color: white;
    padding: 12px;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    margin-bottom: 10px;
}

#cardPhoto {
    display: none;
}

#cardPhotoPreview {
    display: none;
    max-width: 180px;
    max-height: 250px;
    object-fit: contain;
    margin: 12px auto 0;
}

#cardPhotoPreview[src] {
    display: block;
}

#recognizeCardButton[hidden] {
    display: none;
}

#recognitionStatus:empty {
    display: none;
}

#recognizeCardButton {
    background: #9565ED;
    color: #FFFFFF;
    border: none;
    border-radius: 12px;
    padding: 9px 16px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

#recognizeCardButton:hover {
    background: #A77AF2;
}

#recognizeCardButton:disabled {
    opacity: 0.6;
    cursor: wait;
}

#cardPhotoPreview {
    width: 160px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    margin: 8px auto;
}

#recognitionStatus {
    color: #CDB7FF;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
    margin-top: 10px;
}

@keyframes scannerPulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }

    100% {
        opacity: 1;
    }
}

#recognitionStatus.scanning {
    animation: scannerPulse 1.2s ease-in-out infinite;
}

/* Exercise 227: PokeHouse Card Verification */

#cardVerificationPanel {
    background: #292333;
    border: 1px solid #5A4A69;
    border-radius: 12px;
    padding: 18px;
    margin: 18px 0;
    box-sizing: border-box;
}

#cardVerificationPanel h3 {
    color: #F5F0FF;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px;
}

#cardVerificationMessage {
    color: #D1C5DE;
    font-size: 13px;
    line-height: 1.7;
    margin: 0 0 16px;
    white-space: pre-line;
}

#acceptCardCorrectionButton,
#reviewRecognizedCardButton {
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    border-radius: 10px;
    padding: 11px 14px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

#acceptCardCorrectionButton {
    background: #9565ED;
    border: 1px solid #9565ED;
    color: #FFFFFF;
    margin-right: 8px;
    margin-bottom: 8px;
}

#acceptCardCorrectionButton:hover {
    background: #8251DB;
}

#reviewRecognizedCardButton {
    background: #3B3249;
    border: 1px solid #5A4A69;
    color: #D1B5FF;
    margin-bottom: 8px;
}

#reviewRecognizedCardButton:hover {
    background: #493B59;
}

#cardVerificationPanel button:focus-visible {
    outline: 2px solid #D1B5FF;
    outline-offset: 3px;
}

@media (max-width: 600px) {
    #cardVerificationPanel {
        padding: 14px;
    }

    #acceptCardCorrectionButton,
    #reviewRecognizedCardButton {
        width: 100%;
        margin-right: 0;
    }
}

/* Exercise 247: Compact card verification */

#cardVerificationPanel {
    padding: 16px;
}

#cardVerificationMessage {
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 12px;
    white-space: pre-line;
}

#cardVerificationPanel h3 {
    margin-bottom: 10px;
}

@media (max-width: 600px) {
    #cardVerificationPanel {
        padding: 14px;
    }
}

/* Exercise 249: Collapsible card verification */

#cardVerificationPanel {
    padding: 0;
    overflow: hidden;
}

#cardVerificationDetails summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    color: #F5F0FF;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}

#cardVerificationDetails summary::-webkit-details-marker {
    display: none;
}

#cardVerificationDetails .verification-chevron {
    color: #D1B5FF;
    font-size: 20px;
    transition: transform 0.2s ease;
}

#cardVerificationDetails[open] .verification-chevron {
    transform: rotate(180deg);
}

#cardVerificationMessage {
    padding: 0 16px;
    overflow-wrap: anywhere;
}

#cardVerificationDetails button {
    max-width: 100%;
}

@media (max-width: 600px) {
    #cardVerificationPanel {
        width: 100%;
        max-width: 100%;
        padding: 0;
        box-sizing: border-box;
    }

    #cardVerificationDetails summary {
        min-height: 48px;
        padding: 12px 14px;
    }

    #cardVerificationMessage {
        padding: 0 14px;
        font-size: 12px;
        line-height: 1.6;
    }

    #cardVerificationDetails button {
        width: calc(100% - 28px);
        margin: 0 14px 10px;
        box-sizing: border-box;
    }
}

/* Exercise 250: Verification panel spacing */

#cardVerificationDetails[open] #cardVerificationMessage {
    margin-top: 0;
    margin-bottom: 8px;
}

#cardVerificationDetails[open] {
    padding-bottom: 10px;
}

#cardVerificationDetails summary {
    margin-bottom: 0;
}

#cardVerificationDetails button {
    margin-top: 4px;
}

/* Exercise 251: Mobile verification spacing */

@media (max-width: 600px) {

    #cardVerificationPanel {
        margin-top: 12px;
        margin-bottom: 14px;
    }

    #cardVerificationDetails summary {
        padding: 10px 12px;
        min-height: 44px;
    }

    #cardVerificationMessage {
        padding: 0 12px;
        margin-bottom: 8px;
        line-height: 1.5;
    }

    #cardVerificationDetails button {
        width: calc(100% - 24px);
        margin: 4px 12px 8px;
    }
}

/* Exercise 255: PokeHouse live scanner */

#openLiveCamera {
    width: 100%;
    min-height: 44px;
    margin-top: 10px;
    background: #3B3249;
    color: #F5F0FF;
    border: 1px solid #9565ED;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

#liveCameraPanel {
    margin-top: 12px;
    padding: 12px;
    background: #292333;
    border: 1px solid #5A4A69;
    border-radius: 12px;
}

#liveCameraPanel[hidden] {
    display: none;
}

#liveCameraPreview {
    display: block;
    width: 100%;
    max-height: 320px;
    object-fit: contain;
    background: #101014;
    border-radius: 10px;
}

#captureCardButton,
#closeLiveCamera {
    width: 100%;
    min-height: 44px;
    margin-top: 10px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

#captureCardButton {
    background: #9565ED;
    color: #FFFFFF;
    border: none;
}

#closeLiveCamera {
    background: #3B3249;
    color: #F5F0FF;
    border: 1px solid #5A4A69;
}

@media (max-width: 600px) {
    #liveCameraPanel {
        padding: 10px;
    }

    #liveCameraPreview {
        max-height: 260px;
    }
}

/* Exercise 256: Compact mobile scanner */

@media (max-width: 600px) {

    #openLiveCamera {
        margin-top: 6px;
        margin-bottom: 6px;
    }

    #liveCameraPanel {
        margin-top: 8px;
        margin-bottom: 8px;
    }

    #liveCameraPreview {
        max-height: 220px;
        object-fit: contain;
    }

    #cardVerificationPanel {
        margin-top: 8px;
        margin-bottom: 8px;
    }

    #cardVerificationDetails summary {
        min-height: 44px;
        padding: 10px 12px;
    }

    #cardVerificationMessage {
        margin-bottom: 6px;
    }

    #cardVerificationDetails button {
        margin-top: 2px;
        margin-bottom: 6px;
    }
}

/* Exercise 259: Responsive scanner overlay */

#liveCameraPanel:not([hidden]) {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    margin: 0;
    background: rgba(0, 0, 0, 0.85);
    box-sizing: border-box;
}

#liveCameraPanel[hidden] {
    display: none;
}

.scanner-window {
    width: 100%;
    max-width: 480px;
    max-height: 90dvh;
    overflow-y: auto;
    padding: 18px;
    background: #292333;
    border: 1px solid #5A4A69;
    border-radius: 18px;
    box-sizing: border-box;
}

.scanner-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.scanner-header h3 {
    margin: 0;
    color: #F5F0FF;
    font-size: 18px;
}

#closeLiveCamera {
    width: 40px;
    height: 40px;
    min-height: 40px;
    margin: 0;
    flex-shrink: 0;
    background: #3B3249;
    color: #F5F0FF;
    border: 1px solid #5A4A69;
    border-radius: 10px;
}

.scanner-viewport {
    position: relative;
    overflow: hidden;
    background: #101014;
    border-radius: 12px;
}

#liveCameraPreview {
    display: block;
    width: 100%;
    height: 360px;
    max-height: none;
    object-fit: cover;
}

.scanner-guide {
    position: absolute;
    width: 58%;
    aspect-ratio: 0.715;
    max-height: 85%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid #B58AFF;
    border-radius: 12px;
    box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.18);
    pointer-events: none;
}

.scanner-instruction {
    margin: 12px 0;
    color: #B8AAC9;
    font-size: 13px;
    text-align: center;
}

#captureCardButton {
    width: 100%;
    min-height: 48px;
    margin-top: 8px;
    background: #9565ED;
    color: #FFFFFF;
    border: none;
    border-radius: 12px;
    font-weight: 600;
}

/* Full-screen mobile scanner */

@media (max-width: 600px) {

    #liveCameraPanel:not([hidden]) {
        padding: 0;
    }

    .scanner-window {
        width: 100%;
        max-width: none;
        height: 100dvh;
        max-height: none;
        border: none;
        border-radius: 0;
        padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
        display: flex;
        flex-direction: column;
    }

    .scanner-viewport {
        flex: 0 0 auto;
        height: 65dvh;
        min-height: 65dvh;
    }

    #liveCameraPreview {
        height: 100%;
        max-height: none;
        object-fit: cover;
    }

    .scanner-guide {
        width: min(72%, 270px);
    }

    #captureCardButton {
        flex-shrink: 0;
        min-height: 54px;
    }
}

/* Exercise 260: Consistent scanner buttons */

#openLiveCamera {
    width: 100%;
    min-height: 44px;
    margin: 0;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
}

/* Existing camera/photo upload button */
#openLiveCamera,
#captureCardButton {
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
}

/* Exercise 261: Scanner spacing */

#openLiveCamera {
    margin-top: 12px;
    margin-bottom: 12px;
}

/* Exercise 263: Scanner action buttons */

#openLiveCamera,
.camera-button {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 44px;
    box-sizing: border-box;

    margin: 0;
    padding: 10px 14px;

    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;

    border-radius: 12px;
    cursor: pointer;
}

/* Primary scanner */
#openLiveCamera {
    background: #9565ED;
    color: #FFFFFF;
    border: 1px solid #9565ED;
}

/* Secondary photo upload */
.camera-button {
    background: #3B3249;
    color: #F5F0FF;
    border: 1px solid #5A4A69;
}

/* Exercise 264: Consistent scanner spacing */

#openLiveCamera {
    margin-top: 8px;
}

.camera-button {
    margin-top: 10px;
    margin-bottom: 12px;
}

/* Exercise 266: Pokémon card scanning guide */

.scanner-guide {
    aspect-ratio: 63 / 88;
    border: 2px solid #B58AFF;
    border-radius: 12px;
    box-sizing: border-box;
    pointer-events: none;
}

/* Exercise 269: Continuous scanner controls */

#scannerReviewActions[hidden] {
    display: none;
}

#scannerReviewActions {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

#scannerCaptureStatus {
    margin: 0;
    color: #B8AAC9;
    font-size: 13px;
    line-height: 1.5;
}

#reviewCapturedCardButton,
#scanNextCardButton {
    width: 100%;
    min-height: 44px;
    margin: 0;
    padding: 10px 14px;
    border-radius: 12px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

#reviewCapturedCardButton {
    background: #9565ED;
    color: #FFFFFF;
    border: none;
}

#scanNextCardButton {
    background: #3B3249;
    color: #F5F0FF;
    border: 1px solid #5A4A69;
}

/* Exercise 273: Scanned cards gallery */

#scannedCardsGallery {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    margin-top: 12px;
    padding-bottom: 8px;
}

.scanned-card-thumbnail {
    width: 65px;
    height: 90px;
    flex-shrink: 0;
    object-fit: cover;
    border: 2px solid #9565ED;
    border-radius: 8px;
}

/* Exercise 278: Selected scanned card */

.scanned-card-thumbnail {
    cursor: pointer;
    opacity: 0.65;
    transition: opacity 0.2s, border-color 0.2s;
}

.scanned-card-thumbnail.selected {
    opacity: 1;
    border-color: #FFFFFF;
    box-shadow: 0 0 0 2px #9565ED;
}

.scanned-card-wrapper {
    position: relative;
    display: inline-block;
}

.delete-scanned-card {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 50%;
    background: #D94B65;
    color: white;
    font-size: 16px;
    cursor: pointer;
    z-index: 2;
}

/* Exercise 338: Batch inventory review */
#batchInventoryReview {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin-top: 20px;
}

.batch-card-row {
    padding: 12px 0;
    border-bottom: 1px solid #5A4A69;
}

.batch-card-row:last-child {
    border-bottom: none;
}

.batch-card-row p {
    margin: 5px 0 0;
    color: #B8AAC9;
    font-size: 13px;
}

/* Exercise 341: Review Batch button */
#reviewBatchButton {
    display: block;
    width: 100%;
    min-height: 44px;
    margin-top: 10px;
    padding: 12px 16px;

    background: #9565ED;
    color: #FFFFFF;

    border: none;
    border-radius: 10px;

    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

/* Exercise 342: Scanner button spacing */
#reviewBatchButton:hover {
    background: #A77BF2;
}

#reviewBatchButton:active {
    transform: scale(0.98);
}

/* Exercise 344: Batch inventory inputs */
.batch-card-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.batch-card-row label {
    font-size: 12px;
    color: #B8AAC9;
    margin-top: 6px;
}

.batch-card-row input {
    width: 100%;
    box-sizing: border-box;
    min-height: 44px;
    padding: 10px 12px;
    background: #3B3249;
    border: 1px solid #5A4A69;
    border-radius: 10px;
    color: #F5F0FF;
    font-size: 14px;
}

/* Exercise 348: Stable mobile scanner layout */

@media (max-width: 600px) {

    .scanner-header,
    .scanner-instruction,
    #scannedCardsGallery,
    #scannerReviewActions {
        flex-shrink: 0;
    }

    .scanner-window {
        overflow-y: auto;
    }
}

/* Exercise 356: Scanner footer */

.scanner-footer {
    flex-shrink: 0;
    padding-top: 12px;
    background: #292333;
    border-top: 1px solid #5A4A69;
}

.scanner-footer #captureCardButton {
    width: 100%;
    height: 44px;
    min-height: 44px;
    margin: 0;
    padding: 8px 12px;
    font-size: 13px;
}

/* Exercise 358: Permanent scanner controls */

.scanner-footer {
    display: grid;
    gap: 10px;
}

.scanner-footer #reviewBatchButton {
    margin: 0;
    background: transparent;
    border: 1px solid #9565ED;
    color: #D1B5FF;
    height: 44px;
    min-height: 44px;
    padding: 8px 12px;
    font-size: 13px;
}

@media (max-width: 600px) {

    .scanner-window {
        overflow-y: auto;
        overflow-x: hidden;
    }

    .scanner-viewport {
        flex: 1 1 0;
        height: 0;
        min-height: 0;
        max-height: none;
    }

    .scanner-footer {
        margin-top: auto;
        flex-shrink: 0;
    }

    #scannedCardsGallery {
        flex-shrink: 0;
    }

}

/* Exercise 390: Compact scanner controls */

#reviewCapturedCardButton {
    display: none;
}

@media (max-width: 600px) {

    #scannedCardsGallery {
        height: 84px;
        min-height: 84px;
        padding-top: 6px;
        box-sizing: border-box;
    }

    .scanned-card-thumbnail {
        width: 50px;
        height: 70px;
    }

    #scannerReviewActions {
        min-height: 20px;
        margin-top: 4px;
        gap: 0;
    }

    #scannerReviewActions[hidden] {
        display: grid !important;
        visibility: hidden;
    }

    .scanner-instruction {
        margin: 8px 0;
    }

    .scanner-footer {
        padding-top: 8px;
        gap: 8px;
    }
}

#reviewBatchButton:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Exercise 362: Full-screen batch review */

#batchInventoryReview:not([hidden]) {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: #101014;
    margin: 0;
    overflow: hidden;
}

.batch-review-window {
    height: 100%;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.batch-review-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

#batchCardList {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

#closeBatchReview {
    background: #3B3249;
    color: #F5F0FF;
    border: 1px solid #5A4A69;
    border-radius: 10px;
    width: 40px;
    height: 40px;
    cursor: pointer;
}

/* Exercise 374: Batch card thumbnail */
.batch-card-image {
    width: 85px;
    height: 119px;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid #5A4A69;
    background: #101014;
}

/* Exercise 376: Batch card information layout */
.batch-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
}

.batch-card-info {
    flex: 1;
    min-width: 0;
}

.batch-card-info strong {
    font-size: 16px;
    color: #F5F0FF;
}

.batch-card-image {
    flex-shrink: 0;
}

/* Exercise 378: Compact batch input layout */
.batch-card-fields {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 12px;
}

.batch-card-fields>div {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

/* Exercise 382: Batch edit details button */
.batch-edit-details-btn {
    background: transparent;
    color: #D1B5FF;
    border: 1px solid #9565ED;
    border-radius: 8px;
    padding: 7px 12px;
    font-size: 12px;
    margin-top: 10px;
    cursor: pointer;
}

.batch-edit-details-btn:hover {
    background: #3B3249;
}

/* Exercise 384: Batch editing panel */
.batch-edit-details-panel:not([hidden]) {
    display: grid;
    gap: 8px;
    padding: 12px;
    background: #101014;
    border: 1px solid #5A4A69;
    border-radius: 12px;
}

.batch-edit-details-panel[hidden] {
    display: none;
}

/* Exercise 396: Stable scanner screen */

@media (max-width: 600px) {
    #liveCameraPanel:not([hidden]) {
        height: 100svh;
        bottom: auto;
        border: none;
    }

    .scanner-window {
        height: 100%;
        overflow: hidden;
    }

    #scannerCaptureStatus {
        font-size: 12px;
        line-height: 20px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* Exercise 390: Maximize mobile scanner preview */

@media (max-width: 600px) {

    .scanner-viewport {
        flex: 1;
        min-height: 0;
        height: auto;
    }

    #scannerReviewActions {
        min-height: 0;
        margin-top: 6px;
    }

    #scannerReviewActions[hidden] {
        display: none;
    }

    #scannedCardsGallery {
        height: 85px;
        min-height: 85px;
        margin-top: 8px;
    }

    .scanned-card-thumbnail {
        width: 52px;
        height: 73px;
    }

    .scanner-instruction {
        margin: 8px 0;
    }
}

/* Exercise 392: Product entry menu */

#productEntryOptions {
    display: grid;
    gap: 12px;
}

#productEntryOptions p {
    color: #B8AAC9;
    font-size: 14px;
}

#productEntryOptions button {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 18px;
    width: 100%;
    background: #292333;
    border: 1px solid #5A4A69;
    border-radius: 14px;
    color: #F5F0FF;
    text-align: left;
    cursor: pointer;
}

#productEntryOptions button strong {
    font-size: 16px;
}

#productEntryOptions button span {
    font-size: 13px;
    color: #B8AAC9;
}

#productEntryOptions button:hover {
    background: #3B3249;
    border-color: #9565ED;
}

/* Exercise 407: Batch verification details */
.batch-card-info details {
    font-size: 11px;
    color: #B8AAC9;
    margin-top: 4px;
}

.batch-card-info summary {
    font-size: 11px;
    font-weight: 400;
    cursor: pointer;
}

.batch-card-info details p {
    font-size: 11px;
    line-height: 1.5;
    margin-top: 6px;
}

/* Exercise 408: Batch rarity dropdown */
.batch-edit-details-panel select {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    height: 44px;
    padding: 0 36px 0 12px;
    background-color: #3B3249;
    border: 1px solid #5A4A69;
    border-radius: 12px;
    color: #F5F0FF;
    font-size: 14px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23B8AAC9' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

/* Exercise 414: Batch pricing controls */
.batch-pricing-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

#batchCostInput {
    flex: 1;
    min-width: 0;
    width: 100%;
    height: 40px;
    font-size: 13px;
    box-sizing: border-box;
}

#applyBatchCostButton {
    height: 40px;
    padding: 0 12px;
    background: #3B3249;
    border: 1px solid #9565ED;
    border-radius: 10px;
    color: #F5F0FF;
    font-size: 12px;
    white-space: nowrap;
    cursor: pointer;
}

/* Exercise 417: Batch summary */
.batch-summary {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    margin-top: 12px;
    background: #292333;
    border: 1px solid #5A4A69;
    border-radius: 12px;
}

.batch-summary span {
    display: block;
    font-size: 12px;
    color: #B8AAC9;
    margin-bottom: 5px;
}

.batch-summary strong {
    font-size: 20px;
    color: #F5F0FF;
}

/* Exercise 419: Save batch button */
#saveBatchInventoryButton {
    width: 100%;
    min-height: 46px;
    margin-top: 12px;
    background: #9565ED;
    color: #FFFFFF;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
}

#saveBatchInventoryButton:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#checkoutSearchResults {
    max-height: none;
    overflow: visible;
    padding-bottom: 16px;
}

@media (max-width: 768px) {
    #checkoutSearchResults {
        max-height: none;
        overflow: visible;
        padding-bottom: 0;
    }
}

#checkoutSearchResults:empty {
    display: none;
}

.checkout-result-name {
    font-size: 14px;
    font-weight: 600;
    color: #F5F0FF;
}

.checkout-result-details {
    font-size: 11px;
    color: #B8AAC9;
    line-height: 1.5;
    margin-top: 3px;
}

.checkout-result-stock {
    font-size: 11px;
    color: #BDA0FF;
    margin-top: 4px;
}

.checkout-result-details:empty {
    display: none;
}

.checkout-cart-cost {
    font-size: 12px;
    color: #B8AAC9;
    margin-top: 6px;
    margin-bottom: 10px;
}

.checkout-summary {
    margin-top: 18px;
    padding: 16px;
    background: #201B29;
    border: 1px solid #5A4A69;
    border-radius: 12px;
}

.checkout-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #B8AAC9;
    margin-bottom: 12px;
}

.checkout-summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #5A4A69;
    padding-top: 14px;
    font-size: 20px;
    font-weight: 700;
    color: #C4A7FF;
}

#checkoutProfit.profit-positive {
    color: #86D9AC;
    font-weight: 600;
}

#checkoutProfit.profit-negative {
    color: #FF9393;
    font-weight: 600;
}

#checkoutCartItems .checkout-product {
    position: relative;
}

#checkoutCartItems .checkout-cart-name {
    padding-right: 36px;
}

#checkoutCartItems .checkout-remove-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    padding: 0;
    margin: 0;
    background: transparent;
    border: 1px solid #5A4A69;
    border-radius: 8px;
    color: #B8AAC9;
    font-size: 20px;
    cursor: pointer;
}

.checkout-price-field {
    flex: 0 1 180px;
    min-width: 0;
    margin-left: auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 5px;
}

.checkout-price-field label {
    font-size: 11px;
    color: #B8AAC9;
}

.checkout-cart-controls .checkout-price-field input {
    width: 100%;
    max-width: none;
    min-width: 0;
    margin: 0;
    height: 40px;
    box-sizing: border-box;
    font-size: 16px;
}

.checkout-cart-controls {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.checkout-cart-controls>button {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    padding: 0;
    margin: 0;
}

.checkout-cart-controls>.checkout-quantity {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    min-width: 20px;
}

.checkout-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.checkout-search-panel {
    min-width: 0;
}

.checkout-layout .checkout-cart {
    min-width: 0;
    margin: 0;
    padding: 20px;
    background: #292333;
    border-radius: 14px;
}

@media (max-width: 768px) {

    .checkout-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    .checkout-layout .checkout-cart {
        padding: 0;
        background: transparent;
        border: none;
    }

}

#checkoutCartItems .checkout-product {
    background: #292333;
    border: none;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 10px;
}

.checkout-summary {
    background: transparent;
    border: none;
    border-top: 1px solid #5A4A69;
    border-radius: 0;
    padding: 16px 0 0;
}

.checkout-summary-total {
    font-size: 24px;
}

.checkout-quantity-control {
    display: flex;
    align-items: center;
    background: #3B3249;
    border: 1px solid #5A4A69;
    border-radius: 10px;
    height: 40px;
    box-sizing: border-box;
    flex-shrink: 0;
}

.checkout-quantity-control button {
    width: 36px;
    height: 38px;
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
}

.checkout-quantity-control .checkout-quantity {
    min-width: 26px;
    text-align: center;
    font-weight: 600;
}

#checkoutPagination {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #5A4A69;
    text-align: center;
}

#checkoutResultCount {
    display: block;
    font-size: 12px;
    color: #B8AAC9;
    margin-bottom: 14px;
    line-height: 1.5;
}

#checkoutPrevPage,
#checkoutNextPage {
    width: auto;
    min-height: 36px;
    padding: 8px 14px;
    background: #3B3249;
    color: #D8C2FF;
    border: 1px solid #5A4A69;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
}

#checkoutPrevPage:disabled,
#checkoutNextPage:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

#checkoutPageNumber {
    font-size: 12px;
    margin: 0 12px;
    color: #B8AAC9;
}

#completeSaleButton {
    width: 100%;
    min-height: 48px;
    margin-top: 16px;
    background: #9565ED;
    color: #FFFFFF;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

#completeSaleButton:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

#checkoutSalesChannel,
#checkoutEventSelect {
    width: 100%;
    height: 44px;
    padding: 0 36px 0 14px;
    border: 1px solid #5A4A69;
    border-radius: 12px;
    color: #F5F0FF;
    font-size: 16px;
    appearance: none;
    cursor: pointer;

    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23D8C2FF' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center,
        linear-gradient(135deg, #3B3249, #30263D);

    margin-top: 0;
    margin-bottom: 0;
}

#checkoutEventField[hidden] {
    display: none;
}

.field:has(#checkoutSalesChannel),
#checkoutEventField {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
    margin-bottom: 0;
}

#checkoutEventField[hidden] {
    display: none;
}

#checkoutSalesChannel {
    display: none;
}

.checkout-channel-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.checkout-channel-btn {
    width: 100%;
    height: 44px;
    margin: 0;
    padding: 0;
    background: #30283B;
    color: #B8AAC9;
    border: 1px solid #5A4A69;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.checkout-channel-btn.active {
    background: #493560;
    border-color: #9565ED;
    color: #D8C2FF;
}

#checkoutEventField {
    margin-top: 16px;
    margin-bottom: 20px;
}

.field:has(#checkoutSalesChannel) {
    margin-bottom: 16px;
}

.checkout-channel-buttons .checkout-channel-btn,
#completeSaleButton {
    margin-left: 0;
    margin-right: 0;
    box-sizing: border-box;
}

#cancelCheckoutButton {
    width: 100%;
    min-height: 44px;
    margin-top: 10px;
    padding: 12px 16px;
    background: transparent;
    border: 1px solid #5A4A69;
    border-radius: 12px;
    color: #D1B5FF;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

#cancelCheckoutButton:hover:not(:disabled) {
    background: #3B3249;
}

#cancelCheckoutButton:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#cancelCheckoutButton[hidden] {
    display: none;
}

.batch-remove-btn {
    background: transparent;
    color: #F28B95;
    border: 1px solid #B85B65;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    margin: 6px 8px 6px 0;
    width: fit-content;
}

#uploadBatchActions {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}

#uploadBatchActions[hidden] {
    display: none;
}

#uploadBatchActions button {
    flex: 1;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

#addMorePhotosButton {
    background: #3B3249;
    color: #D1B5FF;
    border: 1px solid #9565ED;
}

#recognizeBatchButton {
    background: #9565ED;
    color: white;
    border: 1px solid #9565ED;
}

#uploadBatchActions button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.manual-photo-actions {
    display: flex;
    gap: 10px;
}

.manual-photo-actions button {
    flex: 1;
    background: #3B3249;
    color: #D1B5FF;
    border: 1px solid #9565ED;
    border-radius: 10px;
    padding: 12px;
    font-size: 13px;
    cursor: pointer;
}

#manualPhotoPreview {
    width: 100%;
    max-height: 220px;
    object-fit: contain;
    border-radius: 12px;
    background: #101014;
    margin-top: 10px;
}

#removeManualPhoto {
    background: transparent;
    color: #F28B95;
    border: 1px solid #B85B65;
    border-radius: 8px;
    padding: 8px 12px;
    margin-top: 8px;
    cursor: pointer;
}

#manualPhotoSection [hidden] {
    display: none;
}

/* Exercise 971: Inventory product thumbnails */

.inventory-product-layout {
    display: flex;
    align-items: center;
    gap: 12px;
}

.inventory-product-info {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
}

.inventory-thumbnail {
    width: 48px;
    height: 64px;
    flex-shrink: 0;
    object-fit: contain;
    border-radius: 6px;
    background: #101014;
    border: 1px solid #5A4A69;
    cursor: pointer;
}

/* Exercise 974: Mobile inventory thumbnails */

@media (max-width: 600px) {

    .inventory-thumbnail {
        width: 40px;
        height: 54px;
    }

    .inventory-product-layout {
        gap: 8px;
        align-items: center;
    }

    .inventory-product-info {
        font-size: 13px;
        line-height: 1.4;
    }
}

/* Exercise 976: Inventory photo viewer */

#inventoryPhotoViewer {
    width: 90%;
    max-width: 420px;
    max-height: 85dvh;
    padding: 20px;
    box-sizing: border-box;
    background: #292333;
    color: #F5F0FF;
    border: 1px solid #5A4A69;
    border-radius: 16px;
    overflow-y: auto;
}

#inventoryPhotoViewer::backdrop {
    background: rgba(0, 0, 0, 0.8);
}

.photo-viewer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.photo-viewer-header h3 {
    margin: 0;
}

#closeInventoryPhotoViewer {
    background: #3B3249;
    color: #D1B5FF;
    border: 1px solid #5A4A69;
    border-radius: 8px;
    font-size: 24px;
    cursor: pointer;
}

#inventoryViewerImage {
    display: block;
    width: 100%;
    max-height: 60dvh;
    object-fit: contain;
    border-radius: 10px;
}

#inventoryViewerName {
    text-align: center;
    font-size: 14px;
    margin: 14px 0 0;
}

/* Exercise 984: Hide unloaded viewer image */

#inventoryViewerImage:not([src]) {
    display: none;
}

/* Exercise 986: Edit product photo */

#editProductPhotoSection {
    margin-top: 16px;
    margin-bottom: 16px;
}

#editProductPhotoPreview {
    width: 100%;
    max-height: 180px;
    object-fit: contain;
    background: #101014;
    border-radius: 10px;
    margin-bottom: 8px;
}

/* Exercise 1019: Home dashboard header */

.home-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 16px;
    border-bottom: 1px solid #3B3249;
    position: relative;
}

.home-brand span {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #D1B5FF;
}

.home-brand h2 {
    margin: 4px 0 0;
    font-size: 24px;
    color: #F5F0FF;
}

.home-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.home-header-actions button {
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid #5A4A69;
    border-radius: 12px;
    background: #292333;
    color: #D1B5FF;
    font-size: 18px;
    cursor: pointer;
}

/* Exercise 1021: Home quick actions */

#homeDashboard {
    max-width: 1000px;
    margin: 0 auto;
    padding: 24px 16px;
    box-sizing: border-box;
}

#homeDashboard>h1 {
    margin: 0 0 8px;
    font-size: 26px;
}

#homeDashboard>p {
    margin: 0;
    color: #B8AAC9;
    font-size: 14px;
}

.home-quick-actions {
    margin-top: 28px;
}

.home-quick-actions h2 {
    font-size: 17px;
    margin: 0 0 14px;
}

.home-primary-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 20px;
    background: linear-gradient(135deg, #9565ED, #6541AA);
    border-radius: 16px;
    color: #FFFFFF;
    text-decoration: none;
    margin-bottom: 12px;
}

.home-primary-action h3 {
    font-size: 22px;
    margin: 0 0 6px;
}

.home-primary-action p {
    font-size: 13px;
    margin: 0;
    color: #E5D8FF;
}

.home-primary-action span {
    font-size: 28px;
}

.home-action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.home-action-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 6px;
    width: 100%;
    min-height: 110px;
    box-sizing: border-box;
    padding: 18px 14px;
    background: #292333;
    border: 1px solid #5A4A69;
    border-radius: 14px;
    color: #F5F0FF;
    text-decoration: none;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
}

.home-action-card h3 {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    margin: 0;
}

.home-action-card p {
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
    margin: 0;
    color: #B8AAC9;
}

.home-action-card:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Desktop layout */

@media (min-width: 768px) {
    .home-action-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    #homeDashboard {
        padding: 32px 24px;
    }
}

/* Exercise 1025: Home icons */

.home-action-card svg {
    width: 26px;
    height: 26px;
    color: #D1B5FF;
    margin-bottom: 4px;
    stroke-width: 1.7;
}

.home-header-actions button {
    display: flex;
    align-items: center;
    justify-content: center;
}

.home-header-actions svg {
    width: 21px;
    height: 21px;
    stroke-width: 1.8;
}

/* Exercise 1026: Primary action polish */

.home-primary-action {
    gap: 14px;
}

.home-primary-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
}

.home-primary-icon svg {
    width: 26px;
    height: 26px;
}

.home-primary-text {
    flex: 1;
    min-width: 0;
}

.home-primary-action>svg {
    width: 22px;
    flex-shrink: 0;
}

/* Exercise 1027: Home overview */

.home-overview {
    margin-top: 28px;
}

.home-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 14px;
}

.home-section-heading h2 {
    font-size: 17px;
    margin: 0;
}

.home-section-heading a {
    font-size: 12px;
    color: #D1B5FF;
    text-decoration: none;
}

.home-overview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.home-stat-card {
    background: #292333;
    border: 1px solid #5A4A69;
    border-radius: 14px;
    padding: 16px;
}

.home-stat-card p {
    font-size: 12px;
    color: #B8AAC9;
    margin: 0 0 8px;
}

.home-stat-card h3 {
    font-size: 20px;
    color: #F5F0FF;
    margin: 0;
    overflow-wrap: anywhere;
}

#homeTotalProfit {
    color: #D1B5FF;
}

@media (min-width: 768px) {
    .home-overview-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* Exercise 1028: Home notification panel */

.home-popup {
    position: absolute;
    top: 100%;
    right: 16px;
    width: 340px;
    max-width: calc(100% - 32px);
    box-sizing: border-box;
    background: #292333;
    border: 1px solid #5A4A69;
    border-radius: 16px;
    padding: 18px;
    z-index: 100;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.home-popup[hidden] {
    display: none;
}

.home-popup-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.home-popup-heading h3 {
    margin: 0;
    font-size: 17px;
}

.home-popup-heading button {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: #D1B5FF;
    border: none;
    padding: 8px;
    cursor: pointer;
}

.home-notification-empty {
    padding: 28px 8px;
    text-align: center;
    color: #B8AAC9;
}

.home-notification-empty svg {
    width: 30px;
    height: 30px;
    color: #9565ED;
}

.home-notification-empty h4 {
    color: #F5F0FF;
    margin: 12px 0 6px;
}

.home-notification-empty p {
    font-size: 13px;
    margin: 0;
}

/* Exercise 1030: Home profile menu */

.home-profile-info {
    text-align: center;
    padding: 24px 0;
}

.home-profile-info svg {
    width: 42px;
    height: 42px;
    color: #D1B5FF;
}

.home-profile-info h4 {
    margin: 10px 0 6px;
}

.home-profile-info p {
    margin: 0;
    font-size: 13px;
    color: #B8AAC9;
}

#homeLogoutButton {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    background: #3B3249;
    border: 1px solid #5A4A69;
    border-radius: 10px;
    color: #D1B5FF;
}

#homeLogoutButton svg {
    width: 18px;
    height: 18px;
}

.bottom-navigation {
    display: none;
}

@media (max-width: 767px) {

    .bottom-navigation {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        display: flex;
        justify-content: space-around;
        align-items: center;
        background: #211C2B;
        border-top: 1px solid #5A4A69;
        padding: 12px 8px;
        padding-bottom: calc(12px + env(safe-area-inset-bottom));
        z-index: 90;
    }

    .bottom-navigation a {
        display: flex;
        flex: 1;
        flex-direction: column;
        align-items: center;
        gap: 6px;
        color: #B8AAC9;
        text-decoration: none;
        font-size: 11px;
        font-weight: 500;
    }

    .bottom-navigation a svg {
        width: 23px;
        height: 23px;
        stroke-width: 1.8;
    }

    .bottom-navigation a.active {
        color: #B991FF;
        font-weight: 600;
    }

    body:has(.bottom-navigation) {
        padding-bottom: calc(85px + env(safe-area-inset-bottom));
    }

}

@media (max-width: 767px) {

    body:has(.bottom-navigation) #menuButton {
        display: none;
    }

    body:has(.bottom-navigation) .sidebar {
        display: none;
    }

}

.checkout-page .checkout-search-panel,
.checkout-page .checkout-cart {
    background: #292333;
    border: 1px solid #5A4A69;
    border-radius: 14px;
    padding: 16px;
    box-sizing: border-box;
}

.checkout-page .checkout-layout {
    gap: 16px;
}

.checkout-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    margin-bottom: 16px;
    border-bottom: 1px solid #3B3249;
}

.checkout-search-input {
    position: relative;
}

.checkout-search-input svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #B8AAC9;
    pointer-events: none;
}

.checkout-search-input #checkoutSearch {
    width: 100%;
    padding-left: 42px;
    box-sizing: border-box;
}

.checkout-search-panel label {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
}

.checkout-empty-cart {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 28px 12px;
    gap: 8px;
}

.checkout-empty-cart svg {
    width: 36px;
    height: 36px;
    color: #9565ED;
    margin-bottom: 6px;
    stroke-width: 1.5;
}

.checkout-empty-cart h3 {
    font-size: 15px;
    color: #F5F0FF;
    margin: 0;
}

.checkout-empty-cart p {
    font-size: 12px;
    color: #B8AAC9;
    margin: 0;
}

@media (max-width: 767px) {

    #dashboard #logoutButton,
    #dashboard .status {
        display: none;
    }

}