/* =============================================================================
   LINE.CSS - Раздел «Линия» (фасовка, позже упаковка)
   Mobile-first; стиль консистентен с cooker.css / base.css.
   ============================================================================= */

/* ===== Page shell ===== */

.line-page {
    padding: 0;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #f5f7fa;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #1a202c;
}

.line-content {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    -webkit-overflow-scrolling: touch;
}

.line-empty,
.line-muted {
    color: #94a3b8;
    font-size: 0.9rem;
}

.line-empty {
    text-align: center;
    padding: 48px 20px;
    font-weight: 600;
    font-size: 1.05rem;
}

.line-muted {
    padding: 8px 2px;
}

.line-section-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    margin: 14px 0 6px;
}

.line-field-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 4px;
}

.line-art {
    color: #2563eb;
    font-weight: 600;
}

/* ===== Orders list ===== */

.line-orders-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.line-order-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 14px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.line-order-card:active {
    background: #f1f5f9;
    transform: scale(0.99);
}

.line-order-main {
    min-width: 0;
}

.line-order-product {
    font-size: 0.98rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.3;
}

.line-order-meta {
    font-size: 0.78rem;
    color: #64748b;
    margin-top: 4px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.line-order-session {
    font-size: 1.3rem;
    flex-shrink: 0;
}

/* ===== Order screen — header ===== */

.line-order-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 2px 0 12px;
    border-bottom: 1px solid #e2e8f0;
}

.line-back-btn {
    padding: 10px 14px;
    font-size: 0.9rem;
    font-weight: 500;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    color: #475569;
    cursor: pointer;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}

.line-back-btn:active {
    background: #e2e8f0;
}

.line-order-title {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.line-order-title strong {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
}

.line-order-title span {
    font-size: 0.82rem;
    color: #64748b;
}

/* ===== Session section ===== */

.line-session-section {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px;
    margin-top: 12px;
}

.line-session-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 10px;
}

.line-session-status {
    font-size: 1rem;
    font-weight: 700;
}

.line-session-status.active { color: #2563eb; }
.line-session-status.completed { color: #16a34a; }

.line-session-meta {
    font-size: 0.8rem;
    color: #64748b;
}

/* ===== Buttons (touch-friendly) ===== */

.line-btn {
    width: 100%;
    padding: 16px;
    font-size: 1.1rem;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: white;
    -webkit-tap-highlight-color: transparent;
}

.line-btn:active { transform: scale(0.99); }

.line-btn-start { background: #2563eb; }
.line-btn-finish { background: #dc2626; }
.line-btn-resume { background: #64748b; }

/* ===== Scan section ===== */

.line-scan-section {
    margin-top: 12px;
}

.line-barcode-input {
    width: 100%;
    padding: 16px;
    font-size: 1.15rem;
    border: 2px solid #2563eb;
    border-radius: 8px;
    outline: none;
    -webkit-appearance: none;
}

.line-barcode-input:focus {
    border-color: #1d4ed8;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}

/* ===== Materials list (план заказа) ===== */

.line-materials-list,
.line-scans-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.line-material-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}

.line-material-row.done {
    border-color: #86efac;
    background: #f0fdf4;
}

.line-material-name {
    font-size: 0.9rem;
    color: #1e293b;
    min-width: 0;
}

.line-material-qty {
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ===== Scans list (передано на линию) ===== */

.line-scan-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    border-left-width: 4px;
}

.line-scan-item.line-scan-ok { border-left-color: #16a34a; }
.line-scan-item.line-scan-warning { border-left-color: #f59e0b; }
.line-scan-item.line-scan-error { border-left-color: #dc2626; }

.line-scan-main { min-width: 0; }

.line-scan-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e293b;
}

.line-scan-meta {
    font-size: 0.78rem;
    color: #64748b;
    margin-top: 2px;
}

.line-scan-del {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #dc2626;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.line-scan-del:active { background: #fee2e2; }

/* ===== Amount modal ===== */

.line-amount-material {
    font-size: 1rem;
    text-align: center;
    color: #1e293b;
    line-height: 1.4;
}

/* ===== Wide screens (планшет / POS-терминал) ===== */

@media (min-width: 768px) {
    .line-content {
        max-width: 720px;
        margin: 0 auto;
        width: 100%;
    }
}
