* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: rgba(99, 102, 241, 0.1);
    --bg: #09090b;
    --bg-card: #18181b;
    --bg-elevated: #27272a;
    --bg-input: #0f0f11;
    --text: #fafafa;
    --text-secondary: #a1a1aa;
    --text-muted: #52525b;
    --border: #27272a;
    --border-light: #3f3f46;
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.1);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.1);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.1);
    --reserved: #8b5cf6;
    --reserved-bg: rgba(139, 92, 246, 0.1);
    --gradient-1: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-2: linear-gradient(135deg, #06b6d4 0%, #6366f1 100%);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ========== PUBLIC PAGE STYLES ========== */
.public-page {
    background: var(--bg);
}

/* HERO HEADER */
.hero-header {
    position: relative;
    background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg) 100%);
    padding: 0 0 48px 0;
    overflow: hidden;
}

.header-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 102, 241, 0.15), transparent),
        radial-gradient(ellipse 60% 40% at 80% 0%, rgba(139, 92, 246, 0.1), transparent);
    pointer-events: none;
}

.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    position: relative;
    z-index: 1;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    font-size: 1.5rem;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content {
    text-align: center;
    padding: 40px 0 20px;
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
    background: linear-gradient(180deg, var(--text) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

/* FILTER PILLS */
.search-filters {
    display: flex;
    justify-content: center;
}

.filter-pills {
    display: flex;
    gap: 8px;
    padding: 6px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.filter-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-pill:hover {
    color: var(--text);
    background: var(--bg-elevated);
}

.filter-pill.active {
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.pill-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.pill-dot.all { background: var(--text-secondary); }
.pill-dot.available { background: var(--success); }
.pill-dot.sold { background: var(--danger); }
.pill-dot.reserved { background: var(--reserved); }

.filter-pill.active .pill-dot {
    background: rgba(255, 255, 255, 0.8);
}

/* MAIN CONTENT */
.main-content {
    padding: 32px 0 80px;
    min-height: 60vh;
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.results-count {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* LOADING STATE */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    color: var(--text-secondary);
}

.loader {
    position: relative;
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
}

.loader-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loader-ring:nth-child(2) {
    width: 80%;
    height: 80%;
    top: 10%;
    left: 10%;
    border-top-color: var(--reserved);
    animation-duration: 0.8s;
    animation-direction: reverse;
}

.loader-ring:nth-child(3) {
    width: 60%;
    height: 60%;
    top: 20%;
    left: 20%;
    border-top-color: var(--success);
    animation-duration: 0.6s;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* TABLE CONTROLS */
.table-controls {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 400px;
    min-width: 200px;
}

.search-box .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.search-box input {
    width: 100%;
    padding: 12px 40px 12px 44px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    color: var(--text);
    transition: all 0.2s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.clear-search {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-elevated);
    border: none;
    color: var(--text-muted);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.clear-search:hover {
    background: var(--border-light);
    color: var(--text);
}

.filter-pills {
    display: flex;
    gap: 6px;
    padding: 4px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.filter-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* TABLE CONTAINER */
.table-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.results-bar {
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-elevated);
}

.results-count {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* INVENTORY TABLE */
.inventory-table {
    width: 100%;
    border-collapse: collapse;
}

.inventory-table thead {
    background: var(--bg);
    position: sticky;
    top: 0;
    z-index: 10;
}

.inventory-table th {
    padding: 14px 16px;
    text-align: left;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.inventory-table th.sortable {
    cursor: pointer;
    user-select: none;
    transition: color 0.2s;
}

.inventory-table th.sortable:hover {
    color: var(--text);
}

.inventory-table th.sortable.active {
    color: var(--primary);
}

.sort-icon {
    display: inline-block;
    vertical-align: middle;
    margin-left: 4px;
    opacity: 0.4;
    transition: opacity 0.2s;
}

.inventory-table th.sortable:hover .sort-icon,
.inventory-table th.sortable.active .sort-icon {
    opacity: 1;
}

.inventory-table th.sortable.asc .sort-icon {
    transform: rotate(180deg);
}

.th-image { width: 70px; }
.th-name { min-width: 180px; }
.th-brand { min-width: 120px; }
.th-code { min-width: 100px; }
.th-category { min-width: 100px; }
.th-sizes { min-width: 140px; }
.th-status { width: 100px; }

.inventory-table tbody tr {
    cursor: pointer;
    transition: background 0.15s;
}

.inventory-table tbody tr:hover {
    background: var(--bg-elevated);
}

.inventory-table td {
    padding: 12px 16px;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.inventory-table tbody tr:last-child td {
    border-bottom: none;
}

/* Table Cells */
.table-image {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: var(--bg);
}

.table-name {
    font-weight: 500;
    color: var(--text);
}

.table-brand {
    color: var(--primary);
    font-weight: 500;
}

.table-code {
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    font-size: 0.8rem;
    color: var(--text-secondary);
    background: var(--bg);
    padding: 4px 8px;
    border-radius: 4px;
}

.table-category {
    color: var(--text-secondary);
}

.table-sizes {
    font-size: 0.8rem;
    color: var(--text-secondary);
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.table-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.table-status.available {
    background: var(--success-bg);
    color: var(--success);
}

.table-status.sold {
    background: var(--danger-bg);
    color: var(--danger);
}

.table-status.reserved {
    background: var(--reserved-bg);
    color: var(--reserved);
}

.table-status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

/* Highlighted text from search */
.highlight {
    background: rgba(99, 102, 241, 0.3);
    color: var(--text);
    padding: 1px 2px;
    border-radius: 2px;
}

.product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.meta-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: var(--bg);
    border-radius: 6px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.meta-tag svg {
    width: 12px;
    height: 12px;
    opacity: 0.6;
}

/* EMPTY STATE */
.no-products {
    padding: 20px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg);
    border-radius: var(--radius-md);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-secondary);
}

/* MODAL - PRODUCT DETAIL */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    overflow-y: auto;
    overflow-x: hidden;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
}

.modal-content {
    position: relative;
    background: var(--bg-card);
    margin: 0 auto;
    border-radius: var(--radius-xl);
    width: calc(100% - 32px);
    max-width: 720px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg), 0 0 60px rgba(99, 102, 241, 0.1);
    animation: modalIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

/* Vertically center the modal */
.modal {
    display: none;
    padding: 24px 16px;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 10;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: scale(1.05);
}

.modal-close svg {
    width: 18px;
    height: 18px;
}

.modal-product .modal-body {
    display: flex;
    flex-direction: column;
}

/* Modal Image Section */
.modal-images {
    position: relative;
    background: var(--bg);
    padding: 0;
}

.main-image {
    aspect-ratio: 16/10;
    overflow: hidden;
    background: var(--bg);
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.thumbnail-images {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.thumbnail-images::-webkit-scrollbar {
    height: 4px;
}

.thumbnail-images::-webkit-scrollbar-track {
    background: var(--bg);
}

.thumbnail-images::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 2px;
}

.thumbnail {
    width: 56px;
    height: 56px;
    min-width: 56px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    background: var(--bg);
    transition: all 0.2s;
}

.thumbnail:hover {
    border-color: var(--text-muted);
}

.thumbnail.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-light);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Modal Details Section */
.modal-details {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.modal-details-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.modal-details-header .status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: fit-content;
}

.modal-details-header .status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.modal-details-header h2 {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text);
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.detail-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: var(--bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.detail-icon {
    font-size: 1.1rem;
    line-height: 1;
    opacity: 0.8;
}

.detail-content {
    flex: 1;
    min-width: 0;
}

.detail-content .detail-label {
    display: block;
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.detail-content .detail-value {
    display: block;
    font-size: 0.85rem;
    color: var(--text);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.detail-notes {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    background: var(--bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.detail-notes .detail-content .detail-value {
    white-space: normal;
    line-height: 1.5;
}

/* STATUS BADGES */
.status-badge.status-available {
    background: var(--success-bg);
    color: var(--success);
}

.status-badge.status-sold {
    background: var(--danger-bg);
    color: var(--danger);
}

.status-badge.status-reserved {
    background: var(--reserved-bg);
    color: var(--reserved);
}

/* FOOTER */
.site-footer {
    padding: 32px 0;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ADMIN LINK */
.admin-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--bg-elevated);
    color: var(--text);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.admin-link:hover {
    background: var(--bg);
    border-color: var(--primary);
    color: var(--primary);
}

.admin-link svg {
    opacity: 0.7;
}

/* ========== RESPONSIVE - PUBLIC ========== */
@media (max-width: 1024px) {
    .th-sizes, .inventory-table td:nth-child(6) {
        display: none;
    }
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .table-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        max-width: none;
    }
    
    .filter-pills {
        justify-content: center;
    }
    
    .filter-pill {
        padding: 8px 12px;
        font-size: 0.75rem;
    }
    
    .th-category, .inventory-table td:nth-child(5),
    .th-brand, .inventory-table td:nth-child(3) {
        display: none;
    }
    
    .inventory-table th,
    .inventory-table td {
        padding: 10px 12px;
    }
    
    /* Modal Mobile */
    .modal {
        padding: 16px 12px;
    }
    
    .modal-content {
        width: 100%;
        max-width: none;
        border-radius: var(--radius-lg);
        max-height: calc(100vh - 32px);
        overflow-y: auto;
    }
    
    .main-image {
        aspect-ratio: 4/3;
    }
    
    .modal-details {
        padding: 20px;
        gap: 16px;
    }
    
    .modal-details-header h2 {
        font-size: 1.2rem;
    }
    
    .details-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .detail-card {
        padding: 12px;
        gap: 10px;
    }
    
    .detail-icon {
        font-size: 1rem;
    }
    
    .detail-content .detail-label {
        font-size: 0.6rem;
    }
    
    .detail-content .detail-value {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .hero-content h1 {
        font-size: 1.75rem;
    }
    
    .table-container {
        border-radius: var(--radius-md);
        margin: 0 -8px;
    }
    
    .inventory-table th,
    .inventory-table td {
        padding: 8px 10px;
        font-size: 0.8rem;
    }
    
    .table-image {
        width: 40px;
        height: 40px;
    }
    
    .th-code, .inventory-table td:nth-child(4) {
        display: none;
    }
    
    /* Modal Extra Small */
    .modal {
        padding: 8px;
    }
    
    .modal-content {
        border-radius: var(--radius-md);
        max-height: calc(100vh - 16px);
    }
    
    .modal-close {
        top: 8px;
        right: 8px;
        width: 32px;
        height: 32px;
    }
    
    .modal-close svg {
        width: 16px;
        height: 16px;
    }
    
    .main-image {
        aspect-ratio: 1;
    }
    
    .thumbnail-images {
        padding: 10px 12px;
    }
    
    .thumbnail {
        width: 48px;
        height: 48px;
        min-width: 48px;
    }
    
    .modal-details {
        padding: 16px;
        gap: 14px;
    }
    
    .modal-details-header h2 {
        font-size: 1.1rem;
    }
    
    .details-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .detail-card,
    .detail-notes {
        padding: 10px 12px;
        gap: 10px;
    }
}

/* AUTH / LOGIN */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, var(--bg) 0%, #1e1b4b 100%);
}

.login-box {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    border: 1px solid var(--border);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
    text-align: center;
}

.login-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.login-box h2 {
    text-align: center;
    margin-bottom: 8px;
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 24px;
}

.login-box .form-group {
    text-align: left;
}

.login-box .btn-full {
    width: 100%;
    padding: 12px;
    font-size: 0.95rem;
    margin-top: 8px;
}

.login-error {
    display: none;
    color: var(--danger);
    font-size: 0.85rem;
    text-align: center;
    margin-top: 16px;
    padding: 12px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 8px;
}

.back-link {
    display: inline-block;
    text-align: center;
    margin-top: 20px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.15s;
}

.back-link:hover {
    color: var(--primary);
}

/* ADMIN LAYOUT */
.admin-dashboard {
    min-height: 100vh;
    background: var(--bg);
}

.admin-header {
    background: linear-gradient(135deg, var(--bg-card) 0%, #1e1b4b 100%);
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.admin-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-icon {
    font-size: 1.5rem;
}

.admin-header h1 {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    padding: 8px;
    border-radius: 6px;
}

.btn-ghost:hover {
    background: var(--bg-elevated);
    color: var(--text);
}

.admin-main {
    padding-top: 24px;
    padding-bottom: 40px;
}

/* ADMIN STATS */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-card);
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.stat-icon {
    font-size: 2.5rem;
    line-height: 1;
}

.stat-content h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.stat-content p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.stat-card.stat-total {
    border-color: rgba(99, 102, 241, 0.3);
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(99, 102, 241, 0.1) 100%);
}

.stat-card.stat-total h3 {
    color: var(--primary);
}

.stat-card.stat-available {
    border-color: rgba(34, 197, 94, 0.3);
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(34, 197, 94, 0.1) 100%);
}

.stat-card.stat-available h3 {
    color: var(--success);
}

.stat-card.stat-taken {
    border-color: rgba(234, 179, 8, 0.3);
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(234, 179, 8, 0.1) 100%);
}

.stat-card.stat-taken h3 {
    color: var(--warning);
}

/* ADMIN PRODUCTS TABLE */
.admin-products {
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border);
    margin-bottom: 40px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.admin-products-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-elevated);
}

.admin-products-header h2 {
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-table-wrapper {
    overflow-x: auto;
}

.products-table {
    width: 100%;
    border-collapse: collapse;
}

.products-table th {
    background: var(--bg);
    padding: 12px 16px;
    text-align: left;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.products-table td {
    padding: 14px 16px;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.products-table tr:last-child td {
    border-bottom: none;
}

.products-table tr:hover {
    background: var(--bg-elevated);
}

.products-table code,
.code-badge {
    background: rgba(99, 102, 241, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-family: 'SF Mono', Monaco, monospace;
    color: var(--primary);
}

.text-muted {
    color: var(--text-muted);
}

.product-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    background: var(--bg);
    border: 1px solid var(--border);
}

.empty-state {
    text-align: center;
    padding: 60px 20px !important;
}

.empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.empty-state span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
}

.status-badge.status-available {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

.status-badge.status-sold {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.status-badge.status-reserved {
    background: rgba(234, 179, 8, 0.15);
    color: var(--warning);
}

.status-badge.status-taken {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.actions-cell {
    white-space: nowrap;
}

.btn-icon {
    padding: 8px;
    border-radius: 6px;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text-muted);
    transition: all 0.15s;
}

.btn-icon:hover {
    background: var(--bg-elevated);
    color: var(--text);
}

.btn-icon.btn-edit:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-icon.btn-danger {
    background: var(--bg);
    color: var(--text-muted);
}

.btn-icon.btn-danger:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--danger);
    color: var(--danger);
}

/* ADMIN MODAL */
.admin-modal .modal-content {
    max-width: 640px;
}

.admin-modal .modal-content.modal-form {
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.admin-modal .modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.admin-modal .modal-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-title-icon {
    font-size: 1.5rem;
}

.admin-modal .modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.admin-modal .modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    background: var(--bg-elevated);
    flex-shrink: 0;
}

.form-section {
    margin-bottom: 24px;
}

.form-section:last-child {
    margin-bottom: 0;
}

.section-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

/* Upload Zone */
.upload-zone {
    position: relative;
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 32px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg);
}

.upload-zone:hover,
.upload-zone.drag-over {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.upload-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.upload-content {
    pointer-events: none;
}

.upload-icon {
    color: var(--text-muted);
    margin-bottom: 12px;
}

.upload-zone:hover .upload-icon,
.upload-zone.drag-over .upload-icon {
    color: var(--primary);
}

.upload-text {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 4px;
}

.upload-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Image Previews */
.image-previews {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}

.preview-item {
    position: relative;
    width: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.preview-item .preview-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid var(--border);
}

.preview-item.existing .preview-thumb {
    border-color: var(--primary);
}

.preview-name {
    font-size: 0.7rem;
    color: var(--text-muted);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.preview-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--primary);
    color: white;
    font-size: 0.6rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-grid .form-group {
    margin-bottom: 0;
}

.required {
    color: var(--danger);
}

/* FORMS */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-group select {
    cursor: pointer;
    appearance: none;
    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='%239ca3af' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

.file-input {
    padding: 10px;
    background: var(--bg);
    cursor: pointer;
}

.file-input::-webkit-file-upload-button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 10px;
    font-size: 0.8rem;
}

.selected-images {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.file-count {
    font-size: 0.8rem;
    color: var(--text-secondary);
    width: 100%;
    margin-bottom: 6px;
}

.preview-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--border);
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.form-message {
    display: none;
    text-align: center;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    font-weight: 500;
}

.form-message.success {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

.form-message.error {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* BUTTONS */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn svg {
    flex-shrink: 0;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-secondary {
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-elevated);
    border-color: var(--text-muted);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-edit {
    background: var(--bg-elevated);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 6px 12px;
    font-size: 0.8rem;
    margin-right: 6px;
}

.btn-edit:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* MODAL LARGE */
.modal-large {
    max-width: 640px;
}

.modal-large .modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .modal-grid {
        grid-template-columns: 1fr;
    }
    
    .product-info {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .product-card {
        grid-template-columns: 50px 1fr 80px;
        gap: 12px;
        padding: 12px;
    }
    
    .product-images {
        width: 50px;
        height: 50px;
    }
    
    .product-info {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .admin-stats {
        grid-template-columns: 1fr;
    }
    
    .form-row,
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column-reverse;
    }
    
    .form-actions .btn {
        width: 100%;
    }
    
    .admin-modal .modal-content {
        margin: 10px;
        max-height: calc(100vh - 20px);
    }
    
    .admin-modal .modal-body {
        padding: 16px;
    }
    
    .admin-modal .modal-header,
    .admin-modal .modal-footer {
        padding: 16px;
    }
    
    .upload-zone {
        padding: 24px 16px;
    }
    
    .admin-header .container {
        flex-direction: column;
        gap: 12px;
    }
    
    .admin-brand {
        width: 100%;
        justify-content: center;
    }
    
    .header-actions {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .preview-item {
        width: 60px;
    }
    
    .preview-item .preview-thumb {
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 480px) {
    .product-card {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .product-images {
        width: 100%;
        height: 140px;
    }
    
    .product-info {
        grid-template-columns: 1fr 1fr;
    }
    
    .product-status {
        justify-self: start;
    }
    
    .filters {
        width: 100%;
    }
    
    .admin-link {
        margin-left: 0;
    }
    
    .header-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .header-actions .btn {
        width: 100%;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .stat-icon {
        font-size: 2rem;
    }
    
    .stat-content h3 {
        font-size: 1.75rem;
    }
    
    .products-table th:nth-child(3),
    .products-table td:nth-child(3),
    .products-table th:nth-child(5),
    .products-table td:nth-child(5),
    .products-table th:nth-child(6),
    .products-table td:nth-child(6) {
        display: none;
    }
}
