:root {
    --primary: #FF3B30;
    --primary-dark: #D70015;
    --dark-bg: #000000;
    --card-bg: rgba(20, 20, 20, 0.85);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --border: rgba(255, 255, 255, 0.1);
    --text: #FFFFFF;
    --text-gray: #A0A0A0;
    --accent: #5E5CE6;
    --shadow: 0 10px 30px rgba(0,0,0,0.5);
    --safe-bottom: env(safe-area-inset-bottom, 20px);
}

/* Hide Spin Buttons (number arrows) */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}
input[type=number] {
  -moz-appearance: textfield;
  appearance: textfield;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--dark-bg);
    color: var(--text);
    line-height: 1.5;
    overflow-x: hidden;
    min-height: 100vh;
}

.glass-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 10%, #1a1a1a 0%, #000 100%);
    z-index: -1;
}

/* Lock Screen */
.lock-screen {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lock-card {
    background: var(--card-bg);
    width: 100%;
    max-width: 380px;
    padding: 40px 30px;
    border-radius: 30px;
    border: 1px solid var(--border);
    backdrop-filter: blur(20px);
    text-align: center;
    box-shadow: var(--shadow);
}

.lock-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.lock-card h2 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.lock-card p {
    color: var(--text-gray);
    margin-bottom: 2rem;
}

.pin-input {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 15px;
    color: #fff;
    font-size: 1.5rem;
    letter-spacing: 12px;
    text-align: center;
    margin-bottom: 1.5rem;
    outline: none;
}

.pin-btn {
    width: 100%;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 18px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
}

.pin-btn:active {
    transform: scale(0.98);
    opacity: 0.9;
}

.pin-error {
    color: var(--primary);
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* Layout */
.mobile-wrapper {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem 1.25rem 6rem 1.25rem;
}

.app-header {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
}

.header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 2rem;
    color: #fff;
    text-transform: uppercase;
}

.subtitle {
    color: var(--text-gray);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.section-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

/* Form Styling */
.form-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 20px;
    backdrop-filter: blur(10px);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-gray);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

input, select {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    color: #fff;
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    transition: 0.3s;
}

input:focus, select:focus {
    border-color: var(--primary);
    background: rgba(255,255,255,0.08);
}

/* Image Upload */
.image-upload-zone {
    width: 100%;
    aspect-ratio: 16/9;
    background: rgba(255,255,255,0.03);
    border: 2px dashed var(--border);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.3s;
    overflow: hidden;
}

.image-upload-zone:active {
    background: rgba(255,255,255,0.07);
    border-color: var(--primary);
}

.upload-content {
    text-align: center;
    color: var(--text-gray);
}

.upload-content i {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.upload-content span {
    display: block;
    font-weight: 700;
    color: #fff;
}

.preview-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 15px;
}

.preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: all 0.3s ease;
}

