* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2196f3;
    --secondary-color: #ff9800;
    --success-color: #4caf50;
    --danger-color: #f44336;
    --dark-color: #333;
    --light-color: #f4f4f4;
    --border-radius: 8px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #f5f5f5;
    color: var(--dark-color);
    line-height: 1.6;
}

#app {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

.app-header {
    background: var(--primary-color);
    color: white;
    padding: 1rem;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.app-header h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.user-info {
    font-size: 0.9rem;
    opacity: 0.9;
}

#main-content {
    flex: 1;
    padding: 1rem;
    padding-bottom: 70px;
    overflow-y: auto;
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    display: flex;
    justify-content: space-around;
    padding: 0.5rem;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    max-width: 600px;
    margin: 0 auto;
    z-index: 100;
}

.nav-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 0.5rem;
    font-size: 0.9rem;
    color: #666;
    transition: all 0.3s;
}

.nav-btn.active {
    color: var(--primary-color);
}

.nav-btn span {
    display: block;
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

/* Стили для карточек заданий */
.task-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.task-brand {
    font-weight: bold;
    color: var(--primary-color);
}

.task-status {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

.status-pending {
    background: #ff9800;
    color: white;
}

.status-in_progress {
    background: #2196f3;
    color: white;
}

.status-completed {
    background: #4caf50;
    color: white;
}

/* Кнопки */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    cursor: pointer;
    width: 100%;
    margin: 0.5rem 0;
    transition: background 0.3s;
}

.btn:hover {
    background: #1976d2;
}

.btn-secondary {
    background: var(--secondary-color);
}

.btn-danger {
    background: var(--danger-color);
}

.btn-success {
    background: var(--success-color);
}

/* Стили для сканера */
.scanner-container {
    width: 100%;
    min-height: 300px;
    background: #000;
    border-radius: var(--border-radius);
    overflow: hidden;
    margin: 1rem 0;
}

#reader {
    width: 100% !important;
}

.barcode-input {
    width: 100%;
    padding: 1rem;
    font-size: 1.2rem;
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    margin: 1rem 0;
}

/* Таблицы товаров */
.products-list {
    list-style: none;
}

.product-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

.product-info {
    flex: 1;
}

.product-sku {
    font-weight: bold;
    color: var(--primary-color);
}

.product-quantity {
    color: var(--secondary-color);
    font-size: 1.2rem;
    font-weight: bold;
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.modal-content {
    background: white;
    margin: 15% auto;
    padding: 20px;
    border-radius: var(--border-radius);
    max-width: 500px;
    position: relative;
}

.close {
    position: absolute;
    right: 20px;
    top: 10px;
    font-size: 28px;
    cursor: pointer;
}

/* Индикатор офлайн-режима */
.offline-indicator {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--danger-color);
    color: white;
    text-align: center;
    padding: 0.5rem;
    z-index: 1000;
}

/* Адаптивность */
@media (max-width: 768px) {
    .app-header h1 {
        font-size: 1.2rem;
    }
    
    .btn {
        padding: 1rem;
        font-size: 1.1rem;
    }
    
    .product-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .product-quantity {
        margin-top: 0.5rem;
    }
}