/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #2a2826;
    --bg-secondary: #353230;
    --bg-tertiary: #403c39;
    --text-primary: #eae7e0;
    --text-secondary: #c8c4bc;
    --text-muted: #9a958d;
    --accent-primary: #d4a373;
    --accent-secondary: #b08559;
    --border-color: #454240;
    --danger: #dc2626;
    --success: #059669;
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--accent-secondary);
}

a:focus {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}


.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
}

/* Header and Navigation */
header {
    background-color: var(--bg-secondary);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.logo img {
    height: 40px;
    width: auto;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.2s ease;
}

.mobile-menu-btn:hover {
    color: var(--accent-primary);
}

.nav-container {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex: 1;
    justify-content: space-between;
    margin-left: 2rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links a i {
    font-size: 1rem;
}

.nav-links a:hover {
    color: var(--accent-primary);
}

/* User Menu Styles */
.user-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.username {
    color: var(--text-secondary);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.username i {
    font-size: 1rem;
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.settings-link,
.logout-btn {
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.settings-link {
    color: var(--text-secondary);
}

.settings-link:hover {
    background: var(--bg-tertiary);
    color: var(--accent-primary);
}

.logout-btn {
    color: var(--danger);
}

.logout-btn:hover {
    background: rgba(220, 38, 38, 0.1);
}

/* Mobile Styles */
@media (max-width: 768px) {
    .main-nav {
        padding: 1rem;
    }

    .mobile-menu-btn {
        display: block;
    }

    .nav-container {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        padding: 1rem;
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        margin-left: 0;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
        display: none;
    }

    .nav-container.active {
        display: flex;
    }

    .nav-links {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links a {
        padding: 0.5rem;
    }

    .user-menu {
        flex-direction: column;
        gap: 1rem;
    }

    .user-actions {
        flex-direction: column;
        width: 100%;
    }

    .settings-link,
    .logout-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-secondary);
}

input[type="text"],
select,
textarea {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
}

input[type="text"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(212, 163, 115, 0.2);
}

/* Photo Upload Styles */
.photo-upload-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.camera-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    padding: 1.25rem;
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.camera-btn:hover {
    border-color: var(--accent-primary);
    background: var(--bg-tertiary);
    color: var(--accent-primary);
    transform: translateY(-1px);
}

.camera-icon {
    font-size: 1.5rem;
}

.photo-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem;
    min-height: 100px;
    border-radius: 8px;
    background: var(--bg-tertiary);
}

.photo-thumb {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

.photo-thumb:hover {
    transform: scale(1.02);
}

.photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-photo {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 50%;
    background: rgba(220, 38, 38, 0.9);
    color: white;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0.5;
    transition: all 0.2s ease;
}

.photo-thumb:hover .remove-photo {
    opacity: 1;
}

.remove-photo:hover {
    background: var(--danger);
    transform: scale(1.1);
}

/* Button Styles */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--accent-primary);
    color: var(--bg-primary);
}

.btn-primary:hover {
    background: var(--accent-secondary);
    transform: translateY(-1px);
}


.photo-thumb {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 4px;
    overflow: hidden;
    border: 2px solid transparent;
}

.photo-thumb.uploading {
    border-color: #ff9800;
    position: relative;
}

.photo-thumb.uploading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.5);
    z-index: 1;
}

.photo-thumb.uploading {
    animation: uploadingBorder 1.5s infinite;
}

@keyframes uploadingBorder {
    0% { border-color: #ff9800; }
    50% { border-color: #f44336; }
    100% { border-color: #ff9800; }
}

.photo-thumb.uploaded {
    border-color: #4CAF50;
}

.photo-thumb.upload-failed {
    border-color: #f44336;
}

.photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-photo {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    background: rgba(255,255,255,0.8);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #ff4444;
}

.remove-photo:hover {
    background: rgba(255,255,255,1);
}


.product-list-container {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.filters {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.search-box {
    flex: 1;
}

.search-box input {
    width: 100%;
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(212, 163, 115, 0.2);
}

.filter-group {
    display: flex;
    gap: 10px;
}

.filter-group select {
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
}

.table-responsive {
    overflow-x: auto;
}

.products-table {
    width: 100%;
    border-collapse: collapse;
}

.products-table th,
.products-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.products-table th {
    background: var(--bg-tertiary);
    font-weight: 500;
    color: var(--text-secondary);
}

.products-table tr {
    transition: background-color 0.2s ease;
}

.products-table tr:hover {
    background: var(--bg-tertiary);
}

.product-photo {
    width: 60px;
}

.product-photo img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}

.no-photo {
    width: 50px;
    height: 50px;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--text-muted);
    border-radius: 4px;
}

.actions {
    white-space: nowrap;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 14px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-edit {
    background: var(--success);
    color: white;
    margin-right: 8px;
}

.btn-edit:hover {
    background: #047857;
    transform: translateY(-1px);
}

.btn-delete {
    background: var(--danger);
    color: white;
}

.btn-delete:hover {
    background: #b91c1c;
    transform: translateY(-1px);
}

.fas {
    font-size: 12px;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 20px;
    flex-wrap: wrap;
    padding: 0 10px;
}

.page-link {
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
}

.page-link:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.page-link.active {
    background: var(--accent-primary);
    color: var(--bg-primary);
    border-color: var(--accent-primary);
}


.recording-item.uploading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.recording-item.uploading::after {
    content: 'Uploading...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.875rem;
}

.recording-item.upload-error {
    border: 1px solid #ef4444;
    background: #fef2f2;
}


@media (max-width: 768px) {
    .products-table th:nth-child(3),
    .products-table th:nth-child(4),
    .products-table th:nth-child(5),
    .products-table td:nth-child(3),
    .products-table td:nth-child(4),
    .products-table td:nth-child(5) {
        display: none;
    }

    .products-table {
        font-size: 14px;
    }

    .products-table th,
    .products-table td {
        padding: 8px;
    }

    .btn-sm {
        padding: 4px 8px;
        font-size: 12px;
    }

    .product-photo {
        width: 40px;
    }

    .product-photo img,
    .no-photo {
        width: 35px;
        height: 35px;
    }
}

/* Media Queries */
@media (max-width: 768px) {
    .main-nav {
        flex-direction: row;
        gap: 1rem;
    }
    
    .nav-links {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
}

/* Footer Styles */
footer {
    text-align: center;
    padding: 2rem;
    background-color: var(--bg-secondary);
    margin-top: auto;
}