.preview-item {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid var(--border);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.preview-item:hover {
    transform: scale(1.05);
    border-color: var(--primary);
}

.main-badge {
    position: absolute;
    top: 5px;
    left: 5px;
    background: var(--primary);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    z-index: 5;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.remove-img {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    z-index: 5;
    backdrop-filter: blur(4px);
}

.remove-img:hover {
    background: var(--primary);
}

.preview-img:hover {
    transform: scale(1.05);
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--accent-glow);
}

@media (max-width: 600px) {
    .preview-gallery {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
}

/* Grids */
.input-grid {
    display: grid;
    gap: 15px;
}

.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Toggles */
.toggle-group {
    display: flex;
    gap: 8px;
}

.toggle-btn {
    flex: 1;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px;
    color: var(--text-gray);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: 0.3s;
}

.toggle-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.condition-toggle {
    display: flex;
    gap: 10px;
}

.condition-toggle .toggle-btn {
    padding: 15px;
}

/* Buttons & Actions */
.submit-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 2rem;
}

.submit-btn {
    width: 100%;
    border: none;
    border-radius: 16px;
    padding: 18px 10px;
    color: #fff;
    font-weight: 800;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.submit-btn.publish {
    background: linear-gradient(135deg, var(--primary), #FF2D55);
    box-shadow: 0 5px 20px rgba(255, 59, 48, 0.35);
}

.submit-btn.pause {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    color: var(--text-gray);
}

.submit-btn:active {
    transform: scale(0.96);
    opacity: 0.9;
}

.submit-btn.publish:hover {
    box-shadow: 0 8px 25px rgba(255, 59, 48, 0.5);
    transform: translateY(-2px);
}

.submit-btn.publish:active { transform: translateY(0); }

.refresh-btn {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 8px 15px;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

/* Inventory List */
.section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.inventory-grid {
    display: grid;
    gap: 1.25rem;
}

.stock-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.stock-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
}

.stock-card.selected {
    border-color: var(--primary);
    background: rgba(255, 59, 48, 0.05);
    box-shadow: 0 0 25px rgba(255, 59, 48, 0.2);
}

.card-selector {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
}

.item-checkbox {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 2px solid rgba(255,255,255,0.3);
    background: rgba(0,0,0,0.5);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.item-checkbox:checked {
    background: var(--primary);
    border-color: var(--primary);
}

.item-checkbox:checked::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 12px;
    color: white;
}

.stock-img {
    width: 100%;
    aspect-ratio: 4/3;
    border-radius: 16px;
    object-fit: cover;
    background: #111;
    border: 1px solid rgba(255,255,255,0.1);
}

.stock-info {
    text-align: center;
}

.stock-info h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.3;
    min-height: 2.6rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.stock-price {
    font-weight: 800;
    color: var(--primary);
    font-size: 1.25rem;
    margin-bottom: 5px;
}

.stock-status {
    display: inline-block;
    font-size: 0.7rem;
    padding: 4px 12px;
    background: rgba(52, 199, 89, 0.15);
    color: #34c759;
    font-weight: 800;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(52, 199, 89, 0.2);
}

.stock-status.inactive {
    background: rgba(255, 159, 10, 0.15);
    color: #ff9f0a;
    border-color: rgba(255, 159, 10, 0.2);
}

.stock-status.ended {
    background: rgba(255, 59, 48, 0.15);
    color: #ff3b30;
    border-color: rgba(255, 59, 48, 0.2);
}

.stock-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
}

.action-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 10px 5px;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.action-btn.pause { color: #ff3b30; }
.action-btn.enable { color: #34c759; }
.action-btn.edit { color: #fff; }

/* Bottom Nav */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 75px;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding-bottom: env(safe-area-inset-bottom, 15px);
    z-index: 9999;
}

.mobile-wrapper {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem 1.25rem 100px 1.25rem; /* Increased bottom padding */
}
.nav-item {
    background: none;
    border: none;
    color: var(--text-gray);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    font-family: inherit;
}

.nav-item i {
    font-size: 1.25rem;
}

.nav-item.active {
    color: var(--primary);
}

/* Stock Filters */
.stock-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.filter-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-gray);
    padding: 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.filter-btn.active {
    background: var(--primary-gradient);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 4px 15px rgba(255, 59, 48, 0.3);
}

.filter-btn:hover:not(.active) {
    box-shadow: 0 0 20px rgba(94, 92, 230, 0.2);
}

/* --- FORM BEAUTIFICATION --- */
.form-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 25px 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.form-section-header i {
    font-size: 1rem;
    opacity: 0.8;
}

.form-section-header:first-of-type {
    margin-top: 0;
}

/* Price Section Stying */
.price-section {
    background: rgba(255, 59, 48, 0.05);
    border: 1px solid rgba(255, 59, 48, 0.15);
    padding: 20px;
    border-radius: 16px;
    margin: 30px 0;
    text-align: center;
}

.price-input-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    max-width: 250px;
    margin: 0 auto;
}

.currency-symbol {
    position: absolute;
    left: 20px;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    font-family: 'Outfit', sans-serif;
}

#price {
    padding-left: 55px !important;
    font-size: 2rem !important;
    font-weight: 800 !important;
    text-align: center;
    background: rgba(255,255,255,0.03);
    border: 2px solid rgba(255,255,255,0.1);
    height: 70px;
    color: #fff;
    border-radius: 12px;
    width: 100%;
}

#price:focus {
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(255, 59, 48, 0.2);
}

/* Condition Toggle Enhancements */
.condition-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    background: rgba(255,255,255,0.03);
    padding: 5px;
    border-radius: 10px;
}

.condition-toggle .toggle-btn {
    height: 40px;
    font-size: 0.8rem;
    border-radius: 8px;
}

/* PC/Desktop Layout Overrides */
@media (min-width: 768px) {
    .container {
        max-width: 900px;
    }
    .form-card {
        padding: 40px;
    }
    .grid-4 {
        grid-template-columns: repeat(4, 1fr) !important;
    }
    .grid-2 {
        grid-template-columns: 1fr 1fr !important;
    }
}
/* --- REFINED INPUT & SELECT STYLES --- */
select {
    appearance: none;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.05) !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 15px;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    outline: none;
    width: 100%;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 18px;
}

select option {
    background: #1a1a1a;
    color: #fff;
}

/* Micro-Cards for Form Groups */
.form-section-header {
    margin-top: 35px;
    margin-bottom: 20px;
    color: var(--primary);
    font-size: 1rem;
    border: none;
    padding-bottom: 0;
}

/* Creating Sub-Cards for blocks */
.input-grid, .form-group.image-group, .price-section {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 18px;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.image-group {
    background: rgba(255, 255, 255, 0.015) !important;
}

/* Toggle Group Separation */
.toggle-group {
    margin-top: 8px;
    background: rgba(0,0,0,0.2) !important;
    padding: 6px !important;
    border-radius: 12px !important;
}

.form-group label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-gray);
    margin-bottom: 10px;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* PC/Desktop Layout Overrides */
@media (min-width: 1024px) {
    .mobile-wrapper {
        max-width: 1250px;
        padding-top: 4rem;
    }
    .form-card { padding: 40px; }
    .inventory-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 25px;
    }
    .stock-card {
        flex-direction: column;
        text-align: center;
        padding: 20px;
        height: 100%;
        justify-content: space-between;
    }
    .stock-img {
        width: 100%;
        height: 180px;
        margin-bottom: 15px;
    }
    .stock-info h4 {
        font-size: 1.1rem;
        min-height: 2.6rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .stock-actions {
        flex-direction: row;
        flex-wrap: wrap;
        width: 100%;
        margin-top: 15px;
    }
    .action-btn {
        flex: 1 1 45%;
        padding: 10px 5px;
    }
    .input-grid.grid-3 {
        gap: 30px;
    }
}

@media (max-width: 600px) {
    .input-grid.grid-3, .input-grid.grid-4 {
        grid-template-columns: 1fr 1fr;
    }
}
.ebay-btn {
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid var(--border);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.3s;
}

.ebay-btn.login { background: rgba(255, 255, 255, 0.1); color: #fff; }
.ebay-btn.logout { background: rgba(255, 59, 48, 0.1); color: var(--primary); }
.ebay-btn:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.15);
}

/* --- BULK ACTIONS --- */
.bulk-control-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 20px;
    margin-bottom: 25px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(15px);
}

.select-all-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
}

#selectAllItems {
    width: 20px;
    height: 20px;
    border-radius: 5px;
    border: 2px solid rgba(255,255,255,0.3);
    background: rgba(0,0,0,0.3);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

#selectAllItems:checked {
    background: var(--primary);
    border-color: var(--primary);
}

#selectAllItems:checked::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 10px;
    color: white;
}

.selected-count-badge {
    background: rgba(255,255,255,0.1);
    color: #fff;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 800;
    border: 1px solid rgba(255,255,255,0.1);
}


.bulk-action-bar {
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 500px;
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--primary);
    border-radius: 20px;
    padding: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
    z-index: 9999;
    animation: slideUp 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes slideUp {
    from { transform: translate(-50%, 100px); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

.bulk-actions-group {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.bulk-btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #fff;
    transition: 0.2s;
}

.bulk-btn.activate { background: #4cd964; }
.bulk-btn.pause { background: #ff9500; }
.bulk-btn.delete { background: var(--primary); }

.bulk-btn:active { transform: scale(0.95); }

/* --- CAMERA MODAL OVERLAY --- */
.camera-modal {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 20000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.camera-container {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
}

#cameraFeed {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}

.camera-ui {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    pointer-events: none;
    padding: 20px;
    justify-content: space-between;
}

.camera-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: auto;
}

#cameraCountLabel {
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(10px);
    padding: 6px 15px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    color: #fff;
}

.camera-close-btn {
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.camera-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: env(safe-area-inset-bottom, 20px);
    pointer-events: auto;
}

.capture-trigger {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid #fff;
    background: transparent;
    padding: 5px;
    cursor: pointer;
    position: absolute;
    left: 50%;
    bottom: calc(20px + env(safe-area-inset-bottom, 20px));
    transform: translateX(-50%);
}

.capture-trigger:active .inner-circle {
    transform: scale(0.9);
    background: #FF3B30;
}

.inner-circle {
    width: 100%;
    height: 100%;
    background: #fff;
    border-radius: 50%;
    transition: 0.2s;
}

.use-photo-btn {
    background: #4cd964;
    color: #fff;
    border: none;
    padding: 12px 25px;
    border-radius: 30px;
    font-weight: 800;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    margin-left: auto;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.camera-previews {
    position: absolute;
    bottom: calc(110px + env(safe-area-inset-bottom, 20px));
    left: 0;
    right: 0;
    display: flex;
    gap: 10px;
    padding: 10px 20px;
    overflow-x: auto;
    pointer-events: auto;
    scrollbar-width: none;
}

.camera-previews::-webkit-scrollbar { display: none; }

.camera-preview-thumb {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.5);
    flex-shrink: 0;
    animation: thumbIn 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes thumbIn {
    from { transform: scale(0.5) translateY(20px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

/* --- PHOTO ACTION BUTTONS --- */
.photo-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.photo-btn {
    border: none;
    border-radius: 16px;
    padding: 24px 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: 0.3s;
    font-size: 1rem;
    font-weight: 700;
}

.photo-btn i { font-size: 1.5rem; }

.camera-trigger {
    background: rgba(255, 59, 48, 0.1);
    color: #FF3B30;
    border: 1px solid rgba(255, 59, 48, 0.2);
}

.camera-trigger:active {
    background: rgba(255, 59, 48, 0.2);
    transform: scale(0.95);
}

.gallery-trigger {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border: 1px solid var(--border);
}

.gallery-trigger:active {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(0.95);
}

.photo-count-label {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-gray);
    margin-top: 10px;
    font-weight: 600;
}

/* --- NEW FEATURES STYLES --- */
.stock-stats-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 10px;
    margin-bottom: 25px;
    backdrop-filter: blur(10px);
}

.stat-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 10px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    background: rgba(255, 255, 255, 0.02);
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.07);
    transform: translateY(-2px);
}

.stat-item i {
    font-size: 1.25rem;
    opacity: 0.8;
}

.stat-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.stat-item .label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-gray);
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.stat-item .val {
    font-size: 1.1rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    color: #fff;
}

.stat-item.active i { color: #34c759; }
.stat-item.paused i { color: #ff9f0a; }
.stat-item.ended i { color: #ff3b30; }

.stat-item.selected {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.search-container {
    position: relative;
    margin-bottom: 25px;
}

.stock-search-input {
    width: 100%;
    padding: 18px 50px 18px 50px !important;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid var(--border) !important;
    color: #fff !important;
    border-radius: 16px !important;
    font-size: 0.95rem !important;
    transition: all 0.3s ease;
}

.stock-search-input:focus {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 20px rgba(255, 59, 48, 0.1);
}

.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-gray);
    font-size: 1.1rem;
    pointer-events: none;
    opacity: 0.6;
}

.search-clear-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: 0.2s;
    opacity: 0.8;
}

.search-clear-btn:hover {
    background: var(--primary);
    opacity: 1;
}

.size-preview-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(94, 92, 230, 0.1);
    color: #5E5CE6;
    padding: 10px 18px;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 800;
    margin-top: 12px;
    border: 1px solid rgba(94, 92, 230, 0.2);
    font-family: 'Outfit', sans-serif;
    box-shadow: 0 4px 15px rgba(94, 92, 230, 0.1);
    animation: badgePop 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes badgePop {
    from { opacity: 0; transform: scale(0.8) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
